This application claims benefit of priority to Korean Patent Application No. 10-2021-0159356 filed on Nov. 18, 2021, and to Korean Patent Application No. 10-2022-0049015 filed on Apr. 20, 2022, each filed in the Korean Intellectual Property Office, and the entire contents of each-above application is incorporated by reference herein.
Aspects of the present disclosure relate to random number generators, integrated circuits including random number generators, and methods of operating random number generators.
In general, a random number may be used to generate a secret key within a security system. Accordingly, the security system may be provided with a random number generator. For security reasons, it is desirable that the random number generator generates random numbers with unpredictable values. For example, security systems may require or desire generation of a true random number that is unpredictable and has no periodicity. A true random number is one generated from a physical noise source, is unpredictable, and has no periodicity. A true random number generator (TRNG) according to a related art may generate a random number using thermal noise, shot noise, or a clock signal having an irregular ring oscillator cycle.
Aspects of the present disclosure provide random number generators that generate random numbers at high speed, and also provide integrated circuits including such random number generators, and methods of operating the random number generators.
Some example embodiments of the inventive concepts provide random number generators that reliably generate random numbers at high speed, and also provide integrated circuits including the random number generators, and methods of operating the random number generators.
According to some aspects, a random number generator may include an initial random number generator configured to generate an initial random number, a self-timed ring (STR) oscillator configured to receive the initial random number from the initial random number generator, the STR oscillator having a plurality of ring stages each configured to generate, in response to a clock, either a bubble that does not change an output state of a previous clock or a token that changes the output state of the previous clock, a duty corrector configured to adjust a duty of an output value of each of the ring stages, and a sampling circuit configured to sample a random number using a logic operation from the duty-corrected output values.
According to some aspects, a method of operating a random number generator may include generating initial values at least some of the plurality of ring stages using an initial random number generator, operating the STR oscillator using the initial values, correcting duties of output values outputted by the STR oscillator, and generating a random number by sampling the corrected output values.
According to some aspects, a method of operating a random number generator may include generating, by a first STR oscillator-based random number generator, a first random number, and generating, by a second STR oscillator-based random number generator, a second random number using the first random number.
According to some aspects, an integrated circuit may include a pseudo random number generator configured to generate a pseudo random number, and an STR oscillator-based random number generator having a plurality of ring stages that each generate, in response to a clock, either a bubble that does not change an output state of a previous clock cycle or a token that changes the output state of the previous clock cycle. In an initialization mode, initial values of at least some of the plurality of ring stages may be determined by the pseudo random number.
According to some aspects, an authentication device may include a certificate handler configured to receive a certificate of an external device, and parse or verify the certificate of the external device, cryptographic primitives configured to receive a response to an authentication request of the external device, generate a random number in response to the authentication request, generate a challenge corresponding to the random number, and verify a response of the external device corresponding to the challenge, a shared memory configured to store the parsed certificate, the random number, the challenge, and the response, and an authentication controller configured to control the certificate handler, the cryptographic primitives, and the shared memory via a register setting according to an authentication protocol. The cryptographic primitives may include an STR oscillator-based random number generator having a plurality of ring stages that are each configured to generate, in response to a clock, either a bubble that does not change an output state of a previous clock cycle, or a token that changes the output state of the previous clock cycle.
Random number generators, integrated circuits including the random number generators, and methods of operating the random number generators, according to some example embodiments of the present disclosure, may improve quality of generated random numbers by randomly arranging a token position using the random number for each sampling clock.
In addition, the random number generators, integrated circuits including the random number generators, and the methods of operating the random number generators, according to some example embodiments, may improve quality of generated random numbers by adjusting a duty of an entropy extraction bit.
In addition, the random number generators, the integrated circuits including the random number generators, and the methods of operating the random number generators, according to some example embodiments, may generate random numbers at high speed via random number sampling using logic operations.
The above and other aspects, features, and advantages of the present inventive concepts will be more clearly understood from the following detailed description, taken in conjunction with the accompanying drawings, in which:
Hereinafter, some example embodiments will be described with reference to the accompanying drawings.
In general, a random number may be used for generation of a private key in a symmetric key encryption system, generation of a private key and a public key in a public key encryption system, or a digital signature and authentication protocol, as examples. A random number may refer to a number that is statistically independent, has a uniform distribution of values, and is unpredictable. The unpredictable characteristic of a random number may increase resistance to security attacks on a cryptographic system. Random number generators, which generate random numbers, may be mainly categorized into pseudo random number generators and true random number generators. The true random number generator, which is a random number generator that uses randomness occurring in a physical phenomenon, may include an entropy source, an entropy extraction circuit, and a post-processing circuit. The entropy source may serve to generate entropy, which is unpredictable data, by using randomness existing in a physical process such as heat, shot noise, or the like in a circuit. Some examples of entropy sources include a ring oscillator, a phase-locked loop (PLL), cellular automata, and the like.
A random number generator, an integrated circuit including the random number generator, and a method of the random number generator according to some example embodiments may perform oscillation based on a self-timed ring (STR) oscillator, correct a bias via a duty corrector, and randomly distribute at least one token or at least one bubble for each sampling clock, thereby improving entropy performance. Herein, an output state of a previous clock cycle that is not changed in response to a clock may be referred to as a bubble, and the output state of the previous clock that is changed may be referred to as a token. Thus, the random number generator, the integrated circuit including the random number generator, and the method of operating the random number generator according to example embodiments may generate a random number with high entropy at high speed.
The initial random number generator 110 may be implemented to generate an initial random number INI_RN. Here, the initial random number INI_RN may be used as an initial value (or seed value) of the STR oscillator 120. In some example embodiments, the initial random number generator 110 may be implemented as a true random number generator. In some example embodiments, the initial random number generator 110 may be implemented as a pseudo random number generator.
The STR oscillator 120 may be implemented to receive the initial random number INI_RN from the initial random number generator 110, and generate a random number using an STR having a plurality of ring stages. Here, each of the ring stages may include a Muller gate and an inverter. When two inputs have the same value, an output of the STR may be one of the input values. In addition, when the two inputs have different values, the output of the STR may be a previous value. In general, an output state of a previous clock that is not changed in response to a clock may be referred to as a bubble, and the output state of the previous clock that is changed may be referred to as a token.
The duty corrector 130 may be implemented to correct a duty of each of output bits of the STR oscillator 120. Here, each of the output bits may be an output value of each of ring stages of the STR oscillator 120. For example, the duty corrector 130 may adjust a duty ratio of each of the output bits to 50%. Here, the duty ratio may refer to a ratio of a high-level signal to a low-level signal.
The sampling circuit 140 may be implemented to generate a random number RN by sampling the output bits adjusted by the duty corrector 130.
The random number generator 100 according to some example embodiments may be initialized using initial random data (e.g., initial random number) from an initial random number generator 110, and may generate, from the initial random data, initial values of all or some of L stages (where L is an integer greater than or equal to 3) of the STR oscillator 120. Thus, the random number generator 100 may randomly distribute a token position for each sampling clock, and accumulate entropy caused by a phase difference when performing oscillation after initialization.
The random number generator 100 according to some example embodiments may initialize an STR state for each cycle in an oscillation mode, and perform oscillation, thereby removing a correlation between sampled bits. In addition, the random number generator 100 according to example embodiments may initialize the oscillation mode (or in an initialization mode) after sampling, thereby removing a correlation between bits.
The random number generator 100 according to some example embodiments may sample signals that pass through the duty corrector 130 that adjusts a duty of each of output values of the STR oscillator 120. When a duty of a signal generated through the STR oscillator 120 does not match 50%, a bias may be generated. The random number generator 100 may adjust the duty to 50% by connecting the duty corrector 130 to all of the ring stages. That is, the random number generator 100 may adjust a ratio of “0” and “1” for the output values of the STR oscillator 120. In addition, the random number generator 100 may reset the duty corrector 130 after sampling, thereby resulting in sampling data having independence from previously sampled data.
In addition, the random number generator 100 according to some example embodiments may include the sampling circuit 140 that generates an output signal by performing a logic operation (e.g., an XOR operation) on data to sample the data, and finally performing the logic operation (e.g., the XOR operation) on the sampled data, thereby reducing an overall size in comparison to that of an existing size.
In addition, the random number generator 100 according to some example embodiments may remove or mitigate effects of a leakage current by changing a structure of a basic component of the STR oscillator 120.
The random number generator 100 according to some example embodiments may include the initial random number generator 110 that generates an initial random number INI_RN that determines initial values of the STR oscillator 120, and the duty corrector 130 that corrects a ratio of a duty of each of output values of the STR oscillator 120 to be close to 50%, thereby increasing entropy for random number generation, and generating a high-quality or higher-quality random number.
A first ring stage ST1 may be implemented to receive a first input value F1 and a second input value R1, and output a first output value C1. Here, the first input value F1 of the first ring stage ST1 may be an output value CL of an L-th ring stage STL, and the second input value R1 of the first ring stage ST1 may be an output value C2 of a second ring stage ST2.
The second ring stage ST2 may be implemented to receive a first input value F2 and a second input value R2, and output a second output value C2. Here, the first input value F2 of the second ring stage ST2 may be the output value C1 of the first ring stage ST1, and the second input value R2 of the second ring stage ST2 may be an output value C3 of the third ring stage ST3.
As described above, each of the ring stages ST1, ST2, ST3, . . . , and STL may be implemented to receive an output value of a previous ring stage and an output value of a following ring stage, and output an output value according to a truth table of a ring stage. Here, the truth table of the ring stage may indicate that an output value of a previous clock is maintained when a first input value and a second input value are the same, and that the first input value is output when the first input value and the second input value are different from each other.
For example, the XOR operation may be performed on the first divided signal DIV_C1 and the second divided signal DIV C2, and a flip-flop may output, in response to the sampling clock SCK, a value obtained by performing the XOR operation as some bits of the random number RN. In the above-described manner, the random number RN may be output by the sampling circuit 140.
It should be understood that the sampling circuit 140 illustrated in
A first PMOS transistor PM1 may include a source connected to a power supply terminal VDD and a gate that receives the second input value R1. A second PMOS transistor PM2 may include a source connected to a drain of the first PMOS transistor PM1 and a gate that receives the first input value F1. A third PMOS transistor PM3 may include a source connected to the power supply terminal VDD and a gate connected to a drain of the second PMOS transistor PM2. A fourth PMOS transistor PM4 may include a source connected to the power supply terminal VDD, a drain connected to the drain of the second PMOS transistor PM2, and a gate connected to a drain of the third PMOS transistor PM3. Here, the output value C1 may be output to the drain of the third PMOS transistor PM3.
A first NMOS transistor NM1 may include a drain connected to the drain of the second PMOS transistor PM2 and a gate that receives the first input value F1. A second NMOS transistor NM2 may include a drain connected to a source of the first NMOS transistor PM1, a source connected to a ground terminal GND, and a gate that receives the second input value R1. A third NMOS transistor NM3 may include a drain connected to the drain of the third PMOS transistor PM3, the source connected to the ground terminal GND, and the gate connected to the drain of the second PMOS transistor PM2. A fourth NMOS transistor NM4 may include the drain connected to the drain of the second PMOS transistor PM2, the source connected to the ground terminal GND, and the gate connected to the drain of the third PMOS transistor PM3.
According to the above-described truth table, when the first and second input values F1 and R1 are the same, the output value C1 may be the first input value F1. Conversely, when the first and second input values F1 and R1 are not the same, the output value C1 may maintain a value of a previous clock cycle.
In some embodiments, a ring stage of the STR oscillator 120 may be implemented such that the leakage current path does not occur regardless of the input values F1 and R1 and the output value C1.
A first activation switch PM5 may turn on/off, in response to an inverted signal EN_b of an activation signal EN, and may be between the power supply terminal VDD and the third PMOS transistor PM3. A second activation switch PM6 may turn on/off, in response to the inverted signal EN_b of the activation signal EN, and may be between the power supply terminal VDD and the fourth PMOS transistor PM4. Each of the first and second activation switches PM5 and PM6 may be implemented as a PMOS transistor.
A third activation switch NM5 may turn on/off, in response to the activation signal EN, and may be between the ground terminal GND and the third NMOS transistor NM3. A fourth activation switch NM6 may turn on/off, in response to the activation signal EN, and may be between the ground terminal GND and the fourth NMOS transistor NM4. Each of the third and fourth activation switches NM5 and NM6 may be implemented as an NMOS transistor.
The ring stage ST1a according to some example embodiments may add the activation switches PM5, PM6, NMS, and NM6 so that leakage current paths according to initial values do not occur, thereby removing all leakage current paths in a deactivated state (i.e., when EN=“0” and EN_b =“1”) regardless of states of the input values F1 and R1 and output value C1. Accordingly, in some embodiments leakage currents may be avoided or mitigated.
In summary, when a state of an i+1-th ring stage STi+1 (i is an integer greater than or equal to 2) is a bubble, a token of the i-th ring stage STi may be transferred to the i+1-th ring stage STi+1. Accordingly, a transition may occur, and oscillation may be performed. The STR oscillator may require states of three or more ring stages so as to perform ring oscillation. Here, the number (for example, L) of states of the ring stages may be a sum of the number of tokens and the number of bubbles.
Referring to
The random number generator 100 according to some example embodiments may initialize a state at each sampling time point so as to sufficiently accumulate jitter (or, in other words, to improve entropy).
Referring to
Referring to
A bubble or a token may be determined in each state (for example, C1) of ring stages according to each of the initial random numbers INI_0, INI_1, INI_2, IND_3, IND_4, and INI_5.
As illustrated in
The random number generator 100 may generate an initial value (for example, INI_RN in
In some example embodiments, initial values may be generated using another STR. In some example embodiments, a token position may be randomly distributed for each sampling clock according to the initial values. In an example embodiment, after a random number is generated, the STR 120 may be reset. In an example embodiment, a ratio of output values “1” and “0” of ring stages may be adjusted to 50% using a duty corrector, thereby removing a bias for an entropy source.
In some example embodiments, the number of ring stages of the first STR oscillator-based random number generator may be different from the number of ring stages of the second STR oscillator-based random number generator.
In some example embodiments, bubble positions and token positions of the ring stages of the second STR oscillator-based random number generator may be randomly distributed using the first random number in an initialization mode for each sampling clock SCLK. Here, the first random number may be generated in a previous sampling clock cycle. In some example embodiments, a bias of an entropy source of each of the ring stages of the second STR oscillator-based random number generator may be corrected using a duty corrector. In some example embodiments, an XOR operation may be performed on output data of the ring stages of the second STR oscillator-based random number generator, and values obtained by performing the XOR operation may be sampled so as to output the second random number.
Referring to
Referring to
Referring to
The random number generator 100 described with reference to
Each of the plurality of STR oscillators 221 to 224 may be implemented to receive the same initial random number INI_RN and output bits corresponding to different entropies. The multiplexer 225 may be implemented to select output bits of one of the plurality of STR oscillators 221 to 224 according to the initial random number INI_RN.
The central processing unit 1100 may output various control signals for controlling an overall operation of the integrated circuit 1000. In some example embodiments, an application processor (AP) may serve as the central processing unit 1100.
The security processor 1200 may be configured to implement one or more high security-related operations (and to perform such operations at high speed) and may be separate from the central processing unit 1100. The security processor 1200 may perform an operation using secret information, and may also be referred to as a security operator. For example, the security processor 1200 may perform an encryption or decryption operation using a private key (or a secret key) in a public key infrastructure (PKI).
The security processor 1200 may perform various types of operations in relation to the encryption or decryption operation. The security processor 1200 may perform an entire operation for encrypting or decrypting data, or may perform only some operations of a plurality of operations required for encryption or decryption. The security processor 1200 may include a random number generator according to the example embodiments described above with reference to
The ROM 1300 and the RAM 1400 may store data required for driving the integrated circuit 1000. The cryptographic memory 1500 may store data required for driving the security processor 1200. That is, the memory 1500 may record data on which encryption or decryption is to be performed, and may store recovery data on which encryption or decryption is performed.
A random number generator according to some example embodiments may be applicable to an authentication device of an electronic device.
The authentication controller 2100 may be implemented to perform an authentication protocol based on a public key encryption system. Here, the authentication protocol may be an external authentication protocol with an external device or an internal authentication protocol with an internal component. The authentication controller 2100 may directly perform the authentication protocol via communication with the external device. For example, the authentication controller 2100 may repeatedly invoke components 2200 and 2300 that perform a unit operation so as to perform an operation required when an authentication protocol is performed. In addition, the authentication controller 2100 may share the shared memory 2400 by sequentially adjusting an operation timing of each of the components 2200 and 2300. That is, the authentication controller 2100 may control the certificate handler 2200, the cryptographic primitives 2300, and the shared memory 2400 so that a value input/output from one component via the shared memory 2400 may be used by another component. In some example embodiments, the authentication controller 2100 may control the certificate handler 2200, the cryptographic primitives 2300, and the shared memory 2400 for the authentication protocol via a register setting.
The certificate handler 2200 may be implemented to manage a public key certificate. The certificate handler 2200 may generate, parse, or verify the certificate. The certificate handler 2200 may parse a certificate input from the external device, and store the parsed certificate in the shared memory 2400. For example, the certificate handler 2200 may receive a public key certificate of the external device, and verify whether the public key certificate of the external device is valid using a root certificate of a certificate authority (CA).
The certificate handler 2200 may be implemented to frequently and continuously access the shared memory 2400 so as to manage the public key certificate. That is, the certificate handler 2200 may be implemented to store, in the shared memory 2400, internal variables for generating or verifying the public key certificate. The cryptographic primitives 2300 may be implemented to perform a public key cryptographic operation, perform a hash operation, or generate a random number. For example, the cryptographic primitives 2300 may include a random number generator STR-RNG generating a random number based on an STR oscillator, as described with reference to the example embodiments illustrated in
In some example embodiments, the cryptographic primitives 2300 may generate a challenge in response to an authentication request from the external device when an authentication protocol is performed. Here, the challenge may be obtained by inputting a random number into a hash algorithm. In addition, the cryptographic primitives 2300 may verify a response generated by the external device in response to the challenge of the authentication device 2000. For example, the response input from the external device may be a value obtained by signing the challenge of the authentication device 2000 with a private key of the external device. In this case, the cryptographic primitives 2300 may verify the response of the external device by decrypting the challenge using the response (signature value) of the external device and a public key (certificate) of the external device.
In addition, the cryptographic primitives 2300 may generate a response (or signature value) of the authentication device corresponding to a challenge issued by the external device. In some example embodiments, the cryptographic primitives 2300 may generate a shared secret value using a random number generated when a mutual authentication protocol is performed.
The cryptographic primitives 2300 may be implemented to frequently and continuously access the shared memory 2400 so as to perform a public key cryptographic operation, perform a hash operation, or generate a random number. That is, the cryptographic primitives 2300 may be implemented to store, in the shared memory 2400, internal variables for the cryptographic operation, hash operation, or random number generation.
The shared memory 2400 may be implemented to store data for an operation of at least one of the authentication controller 2100, the certificate handler 2200, and the cryptographic primitives 2300, data generated during the operation, or data according to a result of the operation. In some example embodiments, the shared memory 2400 may be implemented as a volatile memory, as a nonvolatile memory, or as a hybrid memory that includes a volatile memory and a nonvolatile memory. An input/output control operation of the shared memory 2400 may be performed by the authentication controller 2100. That is, the authentication controller 2100 may include a memory controller for controlling the shared memory 2400.
In some example embodiments, the components 2100, 2200, 2300, and 2400 of the authentication device 2000 may connected to one another by data lines 2010, 2020, 2030, 2040, and 2050. Each of the data lines 2010, 2020, 2030, 2040, and 2050 may be used as an input/output line for internal data generated when the authentication protocol is performed.
The components 2100, 2200, and 2300 of the authentication device 2000 in
A true random number generator (TRNG) may refer to a device that generates a random number by converting a value obtained from an entropy source generated from nature into a bit stream. The random number may play an important role in a security protocol and a security algorithm. The random number generated from the TRNG may be used as an important key value to protect data in various security devices and parts. A range products that use TRNGs is getting wider and increasing in diversity. For example, TRNGs may be used for various types of products including processors (e.g., Exyos processors), memories, controllers, smartcards, embedded secure elements (eSEs), digital televisions (DTVs), and Internet-of-Things (IoT) devices. In addition, according to some security authentication standards, a start-up test corresponding to a statistical test may be performed before preceding use of a random value, and thus a speed of the TRNG may determine a booting speed of the product. For this reason, the importance of TRNGs that generate the random number at high speed is increasing.
There may be several methods of generating a TRNG. According to example embodiments, a random number may be generated using an STR oscillator that has an advantage of having a high speed by propagating multiple events simultaneously without colliding with each other. Accordingly, a TRNG according to example embodiments may generate a random number at high speed, correct a bias using a duty corrector, and randomly distribute a position of an initial token for each sampling clock, thereby increasing randomness, which may improve a quality of the random number.
The TRNG according to an example embodiment may be implemented to correct a ratio of “0” and “1” to be close to 50% using the duty corrector. In addition, an additional STR oscillator-based TRNG block may be arranged to determine an initial setting value of an STR oscillator, and thus the initial setting value may become random by an initial random number generated via the corresponding block. As the initial setting value is random, token positions and bubble positions of a state may be randomly distributed for each cycle. Accordingly, when a ring oscillation mode is entered, a pattern of collision and spread may be different for each cycle. As a result, the randomness of a random number may be increased.
An output value of one STR oscillator may determine an initial value of another STR oscillator, and thus the TRNG according to some example embodiments may be implemented in a form of accumulating entropy generated in each STR oscillator. Accordingly, an STR oscillator-based TRNG according to example embodiments may improve random number quality, and in some instances may greatly improve random number quality.
While some example embodiments have been shown and described above, it will be apparent to those skilled in the art that modifications and variations could be made without departing from the scope of the present inventive concepts as defined by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2021-0159356 | Nov 2021 | KR | national |
10-2022-0049015 | Apr 2022 | KR | national |