Method for accelerating the generation of prime numbers in an electronic device

By pre-storing encrypted prime numbers within executable files, the method addresses the inefficiency of real-time generation in embedded devices, ensuring secure operations are accelerated without compromising security.

JP2026501332APending Publication Date: 2026-01-14SK HYNIX NAND PRODUCT SOLUTIONS CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025537016
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-12-21
Filing Date
2023-12-18
Publication Date
2026-01-14

AI Technical Summary

Technical Problem

Generating prime numbers for secure operations in electronic devices, especially embedded devices with limited computational resources, is time-consuming and slows down secure operations.

Method used

Pre-generate prime numbers in advance and store them in an encrypted format within executable files, ensuring each prime number can only be decrypted by its corresponding executable file, thereby avoiding the need for real-time generation during secure operations.

Benefits of technology

This approach reduces the computational burden on embedded devices by allowing immediate use of pre-generated prime numbers, masking the delay in generation and enhancing the efficiency of secure operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026501332000001_ABST
    Figure 2026501332000001_ABST
Patent Text Reader

Abstract

This application relates to generating prime numbers in an electronic device. The electronic device has a first executable file and a second executable file, each executable file having a unique identifier. The electronic device generates a wrapping key for the first executable file and encrypts a prime number with the wrapping key of the first executable file to generate an encrypted prime number. The encrypted prime number is stored locally in the memory of the electronic device and can only be decrypted by the first executable file and cannot be decrypted by the second executable file. In some embodiments, the first executable file extracts the encrypted prime number from the memory of the electronic device, obtains the wrapping key of the first executable file, and decrypts the encrypted prime number based on the wrapping key. In one example, the second executable file, followed by the first executable file, generates the wrapping key based on the unique identifier of the second executable file.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application is a continuation of and claims priority to U.S. patent application Ser. No. 18 / 086,482, filed Dec. 21, 2022, entitled "Methods for Accelerating Prime Number Generation in Electronic Devices," the entire contents of which are incorporated herein by reference.

[0002] This application relates generally to cryptography, including, but not limited to, methods, systems, and non-transitory computer-readable media for providing prime numbers for use in secure operations. [Background technology]

[0003] Electronic devices can function and interact with each other in a secure manner based on different types of secure operations. Sensitive data is typically transmitted between electronic devices in encrypted format. Before any sensitive data is transmitted, the associated electronic device, software application, or user account is authenticated. To strengthen different secure operations, authentication and encryption algorithms have been developed, and keys based on prime numbers are generated and applied to many of these authentication and encryption algorithms. Prime numbers applied to these secure operations have extended lengths (e.g., 2048 bits or more), and the generation of prime numbers can take a long time, especially in embedded devices with limited computational resources, slowing down secure operations and / or general operations. It would be beneficial to accelerate the generation of prime numbers for the purpose of more efficiently performing secure operations in different electronic devices, including embedded devices. Summary of the Invention

[0004] Various embodiments of the present application relate to methods, systems, devices, and non-transitory computer-readable media for providing prime numbers that are applied to different secure operations (e.g., attestation, authentication, certification, and encryption). Prime numbers do not need to be generated as needed during each secure operation. Rather, each prime number is prepared in advance and stored in an encrypted format for a corresponding executable file on the electronic device. The executable file then extracts and decrypts the encrypted prime number when needed, thereby recovering the corresponding prime number that can be applied to creating a cryptographic key for a subsequent secure operation. For each executable file, its corresponding prime number can only be decrypted by that executable file and cannot be decrypted by any other executable file. By these means, each prime number does not need to be generated as needed and can be used for that executable file (and cannot be used for any other executable file different from that executable file) without compromising the security level of the prime number.

[0005] In one aspect, a method for providing a prime number is implemented in an electronic device having a first executable file and a second executable file. Each executable file has a unique identifier within the electronic device. The method includes generating a wrapping key for the first executable file and encrypting the prime number generated by the electronic device with the wrapping key of the first executable file to generate an encrypted prime number. The method further includes storing the encrypted prime number locally in memory of the electronic device. The encrypted prime number can be decrypted only by the first executable file and cannot be decrypted by the second executable file. In some embodiments, the method further includes extracting the encrypted prime number from the memory of the electronic device, obtaining the wrapping key for the first executable file, and decrypting the encrypted prime number based on the wrapping key.

[0006] In some embodiments, the first executable file immediately follows the second executable file, and the wrapping key for the first executable file is generated by the second executable file based on a second identifier of the second executable file. Each executable file is identified by a corresponding component identifier that includes a digest of the corresponding executable file's configuration information. Furthermore, in some embodiments, the method further includes determining the second identifier of the second executable file based on a corresponding component identifier of at least one executable file directly connected to the second executable file. Alternatively, in some embodiments, the method further includes determining the second identifier of the second executable file based on a second component identifier of the second executable file, independently of any other executable file different from the second executable file.

[0007] In another aspect, a method for secure operation in an electronic device having a first executable file and a second executable file is implemented. Each executable file has a unique identifier within the electronic device. The method includes extracting an encryption prime number from memory of the electronic device and generating a wrapping key for the first executable file. The method further includes decrypting, by the first executable file, the encryption prime number with the wrapping key of the first executable file to retrieve the prime number. The encryption prime number can be decrypted only by the first executable file and cannot be decrypted by the second executable file. The method further includes generating, by the first executable file, an encryption key based on the prime number.

[0008] In another aspect, some embodiments include an electronic device including one or more processors and a memory storing instructions that, when executed by the one or more processors, cause the processors to perform any of the methods described above.

[0009] In yet another aspect, some embodiments include a non-transitory computer-readable medium having stored thereon instructions that, when executed by one or more processors, cause the processors to perform any of the methods described above.

[0010] These exemplary embodiments and implementations are mentioned not to limit or define the disclosure, but to provide examples and aid in understanding the disclosure. Additional embodiments are described in the Detailed Description and further description is provided therein.

[0011] For a better understanding of the various described embodiments, reference should be made to the following detailed description in conjunction with the following drawings, in which like reference characters refer to corresponding parts throughout. [Brief explanation of the drawings]

[0012] [Figure 1] FIG. 1 is a block diagram of an exemplary electronic device, according to some embodiments. [Figure 2] FIG. 1 is a block diagram of an exemplary electronic device having multiple executables that use prime numbers in secure operation, according to some embodiments. [Figure 3] FIG. 1 is a flow diagram of a process for generating, storing, and retrieving prime numbers for secure operations in executable files, according to some embodiments. [Figure 4] FIG. 10 is a block diagram of another exemplary electronic device having multiple executable files that prepare prime numbers in an encrypted format, according to some embodiments. [Figure 5] FIG. 1 is a block diagram of an electronic device that encrypts prime numbers of executable files in a set of consecutive executable files, according to some embodiments. [Figure 6] FIG. 1 is a flow diagram of a process for encrypting prime numbers of executable files in a set of consecutive executable files, according to some embodiments. [Figure 7] FIG. 1 is a block diagram of an exemplary electronic device having multiple executable files, each with a unique identifier, according to some embodiments. [Figure 8A] FIG. 10 is a flow diagram of a process for encrypting a first prime number of a first executable file that immediately follows a second executable file that follows an engine component, according to some embodiments. [Figure 8B] FIG. 10 is a flow diagram of a process for encrypting a first prime number of a first executable file that immediately follows an engine component, according to some embodiments. [Figure 9A] 1 illustrates a flow diagram of a device attestation process performed by an executable file based on pre-stored prime numbers, according to some embodiments. [Figure 9B]1 illustrates a flow diagram of a device attestation process performed by an executable file based on pre-stored prime numbers, according to some embodiments. [Figure 9C] 1 illustrates a flow diagram of a device attestation process performed by an executable file based on pre-stored prime numbers, according to some embodiments. [Figure 10A] FIG. 1 is a flow diagram of a method for providing prime numbers, according to some embodiments. [Figure 10B] FIG. 1 is a flow diagram of a method for implementing secure operations based on prime numbers, according to some embodiments.

[0013] Like reference characters refer to corresponding parts throughout the several views of the drawings. DETAILED DESCRIPTION OF THE INVENTION

[0014] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. To facilitate an understanding of the subject matter described herein, the following detailed description sets forth numerous non-limiting specific details. However, it will be apparent to those skilled in the art that various alternatives may be employed and the subject matter may be practiced without these specific details without departing from the scope of the claims. For example, it will be apparent to those skilled in the art that the subject matter described herein may be implemented in many types of electronic devices having digital video capabilities.

[0015] FIG. 1 is a block diagram of an exemplary electronic device 100, according to some embodiments. The electronic device 100 has multiple programmable components organized into multiple executable files 104 (also called binaries) in a tree structure. Each executable file is a binary file output by compilation and includes machine code that runs on the electronic device 100. One or more executable files 104 are coupled to basic hardware modules 102 to perform functions. Each executable file 104 includes one or more corresponding components, and each programmable component includes hardware, firmware, software, configuration, or a combination thereof. For example, in some embodiments, an operating system (OS) 106 includes a basic hardware module 102A and four additional executable files 104A, 104B, 104C, and 104D. The basic hardware module 102A of the OS 106 includes processor boot read-only memory (ROM). Each of the four additional executables 104A-104D of the OS 106 includes a corresponding software component, i.e., a boot loader, a high-level operating system (HLOS), a container runtime (also referred to as a container engine), or a container. In some embodiments, the functional system 110 includes only a single executable 102E with a hardware module 102B and, optionally, one or more components. For simplicity, the labels for the hardware module 102B and the executable 104 are selectively applied to a subset (but not all) of the hardware modules and executables.

[0016] In some embodiments, electronic device 100 includes an embedded device with limited resources, particularly computational resources. Examples of embedded devices include, but are not limited to, storage devices, Internet of Things (IoT) devices, autonomous vehicles, and surveillance cameras. The embedded device is configured to generate one or more prime numbers to facilitate security capabilities, including device attestation and data encryption. Even when hardware acceleration is utilized, generating prime numbers requires significant computational resources, e.g., greater than a threshold number of floating point operations per second (FLOPS). In some embodiments, the embedded device is coupled to a high-speed serial computer expansion bus and configured to communicate data over the bus according to the Peripheral Component Interconnect Express (PCIe) protocol. Data is encrypted using one or more prime numbers generated by the embedded device, and the encrypted data is communicated over the bus.

[0017] In some embodiments, electronic device 100 does not generate prime numbers as needed immediately prior to or during secure operations that rely on prime numbers (e.g., device attestation, software attestation, and data encryption). Instead, prime numbers are generated in advance (e.g., during the boot phase) and stored in an encrypted format, and electronic device 100 extracts the prime numbers from its memory in real time during secure operation. This is important for embedded devices with limited computational resources. In this way, the embedded device can directly extract, decrypt, and use pre-generated and stored prime numbers during secure operation, without having to conserve its limited computational resources or preserve secure operation for real-time prime number generation.

[0018] In some embodiments, for each executable file 104 on the electronic device 100, one or more corresponding prime numbers are generated locally and stored in encrypted format in association with the corresponding executable file 104. The electronic device 100 is configured to generate the one or more corresponding prime numbers in hardware, firmware, or a combination thereof. In some embodiments, the prime numbers for different executable files 104 are generated in a central prime number generator on the electronic device 100. Alternatively, in some embodiments, the prime numbers for each executable file 104 are generated in a prime number generator local to the corresponding executable file 104. In particular, for each executable file 104, the one or more corresponding prime numbers can only be decrypted by the corresponding executable file 104 and cannot be decrypted by any other executable files on the electronic device 100, thereby minimizing the possibility of attacks or tampering during the search for the corresponding encrypted prime numbers.

[0019] Electronic device 100 optionally has a single processor core or multiple processor cores. In some embodiments, electronic device 100 implements a multi-threaded process in which the single processor core or multi-core processor of electronic device 100 provides multiple threads of execution simultaneously. Furthermore, in some embodiments, each execution thread of the subset of execution threads includes one or more secure operations of one or more executable files. For each secure operation performed in a corresponding executable file 104, one or more prime numbers are prepared in advance (i.e., prior to the corresponding secure operation) and extracted as needed for use in the secure operation.

[0020] 2 is a block diagram of an exemplary electronic device 100 having multiple executable files 104-0, 104-1, and 104-N that use a prime number 202 in secure operation, according to some embodiments. The multiple executable files 104-0, 104-1, and 104-N form an ordered array of executable files 104, where N is an integer. If N is equal to or greater than 2, the array of executable files 104 includes N+1 executable files coupled in series. For clarity, the multiple executable files include a starting executable file 104-0, a first executable file, ..., an Nth executable file 104-N. If N is equal to 1, the array of executable files 104 includes two executable files coupled together. If N is equal to 0, the array of executable files 104 includes a single executable file (e.g., in function system 110 in FIG. 1). In some embodiments, at least a subset (fewer than all) of the plurality of executable files 104-0, 104-1, and 104-N are configured to perform the corresponding secure operation based on the corresponding prime number 202. In some embodiments, all of the plurality of executable files 104-0, 104-1, and 104-N are configured to perform the corresponding secure operation based on the corresponding prime number 202.

[0021] For example, the first executable file 104-1 corresponds to one or more first prime numbers 202-1. The first executable file 104-1 generates a first encryption key 204-1 with the one or more first prime numbers 202-1 and performs a first secure operation (e.g., attestation, authentication, certification, or encryption) based on the first encryption key 204-1. In some circumstances, the first encryption key 204-1 includes an encryption key used to encrypt a first secret or data item to generate a first encrypted secret or data item 206-1. In some embodiments, the starting encryption key 204-0 of the starting executable file 104-0 includes a signature generated from the starting prime numbers 202-0 and used for attestation 206-0 of the electronic device 100, and the Nth encryption key 204-N includes a signature used for attestation 206-N of the software application associated with the Nth executable file 104-N. In some embodiments, the same executable file 104 (e.g., the first executable file 104-1) provides different prime numbers 202 to generate different encryption keys 204 that apply to different secure operations. Alternatively, in some embodiments, one of the multiple executable files 104 (e.g., the first executable file 104-1) provides the same prime number 202 to generate the same encryption key 204 that applies to at least two different secure operations.

[0022] In some embodiments, the initiating executable 104-0 initiates the sequence of executable files 104 and is coupled to an engine component 208 (e.g., a device identifier configuration engine (DICE)). The initiating executable 104-0 is followed by the first executable 104-1 and not any other executables. The engine component 208 has hardware and firmware capabilities to perform measurements of code and / or configuration data and generate a cryptographically unique value (i.e., a composite device identifier (CDI)). Specifically, in some embodiments, each executable in the sequence of executable files 104 interacts directly or indirectly with the engine component 208 to securely store a prime number in an encrypted format, thereby generating a unique identifier for that executable and creating a wrapping key based on the unique identifier.

[0023] 3 is a flow diagram of a process 300 for generating, storing, and retrieving prime numbers 202 for secure operation in an executable file 104, according to some embodiments. In some embodiments, the process 300 can be varied, for example, by rearranging, modifying, adding, and / or removing steps. In some embodiments, the process is performed when the electronic device 100 is powered on (step 302), for example, during the boot phase. When the electronic device 100 is powered on (step 302), the electronic device 100 determines whether a first prime number 202-1 is available to the first executable file 104-1 (step 304). In accordance with a determination that the first prime number 202-1 is not available to the first executable file 104-1, the electronic device 100 generates a first prime number 202-1 (as shown in FIG. 2) for the first executable file 104-1 (step 306), and the first executable file 104-1 encrypts the first prime number 202-1 and stores the first prime number 202-1 in a memory of the electronic device 100 (step 308). Meanwhile, in accordance with a determination that the first prime number 202-1 is available to the first executable file 104-1, the electronic device 100 executes the next executable file 104 (step 310), which may include, for example, determining whether a prime number is available to the next executable file 104 (step 304).

[0024] Thereafter, during secure operation associated with the first executable file 104-1, the first executable file 104-1 determines whether the first prime number 202-1 is required to perform the secure operation (step 312). Pursuant to a determination that the first prime number 202-1 is required, the first executable file 104-1 uses the previously generated first prime number 202-1, now stored in encrypted format (step 314). However, pursuant to a determination that the first prime number 202-1 is not required, the first executable file 104-1 continues to execute without loading the first prime number 202-1 (step 310), and the next executable file 104 executes after the first executable file 104-1.

[0025] In some embodiments, prime number 202 is generated in advance (e.g., during the boot phase) in this dedicated process 300, independent of any secure operations (e.g., attestation, authentication, certification, and encryption) that use prime number 202. Furthermore, in some embodiments, process 300 is performed in parallel with other tasks of electronic device 100 (including related secure operations). For example, the generation and storage of prime number 202 and the performance of secure operations are performed simultaneously until the time when prime number 202 is used. Alternatively, in some embodiments, electronic device 100 is capable of reusing a previously generated prime number 202 without performing two or more tasks in parallel. Process 300 is dedicated to prime number generation and is configured to prepare prime number 202 in advance so that prime number 202 can be directly used in subsequent secure operations. From a secure operation perspective, prime number 202 is provided as if it were generated locally as needed with a desired delay. By these means, process 300 effectively masks the extended delay associated with generating prime numbers (eg, reducing the delay in obtaining a prime number by 50% or more).

[0026] In some embodiments, process 300 is performed at least in part on a sequence of executable files 104 during a boot phase of electronic device 100. For example, during the boot phase, a first executable file 104-1 (FIG. 2) uses cryptographic data (e.g., a wrapping key for encrypting a first prime number 202-1) provided by initiating executable file 104-0 and presents cryptographic data (e.g., a wrapping key for encrypting the next prime number) to a next executable file 104 in the sequence of identical executable files 104.

[0027] FIG. 4 is a block diagram of another exemplary electronic device 100 having multiple executable files 104 (e.g., executable files 104-0, 104-1, and 104-N) that prepare prime numbers in an encrypted format, according to some embodiments. The multiple executable files 104 form an ordered array of executable files 104, where N is an integer. While FIG. 4 shows three executable files 104-0, 104-1, and 104-N, the array of executable files 104 optionally includes one, two, or more than two serially coupled executable files. The array of executable files 104 begins with an initiating executable file 104-0 that is directly coupled to an engine component 208 (e.g., a DICE). Each executable file 104 has a unique identifier within the electronic device 100. In some embodiments, the electronic device 100 generates a first wrapping key 402-1 for the first executable file 104-1. The first prime number 202-1 generated by the electronic device 100 is encrypted with the first wrapping key 402-1 of the first executable file 104-1, thereby generating an encrypted prime number 404-1, which is stored locally in the memory 406 of the electronic device 100.

[0028] In particular, the encryption prime number 404-1 can only be decrypted by the first executable file 104-1 and cannot be decrypted by any other executable file 104. In some embodiments, only the first executable file 104-1 knows the first wrapping key 402-1, thereby ensuring that the encryption prime number 404-1 can only be decrypted by the first executable file 104-1. In some embodiments, the encryption prime number 404-1 is stored in the memory 406 of the electronic device based on a memory address associated with the first executable file 104-1. The memory address is known only to the first executable file 104-1. In one example, the first executable file 104 includes first metadata 408-1, and the memory address associated with the first executable file 104 is determined based on the first metadata 408-1. The first metadata 408-1 is known only to the first executable file 104-1, thereby enabling the first executable file 104-1 (and not any other executable file 104) to retrieve the cryptographic prime number 404-1 stored at a memory address determined from the first metadata 408-1.

[0029] In some embodiments, prime number 202-1 is generated by a prime number generator 410A shared by two or more executable files 104 and locally encrypted by the first executable file 104-1. Alternatively, in some embodiments, the first executable file 104-1 includes a prime number generator 410B that locally generates first prime number 202-1 and locally encrypts first prime number 202-1 by the first executable file 104-1. In some embodiments, cryptographic functions (e.g., key derivation and related secure operations) are performed using first prime number 202-1 for the first executable file 104-1. Furthermore, in some embodiments, cryptographic functions for two or more executable files 104 are centralized and performed by a central cryptographic module. The central cryptographic module performs cryptographic functions using first prime number 202-1 for the first executable file 104-1. Alternatively, in some embodiments, each executable file 104 has a corresponding cryptographic module to perform cryptographic functions. The embedded cryptographic module of the first executable file 104 performs cryptographic functions locally using the first prime number 202-1.

[0030] In some embodiments, the first executable file 104-1 then performs secure operations using the first prime number 202-1. The first executable file 104-1 extracts the encrypted prime number 404-1 from the memory 406 of the electronic device 100, obtains the first wrapping key 402-1 for the first executable file 104-1, and decrypts the encrypted prime number 404-1 based on the first wrapping key 402-1. In some situations, the first wrapping key 402-1 is securely stored and used directly during the decryption of the prime number. Alternatively, in some situations, the first wrapping key 402-1 is generated on demand each time the first prime number 202-1 is encrypted and decrypted.

[0031] In some embodiments, the memory 406 in which the encryption prime number 404-1 is stored includes a volatile memory unit, and the encryption prime number 404-1 is stored in the volatile memory unit of the memory 406 of the electronic device 100. Examples of volatile memory units include, but are not limited to, dynamic random access memory (DRAM) and static random access memory (SRAM). Alternatively, in some embodiments, the memory 406 in which the encryption prime number 404-1 is stored includes a non-volatile memory unit, and the encryption prime number 404-1 is stored in the non-volatile memory unit of the memory 406 of the electronic device 100. For example, in some embodiments, in the non-volatile memory unit, data is stored in floating gate memory cells including floating gate metal oxide semiconductor field effect transistors (MOSFETs). The non-volatile memory unit may include flash memory storage, such as NAND flash or solid state drives (SSDs). Other examples of non-volatile memory units include read-only memory (ROM), erasable programmable ROM (EPROM) and electrically erasable programmable ROM (EEPROM), ferroelectric RAM, and other types of data storage devices (e.g., disk storage, hard disk drives, optical disks, floppy disks, and magnetic tape).

[0032] 5 is a block diagram of an electronic device 100 that encrypts prime numbers of executable files in a set of consecutive executable files 502, according to some embodiments. The set of consecutive executable files 502 includes three consecutive executable files 104 (FIG. 2), e.g., an (N+1)th executable file, an Nth executable file, and an (N-1)th executable file, where N is an integer equal to or greater than 1. For convenience, the (N+1)th executable file, the Nth executable file, and the (N+1)th executable file are also referred to as a first executable file 502A, a second executable file 502B, and a third executable file 502C. The first executable file 502A immediately follows the second executable file 502B, which immediately follows the third executable file 502C. Each of the first executable file 502A, the second executable file 502B, and the third executable file 502C provides a corresponding encryption prime number, such as the first encryption prime number 404A, the second encryption prime number 404B, or the third encryption prime number 404C. The encryption prime numbers 404A-404C are stored in the memory 406 of the electronic device 100.

[0033] The first executable file 502A encrypts the first prime number generated by the prime number generator 410 of the electronic device 100 with the first wrapping key 402A. In some embodiments, the first wrapping key 402A of the first executable file 502A is provided by the second executable file 502B that immediately follows the first executable file 502A. That is, the second executable file 502B generates the first wrapping key 402A for the first executable file 502A and provides the first wrapping key 402A to the first executable file 502A, which enables the first executable file 502A to encrypt the first prime number with the first wrapping key 402A of the first executable file 502A. Also, in some embodiments not shown, the second executable file 502B obtains a random number and generates a first wrapping key 402A for the first executable file 502A based on both the random number and a second identifier of the second executable file 502B.

[0034] In some embodiments, each executable file 502 of electronic device 100 is identified by a corresponding component identifier 504 that includes a digest (e.g., a hash) of the configuration information for the corresponding executable file 502. The configuration information includes one or more of the following information: firmware, settings, vendor name, product information, version, security version number (SVN), and instance identifier for the corresponding executable file. First executable file 502A, second executable file 502B, and third executable file 502C are identified by a first component identifier 504A, a second component identifier 504B, and a third component identifier 504C, respectively. In some situations, each of executable files 502A-502C provides a corresponding component identifier 504A-504C to a different executable file that immediately follows the corresponding executable file; for example, first executable file 502A provides its first component identifier 504A to second executable file 502B.

[0035] In some embodiments, the first wrapping key 402A for the first executable file 502A is generated by the second executable file 502B based on the second identifier of the second executable file 502B that immediately follows the first executable file 502A. Further, in some embodiments, the second identifier of the second executable file 502B is determined based on the second component identifier 504B of the second executable file 502B, independently of any other executable file different from the second executable file. Thus, the first wrapping key 402A for the first executable file 502A is generated by the second executable file 502B based on the second component identifier 504B of the second executable file 502B. In some embodiments, the second identifier of the second executable file 502B is determined based on the corresponding component identifier of at least one executable file directly connected to the second executable file 502B, i.e., based on the first component identifier 504A, the third component identifier 504C, or both. Thus, the first wrapping key 402A for the first executable file 502A is generated by the second executable file 502B based on the first component identifier 504A, the third component identifier 504C, or both. In one example, the first wrapping key 402A for the first executable file 502A is generated by the second executable file 502B based on at least the first component identifier 504A of the first executable file 502A.

[0036] In some embodiments, each executable file 502 on electronic device 100 is identified by a corresponding composite device identifier 506. First executable file 502A, second executable file 502B, and third executable file 502C are identified by a first composite device identifier 506A, a second composite device identifier 506B, and a third composite device identifier 506C, respectively. In some situations, each executable file 502A-502C provides its corresponding composite device identifier 506A-506C to a different executable file that immediately follows it. For example, third executable file 502C provides its third composite device identifier 506C to second executable file 502B, which provides its second composite device identifier 506B to first executable file 502A. In some embodiments, upon receiving the third composite device identifier 506C and the first component identifier 504A, the second executable file 502B generates a second composite device identifier 506B from the third composite device identifier 506C and the first component identifier 504A. Further, in some embodiments, the second executable file 502B generates a first wrapping key 402A for the first executable file 502A based on the second composite device identifier 506B.

[0037] 6 is a flow diagram of a process 600 for encrypting prime numbers of executable files in a set of consecutive executable files 502, according to some embodiments. The set of consecutive executable files 502 includes three consecutive executable files 104, e.g., the (N+1)th executable file, the Nth executable file, and the (N-1)th executable file in FIGS. 2, 4, and 7, where N is an integer equal to or greater than 1. For convenience, the (N+1)th executable file, the Nth executable file, and the (N-1)th executable file are also referred to as the first executable file 502A, the second executable file 502B, and the third executable file 502C. The first executable file 502A immediately follows the second executable file 502B, which immediately follows the third executable file 502C. Each of the first executable file 502A, the second executable file 502B, and the third executable file 502C provides a corresponding encryption prime 404, e.g., the first encryption prime number 404A, the second encryption prime number 404B, or the third encryption prime number 404C. The encryption primes 404A-404C are stored in the memory 406 of the electronic device 100 (FIG. 5). In some embodiments, the first executable file 502A is an intermediate executable file that is followed by at least one additional executable file in the sequence of executable files 104 (FIG. 2). Alternatively, in some embodiments, the first executable file 502A is the last executable file in the sequence of executable files 104 and is not followed by any additional executable files.

[0038] Each executable file 502A, 502B, or 502C has a unique identifier 602 within the electronic device 100 (e.g., a component identifier 504A, 504B, or 504C, a composite device identifier 506A, 506B, or 506C). Each executable file 502A, 502B, or 502C encrypts a corresponding prime number 202 using a corresponding wrapping key 402 provided by a different executable file that follows the corresponding executable. Specifically, a first executable file 502A encrypts a first prime number 202A using a first wrapping key 402A provided by a second executable file 502B. In some embodiments, the second executable file 502B generates a first wrapping key 402A for the first executable file 502A based on its own unique identifier 602B (e.g., a component identifier 504B, a composite device identifier 506B). More broadly, in some embodiments, the second executable file 502B generates a first wrapping key 402A for the first executable file 502A based on a subset of the unique identifiers 602B (e.g., component identifiers 504A-504C, composite device identifiers 506A-506C) of the set of consecutive executable files 502.

[0039] Specifically, in some embodiments, the second identifier 602B of the second executable file 502B includes the second composite device identifier 506B of the second executable file 502B. The second executable file 502B obtains the third composite device identifier 506C of the third executable file 502C that follows the second executable file 502B, and the first component identifier 504A of the first executable file 502A that follows the second executable file 502B. The second composite device identifier 506B of the second executable file 502B is calculated based on the third composite device identifier 506C of the third executable file 502C and the first component identifier 504A of the first executable file 502A, for example, using a one-way function f OWF604. The second executable file 502B generates a first wrapping key 402A for the first executable file 502A based on the second composite device identifier 506B and provides the first wrapping key 402A to the first executable file 502A.

[0040] During prime number preparation, the first executable file 502A encrypts the first prime number 202A with the first wrapping key 402A to generate an encrypted prime number 404A that is stored in the memory 406 of the electronic device 100. During subsequent secure operation, the first executable file 502A retrieves the encrypted prime number 404A from the memory 406, obtains the first wrapping key 402A from the second executable file 502B, and decrypts the encrypted prime number 404A based on the first wrapping key 402A to recover the first prime number 202A. The recovered first prime number 202A is used by the first executable file 502A for attestation, authentication, certification, or encryption, just as if the first prime number 202 were generated in real time for secure operation.

[0041] In some embodiments, the engine component 208 includes a unique device secret (UDS) 606, which is a unique secret value specific to the electronic device 100. A third executable file 502C immediately follows the engine component 208 and includes a composite device identifier 506C (CDI N-2 ) is equal to UDS 606. This allows executable files 502A-502C to be bound to the hardware of electronic device 100 and have the ability to derive wrapping keys used by electronic device 100.

[0042] FIG. 7 is a block diagram of an exemplary electronic device 100 having multiple executable files 104, each having a unique identifier, according to some embodiments. The multiple executable files 104 form an ordered array of executable files 104, where N is an integer. While three executable files 104-0, 104-1, and 104-N are shown in FIG. 7, the array of executable files 104 optionally includes one, two, or more than two serially coupled executable files. Each executable file 104 has a unique identifier 602 (e.g., component identifier 504, composite device identifier 506) within the electronic device 100. Specifically, the initiating executable file 104-0 is directly coupled to the engine component 208 and has an initiating unique identifier (e.g., component identifier 504-0 and composite device identifier 506-0). The first executable file 104-1 immediately follows the start executable file 104-0 and has a first unique identifier (e.g., a first component identifier 504-1 and a first composite device identifier 506-1). The Nth executable file 104-N has an Nth unique identifier (e.g., an Nth component identifier 504-N and an Nth composite device identifier 506-N).

[0043] For each executable file 104-0, 104-1, or 104-N, the corresponding component identifier 504-0, 504-1, or 504-N includes, for example, a digest (e.g., a hash) of the configuration information for the corresponding executable file 104-0, 104-1, or 104-N, independent of any other executable file. For each executable file 104-0, 104-1, or 104-N, the configuration information includes one or more of the following information: firmware, settings, vendor name, product information, version, SVN, and instance identifier for the corresponding executable file 104-0, 104-1, or 104-N.

[0044] In some embodiments, for each executable file 104, the corresponding composite device identifier 506 is calculated using, for example, a one-way function f() OWF604 is used to combine the component identifier 504 of the next executable file 104 with the composite device identifier 506 of the previous executable file 104. Specifically, the first composite device identifier 506-1 is a combination of the second component identifier 504-2 of the second executable file (not shown) that immediately follows the first executable file 104-1 and the composite device identifier 506-0 of the start executable file 104-0 that is followed by the first executable file 104-1. For the start executable file 104-0 that immediately follows the engine component 208, the composite device identifier 506-0 is a combination of the first component identifier 504-1 of the first executable file 104-1 that immediately follows the start executable file 104-0 and the engine identifier 506-E of the engine component 208, which is a combination of the unique device secret (UDS) 606 and the component identifier 504-0 of the start executable file 104-0. UDS 606 is a unique secret value specific to electronic device 100. In some embodiments, UDS 606 is loaded into non-volatile memory of electronic device 100 during manufacturing. Alternatively, in some embodiments, UDS 606 is generated internally to electronic device 100 during device provisioning.

[0045] In some embodiments, the Nth executable file 104-N is the last executable file in the sequence of executable files 104 that is not followed by any other executable files. The Nth composite device identifier 506-N is a combination of the firmware security descriptor 706 of the Nth executable file 104-N and the (N-1)th composite device identifier 506-(N-1) of the (N-1)th executable file (not shown) that immediately follows the Nth executable file 104-N. The firmware security descriptor 706 of the Nth executable file 104-N defines the security characteristics of the device firmware associated with the Nth executable file 104-N.

[0046] In some embodiments, in the sequence of executable files 104, each ith intermediate executable file 104-i follows the (i-1)th executable file, which is then followed by the (i+1)th executable file. Each ith intermediate executable file 104-i generates the next wrapping key 402 for the (i+1)th executable file based on its own unique identifier 602 (e.g., the component identifiers 504 and composite device identifier 506 of the ith intermediate executable file 104-i). More broadly, in some embodiments, each ith intermediate executable file 104-i generates the next wrapping key 402 for the (i+1)th executable file based on a subset of the unique identifiers 602 of the (i-1), ith, and (i+1)th executable files 502 (e.g., their component identifiers 504 and composite device identifier 506). For example, each ith intermediate executable file 104-i may compute, based on its composite device identifier 506, a one-way function f() OWF 604 to generate a wrapping key for the (i+1)th executable file, the composite device identifier combining the component identifier 504 of the (i+1)th executable file and the composite device identifier 506 of the (i-1)th executable file.

[0047] 8A is a flow diagram of a process 800 for encrypting a first prime number 202A of a first executable file 502A that immediately follows a second executable file 502B that follows an engine component 208, according to some embodiments. The set of consecutive executable files 502 includes two consecutive executable files, e.g., the first executable file 502A that immediately follows the second executable file 502B. The second executable file 502B immediately follows the engine component 208. The second executable file 502B generates a first wrapping key 402A for the first executable file 502A based on a second identifier 602B of the second executable file 502B and provides the first wrapping key 402A to the first executable file 502A. The first executable file 502A encrypts the first prime number 202A into an encrypted prime number 404A and stores the encrypted prime number 404A in the memory 406 of the electronic device 100. In some embodiments, the first executable file 502A is followed by at least one additional executable file in the array of executable files 104 (FIG. 2). Alternatively, in some embodiments, the first executable file 502A is the last and only executable file in the array of executable files 104 and is not followed by any additional executable files.

[0048] In some embodiments, the second identifier 602B of the second executable file 502B includes the second composite device identifier 506B of the second executable file 502B. The second executable file 502B obtains the first component identifier 504A of the first executable file 502A and determines the second composite device identifier 506B of the second executable file 502B based on the first component identifier 504A of the first executable file 502A and the UDS 606 of the engine component 208. Specifically, in some embodiments, the engine component 208 combines the second component identifier 504B of the second executable file 502B with the UDS 606 of the engine component 208 to generate an engine identifier 506-E for the engine component 208, and the second executable file 502B combines the engine identifier 506-E of the engine component 208 with the first component identifier 504A of the first executable file 502A to generate a second composite device identifier 506B for the second executable file 502B.

[0049] 8B is a flow diagram of a process 840 for encrypting a first prime number 202A of a first executable file 502A immediately following an engine component 208, according to some embodiments. The engine component 208 generates a first wrapping key 402A for the first executable file 502A based on the UDS 606 of the engine component 208 and provides the first wrapping key 402A to the first executable file 502A. Specifically, in some embodiments, the engine component 208 combines the UDS 606 and the first component identifier 504A of the first executable file 502A to generate an engine identifier 506-E, which is the unique identifier 602-E of the engine component 208 that is applied to generate the first wrapping key 402A. The first executable file 502A receives the first wrapping key 402A from the engine component 208, encrypts the first prime number 202A with the first wrapping key 402A to generate an encrypted prime number 404A, and stores the encrypted prime number 404A in the memory 406 of the electronic device 100. In some embodiments, the first executable file 502A is followed by at least one additional executable file in the array of executable files 104 (FIG. 2). Alternatively, in some embodiments, the first executable file 502A is the last and only executable file in the array of executable files 104 and is not followed by any additional executable files.

[0050] 9A-9C show a flow diagram of a device attestation process 900 implemented by an executable file based on a pre-stored prime number, according to some embodiments. The device attestation process 900 includes retrieving a prime number for an Nth executable file (step 902), determining a unique identifier (e.g., a composite device identifier) ​​for the Nth executable file (step 904), and generating a wrapping key for the (N+1)th executable file (step 906). The (N-1)th executable file, the Nth executable file, and the (N+1)th executable file are consecutive executable files in the sequence of executable files 104 ( FIGS. 2 , 4 , and 7 ). In some embodiments, the device attestation process 900 is executed by the Nth executable file during the boot phase of electronic device 100 and corresponds to the boot segment execution of the Nth executable file.

[0051] 9A , to retrieve the prime number of the Nth executable file (step 902), a wrapping key 908 generated by the (N−1)th executable file and a composite device identifier 910 of the (N−1)th executable file are extracted from memory 406 (e.g., an SRAM unit) of electronic device 100. Following a determination that an encryption key 204 is available for the Nth executable file (step 912), a unique identifier (e.g., a composite device identifier) ​​of the Nth executable file is determined (step 904). Following a determination that an encryption key 204 is not available for the Nth executable file (step 914), an encryption prime number 916 of the Nth executable file is extracted from non-volatile memory. Pursuant to a determination (step 918) that the wrapping key 908 generated by the (N-1) executable file and the encryption prime number 916 of the N executable file are available for use, the wrapping key 908 generated by the (N-1) executable file decrypts the encryption prime number 916 of the N executable file to generate an N executable file prime number 920. The N executable file prime number 920 is applied to generate an encryption key 922 for the N executable file.

[0052] On the other hand, following a determination (step 924) that the wrapping key 908 generated by the (N-1)th executable file or the encrypted prime number 916 of the Nth executable file is not available, the prime number 920 of the Nth executable file is prepared (step 926) by obtaining a composite device identifier 928 of the (N-1)th executable file, generating a prime number 920 for the Nth executable file, encrypting the prime number 920 for the Nth executable file with the wrapping key 908 provided by the (N-1)th executable file, and storing the encrypted prime number 916 in the memory 406 (e.g., a non-volatile memory unit) of the electronic device (step 930).

[0053] 9B, to determine the unique identifier of the Nth executable file (step 904), the (N+1)th executable file is loaded from the non-volatile memory unit (step 936) and a digest 938 (e.g., corresponding to a component identifier) ​​of the (N+1)th executable file is determined. The component identifier of the (N+1)th executable file corresponds to the digest 938 of the (N+1)th executable file. The composite device identifier 940 of the Nth executable file is a combination of the digest 936 of the (N+1)th executable file and the composite device identifier 910 of the (N-1)th executable file.

[0054] 9C , to generate a wrapping key for the (N+1)th executable file (step 906), the encryption seed 942 for the Nth executable file is extracted from non-volatile memory. Following a determination that the encryption seed 942 for the Nth executable file is available (step 944), the encryption seed 942 is decrypted based on the composite device identifier 940 of the Nth executable file to generate a seed 946 for the Nth executable file. Meanwhile, following a determination that the encryption seed 942 for the Nth executable file is not retrievable from non-volatile memory (step 948), a new seed 946 for the Nth executable file is generated (step 950), e.g., by a random number generator. The seed 946 for the Nth executable file is encrypted based on the composite device identifier 940 of the Nth executable file (step 952) to generate an encryption seed 942, and the encryption seed is stored in non-volatile memory (step 954). The Nth executable file generates a wrapping key 956 for the (N+1)th executable file based on the seed 946 for the Nth executable file and the Nth executable file's composite device identifier 940. The wrapping key 956 for the (N+1)th executable file is stored in SRAM (step 958), and the Nth executable file's composite device identifier 940 is also stored in SRAM (step 960).

[0055] In some embodiments, the device attestation process 900 is implemented by an embedded device that supports a multitasking environment. Each boot stage includes a dedicated task for generating and storing prime numbers. During subsequent secure operations for attestation, authentication, certification, or encryption, one or more appropriate prime numbers are made available for each corresponding executable by accessing the embedded device's memory 406. Before the boot segment of an Nth executable is changed, for example, via a firmware update, the prime number 920 of the Nth executable can be reused. These measures allow prime numbers to be easily obtained, eliminating the need to generate prime numbers as needed, thereby conserving the embedded device's limited computing resources.

[0056] In some embodiments, encrypting the prime number 920 of the Nth executable file with the wrapping key 908 generated by the (N-1)th executable file ensures that if the Nth executable file is intentionally or maliciously altered, the previously generated prime number 920 of the Nth executable file becomes unusable. In some embodiments, the encryption key 922 and wrapping key 908 of the Nth executable file are stored in volatile memory, thereby protecting them from any attacker who examines only non-volatile memory.

[0057] FIG. 10A is a flow diagram of a method 1000 for providing a prime number, according to some embodiments, and FIG. 10B is a flow diagram of a method 1050 for performing secure operations based on a prime number, according to some embodiments. For convenience, methods 1000 and 1050 are described as being implemented by electronic device 100 (e.g., an Internet of Things (IoT) device, an autonomous vehicle, and a surveillance camera). Methods 1000 and 1050 are governed by instructions that are optionally stored on a non-transitory computer-readable storage medium and executed by one or more processors of a computer system. Each of the operations illustrated in FIGS. 10A and 10B may correspond to instructions stored in computer memory or a non-transitory computer-readable storage medium. The computer-readable storage medium may include a magnetic or optical disk storage device, a solid-state storage device such as a flash memory, or one or more other non-volatile memory devices. The instructions stored on the computer-readable storage medium may include one or more of source code, assembly language code, object code, or other instruction formats that are interpreted by one or more processors. Some operations in method 1000 may be combined and / or the order of some operations may be changed.

[0058] Referring to FIG. 10A , in some embodiments, electronic device 100 (1002) has first executable file 502A and second executable file 502B. Each executable file has a unique identifier 602 (FIG. 6) within electronic device 100. Electronic device 100 generates (1004) wrapping key 402A for first executable file 502A and encrypts (1006) prime number 202A generated by electronic device 100 with wrapping key 402A for first executable file 502A to generate encrypted prime number 404A. Electronic device 100 stores (1008) encrypted prime number 404A locally in memory 406 (FIG. 4) of electronic device 100. Encrypted prime number 404A (1010) can only be decrypted by first executable file 502A and cannot be decrypted by second executable file 502B. In some embodiments, the electronic device 100 determines a memory address associated with the first executable file 502A, for example, based on the metadata 408 (FIG. 4) of the first executable file 502A. The encryption prime number 404A is stored in the memory 406 of the electronic device 100 based on the memory address. In some embodiments, the encryption prime number 404A is stored for the first executable file 502A during a boot phase.

[0059] In some embodiments, the first executable file 502A extracts (1012) the encrypted prime number 404A from the memory of the electronic device 100, obtains (1014) the wrapping key 402A for the first executable file 502A, and decrypts (1016) the encrypted prime number 404A based on the wrapping key 402A by the first executable file 502A. Only the first executable file 502A can obtain and use the wrapping key 402A to decrypt the encrypted prime number 404A. In some embodiments, the first executable file 502A can obtain the wrapping key 402A from the second executable file 502B that immediately precedes the first executable file 502A, while the second executable file 502B is prohibited from applying the wrapping key 402A to decrypt the encrypted prime number 404A of the first executable file 502A.

[0060] In some embodiments, the wrapping key 402A for the first executable file 502A is generated by the second executable file 502B, with the first executable file 502A immediately following the second executable file 502B. The electronic device 100 enables the first executable file 502A to encrypt the prime number 202A with the wrapping key 402A for the first executable file 502A by the second executable file 502B providing the wrapping key 402A for the first executable file 502A to the first executable file 502A. Further, in some embodiments, the second executable file 502B obtains a random number and generates the wrapping key 402A for the first executable file 502A based on both the random number and the second identifier of the second executable file 502B.

[0061] 2, in some embodiments, first executable file 502A generates encryption key 204 with prime number 202A (1018). Electronic device 100 performs attestation, authentication, certification, or encryption based on encryption key 204 (1020). Further, in some embodiments, encryption key 204-0 includes a signature used to attest electronic device 100 (e.g., first executable file 502A). In some embodiments, encryption key 204-N includes a signature used to attest a software application executed by first executable file 502A. Alternatively, in some embodiments, encryption key 204-1 includes an encryption key used to encrypt data or secrets.

[0062] In some embodiments, the second executable file 502B generates 1022 a wrapping key 402A for the first executable file 502A based on the second identifier of the second executable file 502B, where the first executable file 502A immediately follows the second executable file 502B. Each executable file is identified 1024 by a corresponding component identifier 504 that includes a digest of the corresponding executable's configuration information. In some embodiments, the configuration information includes one or more of the following information: firmware, configuration, vendor name, product information, version, security version number (SVN), and instance identifier of the corresponding executable. Furthermore, in some embodiments, the electronic device 100 determines 1026 a second identifier for the second executable file 502B based on the corresponding component identifier 504 of at least one executable file directly connected to the second executable file 502B. Alternatively, in some embodiments, electronic device 100 determines the second identifier of second executable file 502B based on second component identifier 504B of second executable file 502B, independently of any other executable file different from second executable file 502B.

[0063] In some embodiments, the second identifier of the second executable file 502B includes the second composite device identifier 506B of the second executable file 502B. The electronic device 100 obtains (1028) the third composite device identifier 506C of the third executable file 502C followed by the second executable file 502B, and obtains (1030) the first component identifier 504A of the first executable file 502A. The electronic device 100 generates (1032) the second composite device identifier 506B of the second executable file 502B based on the third composite device identifier 506C of the third executable file 502C and the first component identifier 504A of the first executable file 502A.

[0064] In some embodiments, the second identifier of the second executable file 502B includes a second composite device identifier 506B of the second executable file 502B. The electronic device 100 obtains the first component identifier 504A of the first executable file 502A and a unique device secret (UDS) 606 of the engine component 208 (e.g., a device identifier configuration engine (DICE)). The second executable file 502B immediately follows the engine component 208. The electronic device 100 determines the second composite device identifier 506B of the second executable file 502B based on the first component identifier 504A of the first executable file 502A and the UDS 606 of the engine component 208. In some embodiments, the second executable file 502B immediately follows the engine component 208. The electronic device 100 obtains the UDS 606 of the engine component 208 and generates a second identifier for the second executable file 502B based on at least the UDS 606 of the engine component 208 .

[0065] In some embodiments, the electronic device 100 generates the prime number 202A locally within the electronic device 100.

[0066] In some embodiments, the memory includes a volatile memory unit (e.g., DRAM and SRAM), and the encryption prime number 404A is stored in the volatile memory unit of the memory of the electronic device 100. Alternatively, in some embodiments, the memory includes a nonvolatile memory unit, and the encryption prime number 404A is stored in the nonvolatile memory unit of the memory of the electronic device 100. Nonvolatile memory refers to storage in semiconductor memory chips. Data is stored in floating-gate memory cells, including floating-gate metal-oxide-semiconductor field-effect transistors (MOSFETs). Nonvolatile memory units include flash memory storage, such as NAND flash and solid-state drives (SSDs). Other examples of nonvolatile memory include read-only memory (ROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), ferroelectric RAM, and other types of data storage devices (e.g., disk storage, hard disk drives, optical disks, floppy disks, and magnetic tape).

[0067] In some embodiments, electronic device 100 includes multiple programmable components organized into multiple executable files in a tree structure. The multiple executable files include a first executable file and a second executable file 502B, each executable file having one or more corresponding components. Each programmable component includes hardware, firmware, software, configuration, or a combination thereof.

[0068] 10B , in some embodiments, electronic device 100 includes first executable file 502A and second executable file 502B (1052). Each executable file includes a unique identifier 602 within electronic device 100. Electronic device 100 extracts encryption prime number 404A from memory of electronic device 100 (1054), generates wrapping key 402A for first executable file 502A (1056), and decrypts encryption prime number 404A by first executable file 502A with wrapping key 402A for first executable file 502A (1058) to generate prime number 202. Encryption prime number 404A can only be decrypted by first executable file 502A and cannot be decrypted by second executable file 502B (1060). The first executable file 502A generates 1062 the encryption key 204 based on the prime number 202A.

[0069] It should be understood that the particular order in which the operations in Figures 10A and 10B are described is merely exemplary and is not intended to indicate that the described order is the only order in which the operations can be performed. Those skilled in the art will recognize various methods for providing prime numbers applicable to secure operations (e.g., attestation, authentication, certification, and encryption). It should be noted that other process details described above with respect to Figures 1-9 are also applicable in a similar manner to methods 1000 and 1050 described above with respect to Figures 10A and 10B. For the sake of brevity, these details will not be repeated here.

[0070] Some embodiments of the present application relate to the security feature of attestation (e.g., firmware attestation), which is experiencing a major push in storage and other industries. For example, the U.S. government has proposed platform resilience requirements that include several attestation requirements. Attestation has broad application across many market segments, including storage such as SSDs. In another example, method 1000 is implemented in a surveillance camera to provide a prime number thereto.

[0071] The memory used to store instructions and data associated with methods 1000 and 1050 includes high-speed random access memory, such as DRAM, SRAM, DDR RAM, or other random access solid-state memory devices, and optionally includes non-volatile memory, such as one or more magnetic disk storage devices, one or more optical disk storage devices, one or more flash memory devices, or one or more other non-volatile solid-state storage devices. The memory optionally includes one or more storage devices located remotely from one or more process units. The memory or non-volatile memory therein comprises a non-transitory computer-readable storage medium. In some embodiments, the memory or non-transitory computer-readable storage medium of the memory stores programs, modules, and data structures for implementing methods 1000 and 1050, or a subset or superset.

[0072] Each of the elements identified above may be stored in one or more of the memory devices described above and corresponds to an instruction set for performing the functions described above. The modules or programs (i.e., instruction sets) identified above need not be implemented as separate software programs, procedures, modules, or data structures; thus, various subsets of these modules may be combined or otherwise rearranged in various embodiments. In some embodiments, memory optionally stores a subset of the modules and data structures identified above. Note that memory optionally stores additional modules and data structures not described above.

[0073] The terms used in the description of the various embodiments set forth herein are for the purpose of describing particular embodiments only and are not intended to be limiting. As used in the description of the various described embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly dictates otherwise. It will also be understood that the term "and / or," as used herein, refers to and encompasses any and all possible combinations of one or more of the associated listed items. It will also be understood that the terms "includes," "including," "comprises," and / or "comprising," as used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. Furthermore, although terms such as "first," "second," etc. may be used herein to describe various elements, it will be understood that these terms are not intended to be limiting of these elements and are used only to distinguish one element from another.

[0074] As used herein, the term "if" is deemed to mean, depending on the context, optionally "when" or "upon" or "determined" or "determined" or "determined" or "following a determination of." Similarly, the phrase "determined" or "when [stated condition or event] is detected" is deemed to mean, depending on the context, optionally "upon determination" or "determined" or "upon determination" or "upon detection of [stated condition or event]" or "following a determination that [stated condition or event] is detected."

[0075] The above description has been described with reference to specific embodiments for purposes of explanation. However, the exemplary description above is not intended to be exhaustive or to limit the scope of the claims to the precise form disclosed. Many modifications and variations are possible in light of the above teachings. The above embodiments have been chosen and described in order to best explain and enable others skilled in the art to understand the principles of operation and practical applications.

[0076] Although the various figures depict multiple logical steps in a particular order, steps that are not order-dependent may be reordered, and other steps may be combined or separated. While some reordering or other groupings are specifically described, other reordering or groupings will be apparent to those skilled in the art, and the ordering and grouping shown herein is not an exhaustive list of alternatives. It should be recognized that the steps may be implemented in hardware, firmware, software, or any combination thereof.

Claims

1. 1. A method comprising: an electronic device having a first executable file and a second executable file, each executable file having a unique identifier within the electronic device; generating a wrapping key for the first executable file; encrypting a prime number generated by the electronic device with the wrapping key of the first executable file to generate an encrypted prime number; storing the encryption prime number locally in a memory of the electronic device, the encryption prime number being decryptable only by the first executable file and not decryptable by the second executable file; A method comprising:

2. In the first executable file, extracting the encrypted prime number from the memory of the electronic device; obtaining the wrapping key for the first executable file; decrypting, by the first executable file, the encrypted prime number based on the wrapping key; The method of claim 1 further comprising:

3. 3. The method of claim 1, further comprising determining a memory address associated with the first executable file, and wherein the cryptographic prime number is stored in the memory of the electronic device based on the memory address.

4. The wrapping key for the first executable file is generated by the second executable file, the first executable file immediately following the second executable file, and the method includes:

4. The method of claim 1, further comprising the step of providing the wrapping key of the first executable file to the first executable file by the second executable file, thereby enabling the first executable file to encrypt the prime number with the wrapping key of the first executable file.

5. 5. The method of claim 4, further comprising obtaining, by the second executable file, a random number, wherein the wrapping key for the first executable file is generated by the second executable file based on both the random number and a second identifier of the second executable file.

6. generating a cryptographic key with the prime number by the first executable file; performing attestation, authentication, certification, or encryption based on the encryption key; The method of any one of claims 1 to 5, further comprising:

7. 7. The method of claim 1, wherein the wrapping key for the first executable file is generated by the second executable file based on a second identifier of the second executable file, the first executable file immediately following the second executable file, and each executable file is identified by a corresponding component identifier that includes a digest of configuration information for the corresponding executable file.

8. 8. The method of claim 7, further comprising determining the second identifier of the second executable file based on a corresponding component identifier of at least one executable file directly connected to the second executable file.

9. determining the second identifier of the second executable file based on a second component identifier of the second executable file, independent of any other executable files different from the second executable file; The method of claim 7.

10. the second identifier of the second executable file includes a second composite device identifier of the second executable file, and the method further comprises: obtaining a third composite device identifier for a third executable file, the third executable file being followed by the second executable file; obtaining a first component identifier of the first executable file; generating the second composite device identifier for the second executable file based on the third composite device identifier for the third executable file and the first component identifier for the first executable file; The method of claim 7 further comprising:

11. the second identifier of the second executable file includes a second composite device identifier of the second executable file, and the method further comprises: obtaining a first component identifier of the first executable file; obtaining a unique device secret (UDS) of an engine component, the second executable file immediately following the engine component; determining the second composite device identifier for the second executable file based on the first component identifier for the first executable file and the UDS for the engine component; The method of claim 7 further comprising:

12. The second executable file immediately follows the engine component, and the method further comprises: obtaining a UDS for the engine component; generating the second identifier for the second executable file based on at least the UDS of the engine component; The method of claim 7 further comprising:

13. The method of any one of claims 1 to 12, further comprising the step of generating the prime number locally within the electronic device.

14. The method of any one of claims 1 to 13, wherein the memory comprises a volatile memory unit, and the cryptographic prime number is stored in the volatile memory unit of the memory of the electronic device.

15. The method of any one of claims 1 to 14, wherein the memory comprises a non-volatile memory unit, and the cryptographic prime number is stored in the non-volatile memory unit of the memory of the electronic device.

16. The method of any one of claims 1 to 15, wherein the cryptographic prime number is stored for the first executable file during a boot phase.

17. the electronic device includes a plurality of programmable components, and the method comprises:

17. The method of claim 1, further comprising: organizing the plurality of programmable components into a plurality of executable files having a tree structure, the plurality of executable files including the first executable file and the second executable file, each executable file including one or more corresponding components.

18. an electronic device having a first executable file and a second executable file, each executable file having a unique identifier within the electronic device; extracting an encrypted prime number from a memory of the electronic device; generating a wrapping key for the first executable file; decrypting, by the first executable file, the encrypted prime number with the wrapping key of the first executable file to generate a prime number, the encrypted prime number being decryptable only by the first executable file and not decryptable by the second executable file; encrypting, by the first executable file, an encryption key based on the prime number; A method comprising:

19. one or more processors; a memory having stored thereon instructions which, when executed by said one or more processors, cause said processors to carry out the method of any one of claims 1 to 18; , an electronic device.

20. A non-transitory computer readable medium having stored thereon instructions that, when executed by one or more processors, cause the processors to perform the method of any one of claims 1 to 18.