KR101194403B1 - Apparatus of generating cryptographically secure pseudo random number and method thereof - Google Patents

Apparatus of generating cryptographically secure pseudo random number and method thereof Download PDF

Info

Publication number
KR101194403B1
KR101194403B1 KR1020100123485A KR20100123485A KR101194403B1 KR 101194403 B1 KR101194403 B1 KR 101194403B1 KR 1020100123485 A KR1020100123485 A KR 1020100123485A KR 20100123485 A KR20100123485 A KR 20100123485A KR 101194403 B1 KR101194403 B1 KR 101194403B1
Authority
KR
South Korea
Prior art keywords
random number
output
value
pool
generator
Prior art date
Application number
KR1020100123485A
Other languages
Korean (ko)
Other versions
KR20120062287A (en
Inventor
이준호
조민범
Original Assignee
삼성에스디에스 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성에스디에스 주식회사 filed Critical 삼성에스디에스 주식회사
Priority to KR1020100123485A priority Critical patent/KR101194403B1/en
Publication of KR20120062287A publication Critical patent/KR20120062287A/en
Application granted granted Critical
Publication of KR101194403B1 publication Critical patent/KR101194403B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/582Pseudo-random number generators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/008Reliability or availability analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/25Testing of logic operation, e.g. by logic analysers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • G06F21/46Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

암호학적 안전성이 보장된 의사난수 생성 장치 및 그 방법이 개시된다. 암호학적으로 안전성이 보장되지 아니한 난수 생성기에서 출력한 두 난수를 각각 평문 및 키로 하는 대칭키 암호화를 수행하여 그 결과를 난수풀 값으로 저장한 후 난수 생성기에서 출력한 난수와 난수풀 값의 배타적 논리합 연산의 수행 결과를 암호학적 안전성이 보장된 의사난수로서 출력한다.Disclosed are a pseudorandom number generating device and a method for ensuring cryptographic security. Performs symmetric key encryption using plain text and key for two random numbers output from cryptographically insecure random number generator, saves the result as random pool value, and then extracts the exclusive OR of random number and random pool value output from random number generator. Outputs the result of the operation as a pseudo random number with cryptographic stability.

Description

암호학적 안전성이 보장된 의사난수 생성 장치 및 그 방법{Apparatus of generating cryptographically secure pseudo random number and method thereof}Apparatus of generating cryptographically secure pseudo random number and method

본 발명은 의사난수 발생 장치 및 그 방법에 관한 것으로서, 보다 상세하게는 자원이 한정된 유한 자원 시스템에서 암호학적 안정성이 보장된 의사난수를 생성하는 장치 및 그 방법에 관한 것이다. The present invention relates to an apparatus and method for generating a pseudo random number, and more particularly, to an apparatus and method for generating a pseudo random number with guaranteed cryptographic stability in a finite resource system with limited resources.

암호학적으로 안전한 의사난수 생성기(Cryptographically Secure Pseudo Random Number Generator, CSPRNG)는 알려진 암호학적 공격에 견딜 수 있도록 고안된 의사난수 생성기를 지칭하며, 암호 키, 넌스(nonce), 솔트(salt) 등에 사용되는 난수를 제공한다. Cryptographically Secure Pseudo Random Number Generator (CSPRNG) refers to a pseudo random number generator designed to withstand known cryptographic attacks, and is a random number used in cryptographic keys, nonces, salts, etc. To provide.

암호학적으로 안전한 의사난수 생성기(CSPRNG)가 되기 위한 핵심 요구사항은 'next-bit' 테스트를 통과하는 것이다. 즉, k-bit의 난수열이 주어져 있을 때 50%보다 큰 확률로 (k+1)번째 비트값을 예측할 수 있는 다항식-시간 알고리즘(Polynomial-time Algorithm)이 존재하는 경우에 'next-bit' 테스트를 통과한다고 정의한다.The key requirement to become a cryptographically secure pseudorandom number generator (CSPRNG) is to pass a 'next-bit' test. That is, when there is a polynomial-time algorithm that can predict the (k + 1) th bit value with probability greater than 50% when a random sequence of k-bits is given, 'next-bit' Define that the test passes.

Andrew Yao 등 여러 연구에 의하면, 의사난수생성기(Pseudo Random Number Generator, PRNG)는 모든 다항식-시간 통계 테스트를 통과하는 경우에만(if and only if) next-bit 테스트를 통과하는 것이 증명되어 있다. Several studies, including Andrew Yao, have demonstrated that Pseudo Random Number Generators (PRNGs) pass the next-bit test only if and only if they pass all polynomial-time statistical tests.

일반적으로 의사난수에 대한 통계적 테스트를 수행할 때는 다른 테스트에 앞서 프리퀀시 테스트를 가장 먼저 실행할 것을 권고하는데, 이는 주어진 비트열이 랜덤(random)한지 여부를 검사하는 가장 기초적인 증거를 프리퀀시 테스트로부터 얻을 수 있기 때문에다. 이 테스트를 통과하지 못할 경우 다른 테스트에서도 실패할 확률이 매우 높다는 것은 실험적으로 알려져 있다. 반면에, 이 테스트를 통과한 비트열이 난수가 아님을 나타내는 증거는 존재하지 않는다.In general, when performing statistical tests on pseudorandom numbers, it is recommended to run the frequency test first, before any other test, which provides the most basic evidence for checking whether a given bit string is random. Because there is. It is known experimentally that failure to pass this test has a very high probability of failing in other tests. On the other hand, there is no evidence that the bit string passed this test is not a random number.

본 발명이 해결하고자 하는 기술적 과제는, 유한 자원 시스템에서 암호학적 안전성이 보장되지 아니한 의사난수생성기의 출력을 기초로 암호학적 안전성이 보장된 의사난수를 생성하기 위한 장치 및 그 방법을 제공하는 데 있다. SUMMARY OF THE INVENTION The present invention has been made in an effort to provide an apparatus and method for generating a cryptographically secure pseudorandom number based on the output of a pseudorandom number generator that is not cryptographically secured in a finite resource system. .

상기의 기술적 과제를 달성하기 위한, 본 발명에 따른 암호학적 안전성이 보장된 의사난수 생성 장치의 일례는, 암호학적 안전성이 보장되지 아니한 난수를 생성하는 난수 생성부; 상기 난수 생성기의 두 출력값을 평문 및 키로 하는 대칭키 암호화를 수행한 결과값으로 난수풀을 생성하는 난수풀 생성부; 및 상기 난수 생성부의 출력 값과 상기 난수풀 값의 배타적 논리합 연산의 수행 결과를 암호학적 안전성이 보장된 의사난수로 출력하는 출력부;를 포함한다.In order to achieve the above technical problem, an example of a cryptographically secured pseudo-random number generating apparatus according to the present invention, Random number generation unit for generating a random number that is not guaranteed cryptographically secured; A random number pool generator for generating a random number pool as a result of performing symmetric key encryption using two output values of the random number generator as plain text and a key; And an output unit configured to output a result of performing an exclusive OR operation on the output value of the random number generation unit and the random number pool value as a pseudo random number having a guaranteed cryptographic stability.

상기의 기술적 과제를 달성하기 위한, 본 발명에 따른 암호학적 안전성이 보장된 의사난수 생성 방법의 일례는, 암호학적으로 안전성이 보장되지 아니한 난수 생성기에서 출력한 두 난수를 각각 평문 및 키로 하는 대칭키 암호화를 수행하여 그 결과를 난수풀 값으로 저장하는 단계; 및 상기 난수 생성기에서 출력한 난수와 상기 난수풀 값의 배타적 논리합 연산의 수행 결과를 암호학적 안전성이 보장된 의사난수로서 출력하는 단계;를 포함한다.In order to achieve the above technical problem, one example of a cryptographically secured pseudorandom number generation method according to the present invention is a symmetric key having two random numbers output from a cryptographically unsecured random number generator as plain text and a key, respectively. Performing encryption to store the result as a random pool value; And outputting a result of performing an exclusive OR operation on the random number output from the random number generator and the random number pool value as a pseudo random number guaranteed cryptographic stability.

본 발명에 따르면, 유한 자원 시스템의 보호 메모리와 암호학적 안전성이 보장되지 않은 의사난수 생성기를 이용하여 암호학적 안전성이 보장된 의사난수를 생성할 수 있다. 또한 종래 의사난수 발생을 위한 엔트로피 축적기(Entropy Accumulator) 역할을 하는 난수풀을 시스템 내부에서 초기에 자동으로 1세트만을 생성하여 보호 메모리에 저장함으로써 비휘발성 메모리의 사용을 최소화함과 아울러 난수풀 출력의 안전성을 유지할 수 있다. 또한 시스템 스타트업시 난수성(randomness) 시험을 하는 경우에, 난수성 시험 시료를 이용하여 난수풀을 보다 정교화함으로써 엔트로피 수준을 유지 개선할 수 있다.According to the present invention, it is possible to generate a cryptographically secure pseudorandom number using a protected memory of a finite resource system and a pseudo random number generator whose cryptographical security is not guaranteed. In addition, since only one set of random number pool, which acts as an entropy accumulator for generating pseudo random numbers, is automatically generated inside the system and stored in the protected memory, it minimizes the use of nonvolatile memory and outputs the random number pool. It can maintain the safety of. In addition, in the case of randomness test at system start-up, it is possible to maintain and improve the entropy level by more precisely randomizing the random number pool using the random number test sample.

도 1은 본 발명에 따른 암호학적으로 안전성이 보장된 의사난수 생성기가 구현되는 유한 자원 시스템의 일례를 도시한 도면,
도 2는 본 발명에 따른 암호학적 안전성이 보장된 의사 난수 생성기의 일례를 도시한 도면, 그리고,
도 3은 본 발명에 따른 암호학적 안전성이 보장된 난수 생성 방법의 일례를 도시한 흐름도이다.
1 is a diagram illustrating an example of a finite resource system implemented with a cryptographically secure pseudorandom number generator according to the present invention;
2 is a view showing an example of a cryptographically secure pseudo random number generator according to the present invention, and
3 is a flowchart illustrating an example of a cryptographically secure random number generation method according to the present invention.

이하에서, 첨부된 도면들을 참조하여 본 발명에 따른 암호학적 안전성이 보장된 의사난수 생성 장치 및 그 방법에 대해 상세히 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail with respect to the cryptographically secured pseudo-random number generating apparatus and method according to the present invention.

도 1은 본 발명에 따른 암호학적으로 안전성이 보장된 의사난수 생성기가 구현되는 유한 자원 시스템의 일례를 도시한 도면이다.1 is a diagram illustrating an example of a finite resource system in which a cryptographically secure pseudorandom number generator according to the present invention is implemented.

도 1을 참조하면, 스마트카드와 같은 유한 자원 시스템(100)은 파워-온(power-on)에 따른 스타트업 과정과는 별도로 전달 보안성(transportation security)을 높이기 위해 시스템 보호 모드(protected mode)에서 사용 모드(operation mode)로 전환하는 시스템 생명 주기상 단 1회 발생하는 활성화(enablement) 과정을 일반적으로 가지고 있다. Referring to FIG. 1, a finite resource system 100 such as a smart card has a system protected mode in order to increase transport security separately from a startup process according to power-on. It usually has an enablement process that occurs only once in the system life cycle, from transition to operation mode.

본 실시예의 경우, 유한 자원 시스템(100)은 외부에 별도로 존재하는 난수 생성기를 통해 사전 생성된 난수를 주입받는 방법이 아니라 보호 모드에서 사용 모드로 전환하는 1회의 활성화 과정을 활용하여 시스템 내부에서 암호학적으로 안전한 의사 난수 생성기(Cryptographically Secure Pseudo Random Number Generator, CSPRNG)(120)를 통해 초기 난수풀(Random Number Pool, RNP)(130)을 생성한 후 이를 보호 메모리(110)에 저장한다. 보호 메모리(110)에 저장되는 난수풀(130)은 1세트만 존재하는 것이 바람직하다.In the present embodiment, the finite resource system 100 uses the one-time activation process of switching from the protected mode to the use mode, instead of receiving a pre-generated random number through a random number generator that is externally present. An initial random number pool (RNP) 130 is generated through a Cryptographically Secure Pseudo Random Number Generator (CSPRNG) 120 and then stored in the protection memory 110. Only one set of random number pools 130 stored in the protection memory 110 may exist.

난수풀(130)이 저장되는 보호 메모리(110)는 시스템 개발자가 지정해 놓은 정규 입출력 채널을 통해서 접근을 허용하지 않은 경우 IC 칩의 탬퍼 레지스턴스(Tamper Resistance) 특성에 의해 공격자가 물리적, 전기적, 논리적 방법을 동원하여 노력하여도 시간 및 비용을 고려할 때 사실상 접근할 수 없는 특성을 가지는 메모리 영역을 의미하며, 스마트카드의 경우 보호된 비휘발성 메모리가 이에 해당한다.The protection memory 110 in which the random number pool 130 is stored has a physical, electrical, and logical method due to the tamper resistance characteristic of the IC chip when the access is not permitted through the regular input / output channel designated by the system developer. It means a memory area that has virtually inaccessible characteristics even in consideration of time and cost even if it is mobilized. In the case of a smart card, this is a protected nonvolatile memory.

본 실시 예에서 유한 자원 시스템으로 스마트카드의 경우를 제시하였으나 유한 자원 시스템은 이에 한정되는 것은 아니다.In the present embodiment, the smart card is presented as a finite resource system, but the finite resource system is not limited thereto.

도 2는 본 발명에 따른 암호학적 안전성이 보장된 의사 난수 생성기의 일례를 도시한 도면이다. 2 is a diagram illustrating an example of a pseudo random number generator with guaranteed cryptographic security according to the present invention.

도 2를 참조하면, 본 발명에 따른 암호학적 안전성이 보장된 의사난수 생성기(CSPRNG)(200)는 난수 생성부(210), 난수풀 생성부(220), 정교화부(230) 및 출력부(240)를 포함한다.Referring to FIG. 2, the pseudo-random number generator (CSPRNG) 200 according to the present invention has a guaranteed random number generator 210, a random number pool generator 220, an elaborator 230, and an output unit ( 240).

난수 생성부(210)는 종래 암호학적으로 안전성이 보장되지 아니한 의사난수 발생기(Pseudo Random Number Generator, 이하, 'PRNG')를 통해 난수를 생성하여 출력하거나, 시스템이 True Random 소스를 제공하는 경우 그 소스로부터 난수를 출력한다. 이 외 난수 생성부(210)는 종래 다양한 방법을 통해 암호학적 안전성이 보장되지 아니한 의사 난수를 생성할 수 있다.The random number generator 210 generates and outputs a random number through a pseudo random number generator (PRNG), which is not conventionally secured, or when the system provides a true random source. Output a random number from the source. In addition, the random number generator 210 may generate pseudo random numbers that are not guaranteed cryptographic stability through various conventional methods.

난수풀 생성부(220)는 난수 생성부(210)의 두 출력 값을 이용하여 대칭키 암호화를 수행한 후 그 결과 값을 난수풀(미도시)에 저장한다. 난수풀 값을 생성하는 일례로 아래 수학식 1을 이용할 수 있다.The random number generator 220 performs symmetric key encryption using two output values of the random number generator 210 and stores the result in a random number pool (not shown). As an example of generating a random pool value, Equation 1 below may be used.

Figure 112010080178560-pat00001
Figure 112010080178560-pat00001

여기서, PRNG는 암호학적 안전성이 보장되지 아니한 의사난수생성기를 의미하며, PRNG(n)와 PRNG(m)은 의사난수생성기(PRNG)에서 각각 n번째 및 m번째 생성한 출력값을 의미하고, EK(S)는 S를 평문으로 K를 키로 하는 대칭키 암호화를 의미한다. Here, PRNG means a pseudo random number generator that is not guaranteed cryptographic safety, PRNG (n) and PRNG (m) means the output value generated by the n and m th each in the pseudo random number generator (PRNG), E K (S) means symmetric key encryption with S as plain text and K as key.

난수풀 생성부(220)는 대칭키 암호화를 위해 하드웨어로 지원되는 TDES(Triple Data Encryption Standard)-112 또는 그 상위 키 버전 등을 사용할 수 있다. 만약 의사난수생성기(200)가 구현된 시스템이 하드웨어 대칭키 암호 모듈을 지원하지 않는 경우에는 소프트웨어 대칭키 암호 모듈을 사용할 수 있으며, 이 경우 초기 난수풀 생성 시간은 다소 늘어나지만, 도 1에서 살핀 유한 자원 시스템의 사용 모드에서는 암호화 동작이 없기 때문에 난수 출력 속도가 떨어지지는 않는다. The random number generator 220 may use a triple data encryption standard (TDES) -112 or a higher key version thereof supported by hardware for symmetric key encryption. If the system in which the pseudo random number generator 200 is implemented does not support a hardware symmetric key cryptographic module, a software symmetric key cryptographic module may be used, in which case the initial random pool generation time is somewhat increased, In the usage mode of the resource system, since there is no encryption operation, the random number output speed does not decrease.

위 수학식 1의 평문(S)은 대칭키 운영모드에 따라 ECB(Electronic CodeBook) 모드이면 대칭키 암호 평문 블록과 길이가 동일하고, CBC(Cipher Block Chaining) 모드이면 초기화 벡터 값을 포함하므로 대칭키 암호 평문 블록 길이의 2배 길이가 된다. 따라서 난수풀 생성부(220)는 대칭키 암호 평문과 동일한 길이의 난수풀 값을 생성하며 TDES-112를 사용하는 경우 112 비트, AES-128을 사용하는 경우 128 비트가 된다. 이때 난수풀 생성부(220)는 난수 생성부(210)의 두 출력 값(K,S)과 대칭키 암호화 결과값(RNP)을 모두 외부로 출력하지 않고, 난수풀(RNP)만을 보호 메모리에 저장한다.The plain text (S) of Equation 1 has the same length as the symmetric key cryptographic plaintext block in ECB (Electronic CodeBook) mode according to the symmetric key operation mode, and includes the initialization vector value in the Cipher Block Chaining (CBC) mode. It is twice the length of the cipher plaintext block. Accordingly, the random number pool generation unit 220 generates a random number pool value having the same length as the symmetric key cipher plaintext and becomes 112 bits when using TDES-112 and 128 bits when using AES-128. At this time, the random number generator 220 does not output both the two output values (K, S) and the symmetric key encryption result value (RNP) of the random number generator 210 to the outside, and only the random number pool (RNP) to the protected memory. Save it.

이와 같이 키(K)와 평문(S)이 모두 외부로 노출되지 않은 상태에서 난수 생성부(220)의 출력값만을 이용하여 안정성이 검증된 대칭키 암호화 과정을 수행함으로써 난수풀 값은 암호키 크기만큼의 엔트로피를 가진다. 예를 들어, TDES-112를 사용하는 경우 112 비트, AES-128을 사용하는 경우 128 비트 엔트로피를 가지게 되며 이러한 암호화 결과값(Cryptogram)은 키(K)와 평문(S)이 안전하게 보호되는 조건에서 암호학적으로 안전한 의사 난수 생성기(CSPRNG) 출력의 특성을 만족하는 것이 실험적으로 알려져 있다.As such, the random number pool value is equal to the size of the encryption key by performing a symmetric key encryption process whose stability is verified using only the output value of the random number generator 220 in a state where both the key K and the plain text S are not exposed to the outside. Has entropy of. For example, if you use TDES-112, you will have 112 bits and if you use AES-128, you will have 128 bits of entropy. It is experimentally known to satisfy the characteristics of a cryptographically secure pseudorandom number generator (CSPRNG) output.

따라서 난수풀 생성부(220)는 초기 난수풀을 보호메모리에 저장할 때 반드시 키(S)와 평문(S) 등이 사용된 모든 버퍼값을 삭제 또는 리셋하여 의도하지 않은 부채널공격(side-channel attack)에 의해 초기 난수풀 값이 공격자에게 노출된 가능성을 없애는 것이 바람직하다.Therefore, when storing the initial random number pool in the protected memory, the random number pool generation unit 220 deletes or resets all buffer values used with the key (S) and the plain text (S), thereby inadvertently sub-channel attack (side-channel). It is desirable to eliminate the possibility that the initial random number value is exposed to the attacker by attack.

정교화부(230)는 스마트카드와 같은 정보보호 기능이 중요한 유한 자원 시스템의 파워온 등 시스템 시작으로 인한 스타트업이 가동될 때 난수 생성부(210)의 난수성(randomness) 시험을 수행하는 경우에 그 난수성 시험에 사용된 시료를 이용하여 난수풀 값을 정교화한다. 여기서 난수성 시험은 난수 생성부(210)에서 생성된 표본출력수열(sample output sequence)에 몇몇 테스트를 적용하여 이루질 수 있는데 일례로 무작위 수열이 가져야 하는 특정한 속성을 표본출력수열이 가지는지의 여부를 판별하는 통계적 테스트 방법이 있다. 이 외의 다양한 난수성 시험 방법이 종래 존재하며 정교화부(230)는 이러한 난수성 시험에 사용한 시료를 이용하는 데 특징이 있으며 난수성 시험 방법은 본 발명의 범위를 벗어나므로 이에 대한 상세한 설명은 생략한다.When the elaboration unit 230 performs a randomness test of the random number generator 210 when a startup is started due to system startup, such as power-on of a finite resource system in which an information protection function such as a smart card is important. The random pool value is refined using the sample used for the randomness test. Here, the randomness test may be performed by applying several tests to the sample output sequence generated by the random number generator 210. For example, whether the sample output sequence has a specific attribute that the random sequence should have. There is a statistical test method to determine. Various other hydrophobicity test methods exist in the related art, and the elaboration unit 230 is characterized by using a sample used for such a hydrophobicity test, and the detailed description thereof will be omitted since the randomness test method is beyond the scope of the present invention.

구체적으로 정교화부(230)는 난수성 시험에 사용한 시료를 연접(concatenation)한 난수 시퀀스에서 난수풀 값의 길이만큼의 상위 비트를 취한 후 이를 난수풀 값과 배타적 논리합을 수행한 결과를 출력한다. 즉 정교화부(230)는 다음 수학식 2와 같이 구현될 수 있다.In detail, the elaboration unit 230 takes an upper bit corresponding to the length of the random number pool value from the random number sequence concatenated with the sample used for the random number test, and outputs the result of performing the exclusive OR with the random number pool value. That is, the refiner 230 may be implemented as in Equation 2 below.

Figure 112010080178560-pat00002
Figure 112010080178560-pat00002

여기서, RS는 난수성 시험에 사용한 시료를 연접한 난수 시퀀스이며, RNP는 난수풀 값을 나타내고, 정교화함수 R은 RNP와 RS의 배타적 논리합(XOR) 연산을 나타낸다. Here, RS is a random number sequence obtained by concatenating the samples used in the randomness test, RNP represents a random number pool value, and the refinement function R represents an exclusive OR (XOR) operation of RNP and RS.

앞서 살핀 바와 같이 난수풀 값은 보호 메모리의 안정성이 보장되는 경우 CSPRNG 출력과 동일한 특성을 가지므로 수학식 2의 정교화함수R이 단순한 비트간 배타적 논리합(bit-wise exclusive OR) 연산이더라도 결과값은 CSPRNG의 출력과 동일한 특성을 가진다. As we saw earlier, the random number value has the same characteristics as the CSPRNG output when the stability of the protected memory is guaranteed. Therefore, even if the elaboration function R in Equation 2 is a simple bit-wise exclusive OR operation, the result value is CSPRNG. It has the same characteristics as the output of.

보호 메모리의 안전성이 일부 공격당하는 경우 또는 난수 생성부(210)의 출력 순서를 공격자가 예측할 수 있는 극단적인 경우를 대비하고자 할 때는 두 입력값(즉, RNP, RS)을 연접하여 SHA-1 또는 SHA-2와 같은 해쉬함수를 적용한 후 난수풀 값의 길이 만큼의 상위 비트를 취하는 식의 암호학적 함수로 수학식 2의 정교화함수R을 정의할 수 있다. When the safety of the protection memory is under attack, or to prepare for the extreme case where the attacker can predict the output order of the random number generator 210, two input values (i.e., RNP and RS) are concatenated to form SHA-1 or After applying a hash function such as SHA-2, an elaboration function R of Equation 2 may be defined as a cryptographic function of taking an upper bit as long as a random pool value.

정교화부(230)는 정교화 결과값으로 난수풀 값을 대체하여 보호메모리에 저장하며, 이때 사용된 버퍼값을 삭제 또는 리셋하여 의도하지 않은 부채널공격에 의한 난수풀 값이 공격자에게 노출될 가능성을 없애는 것이 바람직하다.The refiner 230 replaces the random number pool value with the refinement result and stores it in the protected memory.In this case, by deleting or resetting the used buffer value, it is possible that the random number pool value due to an unintended subchannel attack is exposed to the attacker. It is desirable to get rid of it.

출력부(240)는 외부로부터 난수 출력을 요청받으면 난수 생성부(210)의 출력 값과 난수풀 값을 배타적 논리합 연산한 후 그 결과값을 출력한다. 즉 출력부(240)는 다음 수학식 3의 연산 후 그 결과값을 출력한다.When the output unit 240 receives a random number output request from the outside, the output unit 240 performs an exclusive OR operation on the output value of the random number generator 210 and the random number pool value, and then outputs the result value. That is, the output unit 240 outputs the result value after the operation of Equation 3 below.

Figure 112010080178560-pat00003
Figure 112010080178560-pat00003

만약 요청받은 난수의 길이가 난수풀 값의 길이보다 긴 경우에, 출력부(240)는 다음 수학식 4와 같이 세션 리시딩을 블록 단위로 반복 수행하여 원하는 길이 만큼의 출력값을 얻을 수 있다. If the length of the requested random number is longer than the length of the random number pool value, the output unit 240 may repeatedly perform session receiving in block units as shown in Equation 4 to obtain an output value of a desired length.

Figure 112010080178560-pat00004
Figure 112010080178560-pat00004

여기서, SPRNG는 출력부의 의사난수출력값, PRNG는 난수 생성부(210)의 출력 값, RNP는 난수풀 값을 나타낸다.Here, SPRNG denotes a pseudo random number output value of the output unit, PRNG denotes an output value of the random number generator 210, and RNP denotes a random number pool value.

효율이 요구되는 응용에 대해서는 앞서 살핀 정교화부(230)를 생략하고 난수 생성부(210)의 출력값으로 세션 리시딩하여 출력할 수 있다. 이 경우에는 공격자가 출력값을 연속적으로 얻어냄으로서 난수 생성부(210)의 출력 구조에 대한 정보를 무한히 수집하는 것을 방지할 필요가 있다. 난수 생성부(210)가 충분한 주기를 갖지 못하는 경우 공격에 대응하는 한 가지 방법으로 출력부(240)는 정교화부(230)의 적용없이 세션 리시딩만으로 난수를 출력하되 그 횟수를 제한하는 것이며, 허용 횟수에 도달하였들 때 정교화부(230)에 의한 정교화함수R을 적용하여 난수풀 값을 리시딩하도록 하는 것이다.For applications requiring efficiency, the salping refiner 230 may be omitted and session-received as an output value of the random number generator 210. In this case, it is necessary to prevent an attacker from infinitely collecting information on the output structure of the random number generator 210 by continuously obtaining the output value. When the random number generator 210 does not have a sufficient period, the output unit 240 outputs a random number by only session receiving without applying the refiner 230, but limits the number of times as one method corresponding to the attack. When the allowable number of times is reached, a refinement function R by the refiner 230 is applied to receive the random number pool value.

그러나 스마트카드와 같은 유한 자원 시스템의 경우 입출력 속도가 현저히 느리기 때문에 무작위 수집(brute-force) 공격에 대해서는 40 비트 엔트로피 정도면 실용적으로 충분히 안전하다는 것이 알려져 있다. 따라서 난수생성부가 240이상의 주기를 보장하는 경우에는 정교화부에 의한 정교화함수R의 적용없이 안전한 난수 출력을 얻을 수 있다.However, in the case of finite resource systems such as smart cards, the input / output speed is significantly slower, so it is known that 40-bit entropy is practically safe enough for brute-force attacks. Therefore, when the random number generator guarantees a period of 2 40 or more, a safe random number output can be obtained without applying the refinement function R by the refiner.

도 3은 본 발명에 따른 암호학적 안전성이 보장된 난수 생성 방법의 일례를 도시한 흐름도이다.3 is a flowchart illustrating an example of a cryptographically secure random number generation method according to the present invention.

도 3을 참조하면, 유한 자원 시스템은 암호학적 안전성이 보장되지 아니한 의사난수생성기(PRNG)로부터 난수를 출력하며(S300), 출력된 두 개의 난수를 각각 키 및 평문으로 한 대칭키 암호화를 수행하여 그 결과를 난수풀에 저장한다(S310). 난수풀은 앞서 살핀 바와 같이 유한 자원 시스템의 보호 메모리에 1세트만 저장되는 것이 바람직하다.Referring to FIG. 3, the finite resource system outputs a random number from a pseudo random number generator (PRNG) whose cryptographic stability is not guaranteed (S300), and performs symmetric key encryption using the output two random numbers as keys and plain text, respectively. The result is stored in the random number pool (S310). As previously described, it is preferable that only one set of random number pools is stored in the protection memory of the finite resource system.

유한 자원 시스템이 시스템 스타트업시 난수성 시험을 하는 경우, 그 난수성 시험의 시료를 기초로 난수풀 값을 보다 정교화한다(S320). 즉 난수성 시험의 시료를 연접한 난수 시퀀스에서 난수풀 값의 길이만큼의 상위 비트를 취한 후 이를 난수풀 값과 배타적 논리합을 수행한 후 그 결과로 난수풀 값을 대체한다.When the finite resource system performs the random number test at system startup, the random number pool value is further refined based on the sample of the random number test (S320). In other words, in the random number sequence of the random number test sample, the upper bits of the random number are taken as long as the length of the random number, and the result is exclusively ORed with the random number and the result is replaced with the random number.

이와 같이 난수풀의 생성 및 정교화가 완료되면, 유한 자원 시스템은 외부의 난수출력 요청이 있으면 암호학적 안전성이 보장되지 아니한 의사난수생성기(PRNG)의 출력과 난수풀 값을 배타적 논리합 연산하여 그 결과를 출력한다(S330). 유한 자원 시스템은 이부 요청 난수값의 길이가 난수풀 값보다 긴 경우에는 세션 리시딩을 블록 단위로 반복수행하여 원하는 길이 만큼의 출력값을 얻을 수 있다. 또한 유한 자원 시스템은 정교화 과정을 생략하고 세션 리시딩만을 수행할 수 있으며, 이 경우 출력 횟수를 제한하여 일정 횟수에 도달하면 정교화과정을 수행함으로써 공격자가 PRNG의 출력 구조에 대한 정보를 무한히 수집하는 것을 방지할 수 있다. When the generation and refinement of the random number pool is completed, the finite resource system performs an exclusive OR operation on the output of the pseudo random number generator (PRNG) and the random number pool value, which are not guaranteed cryptographic safety, upon receiving an external random number output request. Output (S330). The finite resource system can obtain the output value of the desired length by repeatedly performing session receiving in block units when the length of the dual request random number is longer than the random pool value. In addition, the finite resource system can perform session receiving only by skipping the refinement process. In this case, the finite resource system restricts the number of outputs and executes the refinement process when a certain number of times is reached, thereby preventing the attacker from collecting information on the output structure of the PRNG indefinitely. It can prevent.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광데이터 저장장치 등이 있다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The present invention can also be embodied as computer-readable codes on a computer-readable recording medium. A computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disks, optical data storage devices, and the like. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far I looked at the center of the preferred embodiment for the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

Claims (8)

암호학적 안전성이 보장되지 아니한 난수를 생성하는 난수 생성부;
상기 난수 생성기의 두 출력값을 평문 및 키로 하는 대칭키 암호화를 수행한 결과값으로 난수풀을 생성하는 난수풀 생성부; 및
상기 난수 생성부의 출력 값과 상기 난수풀 값의 배타적 논리합 연산의 수행 결과를 암호학적 안전성이 보장된 의사난수로 출력하는 출력부;를 포함하는 것을 특징으로 하는 암호학적 안전성이 보장된 의사난수생성 장치.
Random number generation unit for generating a random number that is not guaranteed cryptographic stability;
A random number pool generator for generating a random number pool as a result of performing symmetric key encryption using two output values of the random number generator as plain text and a key; And
And an output unit for outputting a result of performing an exclusive OR operation of the output value of the random number generation unit and the random number pool value as a pseudo random number with a guaranteed cryptographic stability. .
제 1항에 있어서,
상기 난수 생성부에서 생성된 표본출력수열에 대한 난수성 시험을 하는 경우, 상기 표본출력수열과 상기 난수풀 값의 배타적 논리합 연산을 수행한 후 그 결과값으로 상기 난수풀 값을 대체하여 저장하는 정교화부;를 더 포함하는 것을 특징으로 하는 암호학적 안전성이 보장된 의사난수생성 장치.
The method of claim 1,
When the random number test is performed on the sample output sequence generated by the random number generator, an elaborate OR operation of the sample output sequence and the random number pool value is performed, and refinement is performed by replacing the random number pool value with the result. Cryptographically secured pseudo-random generating device further comprising a.
제 1항에 있어서, 상기 난수풀 생성부는,
시스템이 보호 모드에서 사용 모드로 전환하는 1회의 활성화 과정에서 상기 난수풀을 생성한 후 정규 입출력 채널을 통해서만 접근이 허용되는 보호 메모리에 저장하는 것을 특징으로 하는 암호학적 안정성이 보장된 의사난수생성 장치.
The method of claim 1, wherein the random number pool generation unit,
The pseudo-random number generation device with guaranteed cryptographic stability, wherein the random number pool is generated during the one-time activation process when the system switches from the protected mode to the enabled mode and stored in a protected memory that is accessible only through a regular input / output channel. .
제 1항에 있어서, 상기 출력부는,
외부로부터 요청받은 난수 출력 길이가 상기 난수풀 값의 길이보다 긴 경우에는 상기 난수 생성부의 출력값과 난수풀 값의 배타적 논리합 연산을 반복 수행하여 원하는 길이를 얻는 것을 특징으로 하는 암호학적 안정성이 보장된 의사난수생성 장치.
The method of claim 1, wherein the output unit,
When the random number output length requested from the outside is longer than the random number pool value, the cryptographic stability guaranteed pseudo-characteristics is obtained by repeatedly performing the exclusive OR operation of the output value of the random number generator and the random number pool value. Random number generator.
암호학적으로 안전성이 보장되지 아니한 난수 생성기에서 출력한 두 난수를 각각 평문 및 키로 하는 대칭키 암호화를 수행하여 그 결과를 난수풀 값으로 저장하는 단계; 및
상기 난수 생성기에서 출력한 난수와 상기 난수풀 값의 배타적 논리합 연산의 수행 결과를 암호학적 안전성이 보장된 의사난수로서 출력하는 단계;를 포함하는 것을 특징으로 하는 암호학적 안전성이 보장된 의사난수생성 방법.
Performing symmetric key encryption using the plain text and the key as two random numbers output from the cryptographically insecure random number generator and storing the result as a random number pool value; And
And outputting a result of performing an exclusive OR operation on the random number output from the random number generator and the random number pool value as a pseudo random number with a guaranteed cryptographic stability. .
제 5항에 있어서,
시스템 스타업시 상기 난수 생성기에서 생성된 표본출력수열에 대한 난수성 시험을 수행하는 단계; 및
상기 표본출력수열과 상기 난수풀 값의 배타적 논리합 연산을 수행한 후 그 결과값으로 상기 난수풀 값을 대체하여 저장하는 단계;를 더 포함하는 것을 특징으로 하는 암호학적 안전성이 보장된 의사난수생성 방법.
6. The method of claim 5,
Performing a randomness test on a sample output sequence generated by the random number generator at system startup; And
And performing an exclusive OR operation on the sample output sequence and the random number pool value and storing the random number pool value as a result value. .
제 5항에 있어서, 상기 출력하는 단계는,
외부로부터 요청받은 난수 출력 길이가 상기 난수풀 값보다 긴 경우에는 상기 난수 생성부의 출력값과 난수풀 값의 배타적 논리합 연산을 반복 수행하는 단계;를 포함하는 것을 특징으로 하는 암호학적 안정성이 보장된 의사난수생성 방법.
The method of claim 5, wherein the outputting step,
And repeating an exclusive OR operation of the output value of the random number generation unit and the random number pool value if the random number output length requested from the outside is longer than the random number pool value. How to produce.
제 5항 내지 제7항 중 어느 한 항에 기재된 방법을 수행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for performing the method according to any one of claims 5 to 7.
KR1020100123485A 2010-12-06 2010-12-06 Apparatus of generating cryptographically secure pseudo random number and method thereof KR101194403B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100123485A KR101194403B1 (en) 2010-12-06 2010-12-06 Apparatus of generating cryptographically secure pseudo random number and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100123485A KR101194403B1 (en) 2010-12-06 2010-12-06 Apparatus of generating cryptographically secure pseudo random number and method thereof

Publications (2)

Publication Number Publication Date
KR20120062287A KR20120062287A (en) 2012-06-14
KR101194403B1 true KR101194403B1 (en) 2012-10-25

Family

ID=46683269

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100123485A KR101194403B1 (en) 2010-12-06 2010-12-06 Apparatus of generating cryptographically secure pseudo random number and method thereof

Country Status (1)

Country Link
KR (1) KR101194403B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220153184A (en) 2021-05-11 2022-11-18 금오공과대학교 산학협력단 Method of Forming Deterministic Random Bit using Irrational Number
KR20230025968A (en) 2021-08-17 2023-02-24 한일석 Method for generating random number

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6782863B1 (en) * 2017-11-07 2020-11-11 グーグル エルエルシー Random number generator
KR102027686B1 (en) 2018-03-06 2019-10-01 순천향대학교 산학협력단 True random number generation device and method using visible light for secure communication

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070230693A1 (en) 2006-03-31 2007-10-04 Maik Mueller System and method for generating pseudo-random numbers
WO2008114829A1 (en) 2007-03-19 2008-09-25 Tokyo Denki University Encryption device, decryption device, encryption program, decryption program, and recording medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070230693A1 (en) 2006-03-31 2007-10-04 Maik Mueller System and method for generating pseudo-random numbers
WO2008114829A1 (en) 2007-03-19 2008-09-25 Tokyo Denki University Encryption device, decryption device, encryption program, decryption program, and recording medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220153184A (en) 2021-05-11 2022-11-18 금오공과대학교 산학협력단 Method of Forming Deterministic Random Bit using Irrational Number
KR20230025968A (en) 2021-08-17 2023-02-24 한일석 Method for generating random number

Also Published As

Publication number Publication date
KR20120062287A (en) 2012-06-14

Similar Documents

Publication Publication Date Title
Lazar et al. Why does cryptographic software fail? A case study and open problems
Turan et al. Recommendation for password-based key derivation
Horstmeyer et al. Physical key-protected one-time pad
EP2695052B1 (en) Random number generating system based on memory start-up noise
CN107078904B (en) Hybrid cryptographic key derivation
US8995653B2 (en) Generating a secret key from an asymmetric private key
US8885820B1 (en) Key expansion using seed values
US11349668B2 (en) Encryption device and decryption device
JP6533553B2 (en) Encryption / decryption device and power analysis protection method therefor
US11126404B2 (en) Random number generator using multiple entropy sources and a method for generating random numbers
KR101194403B1 (en) Apparatus of generating cryptographically secure pseudo random number and method thereof
CN111066077A (en) Encryption device, encryption method, decryption device, and decryption method
Turan et al. Sp 800-132. recommendation for password-based key derivation: Part 1: Storage applications
Lee et al. Security issues on the CNG cryptography library (Cryptography API: Next Generation)
EP3214567A1 (en) Secure external update of memory content for a certain system on chip
Fahr The Effects of Side-Channel Attacks on Post-Quantum Cryptography: Influencing FrodoKEM Key Generation Using the Rowhammer Exploit
Elganzoury et al. A new secure one-time password algorithm for mobile applications
CN111143904A (en) Data decryption method and device and computer readable storage medium
Olaleye et al. SoloEncrypt: A Smartphone Storage Enhancement Security Model for Securing users Sensitive Data
Shah et al. A comparative analysis of different LFSR-based ciphers and parallel computing platforms for development of generic cipher compatible on both hardware and software platforms
TWI608381B (en) Encryption/decryption apparatus and power analysis protecting method thereof
KR101925787B1 (en) Method and Apparatus for Securing the Continuity of Random Numbers after Von Neumann Post-processing
US8880906B2 (en) Storing encrypted contents in digital archives
Chari et al. Designing a side channel resistant random number generator
Skillen Deniable storage encryption for mobile devices

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20150930

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20160920

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20170928

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20180927

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20191001

Year of fee payment: 8