KR102217928B1 - Method and Apparatus for Generating Random Prime - Google Patents

Method and Apparatus for Generating Random Prime Download PDF

Info

Publication number
KR102217928B1
KR102217928B1 KR1020190087871A KR20190087871A KR102217928B1 KR 102217928 B1 KR102217928 B1 KR 102217928B1 KR 1020190087871 A KR1020190087871 A KR 1020190087871A KR 20190087871 A KR20190087871 A KR 20190087871A KR 102217928 B1 KR102217928 B1 KR 102217928B1
Authority
KR
South Korea
Prior art keywords
random number
random
prime
seed code
code
Prior art date
Application number
KR1020190087871A
Other languages
Korean (ko)
Other versions
KR20200143183A (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 광운대학교 산학협력단
Publication of KR20200143183A publication Critical patent/KR20200143183A/en
Application granted granted Critical
Publication of KR102217928B1 publication Critical patent/KR102217928B1/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/588Random number generators, i.e. based on natural stochastic processes
    • 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)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Computational Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Tests Of Electronic Circuits (AREA)
  • Pinball Game Machines (AREA)

Abstract

랜덤 소수 생성 방법 및 그를 위한 장치를 개시한다.
본 발명의 실시예에 따른 랜덤 소수 생성장치는, 생체 신호를 이용하여 시드 코드를 생성하는 시드 코드 생성부; 상기 시드 코드를 기반으로 초기 난수를 생성하고, 상기 시드 코드와 상기 초기 난수를 연산 처리하여 난수를 생성하는 난수 생성부; 및 상기 난수의 소수 여부를 판별하여 랜덤 소수를 생성하는 랜덤 소수 생성부를 포함할 수 있다.
Disclosed is a method for generating random prime numbers and an apparatus therefor.
An apparatus for generating a random prime number according to an embodiment of the present invention includes: a seed code generator for generating a seed code using a biosignal; A random number generator configured to generate an initial random number based on the seed code, and to generate a random number by calculating and processing the seed code and the initial random number; And a random prime number generator configured to generate a random prime number by determining whether the random number is a prime number.

Description

랜덤 소수 생성 방법 및 그를 위한 장치{Method and Apparatus for Generating Random Prime}Method and Apparatus for Generating Random Prime

본 발명은 랜덤으로 소수를 생성하기 위한 방법 및 그를 위한 장치에 관한 것이다. The present invention relates to a method for randomly generating prime numbers and an apparatus therefor.

이 부분에 기술된 내용은 단순히 본 발명의 실시예에 대한 배경 정보를 제공할 뿐 종래기술을 구성하는 것은 아니다.The content described in this section merely provides background information on the embodiments of the present invention and does not constitute the prior art.

4 차 산업혁명의 핵심 기술인 IoT(Interesting of Things)는 작은 통신 장비들이 무선 통신을 통해 서로 원하는 데이터를 주고 받는다. IoT 장비 수요가 증가함에 따라 점점 많은 기기들이 서로 통신을 하며, 이런 통신 과정에서 다양한 공격으로 인해 데이터가 유출되는 문제가 발생할 수 있다. 그러므로, 무선 통신을 통해 전송되는 데이터들은 암호화를 통한 데이터 보안이 필수적이다. 기존 PC에서 사용되던 암호화 방식들은 매우 빠른 처리 속도와 큰 비트 수를 가지는 키가 요구되고, 복잡한 알고리즘 방식을 사용함으로 작은 통신 기기에 적용하기 어렵기 때문에, IoT 기기를 위한 전용의 암호화가 필요하다.IoT (Interesting of Things), the core technology of the 4th industrial revolution, allows small communication devices to exchange desired data with each other through wireless communication. As the demand for IoT equipment increases, more and more devices communicate with each other, and data leakage may occur due to various attacks during this communication process. Therefore, data security through encryption is essential for data transmitted through wireless communication. Encryption methods used in existing PCs require a key having a very fast processing speed and a large number of bits, and because they are difficult to apply to small communication devices due to the use of a complex algorithm method, dedicated encryption for IoT devices is required.

RNG(Random Number Generator)는 AES, PBE, DES 등과 같은 대부분의 암호화 응용 프로그램에서 널리 사용되는 중요한 보안 블록입니다. RNG는 독립적으로 작동해야 하며, 예측할 수 없는 난수의 시퀀스를 생성해야 한다. Random Number Generator (RNG) is an important security block widely used in most cryptographic applications such as AES, PBE, DES, etc. RNG must operate independently and generate a sequence of unpredictable random numbers.

RNG는 크게 의사 난수 생성기(PRNG)와 순수 난수 생성기(TRNG)로 구분된다. RNG is largely divided into a pseudorandom number generator (PRNG) and a pure random number generator (TRNG).

PRNG는 임의성을 갖는 난수를 생성하기 위하여 수학적 알고리즘을 사용한다. 일반적으로 난수를 생성할 때 소프트웨어 알고리즘이 사용되며, 난수의 시퀀스는 초기 시드 값에 의해 결정된다. 그러므로, 시드 값을 얻거나 많은 양의 데이터를 수집하여 난수 패턴을 예측할 수 있다. 따라서, PRNG는 구현이 쉽다는 장점이 있지만, PRNG 임의 패턴의 취약성으로 인해 높은 보안이 필요한 금융 또는 국방 시스템에 적합하지 않다. PRNG의 전형적인 유형은 선형 피드백 시프트 레지스터(LFSR)이다. LFSR은 레지스터에 입력된 값이 이전 상태 값의 선형 함수로 계산되는 구조를 가진다. LFSR은 선형 함수가 잘 선택되면 2^n-1의 최대 길이 시퀀스를 생성 할 수 있으며 PRNG 특성에 따라 특정 기간을 연속적으로 반복한다. LFSR은 회로에서 구현하기가 매우 쉽고 최대 길이 시퀀스를 생성 할 수 있는 이점이 있지만, 결정론적 시스템의 특성으로 인해 완전한 난수를 생성하는 것은 불가능하다.PRNG uses a mathematical algorithm to generate random numbers with randomness. In general, a software algorithm is used to generate random numbers, and the sequence of random numbers is determined by the initial seed value. Therefore, it is possible to predict a random number pattern by obtaining a seed value or collecting a large amount of data. Therefore, although PRNG has the advantage of being easy to implement, it is not suitable for financial or defense systems that require high security due to the vulnerability of PRNG random patterns. A typical type of PRNG is a linear feedback shift register (LFSR). LFSR has a structure in which a value entered into a register is calculated as a linear function of the previous state value. LFSR can produce a maximum length sequence of 2^n-1 if the linear function is well chosen, and it repeats a certain period continuously depending on the PRNG characteristics. LFSR is very easy to implement in a circuit and has the advantage of being able to generate a maximum length sequence, but it is impossible to generate a complete random number due to the nature of a deterministic system.

TRNG는 하드웨어 온도, 지터, 잡음, 스펙트럼 등과 같이 예측할 수 없는 시드 코드를 기반으로 랜덤 소수를 생성한다. 따라서, TRNG 기반의 난수에 대한 랜덤 패턴을 예측하는 것은 매우 어렵다. TRNG는 난수의 생성 패턴을 예측할 수 없기 때문에 높은 보안이 요구되는 곳에 적합하다. 하지만, TRNG는 난수를 생성하기 위해 별도의 하드웨어가 필요하고, 구현이 쉽지 않으며, 칩 면적이 크기 때문에 소형 모바일 장치에서 사용하기에는 적합하지 않다.TRNG generates random prime numbers based on unpredictable seed codes such as hardware temperature, jitter, noise, and spectrum. Therefore, it is very difficult to predict a random pattern for a TRNG-based random number. TRNG is suitable for places requiring high security because it cannot predict the generation pattern of random numbers. However, TRNG requires separate hardware to generate random numbers, is not easy to implement, and has a large chip area, so it is not suitable for use in small mobile devices.

암호화를 위한 일반적인 소수 생성기들은 PRNG(Pseudo Random Number Generator)에서 생성된 난수를 기반으로 제작되었으며, 소수 판별을 위해 인수분해 알고리즘을 사용한다. 인수분해 알고리즘은 소수 판별에 오랜 시간이 소요되는 이유로 기존 소수 생성기는 실시간 소수 생성이 불가능하다는 단점을 가진다.General prime number generators for encryption are produced based on random numbers generated by PRNG (Pseudo Random Number Generator), and use a factorization algorithm to determine prime numbers. The factorization algorithm has a disadvantage in that it is impossible to generate a prime number in real time because it takes a long time to determine prime numbers.

본 발명은 생체 신호를 기반으로 난수를 생성하고, 생성된 난수의 소수 여부를 판별하여 랜덤 소수를 생성하는 랜덤 소수 생성 방법 및 그를 위한 장치를 제공하는 데 주된 목적이 있다.An object of the present invention is to provide a random prime number generation method and apparatus for generating a random prime number by generating a random number based on a bio-signal and determining whether the generated random number is prime.

본 발명의 일 측면에 의하면, 상기 목적을 달성하기 위한 랜덤 소수 생성장치는, 생체 신호를 이용하여 시드 코드를 생성하는 시드 코드 생성부; 상기 시드 코드를 기반으로 초기 난수를 생성하고, 상기 시드 코드와 상기 초기 난수를 연산 처리하여 난수를 생성하는 난수 생성부; 및 상기 난수의 소수 여부를 판별하여 랜덤 소수를 생성하는 랜덤 소수 생성부를 포함할 수 있다. According to an aspect of the present invention, an apparatus for generating a random prime number to achieve the above object includes: a seed code generator configured to generate a seed code using a bio signal; A random number generator configured to generate an initial random number based on the seed code, and to generate a random number by calculating and processing the seed code and the initial random number; And a random prime number generator configured to generate a random prime number by determining whether the random number is a prime number.

또한, 본 발명의 다른 측면에 의하면, 상기 목적을 달성하기 위한 랜덤 소수 생성방법은, 생체 신호를 이용하여 시드 코드를 생성하는 시드 코드 생성 단계; 상기 시드 코드를 기반으로 초기 난수를 생성하고, 상기 시드 코드와 상기 초기 난수를 연산 처리하여 난수를 생성하는 난수 생성 단계; 및 상기 난수의 소수 여부를 판별하여 랜덤 소수를 생성하는 랜덤 소수 생성 단계를 포함할 수 있다. In addition, according to another aspect of the present invention, a method for generating a random prime number to achieve the above object includes: a seed code generation step of generating a seed code using a bio-signal; A random number generation step of generating an initial random number based on the seed code, and generating a random number by arithmetic processing the seed code and the initial random number; And generating a random prime number by determining whether the random number is a prime number.

이상에서 설명한 바와 같이, 본 발명은 TRNG(True Random Number Generator)를 사용하여 예측할 수 없는 난수를 기반으로 소수를 생성하고, 16bit 내의 소수만을 생성함으로써, 파라미터 값을 저장시켜 난수와 비교하는 방법을 통해 실시간 소수 판별이 가능한 효과가 있다. As described above, the present invention generates prime numbers based on unpredictable random numbers using TRNG (True Random Number Generator), and generates only prime numbers within 16 bits, thereby storing parameter values and comparing them with random numbers. There is an effect that real-time prime number determination is possible.

또한, 본 발명은 실시간성 소수 생성을 통해 통신 기기들이 데이터를 암호화하기 위한 소수 제공을 원활하게 할 수 있고, 실시간 RSA(Rivest, Sharmir, Adleman) 암호화가 가능한 효과가 있다. In addition, the present invention can smoothly provide a prime number for communication devices to encrypt data through real-time prime number generation, and real-time RSA (Rivest, Sharmir, Adleman) encryption is possible.

또한, 본 발명은 작은 하드웨어 면적을 차지함에 따라 IoT와 같은 작은 기기들에 적용이 가능한 효과가 있다. In addition, the present invention can be applied to small devices such as IoT as it occupies a small hardware area.

또한, 본 발명은 RSA 암호화 방식을 IoT와 같은 작은 통신 기기에서 사용할 수 있도록 하여 반복되는 패턴을 가지지 않은 소수를 생성함으로 보안성이 향상된다는 장점이 있다.In addition, the present invention has the advantage of improving security by allowing the RSA encryption method to be used in a small communication device such as IoT, thereby generating a prime number that does not have a repeating pattern.

도 1은 본 발명의 실시예에 따른 랜덤 소수 생성 시스템을 개략적으로 나타낸 블록 구성도이다.
도 2는 본 발명의 실시예에 따른 랜덤 소수 생성장치에 포함된 난수 생성부를 개략적으로 나타낸 블록 구성도이다.
도 3은 본 발명의 실시예에 따른 랜덤 소수 생성장치에 포함된 랜덤 소수 생성부를 개략적으로 나타낸 블록 구성도이다.
도 4는 본 발명의 실시예에 따른 생체 신호를 기반으로 시드 코드를 생성하는 동작을 설명하기 위한 예시도이다.
도 5는 본 발명의 실시예에 따른 생체 신호를 디지털 신호로 변화시키는 동작을 설명하기 위한 예시도이다.
도 6a 내지 도 6c는 본 발명의 실시예에 따른 시드 코드를 생성하는 방법을 나타낸 예시도이다.
도 7는 본 발명의 실시예에 따른 랜덤 소수 생성장치에서 난수를 생성하기 위한 회로도를 나타낸 도면이다.
도 8는 본 발명의 실시예에 따른 랜덤 소수 생성장치에서 랜덤 소수를 생성하는 동작을 나타낸 도면이다.
도 9는 본 발명의 실시예에 따른 랜덤 소수 생성 방법을 설명하기 위한 순서도이다.
도 10는 일반적인 난수 생성 결과와 본 발명의 실시예에 따른 난수 생성 결과를 비교한 도면이다.
도 11 내지 도 14는 본 발명의 실시 예에 따른 난수 패턴 생성부에서 초기 난수를 생성하는 동작을 설명하기 위한 블록도이다.
1 is a block diagram schematically illustrating a system for generating a random prime number according to an embodiment of the present invention.
2 is a block diagram schematically illustrating a random number generator included in a random prime number generator according to an embodiment of the present invention.
3 is a block diagram schematically illustrating a random prime number generator included in a random prime number generator according to an embodiment of the present invention.
4 is an exemplary diagram for explaining an operation of generating a seed code based on a bio-signal according to an embodiment of the present invention.
5 is an exemplary diagram for explaining an operation of converting a bio signal into a digital signal according to an embodiment of the present invention.
6A to 6C are exemplary views showing a method of generating a seed code according to an embodiment of the present invention.
7 is a diagram showing a circuit diagram for generating a random number in a random prime number generator according to an embodiment of the present invention.
8 is a diagram illustrating an operation of generating a random prime number in a random prime number generator according to an embodiment of the present invention.
9 is a flowchart illustrating a method of generating a random prime number according to an embodiment of the present invention.
10 is a diagram illustrating a comparison between a general random number generation result and a random number generation result according to an embodiment of the present invention.
11 to 14 are block diagrams illustrating an operation of generating an initial random number by a random number pattern generator according to an embodiment of the present invention.

이하, 본 발명의 바람직한 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다. 또한, 이하에서 본 발명의 바람직한 실시예를 설명할 것이나, 본 발명의 기술적 사상은 이에 한정하거나 제한되지 않고 당업자에 의해 변형되어 다양하게 실시될 수 있음은 물론이다. 이하에서는 도면들을 참조하여 본 발명에서 제안하는 랜덤 소수 생성 방법 및 그를 위한 장치에 대해 자세하게 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing the present invention, when it is determined that a detailed description of a related known configuration or function may obscure the subject matter of the present invention, a detailed description thereof will be omitted. In addition, a preferred embodiment of the present invention will be described below, but the technical idea of the present invention is not limited thereto or is not limited thereto, and may be modified and variously implemented by a person skilled in the art. Hereinafter, a method for generating a random prime number proposed in the present invention and an apparatus therefor will be described in detail with reference to the drawings.

도 1은 본 발명의 실시예에 따른 랜덤 소수 생성 시스템을 개략적으로 나타낸 블록 구성도이다. 1 is a block diagram schematically showing a system for generating a random prime number according to an embodiment of the present invention.

본 실시예에 따른 랜덤 소수 생성 시스템(100)은 웨어러블 기기(110) 및 랜덤 소수 생성장치(120)를 포함한다. The random prime number generating system 100 according to the present embodiment includes a wearable device 110 and a random prime number generating device 120.

웨어러블 기기(110)는 사용자의 신체와 접촉하여 착용 가능한 기기로써, 사용자의 생체 신호를 측정하기 위한 생체 신호 측정부(112)를 포함할 수 있다. 여기서, 웨어러블 기기(110)는 안경, 손목 시계, 밴드형 기기, 헤드셋 등 중 하나의 웨어러블 디바이스일 수 있다. The wearable device 110 is a device that can be worn by contacting a user's body, and may include a biosignal measurement unit 112 for measuring a biosignal of the user. Here, the wearable device 110 may be one of a wearable device such as glasses, a wrist watch, a band-type device, and a headset.

사람들은 각각 자신만의 고유한 생체 신호를 포함하고 있다. 예를 들면 사람들은 심장 박동으로 인해 동맥으로 전달되는 맥파의 전달 속도, 호흡 압력 생체 임피던스 등과 같은 사람들 자신만의 고유한 신체 정보를 포함하고 있다.Each person has their own unique bio-signals. For example, people have their own unique body information, such as the rate of transmission of pulse waves transmitted to the arteries due to the heartbeat, respiratory pressure, and biological impedance.

생체 신호 측정부(112)는 생체 신호를 측정하기 위하여 적어도 하나의 센서를 포함할 수 있다. 생체 신호 측정부(112)는 상술한 사용자의 생체 신호를 센서를 이용하여 측정할 수 있으며, 사용자의 생체 신호를 측정하기 위한 센서는 센서를 구동시키는 센서 구동 수단 및 신호 전처리부를 포함할 수 있다. The biosignal measurement unit 112 may include at least one sensor to measure a biosignal. The biosignal measurement unit 112 may measure the aforementioned biosignal of the user using a sensor, and the sensor for measuring the biosignal of the user may include a sensor driving means for driving the sensor and a signal preprocessor.

생체 신호 측정부(112)는 구비된 센서를 이용하여 신체 말단에서 혈관의 용적이 변화하는 신호인 광용정맥파(photoplethysmogram, PPG)를 사용자의 생체 신호로 측정하는 것이 바람직하나 반드시 이에 한정되는 것은 아니다. 예를 들어, 생체 신호 측정부(112)는 구비된 센서를 이용하여 심장의 박동과 관련되어 있는 생체 신호인 심전도(electrocardiogram, ECG), 대뇌의 활동 상태에 따라 변화하는 생체 신호인 뇌전도(electroencephalogram, EEG), 근육의 활동 상태를 나타내는 신호인 근전도(electromyogram, EMG) 등과 같은 사용자의 생체 신호를 측정할 수 있으며, 사용자 자신만의 고유한 생체 신호에 해당되는 모든 신호가 본 발명에 개시된 생체 신호에 해당될 수 있다.It is preferable that the biosignal measurement unit 112 measures a photoplethysmogram (PPG), which is a signal of a change in the volume of a blood vessel at the end of the body, as a biosignal of the user, but is not limited thereto. . For example, the bio-signal measuring unit 112 uses an equipped sensor to provide an electrocardiogram (ECG), which is a bio-signal related to the heartbeat, and an electroencephalogram (EEG), which is a bio-signal that changes according to the activity state of the brain. ), it is possible to measure the user's bio-signals such as electromyogram (EMG), which is a signal indicating the activity state of the muscle, and all signals corresponding to the user's own unique bio-signal correspond to the bio-signals disclosed in the present invention. Can be.

생체 신호 측정부(112)는 측정된 생체 신호를 랜덤 소수 생성장치(120)로 전송한다. 생체 신호 측정부(112)는 무선 통신 방식을 이용하여 생체 신호를 랜덤 소수 생성장치(120)로 전송하는 것이 바람직하나 반드시 이에 한정되는 것은 아니다. 예를 들어, 웨어러블 기기(110)가 랜덤 소수 생성장치(120)와 유선으로 연결되어 있거나, 랜덤 소수 생성장치(120)가 웨어러블 기기(110) 내부에 구현된 경우 생체 신호 측정부(112)는 유선 통신 방식을 이용하여 생체 신호를 랜덤 소수 생성장치(120)로 전송할 수 있다. The biosignal measurement unit 112 transmits the measured biosignal to the random prime number generator 120. It is preferable that the biosignal measurement unit 112 transmits the biosignal to the random prime number generator 120 using a wireless communication method, but is not limited thereto. For example, when the wearable device 110 is connected to the random prime number generator 120 by wire, or the random prime number generator 120 is implemented inside the wearable device 110, the biosignal measurement unit 112 The biosignal may be transmitted to the random prime number generator 120 using a wired communication method.

랜덤 소수 생성장치(120)는 생체 신호를 기반으로 난수를 생성하고, 생성된 난수의 소수 여부를 판별하여 랜덤 소수를 생성하는 장치를 말한다. 본 실시예에 따른 랜덤 소수 생성장치(120)는 생체 신호 획득부(122), 시드 코드 생성부(124), 난수 생성부(126) 및 랜덤 소수 생성부(128)를 포함한다. 도 1의 랜덤 소수 생성장치(120)는 일 실시예에 따른 것으로서, 도 1에 도시된 모든 블록이 필수 구성요소는 아니며, 다른 실시예에서 랜덤 소수 생성장치(120)에 포함된 일부 블록이 추가, 변경 또는 삭제될 수 있다. The random prime number generator 120 refers to a device that generates a random number based on a bio-signal, determines whether the generated random number is prime, and generates a random prime number. The random prime number generator 120 according to the present embodiment includes a biosignal acquisition unit 122, a seed code generation unit 124, a random number generation unit 126, and a random prime number generation unit 128. The random prime number generator 120 of FIG. 1 is according to an embodiment, and not all blocks shown in FIG. 1 are essential components, and some blocks included in the random prime number generator 120 are added in other embodiments. , May be changed or deleted.

생체 신호 획득부(122)는 웨어러블 기기(110)로부터 측정된 생체 신호를 획득한다. 여기서, 생체 신호는 광용정맥파(PPG), 심전도(ECG), 뇌전도(EEG), 근전도(EMG) 등에 관한 같은 신호일 수 있다. The biosignal acquisition unit 122 acquires a biosignal measured from the wearable device 110. Here, the biosignal may be the same signal related to optical vein wave (PPG), electrocardiogram (ECG), electroencephalogram (EEG), electromyography (EMG), and the like.

생체 신호 획득부(122)는 웨어러블 기기(110)와 랜덤 소수 생성장치(120)가 하나의 장치로 구현된 경우 그 구성이 생략될 수 있다. 즉, 생체 신호 측정부(112)에서 측정된 생체 신호는 시드 코드 생성부(124)로 전송될 수 있다. When the wearable device 110 and the random prime number generator 120 are implemented as one device, the configuration of the biosignal acquisition unit 122 may be omitted. That is, the biosignal measured by the biosignal measurement unit 112 may be transmitted to the seed code generation unit 124.

시드 코드 생성부(124)는 생체 신호를 이용하여 난수를 생성하기 위한 시드 코드를 생성한다. The seed code generator 124 generates a seed code for generating a random number by using the bio-signal.

시드 코드 생성부(124)는 센서를 이용하여 측정된 사용자의 생체 신호를 디지털 신호로 변환하고, 디지털 신호로부터 기 설정된 시점에 대응되는 샘플을 추출하며, 추출된 샘플의 크기를 난수 생성과 관련된 이진 코드로 변화시킨 시드 코드를 생성한다. The seed code generation unit 124 converts the user's bio-signal measured using a sensor into a digital signal, extracts a sample corresponding to a preset point in time from the digital signal, and calculates the size of the extracted sample in binary related to random number generation. Generate seed code converted to code.

시드 코드 생성부(124)는 기 설정된 주기마다 갱신된 생체 신호를 획득하고, 갱신된 생체 신호를 이용하여 시드 코드를 생성한다. 여기서, 시드 코드 생성부(124)는 난수 생성부(126)에서 시드 코드를 이용하여 생성된 초기 난수가 최대 길이의 시퀀스에 도달한 경우, 갱신된 생체 신호를 이용하여 새롭게 시드 코드를 생성한다. The seed code generation unit 124 acquires the updated biosignal at every preset period, and generates a seed code using the updated biosignal. Here, when the initial random number generated by the random number generator 126 using the seed code reaches the sequence of the maximum length, the seed code generation unit 124 generates a new seed code using the updated biosignal.

시드 코드 생성부(124)는 생체 신호 측정부(112)에서 측정된 사용자의 생체 신호를 입력 받을 수 있고, 입력 받은 생체 신호를 디지털 신호로 변환하여 출력할 수 있다.The seed code generation unit 124 may receive a user's biosignal measured by the biosignal measurement unit 112, and convert the received biosignal into a digital signal and output it.

본 발명의 일 실시 예에 따른 시드 코드 생성부(124)는 생체 신호 측정부(112)에서 측정된 일정한 신호를 갖는 생체 신호에서 기 설정된 구간을 선택하여 디지털 신호로 변환할 수 있다. The seed code generation unit 124 according to an embodiment of the present invention may select a preset section from a biosignal having a constant signal measured by the biosignal measurement unit 112 and convert it into a digital signal.

본 발명의 일 실시 예에 따른 시드 코드 생성부(124)는 생체 신호 측정부(112)에서 측정된 사용자의 생체 신호를 기 설정된 시간 간격으로 샘플링(sampling) 할 수 있다. 또한, 시드 코드 생성부(124)는 사용자의 생체 신호를 샘플링 된 시점에 대응되는 생체 신호의 크기를 정수화로 양자화(quantization)시킨 디지털 신호로 변환할 수 있다.The seed code generation unit 124 according to an embodiment of the present invention may sample a user's biosignal measured by the biosignal measurement unit 112 at preset time intervals. In addition, the seed code generation unit 124 may convert the user's bio-signal into a digital signal obtained by quantizing the size of the bio-signal corresponding to the sampled time point by integerization.

샘플링은 시간 축 방향으로 디지털화 시키는 과정으로, 구체적으로 연속적인 시간에 대해 생성된 아날로그 신호를 기 설정된 시간 간격에 해당하는 이산적인 시간에 대한 신호로 변환시키는 과정을 나타낸다. 상술한 기 설정된 시간 간격은 1초일 수 있으나 이에 한정되는 것은 아니며 2초, 1분 또는 1시간과 같이 다양한 시간 간격에 따라 이산적인 시간에 대한 아날로그 신호 추출이 가능하다. 따라서, 샘플링에 의해 연속적인 아날로그 시간이 이산 시간으로 나타날 수 있다.Sampling is a process of digitizing in the direction of the time axis, and specifically refers to a process of converting an analog signal generated for a continuous time into a signal for a discrete time corresponding to a preset time interval. The above-described preset time interval may be 1 second, but is not limited thereto, and analog signals for discrete times may be extracted according to various time intervals such as 2 seconds, 1 minute or 1 hour. Thus, continuous analog time can appear as discrete time by sampling.

따라서, 본 발명의 일 실시 예에 따라 시드 코드 생성부(124)는 연속적인 시간에 대하여 측정된 생체 신호를 기 설정된 시간 간격을 가지는 신호로 변환할 수 있다.Accordingly, according to an embodiment of the present invention, the seed code generation unit 124 may convert a biosignal measured for a continuous time into a signal having a preset time interval.

상술한 바와 같이 샘플링은 연속적인 시간에 대한 신호를 이산적인 시간에 대한 신호로 변환시키는 과정인 반면 양자화는 연속적인 시간 축 상에서 각 시점에 해당되는 신호의 크기를 이산적인 분포를 갖는 신호의 크기로 재구성하는 것을 나타낸다. 상술한 재구성하는 방법에는 정수로 수치화하는 방법이 사용될 수 있다. 수치화하는 방법은 반올림이 해당될 수 있으나 이에 한정되는 것은 아니고 정수로 수치화시키는 다양한 방법이 사용될 수 있다.As described above, sampling is a process of converting a signal for a continuous time into a signal for a discrete time, whereas quantization is the size of a signal with a discrete distribution on a continuous time axis. It represents reconstructing. In the above-described reconstruction method, a method of digitizing an integer may be used. The method of digitizing may include rounding, but is not limited thereto, and various methods of digitizing with integers may be used.

예를 들면, 본 발명의 일 실시 예에 따른 시드 코드 생성부(124)는 어느 한 시점에 해당하는 아날로그 신호의 크기가 10.83568인 경우 10.83568에서 소수점 뒷자리를 버림으로써 아날로그 신호의 크기를 디지털 신호의 크기인 10으로 변환할 수 있다.For example, when the size of the analog signal corresponding to a point in time is 10.83568, the seed code generator 124 according to an embodiment of the present invention removes the digit after the decimal point at 10.83568, thereby reducing the size of the analog signal to the size of the digital signal. Can be converted to phosphorus 10.

또한, 상술한 방법에 의해 측정된 생체 신호의 경우 노이즈가 포함될 수 있다. 본 발명의 또 다른 일 실시 예에 따른 시드 코드 생성부(124)는 노이즈에 해당하는 고주파 신호를 제거할 수 있는 저역 통과 필터(LPF)를 포함할 수 있다.In addition, noise may be included in the case of the biosignal measured by the above-described method. The seed code generator 124 according to another embodiment of the present invention may include a low pass filter (LPF) capable of removing a high frequency signal corresponding to noise.

시드 코드 생성부(124)는 변환된 디지털 신호로부터 기 설정된 시점에 대응되는 샘플을 추출할 수 있고, 추출된 샘플의 크기를 난수 생성과 관련된 이진 코드로 변화시킬 수 있다.The seed code generator 124 may extract a sample corresponding to a preset time point from the converted digital signal, and change the size of the extracted sample to a binary code related to random number generation.

본 명세서에서 상술한 난수 생성과 관련된 이진 코드는 시드 코드라고 나타낸다.In this specification, the binary code related to random number generation described above is referred to as a seed code.

본 발명의 일 실시 예에 따른 시드 코드 생성부(124)는 변환된 디지털 신호로부터 기 설정된 시점에 대응되는 복수 개인 N 개(N은 2 이상의 자연수에 해당함)의 샘플을 각각 추출할 수 있다. 또한, 시드 코드 생성부(124)는 추출된 N 개의 샘플에 해당되는 샘플의 크기를 이진 코드로 변환시켜 N 개의 샘플 코드를 생성할 수 있다. 시드 코드 생성부(124)는 생성된 N 개의 샘플 코드를 조합하여 시드 코드를 생성할 수 있다.The seed code generation unit 124 according to an embodiment of the present invention may each extract N samples of a plurality of individuals (N corresponds to a natural number of 2 or more) corresponding to a preset time point from the converted digital signal. Also, the seed code generation unit 124 may generate N sample codes by converting the size of samples corresponding to the extracted N samples into binary codes. The seed code generation unit 124 may generate a seed code by combining the generated N sample codes.

난수 생성부(126)는 시드 코드를 기반으로 초기 난수를 생성하고, 시드 코드와 초기 난수를 연산 처리하여 난수를 생성한다. The random number generator 126 generates an initial random number based on the seed code, and calculates the seed code and the initial random number to generate a random number.

구체적으로, 난수 생성부(126)는 시드 코드를 입력 받아 저장하고, 클락 신호에 응답하여 시드 코드에 포함된 비트 값 각각을 순차적으로 이동시키면서 생성된 적어도 하나의 비트 정보를 포함하는 초기 난수를 생성한다. Specifically, the random number generator 126 receives and stores a seed code, and generates an initial random number including at least one bit information generated by sequentially moving each bit value included in the seed code in response to a clock signal. do.

이후, 난수 생성부(126)는 초기 난수에 포함된 비트 정보를 시드 코드와 혼합 연산하여 난수 코드를 생성하고, 난수 코드를 기 설정된 비트의 난수로 출력한다. Thereafter, the random number generator 126 generates a random number code by mixing the bit information included in the initial random number with a seed code, and outputs the random number code as a random number of a preset bit.

랜덤 소수 생성부(128)는 난수 생성부(126)에서 생성된 난수를 획득하고, 난수의 소수 여부를 판별하여 랜덤 소수를 생성하는 동작을 수행한다. The random prime number generator 128 acquires the random number generated by the random number generator 126, determines whether the random number is prime, and generates a random prime number.

랜덤 소수 생성부(128)는 기 설정된 소수 값을 저장하고, 난수와 저장된 소수 값을 비교하여 난수의 소수 여부를 판별할 수 있다. The random prime number generator 128 may store a preset prime value and determine whether the random number is prime by comparing the random number with the stored prime value.

랜덤 소수 생성부(128)는 난수 생성부(126)에서 생성된 난수가 소수인 것으로 판별된 경우 해당 난수를 랜덤 소수로 선정하여 출력한다. 한편, 랜덤 소수 생성부(128)는 난수가 소수가 아닌 것으로 판별된 경우 해당 난수를 폐기 처리하고 신규로 생성된 난수의 소수 여부를 판별하는 동작을 반복한다. When it is determined that the random number generated by the random number generator 126 is a prime number, the random prime number generator 128 selects and outputs the random number as a random prime number. Meanwhile, when it is determined that the random number is not a prime number, the random prime number generator 128 discards the random number and repeats the operation of determining whether the newly generated random number is prime.

한편, 도 1에서, 웨어러블 기기(110) 및 랜덤 소수 생성장치(120)는 별도의 장치인 것으로 기재하고 있으나 반드시 이에 한정되는 것은 아니다. 예를 들어, 랜덤 소수를 생성하는 랜덤 소수 생성 모듈(미도시)을 포함하는 웨어러블 기기(110)와 같이 하나의 장치로 구현될 수 있다. Meanwhile, in FIG. 1, the wearable device 110 and the random prime number generator 120 are described as being separate devices, but are not limited thereto. For example, it may be implemented as one device, such as the wearable device 110 including a random prime number generation module (not shown) that generates a random prime number.

도 2는 본 발명의 실시예에 따른 랜덤 소수 생성장치에 포함된 난수 생성부를 개략적으로 나타낸 블록 구성도이다. 2 is a block diagram schematically illustrating a random number generator included in a random prime number generator according to an embodiment of the present invention.

본 실시예에 따른 난수 생성부(126)는 난수 패턴 생성부(210), 혼합 게이트 연산부(220) 및 난수 출력부(230)를 포함한다. 도 2의 난수 생성부(126)는 일 실시예에 따른 것으로서, 도 2에 도시된 모든 블록이 필수 구성요소는 아니며, 다른 실시예에서 난수 생성부(126)에 포함된 일부 블록이 추가, 변경 또는 삭제될 수 있다.The random number generation unit 126 according to the present embodiment includes a random number pattern generation unit 210, a mixed gate operation unit 220, and a random number output unit 230. The random number generator 126 of FIG. 2 is according to an embodiment, and not all blocks shown in FIG. 2 are essential components, and some blocks included in the random number generator 126 are added or changed in other embodiments. Or it can be deleted.

난수 패턴 생성부(210)는 시드 코드를 입력 받아 저장하고, 클락 신호에 응답하여 시드 코드에 포함된 비트 값 각각을 순차적으로 이동시키면서 생성된 적어도 하나의 비트 정보를 포함하는 초기 난수를 생성한다. The random number pattern generator 210 receives and stores a seed code, and generates an initial random number including at least one bit information generated by sequentially moving each bit value included in the seed code in response to a clock signal.

난수 패턴 생성부(210)는 초기 난수 생성을 위하여 적어도 하나의 비트 정보를 생성하는 것을 반복하도록 클락 신호를 제어할 수 있다. 여기서, 클락 신호는 논리상태 H(high,논리 1)와 L(low,논리 0)이 주기적으로 나타나는 방형파 신호를 나타낸다.The random number pattern generator 210 may control the clock signal to repeat generating at least one bit of information to generate an initial random number. Here, the clock signal represents a square wave signal in which the logic states H (high, logic 1) and L (low, logic 0) appear periodically.

난수 패턴 생성부(210)에서 초기 난수를 생성하는 동작을 도 11 내지 도 14에서 자세히 설명하도록 한다. An operation of generating an initial random number by the random number pattern generator 210 will be described in detail with reference to FIGS. 11 to 14.

혼합 게이트 연산부(220)는 초기 난수에 포함된 비트 정보를 상기 시드 코드와 혼합 연산하여 난수 코드를 생성하는 동작을 수행한다. The mixed gate operation unit 220 performs an operation of generating a random number code by performing a mixing operation on bit information included in an initial random number with the seed code.

혼합 게이트 연산부(220)는 초기 난수와 시드 코드를 비교하여 서로 같은 비트 값인 경우 또는 서로 다른 비트 값인 경우 참(1)의 난수 코드를 생성할 수 있다. 예를 들어, 혼합 게이트 연산부(220)는 제1 혼합 게이트(XOR 게이트)를 이용하여 초기 난수와 시드 코드를 비교한 비교 결과 서로 다른 비트 값인 경우, 참(1)의 난수 코드를 생성하여 난수가 출력되도록 한다. The mixed gate operation unit 220 may generate a true (1) random number code when the initial random number and the seed code are the same bit value or different bit values. For example, when the initial random number and the seed code are compared using the first mixed gate (XOR gate) and have different bit values, the mixed gate operation unit 220 generates a true (1) random number code To be printed.

한편, 혼합 게이트 연산부(220)는 제2 혼합 게이트(XNOR 게이트)를 이용하여 초기 난수와 시드 코드를 비교한 비교 결과 서로 같은 비트 값인 경우, 참(1)의 난수 코드를 생성하여 난수가 출력되도록 한다. On the other hand, the mixed gate operation unit 220 generates a true (1) random number code to output a random number when the comparison result of comparing the initial random number and the seed code using the second mixed gate (XNOR gate) has the same bit value. do.

난수 출력부(230)는 난수 코드를 기 설정된 비트의 난수로 출력하는 동작을 수행한다. 난수 출력부(230)는 생성된 난수를 랜덤 소수 생성부(128)로 전달하여 랜덤 소수가 생성되도록 한다. The random number output unit 230 outputs the random number code as a random number of a preset bit. The random number output unit 230 transmits the generated random number to the random prime number generation unit 128 to generate a random prime number.

도 3은 본 발명의 실시예에 따른 랜덤 소수 생성장치에 포함된 랜덤 소수 생성부를 개략적으로 나타낸 블록 구성도이다.3 is a block diagram schematically illustrating a random prime number generator included in a random prime number generator according to an embodiment of the present invention.

본 실시예에 따른 랜덤 소수 생성부(128)는 랜덤 소수 판별부(310) 및 랜덤 소수 출력부(320)를 포함한다. 도 3의 랜덤 소수 생성부(128)는 일 실시예에 따른 것으로서, 도 3에 도시된 모든 블록이 필수 구성요소는 아니며, 다른 실시예에서 랜덤 소수 생성부(128)에 포함된 일부 블록이 추가, 변경 또는 삭제될 수 있다.The random prime number generation unit 128 according to the present embodiment includes a random prime number determination unit 310 and a random prime number output unit 320. The random prime number generator 128 of FIG. 3 is according to an embodiment, and not all blocks shown in FIG. 3 are essential components, and some blocks included in the random prime number generator 128 are added in other embodiments. , May be changed or deleted.

랜덤 소수 판별부(310)는 기 설정된 소수 값을 저장하고, 난수와 소수 값을 비교하여 상기 난수의 소수 여부를 판별하는 동작을 수행한다. The random prime number determining unit 310 stores a preset prime value and compares the random number with the prime value to determine whether the random number is prime.

랜덤 소수 판별부(310)는 난수가 소수가 아닌 것으로 판별된 경우, 해당 난수를 폐기 처리하고 신규로 생성된 난수의 소수 여부를 판별하는 동작을 수행한다. When it is determined that the random number is not a prime number, the random prime number determination unit 310 performs an operation of discarding the random number and determining whether the newly generated random number is prime number.

랜덤 소수 출력부(320)는 랜덤 소수 판별부(310)에서 난수가 소수인 것으로 판별된 경우, 해당 난수를 랜덤 소수로 선정하여 출력하는 동작을 수행한다. When the random number is determined to be a prime number by the random prime number determining unit 310, the random prime number output unit 320 performs an operation of selecting and outputting the random number as a random prime number.

도 4는 본 발명의 실시예에 따른 생체 신호를 기반으로 시드 코드를 생성하는 동작을 설명하기 위한 예시도이다. 4 is an exemplary diagram for explaining an operation of generating a seed code based on a bio-signal according to an embodiment of the present invention.

PPG 센서는 대부분의 웨어러블 기기(110)에 내장되어 있으며, 심장의 움직임과 동맥 혈류의 흐름 변화를 포착함으로써 동맥 혈류의 수치를 측정한다. The PPG sensor is built into most wearable devices 110, and measures the level of arterial blood flow by capturing the movement of the heart and changes in arterial blood flow.

PPG 센서는 손가락이 움직이거나 빛의 변화할 때와 같이, 물리적 및 환경적 요소에 따라 신호에 노이즈가 많이 포함되는 단점이 있다. 이러한 단점은 The PPG sensor has a disadvantage in that a signal contains a lot of noise depending on physical and environmental factors, such as when a finger moves or changes in light. These drawbacks are

난수를 생성하기 위하여 생체 신호를 기반으로 시드 코드를 생성하는 과정에서 유리하게 적용된다. 즉, 이러한 생체 신호는 사람 또는 주변 환경의 아주 미세한 움직임에 따라 매번 변하고, 예측할 수 없는 값이기 때문에 패턴을 예측할 수 없는 난수를 생성하는데 유리하다. In order to generate a random number, it is advantageously applied in the process of generating a seed code based on a bio-signal. That is, since such a bio-signal changes every time according to a very minute movement of a person or a surrounding environment, and is an unpredictable value, it is advantageous to generate a random number that cannot predict a pattern.

PPG 센서의 생체 신호(데이터 값)을 난수 생성부(TRNG)의 시드 코드(물리적 소스)로 사용하려면 아날로그 신호를 16 비트의 디지털 데이터 값으로 변환해야 한다. To use the biosignal (data value) of the PPG sensor as a seed code (physical source) of the random number generator (TRNG), an analog signal must be converted into a 16-bit digital data value.

도 4에 도시된 바와 같이, PPG 센서에서 출력된 아날로그 신호 형태의 생체 신호(S410)는 샘플링되고(S420) 샘플링된 값은 ADC 모듈을 통해 16 비트 데이터 값으로 변환된다(S430). 아날로그 신호 형태의 생체 신호를 디지털 신호로 변환하는 과정은 랜덤 소수 생성장치(120)에서 수행되는 것이 바람직하나 반드시 이에 한정되는 것은 아니며, 웨어러블 기기(110)의 ADC에서 PPG 아날로그 신호를 디지털 신호 처리를 위해 디지털 신호로 변환할 수도 있다. As shown in FIG. 4, the biosignal S410 in the form of an analog signal output from the PPG sensor is sampled (S420), and the sampled value is converted into a 16-bit data value through the ADC module (S430). The process of converting a biosignal in the form of an analog signal to a digital signal is preferably performed by the random prime number generator 120, but is not limited thereto, and the ADC of the wearable device 110 performs digital signal processing on the PPG analog signal. It can also be converted into a digital signal for harm.

ADC를 통해 16 비트 데이터 값이 생성될 때, 타이머 인터럽트가 원하는 시간에 발행되어 16 비트 데이터 값을 얻고, 얻어진 16 비트의 데이터를 난수 생성부에서 난수를 발생시키기 위한 시드 코드(물리적 소스)로 사용한다.When a 16-bit data value is generated through the ADC, a timer interrupt is issued at a desired time to obtain a 16-bit data value, and the obtained 16-bit data is used as a seed code (physical source) to generate a random number in the random number generator. do.

도 5는 본 발명의 실시예에 따른 생체 신호를 디지털 신호로 변화시키는 동작을 설명하기 위한 예시도이다.5 is an exemplary diagram for explaining an operation of converting a bio signal into a digital signal according to an embodiment of the present invention.

도 5의 (a) 및 도 5의 (b)를 참조하면, 본 발명의 일 실시 예에 따른 생체 신호 측정부는 센서를 이용하여 사용자의 심장 박동과 동기화되어 혈량의 변화를 나타내는 PPG(Photoplethysmogram) 신호를 측정할 수 있다.5A and 5B, the biosignal measurement unit according to an embodiment of the present invention generates a PPG (Photoplethysmogram) signal indicating a change in blood volume by synchronizing with the user's heartbeat using a sensor. Can be measured.

사용자의 심장 박동에 동기화되어 손가락 끝 혈관에서의 동맥혈량(Arterial Blood volume) 및 정맥혈량(Venous blood volume)이 증가하고 줄어드는 상태가 반복되고, 빛이 흡수되는 정도는 지나가는 경로에 있는 피부, 조직, 혈액의 양에 비례한다. 따라서, 도 5의 (a) 및 도 5의 (b)를 참조하면, 생체 신호 측정부는 센서를 이용하여 도 5의 (a)에서와 같이 혈량의 변화에 따라 빛을 흡수할 수 있고, 흡수되는 빛의 광량을 이용하여 PPG 신호를 측정할 수 있으며, 측정된 PPG 신호를 그래프로 출력 할 수 있다. 도 5의 (b)는 출력된 PPG 신호 그래프의 일부분을 추출하여 나타낸 것이며, PPG 신호는 일정한 주기를 가질 수 있다. 단, 상술한 PPG 신호는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니며, 생체 신호와 관련된 다양한 신호일 수 있다.In synchronization with the user's heartbeat, the arterial blood volume and venous blood volume in the blood vessels of the fingertips increase and decrease repeatedly, and the degree of absorption of light is determined by the skin, tissue, and It is proportional to the amount of blood. Therefore, referring to FIGS. 5A and 5B, the biosignal measuring unit can absorb light according to a change in blood volume using a sensor, as shown in FIG. 5A. The PPG signal can be measured using the amount of light, and the measured PPG signal can be output as a graph. FIG. 5(b) shows the extracted part of the output PPG signal graph, and the PPG signal may have a certain period. However, the above-described PPG signal is only an example for explaining an embodiment of the present invention, and is not limited thereto, and may be various signals related to a biosignal.

도 5의 (c)는 생체 신호 디지털 변환부가 도 5의 (b)에 나타난 PPG 신호 그래프를 기 설정된 시간 간격으로 샘플링하고, 샘플링 된 시점에 대응되는 생체 신호의 크기를 양자화 레벨 12로 정수화시켜 디지털 신호로 변환한 그래프를 나타낸 것이다. 단, 상술한 샘플링 및 양자화 레벨은 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니다.5C shows the biosignal digital conversion unit samples the PPG signal graph shown in FIG. 5B at preset time intervals and converts the size of the biosignal corresponding to the sampled time to a quantization level 12 to be digital. It shows a graph converted to a signal. However, the above-described sampling and quantization levels are only examples for explaining an embodiment of the present invention and are not limited thereto.

도 6a 내지 도 6c는 본 발명의 실시예에 따른 시드 코드를 생성하는 방법을 나타낸 예시도이다. 6A to 6C are exemplary views showing a method of generating a seed code according to an embodiment of the present invention.

도 6a의 (a)에 나타난 그래프는 도 5의 (c)에서와 동일한 그래프로 PPG 신호 그래프가 양자화 레벨 12로 정수화된 디지털 신호로 변환된 그래프를 나타낸 것이고, 본 발명의 일 실시 예에 따른 시드 코드 생성부는 t 시점에 대응되는 샘플(510)을 추출할 수 있고, 추출된 샘플(510)의 크기는 10을 나타낸다.The graph shown in (a) of FIG. 6a is the same graph as in (c) of FIG. 5 and shows a graph in which the PPG signal graph is converted to a digital signal integerized to a quantization level of 12, and a seed according to an embodiment of the present invention The code generator may extract the sample 510 corresponding to the time point t, and the size of the extracted sample 510 is 10.

도 6a의 (b)를 참조하면, 시드 코드 생성부는 도 6a의 (a)에서 추출된 샘플(510)의 크기 10을 난수 생성과 관련된 이진 코드인 1010(10=23+21)(520)으로 변환할 수 있다. 상술한 4bit 코드인 1010(520)이 시드 코드에 해당한다.Referring to FIG. 6A(b), the seed code generation unit converts the size 10 of the sample 510 extracted in FIG. 6A(a) to 1010 (10=2 3 +2 1 ) (520 ) Can be converted. The above-described 4-bit code 1010 (520) corresponds to the seed code.

도 6b를 참조하면, 본 발명의 일 실시 예에 따른 시드 코드 생성부는 변환된 디지털 신호로부터 기 설정된 시점에 대응되는 N개의 샘플 각각을 추출할 수 있다. 도 6b의 (a)를 참조하면 시드 코드 생성부는 기 설정된 시점인 t1에 대응되는 샘플 1(610), t2에 대응되는 샘플 2(620), t3에 대응되는 샘플 3(630) 및 t4에 대응되는 샘플 4(640)인 4개의 샘플을 추출할 수 있다. 단, 상술한 예는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니며, 시드 코드 생성부는 다양한 개수의 샘플을 추출할 수 있다.6B, the seed code generator according to an embodiment of the present invention may extract each of N samples corresponding to a preset time point from the converted digital signal. Referring to (a) of FIG. 6B, the seed code generator corresponds to sample 1 (610) corresponding to t1, sample 2 (620) corresponding to t2, and samples 3 (630) and t4 corresponding to t3. Four samples, which are sample 4 640, may be extracted. However, the above-described example is only an example for describing an embodiment of the present invention, and is not limited thereto, and the seed code generator may extract a variety of samples.

도 6b의 (b)를 참조하면, 시드 코드 생성부는 추출된 4개의 샘플 각각에 해당되는 샘플 크기를 4 비트인 샘플 코드로 변환할 수 있다. 구체적으로, 추출된 샘플 1(610)의 크기는 10을 나타내며 시드 코드 생성부는 추출된 샘플 1(610)의 크기 10을 이진 코드로 변환시켜 1010인 제1 샘플 코드(611)을 생성할 수 있다. 추출된 샘플 2(620)의 크기는 6을 나타내며 시드 코드 생성부는 추출된 샘플 2(620)의 크기 6을 이진 코드로 변환시켜 0110인 제2 샘플 코드(621)을 생성할 수 있다. 추출된 샘플 3(630)의 크기는 4을 나타내며 시드 코드 생성부는 추출된 샘플 3(630)의 크기 4를 이진 코드로 변환시켜 0100인 제3 샘플 코드(631)을 생성할 수 있다. 추출된 샘플 4(640)의 크기는 6을 나타내며 시드 코드 생성부는 추출된 샘플 4(640)의 크기 6을 이진 코드로 변환시켜 0110인 제4 샘플 코드(641)을 생성할 수 있다.Referring to (b) of FIG. 6B, the seed code generator may convert a sample size corresponding to each of the extracted four samples into a sample code having 4 bits. Specifically, the size of the extracted sample 1 610 is 10, and the seed code generator may generate a first sample code 611 of 1010 by converting the size 10 of the extracted sample 1 610 into a binary code. . The size of the extracted sample 2 620 is 6, and the seed code generator may generate a second sample code 621 of 0110 by converting the size 6 of the extracted sample 2 620 into a binary code. The size of the extracted sample 3 630 is 4, and the seed code generator may generate a third sample code 631 of 0100 by converting the size 4 of the extracted sample 3 630 into a binary code. The size of the extracted sample 4 640 is 6, and the seed code generator may generate a fourth sample code 641 of 0110 by converting the size 6 of the extracted sample 4 640 into a binary code.

도 6b의 (c)를 참조하면, 시드 코드 생성부는 생성된 4개의 샘플 코드를 4 x 4행렬로 변환시킬 수 있다. 시드 코드 생성부는 변환된 4 x 4 행렬에서 1행에서 비트 값 0(611a), 2행에서 비트 값 1(621a), 3행에서 비트 값 1(631a) 및 4행에서 비트 값 0(641a)을 추출할 수 있다.Referring to (c) of FIG. 6B, the seed code generation unit may convert four generated sample codes into a 4 x 4 matrix. In the transformed 4 x 4 matrix, the seed code generator has a bit value of 0 (611a) in row 1, a bit value of 1 (621a) in row 2, a bit value of 1 (631a) in row 3, and a bit value of 0 (641a) in row 4 Can be extracted.

따라서, 본 발명의 일 실시 예에 따른 시드 코드 생성부는 변환된 행렬에서 각 행마다 하나의 코드만을 추출할 수 있다. 또한, 도 6b의 (c)를 참조하면, 변환된 행렬은 행과 열의 수가 같은 정사각형 모양의 행렬일 수 있고, 시드 코드 생성부는 변환된 행렬의 대각선에 해당하는 코드만을 추출할 수 있다.Accordingly, the seed code generator according to an embodiment of the present invention may extract only one code for each row from the transformed matrix. Further, referring to (c) of FIG. 6B, the transformed matrix may be a square matrix having the same number of rows and columns, and the seed code generator may extract only codes corresponding to the diagonals of the transformed matrix.

또한, 상술한 예시는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니며, 상술한 변환된 행렬은 행과 열의 수가 다른 행렬일 수 있으며 시드 코드 생성부는 하나의 행 또는 하나의 열에서 복수 개의 비트 값을 추출할 수도 있다.In addition, the above-described example is only an example for explaining an embodiment of the present invention and is not limited thereto, and the transformed matrix may be a matrix having different numbers of rows and columns, and the seed code generator It is also possible to extract multiple bit values from a column.

도 6b의 (d)를 참조하면, 시드 코드 생성부는 도 6b의 (c)에서 추출된 비트 값을 조합하여 시드 코드에 해당하는 0110(650)을 생성할 수 있다. 단, 상술한 예시는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 추출된 비트 값은 다양한 방법으로 조합될 수 있다.Referring to (d) of FIG. 6B, the seed code generator may generate 0110 (650) corresponding to the seed code by combining the bit values extracted in (c) of FIG. 6B. However, the above-described example is only an example for explaining an embodiment of the present invention, and the extracted bit values may be combined in various ways.

도 6c의 (a)에 나타난 4 개의 샘플 코드는 도 6b의 (b)에 나타난 4 개의 샘플 코드와 동일하다.The four sample codes shown in (a) of FIG. 6C are the same as the four sample codes shown in (b) of FIG. 6B.

도 6c의 (a) 및 도 6c의 (b)를 참조하면, 시드 코드 생성부는 시드 코드(710)의 3rd 비트 값(711a)을 생성하기 위해 제1 샘플 코드(611) 및 제2 샘플 코드(621)를 추출할 수 있다. 시드 코드 생성부는 추출된 2 개의 샘플 코드 각각(611, 421)에서 3rd 비트 값(711)인 1 및 0을 추출할 수 있다. 시드 코드 생성부는 추출된 2 개의 비트 값을 논리 연산하여 시드 코드(710)의 3rd 비트 값(711a)을 생성할 수 있다. 도 6c의 (b)의 시드 코드(710)의 3rd 비트 값(711a)은 추출된 2 개의 비트 값이 배타적 논리합(XOR) 연산으로부터 논리 연산 되어 출력된 비트 값(711a)을 나타낸다.Referring to (a) and (b) of Figure 6c in Figure 6c, the seed code generator comprises: a seed code 710 of the 3 rd bit value of the first sample code 611 and the second sample code to produce a (711a) (621) can be extracted. Seed code generation unit may extract a first and a second zero samples in each extracted code (611, 421) 3 rd bit value 711. Seed code generation unit may conducts logic operation to the extracted 2-bit value to produce a 3 rd bit value (711a) of the seed code 710. The 3 rd bit of the seed value code 710 of (b) of Figure 6c (711a) shows the extracted two-bit value is calculated from the logical exclusive-OR (XOR) operation output bit values (711a).

배타적 논리합(XOR) 연산자는 입력된 2개 중 1개만 참일 때 참이 되는 논리 연산자에 해당한다.The exclusive OR (XOR) operator is a logical operator that becomes true when only one of the two inputs is true.

상술한 방법과 동일한 방법을 반복하여, 시드 코드 생성부는 제2 샘플 코드(621) 및 제3 샘플 코드(631)에서 2nd 비트 값(712)을 추출하고, 추출된 2 개의 비트 값을 배타적 논리 연산하여 시드 코드(710)의 2nd 비트 값(712a)을 생성할 수 있다.By repeating the same method as the aforementioned method, a seed code generator comprises: a second sample code 621, and a third sample code 631 extracts the 2 nd bit values 712 in, and the exclusive logic for the two-bit value extracted calculated may generate a 2 nd bit value (712a) of the seed code 710. the

상술한 방법과 동일한 방법을 반복하여, 시드 코드 생성부는 제3 샘플 코드(631) 및 제4 샘플 코드(641)에서 1st 비트 값(713)을 추출하고, 추출된 2 개의 비트 값을 배타적 논리 연산하여 시드 코드(710)의 1st 비트 값(713a)을 생성할 수 있다.By repeating the same method as the above-described method, the seed code generation unit extracts the 1 st bit value 713 from the third sample code 631 and the fourth sample code 641, and extracts the two bit values with exclusive logic. By performing the operation, a 1 st bit value 713a of the seed code 710 may be generated.

마찬가지로, 시드 코드 생성부는 제4 샘플 코드(641) 및 제1 샘플 코드(611)에서 0th 비트 값(714)을 추출하고, 추출된 2 개의 비트 값을 배타적 논리 연산하여 시드 코드(710)의 0th 비트 값(714a)을 생성할 수 있다.Similarly, the seed code generation unit extracts the 0 th bit value 714 from the fourth sample code 641 and the first sample code 611 and performs an exclusive logical operation on the extracted two bit values to generate the seed code 710. The 0 th bit value 714a may be generated.

따라서, 시드 코드 생성부는 상술한 방법에 의해 출력된 비트 값을 조합하여 시드 코드를 생성할 수 있다. 단, 상술한 예시는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 다양한 방법에 의해 조합될 수 있으며, 논리 연산 또한 XOR 이외에도 논리합(OR), 논리곱(AND), 논리곱 부정(NAND) 또는 논리합 부정(NOR)과 같은 다양한 논리 연산이 가능하다.Accordingly, the seed code generator may generate the seed code by combining the bit values output by the above-described method. However, the above-described examples are only examples for explaining an embodiment of the present invention, and can be combined by various methods. In addition to XOR, logical operations are also OR, AND, and NAND. Alternatively, various logical operations, such as OR and negation, are possible.

도 7는 본 발명의 실시예에 따른 랜덤 소수 생성장치에서 난수를 생성하기 위한 회로도를 나타낸 도면이다.7 is a diagram showing a circuit diagram for generating a random number in a random prime number generator according to an embodiment of the present invention.

도 7에서는 랜덤 소수 생성장치(120)에서 난수를 생성하기 위한 난수 생성부(126)의 회로도를 나타낸다. 여기서, 난수 생성부(126)는 순수 난수 생성기(TRNG)을 기반으로 개량된 구조일 수 있다. 7 shows a circuit diagram of a random number generator 126 for generating a random number in the random prime number generator 120. Here, the random number generator 126 may have an improved structure based on a pure random number generator (TRNG).

도 7에 도시된 바와 같이, 본 발명에 따른 난수 생성부(126)에서 난수 패턴 생성부(210)는 일반적인 LFSR 모듈(700)과 피드백 다항식 모듈(702)이 결합된 구조를 가진다. 여기서, 피드백 다항식 모듈(702)은 기 설정된 비트 수에 따라 고정된 다항식으로 고정될 수 있다. 예를 들어, 피드백 다항식 모듈(702)은 16 비트에서 65,535 개의 난수의 최대 길이 시퀀스를 생성하기 위해 x16 + x15 + x13 + x14 + 1로 고정될 수 있다. 여기서, LFSR 모듈(700)은 초기 시드 값을 필요로 하고, 본 발명에서는 PPG 센서에서 얻은 16 비트 디지털 값을 이용하여 생성된 시드 코드를 초기 시드 값으로 사용한다. As shown in FIG. 7, in the random number generation unit 126 according to the present invention, the random number pattern generation unit 210 has a structure in which a general LFSR module 700 and a feedback polynomial module 702 are combined. Here, the feedback polynomial module 702 may be fixed to a fixed polynomial according to a preset number of bits. For example, the feedback polynomial module 702 may be fixed at x 16 + x 15 + x 13 + x 14 + 1 to generate a maximum length sequence of 65,535 random numbers in 16 bits. Here, the LFSR module 700 requires an initial seed value, and in the present invention, a seed code generated using a 16-bit digital value obtained from a PPG sensor is used as an initial seed value.

난수 패턴 생성부(210)는 중복없이 다항식에 의해 출력이 결정되고, 이러한 출력은 초기 난수를 출력하는 연산의 전체 주기 후에 연속적으로 반복된다. 따라서, 고정된 다항식으로 인해 시드 코드가 주기적으로 변경되더라도 공격자가 최대 시퀀스 수를 두 번 이상 획득하면 난수 패턴 생성부(210)에서 다음으로 생성되는 난수를 예측할 수 있다. The random number pattern generator 210 determines an output by a polynomial without overlapping, and this output is continuously repeated after the entire cycle of an operation for outputting an initial random number. Therefore, even if the seed code is periodically changed due to the fixed polynomial, if the attacker acquires the maximum number of sequences more than once, the random number pattern generator 210 can predict the next random number generated.

이러한 문제를 해결하기 위하여, 도 7에 도시된 바와 같이, 본 발명의 난수 생성부(126)에서는 생체 신호를 기반으로 얻은 16 비트의 시드 코드(물리적 랜덤 소스)와 난수 패턴 생성부(210)에서 출력된 초기 난수를 혼합하는 혼합 게이트 연산부(220)를 추가로 포함한다. 여기서, 혼합 게이트 연산부(220)는 XOR 게이트 또는 XNOR 게이트로 구성될 수 있다. In order to solve this problem, as shown in FIG. 7, in the random number generator 126 of the present invention, a 16-bit seed code (physical random source) obtained based on a bio signal and a random number pattern generator 210 It further includes a mixed gate operation unit 220 for mixing the output initial random number. Here, the mixed gate operation unit 220 may be configured as an XOR gate or an XNOR gate.

본 발명의 난수 생성부(126)는 초기 난수와 예측할 수 없는 시드 코드가 혼합 게이트에 의해 연산되므로, 종래의 LFSR보다 더 복잡한 난수 패턴을 발생한다. The random number generator 126 of the present invention generates a more complex random number pattern than the conventional LFSR because the initial random number and the unpredictable seed code are calculated by the mixed gate.

또한, 본 발명의 난수 생성부(126)는 16 비트 LFSR의 최대 길이 시퀀스에 도달 할 때마다 신규 생체 신호를 획득하고, 새롭게 획득된 신규 생체 신호 즉, 변경된 생체 신호를 이용하여 생성된 시드 코드를 기반으로 패턴을 예측할 수 없는 완전한 난수를 생성할 수 있다. In addition, the random number generator 126 of the present invention acquires a new bio-signal every time the maximum length sequence of 16-bit LFSR is reached, and generates a new bio-signal, that is, a seed code generated using the changed bio-signal. Based on the pattern, it is possible to generate completely random numbers that cannot be predicted.

도 8는 본 발명의 실시예에 따른 랜덤 소수 생성장치에서 랜덤 소수를 생성하는 동작을 나타낸 도면이다. 8 is a diagram illustrating an operation of generating a random prime number in a random prime number generator according to an embodiment of the present invention.

도 8에 도시된 바와 같이, 랜덤 소수 판별부(310)는 난수 생성부(126)의 난수 출력부(230)에서 출력된 난수들과 파라미터로 저장된 소수 값을 비교한다. As shown in FIG. 8, the random prime number determination unit 310 compares the random numbers output from the random number output unit 230 of the random number generator 126 with a prime value stored as a parameter.

랜덤 소수 판별부(310)는 난수 생성부(126)에서 생성된 난수들과 파라미터로 저장된 소수 값이 일치하면 소수로 판단하며, 판단된 소수를 랜덤 소수로 출력한다. If the random numbers generated by the random number generator 126 match the prime value stored as a parameter, the random prime number determination unit 310 determines the number as a prime number, and outputs the determined prime number as a random prime number.

본 발명의 랜덤 소수 생성장치(120)를 통해 생성된 랜덤 소수는 RSA 암호화 알고리즘에서의 소수 변수 p, q 값으로 사용이 가능하다. p, q 값을 예측될 수 없는 소수를 사용한다. 또한, AES, DSA 같은 다양한 암호화 방식에서 Key를 생성할 때 본 발명이 활용될 수 있으며, Key 유출시 실시간 무작위 소수 생성을 통해 즉각적인 키 재생성이 가능하다.The random prime number generated by the random prime number generator 120 of the present invention can be used as prime variable p and q values in the RSA encryption algorithm. Use the unpredictable prime numbers for p and q values. In addition, the present invention can be used when generating a key in various encryption methods such as AES and DSA, and instant key regeneration is possible through real-time random prime number generation when a key is leaked.

본 발명의 랜덤 소수 생성장치(120)는 예측할 수 없는 무작위 소수를 생성할 수 있고, 난수 기반의 랜덤 소수를 실시간으로 처리할 수 있다는 장점을 가진다. 특히, 랜덤 소수의 실시간 처리는 실시간으로 데이터를 반복적으로 주고받는 상황에서 매우 큰 장점을 가진다. 즉, 본 발명의 랜덤 소수 생성장치(120)를 암호화 분야에 적용하는 경우, 실시간 암호화와 복호화가 가능하다는 의미로 해석될 수 있으며, 이러한 실시간성은 웨어러블 기기(110) 뿐만 아니라, 무인자동차 시장, IoT 통신 등과 같이 다양한 분야로 확장 적용될 수 있다. The random prime number generation apparatus 120 of the present invention has the advantage of being able to generate unpredictable random prime numbers and to process random number-based random prime numbers in real time. In particular, real-time processing of random numbers has a very great advantage in a situation where data is repeatedly exchanged in real time. That is, when the random prime number generator 120 of the present invention is applied to the encryption field, it can be interpreted as meaning that real-time encryption and decryption is possible, and this real-time property not only the wearable device 110, but also the driverless vehicle market, IoT It can be extended and applied to various fields such as communication.

도 9는 본 발명의 실시예에 따른 랜덤 소수 생성 방법을 설명하기 위한 순서도이다.9 is a flowchart illustrating a method of generating a random prime number according to an embodiment of the present invention.

랜덤 소수 생성장치(120)는 웨어러블 기기(110)로부터 측정된 생체 신호를 획득한다(S910). 여기서, 생체 신호는 광용정맥파(PPG), 심전도(ECG), 뇌전도(EEG), 근전도(EMG) 등에 관한 같은 신호일 수 있다.The random prime number generator 120 acquires a bio-signal measured from the wearable device 110 (S910). Here, the biosignal may be the same signal related to optical vein wave (PPG), electrocardiogram (ECG), electroencephalogram (EEG), electromyography (EMG), and the like.

랜덤 소수 생성장치(120)는 생체 신호를 이용하여 난수를 생성하기 위한 시드 코드를 생성한다(S920). 구체적으로, 랜덤 소수 생성장치(120)는 센서를 이용하여 측정된 사용자의 생체 신호를 디지털 신호로 변환하고, 디지털 신호로부터 기 설정된 시점에 대응되는 샘플을 추출하며, 추출된 샘플의 크기를 난수 생성과 관련된 이진 코드로 변화시킨 시드 코드를 생성한다.The random prime number generator 120 generates a seed code for generating a random number using the bio-signal (S920). Specifically, the random prime number generator 120 converts the user's biosignal measured using a sensor into a digital signal, extracts a sample corresponding to a preset time point from the digital signal, and generates a random number of the extracted sample size. Generate the seed code converted to binary code related to

랜덤 소수 생성장치(120)는 시드 코드를 기반으로 초기 난수(난수 패턴)를 생성하고(S930), 시드 코드와 초기 난수를 혼합 게이트 연산 처리하여 난수를 생성한다(S940). 구체적으로, 랜덤 소수 생성장치(120)는 시드 코드를 입력 받아 저장하고, 클락 신호에 응답하여 시드 코드에 포함된 비트 값 각각을 순차적으로 이동시키면서 생성된 적어도 하나의 비트 정보를 포함하는 초기 난수를 생성한다. 이후, 랜덤 소수 생성장치(120)는 초기 난수에 포함된 비트 정보를 시드 코드와 혼합 연산하여 난수 코드를 생성하고, 난수 코드를 기 설정된 비트의 난수로 출력한다.The random prime number generator 120 generates an initial random number (random number pattern) based on the seed code (S930), and generates a random number by performing a mixed gate operation on the seed code and the initial random number (S940). Specifically, the random prime number generator 120 receives and stores a seed code, and sequentially moves each bit value included in the seed code in response to a clock signal to generate an initial random number including at least one bit information. Generate. Thereafter, the random prime number generator 120 generates a random number code by mixing and calculating bit information included in the initial random number with a seed code, and outputs the random number code as a random number of a preset bit.

랜덤 소수 생성장치(120)는 생성된 난수의 소수 여부를 판별한다(S950). 랜덤 소수 생성장치(120)는 기 설정된 소수 값을 저장하고, 난수와 저장된 소수 값을 비교하여 난수의 소수 여부를 판별한다. The random prime number generator 120 determines whether the generated random number is prime (S950). The random prime number generator 120 stores a preset prime value and compares the random number with the stored prime value to determine whether the random number is prime.

랜덤 소수 생성장치(120)는 생성된 난수가 소수인 것으로 판별된 경우 해당 난수를 랜덤 소수로 선정하여 출력한다(S960). 한편, 랜덤 소수 생성장치(120)는 난수가 소수가 아닌 것으로 판별된 경우 해당 난수를 폐기 처리하고 신규로 생성된 시드 코드를 이용하여 생성된 난수의 소수 여부를 판별하는 동작을 반복한다. When it is determined that the generated random number is a prime number, the random prime number generator 120 selects and outputs the random number as a random prime number (S960). On the other hand, when it is determined that the random number is not a prime number, the random prime number generator 120 discards the random number and repeats the operation of determining whether the generated random number is prime number using a newly generated seed code.

도 9에서는 각 단계를 순차적으로 실행하는 것으로 기재하고 있으나, 반드시 이에 한정되는 것은 아니다. 다시 말해, 도 9에 기재된 단계를 변경하여 실행하거나 하나 이상의 단계를 병렬적으로 실행하는 것으로 적용 가능할 것이므로, 도 9는 시계열적인 순서로 한정되는 것은 아니다.In FIG. 9, it is described that each step is sequentially executed, but is not limited thereto. In other words, since it is possible to change and execute the steps illustrated in FIG. 9 or execute one or more steps in parallel, FIG. 9 is not limited to a time-series order.

도 9에 기재된 본 실시예에 따른 랜덤 소수 생성 방법은 애플리케이션(또는 프로그램)으로 구현되고 단말장치(또는 컴퓨터)로 읽을 수 있는 기록매체에 기록될 수 있다. 본 실시예에 따른 랜덤 소수 생성 방법을 구현하기 위한 애플리케이션(또는 프로그램)이 기록되고 단말장치(또는 컴퓨터)가 읽을 수 있는 기록매체는 컴퓨팅 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치 또는 매체를 포함한다.The method for generating a random prime number according to the present embodiment illustrated in FIG. 9 may be implemented as an application (or program) and recorded on a recording medium readable by a terminal device (or computer). An application (or program) for implementing the method for generating a random prime number according to the present embodiment is recorded, and a recording medium that can be read by a terminal device (or computer) is any type of recording device that stores data that can be read by a computing system. Or media.

도 10는 일반적인 난수 생성 결과와 본 발명의 실시예에 따른 난수 생성 결과를 비교한 도면이다. 10 is a diagram illustrating a comparison between a general random number generation result and a random number generation result according to an embodiment of the present invention.

Verilog 및 Intel Quartus2와 같은 설계 도구를 사용하여 본 발명의 랜덤 소수 생성장치(120)를 구현할 수 있다. The random prime number generator 120 of the present invention can be implemented using design tools such as Verilog and Intel Quartus2.

본 발명의 랜덤 소수 생성장치(120)의 우수성을 검증하기 위하여, 본 발명의 랜덤 소수 생성장치(120)는 일반적인 의사 난수 생성기(PRNG) 및 다항식 수정이 가능한 의사 난수 생성기(PRNG)와 비교한다. 이에, 시뮬레이션을 수행하여 16 비트 난수 생성기(PRNG)에서 최대 길이 시퀀스(예: 250,000 이상의 수)의 4 사이클을 생성하고, 난수를 NIST Test Suites를 통해 평가한다. 테스트 결과는 [표 1]에 기재되어 있다. In order to verify the excellence of the random prime number generator 120 of the present invention, the random prime number generator 120 of the present invention is compared with a general pseudo-random number generator (PRNG) and a pseudo-random number generator (PRNG) capable of polynomial modification. Accordingly, a simulation is performed to generate 4 cycles of a maximum length sequence (eg, 250,000 or more) in a 16-bit random number generator (PRNG), and the random number is evaluated through the NIST Test Suites. The test results are shown in [Table 1].

Figure 112019074503429-pat00001
Figure 112019074503429-pat00001

일반적인 의사 난수 생성기(PRNG)은 테스트에서 가장 기본적인 난수 조건인 정확히 동일한 0 및 1 비율을 가지는 패턴을 생성한다. 그러나, 도 10의 (a)와 같이, 일반적인 의사 난수 생성기(PRNG)은 최대 길이 시퀀스가 생성된 후 값이 계속 반복되기 때문에 대부분의 테스트에서 실패한다.A typical pseudo-random number generator (PRNG) generates a pattern with exactly the same 0 and 1 ratio, which is the most basic random number condition in a test. However, as shown in (a) of FIG. 10, a general pseudo-random number generator (PRNG) fails in most tests because values are continuously repeated after the maximum length sequence is generated.

다음으로, 다항식 수정이 가능한 의사 난수 생성기(PRNG)에서 다항식을 연속적으로 변경함으로써 출력되는 임의의 값은 예측되지 않는다. 그러나, 모든 다항식이 의사 난수 생성기(PRNG)의 최대 시퀀스를 생성 할 수 있는 것은 아니다. 즉, 시퀀스의 길이가 연속적으로 변화하기 때문에, 도 10의 (b)와 같이 다항식에 따라 난수의 0 및 1 비율이 달라진다. 따라서, NIST 테스트 스위트에서 가장 기본적인 난수 특성인 주파수 테스트(즉, 0 대 1의 비율)는 충족되지 않는다. 결과적으로, 난수의 패턴이 종래의 LFSR보다 더 복잡하더라도, 실제 난수를 요구하는 애플리케이션에 적용하기에는 어렵다. Next, in a pseudorandom number generator (PRNG) capable of polynomial modification, an arbitrary value output by continuously changing the polynomial is not predicted. However, not all polynomials are capable of generating the maximum sequence of a pseudorandom number generator (PRNG). That is, since the length of the sequence continuously changes, the ratio of 0 and 1 of the random number is changed according to the polynomial as shown in FIG. 10B. Therefore, the most basic random number characteristic in the NIST test suite, the frequency test (ie, the ratio of 0 to 1) is not satisfied. As a result, although the pattern of the random number is more complex than the conventional LFSR, it is difficult to apply it to an application that requires an actual random number.

그러나, 생체 신호를 사용하는 본 발명에 따른 랜덤 소수 생성장치(120)는 [표 1]에 나와있는 모든 테스트를 통과한 것을 확인할 수 있다. 본 발명에 따른 랜덤 소수 생성장치(120)는 주기적으로 시드 코드를 변경하면서 최대 길이 시퀀스를 생성하기 때문에 도 10의 (c)와 같이, 생성된 난수는 주기성이 없으므로 예측할 수 없다. However, it can be confirmed that the random prime number generator 120 according to the present invention using a bio-signal has passed all the tests shown in [Table 1]. Since the random prime number generator 120 according to the present invention generates a maximum length sequence while periodically changing a seed code, the generated random number cannot be predicted because there is no periodicity as shown in FIG. 10C.

도 11 내지 도 14는 본 발명의 실시 예에 따른 난수 패턴 생성부에서 초기 난수를 생성하는 동작을 설명하기 위한 블록도이다. 11 to 14 are block diagrams for explaining an operation of generating an initial random number by a random number pattern generator according to an embodiment of the present invention.

도 11을 참조하면, 난수 패턴 생성부(210)는 4개의 플립플롭(flip-flop, FF)(141a 내지 141d) 및 4개의 멀티플렉서(141-1 내지 141-4)를 포함할 수 있다. 단, 상술한 플립플롭 및 멀티플렉서의 개수는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니며 플립플롭 및 멀티플렉서의 개수가 4개 보다 작거나 4개 보다 많을 수 있다.Referring to FIG. 11, the random number pattern generator 210 may include four flip-flops (FF) 141a to 141d and four multiplexers 141-1 to 141-4. However, the number of flip-flops and multiplexers described above is only an example for explaining an embodiment of the present invention, and is not limited thereto, and the number of flip-flops and multiplexers may be less than four or more than four.

본 발명의 일 실시 예에 따른 플립플롭은 입력되는 값을 클락 신호의 엣지(edge)에서 캡처해서 출력에 반영하고, 엣지가 발생하지 않는 시간에는 출력이 변하지 않고 유지하는 성질을 가진 D 플립플롭일 수 있다.A flip-flop according to an embodiment of the present invention is a D flip-flop having a property of capturing an input value at an edge of a clock signal and reflecting it in the output, and maintaining the output unchanged at a time when the edge does not occur. I can.

본 명세서에서 도면에는 도시하지 않았지만 레지스터에 포함된 플립플롭에는 클락 신호 라인이 연결되어 있어, 플립플롭은 클락 신호에 응답하여 동작할 수 있다.Although not shown in the drawings in this specification, a clock signal line is connected to a flip-flop included in a register, so that the flip-flop can operate in response to a clock signal.

4개의 멀티플렉서는 선택 신호(701)에 응답하여 생성된 시드 코드의 비트 값을 각각 4개의 플립플롭(141a 내지 141d)으로 선택적으로 출력시킬 수 있다. 본 발명의 일 실시 예를 설명하기 위해 상술한 시드 코드는 도 6a에서 설명한 시드 코드를 예를 들어 설명하도록 한다. 단, 상술한 시드 코드는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니며 다양한 시드 코드가 될 수 있다.The four multiplexers may selectively output bit values of the seed code generated in response to the selection signal 701 to the four flip-flops 141a to 141d, respectively. In order to describe an embodiment of the present invention, the seed code described above will be described as an example of the seed code described in FIG. 6A. However, the seed code described above is only an example for explaining an embodiment of the present invention, and is not limited thereto, and may be various seed codes.

구체적으로 제1 멀티플렉서(141-1)는 선택 신호(701)에 응답하여 시드 코드의 비트 값 중 0th 비트 값인 0을 선택하여 제1 플립플롭(141a)으로 출력시킬 수 있다. 또한, 제2 멀티플렉서(141-2)는 선택 신호(701)에 응답하여 시드 코드의 비트 값 중 1st 비트 값인 1을 선택하여 제2 플립플롭(141b)으로 출력시킬 수 있다. 또한, 제3 멀티플렉서(141-3)는 선택 신호(701)에 응답하여 시드 코드의 비트 값 중 2nd 비트 값인 0을 선택하여 제3 플립플롭(141c)으로 출력시킬 수 있다. 또한, 제4 멀티플렉서(141-4)는 선택 신호(701)에 응답하여 시드 코드의 비트 값 중 3rd 비트 값인 1을 선택하여 제4 플립플롭(141d)으로 출력시킬 수 있다.Specifically, in response to the selection signal 701, the first multiplexer 141-1 may select 0, which is a 0 th bit value from among the bit values of the seed code, and output it to the first flip-flop 141a. In addition, the second multiplexer 141-2 may select 1, which is a 1 st bit value among the bit values of the seed code, in response to the selection signal 701 and output it to the second flip-flop 141b. Furthermore, the third multiplexer (141-3) is in response to the select signal 701, select the 2 nd bit value 0 of bit values of the code seed can be output to a third flip-flop (141c). In addition, the fourth multiplexer (141-4) is in response to the selection signal 701 selecting the 3 rd bit value 1 of bit values of a code seed can be outputted to the fourth flip-flop (141d).

본 발명의 일 실시 예에 따른 시드 코드에 해당하는 비트 값 중 '1'은 전압(혹은 전류)이 높은 레벨일 때 쓰이는 H(high)를 나타내고, '0'은 전압(혹은 전류)이 낮은 레벨일 때 쓰이는 L(low)를 나타낸다.Among the bit values corresponding to the seed code according to an embodiment of the present invention, '1' represents H (high) used when the voltage (or current) is at a high level, and '0' is the level at which the voltage (or current) is low. L(low) is used when is.

4개의 플립플롭(141a 내지 141d)은 생성된 시드 코드의 비트 값을 4개의 멀티플렉서(141-1 내지 141-4)로부터 각각 입력 받을 수 있고, 4개의 플립플롭(141a 내지 141d)은 입력 받은 시드 코드의 비트 값을 저장할 수 있다. 또한, 4개의 플립플롭(141a 내지 141d) 각각은 클락 신호에 응답하여 저장된 시드 코드(131)의 비트 값을 출력(out 1 내지 out 4)할 수 있다. 본 발명의 일 실시 예에 따르면, 제1 플립플롭(141a)은 0을 출력으로, 제2 플립플롭(141b)은 1을 출력으로, 제3 플립플롭(141c)은 0을 출력으로, 제4 플립플롭(141d)은 1을 출력시킬 수 있다.The four flip-flops 141a to 141d can receive the bit values of the generated seed codes from the four multiplexers 141-1 to 141-4, respectively, and the four flip-flops 141a to 141d are inputted seeds. You can store the bit value of the code. In addition, each of the four flip-flops 141a to 141d may output (out 1 to out 4) bit values of the stored seed code 131 in response to a clock signal. According to an embodiment of the present invention, the first flip-flop 141a outputs 0, the second flip-flop 141b outputs 1, and the third flip-flop 141c outputs 0, and the fourth The flip-flop 141d may output 1.

제1 내지 제4 플립플롭(141a 내지 141d) 중 각각의 플립플롭의 출력은 다음 플립플롭의 입력으로 연결되도록 순차적으로 제1 내지 제4 멀티플렉서(141-1 내지 141-4)와 연결되어 있다. 구체적으로 제1 FF(141a)의 출력은 제2 멀티플렉서(141-2)의 입력에 연결되어 있고 제2 멀티플렉서(141-2)의 출력은 제2 FF(141b)의 입력에 연결되어 있다. 따라서, 제2 멀티플렉서(141-2)는 선택 신호(701)에 응답하여 제1 FF(141a)의 출력을 선택하여 제1 FF(141a)에 저장되어 있던 비트 값을 제2 FF(141b)로 이동시킬 수 있다. 따라서, 제2 FF(141b)는 제1 FF(141a)에 저장되어 있던 비트 값을 전달 받을 수 있고, 제2 FF(141b)는 전달 받은 비트 값을 저장할 수 있다. 마찬가지로, 제2 FF(141b)의 출력은 제3 멀티플렉서(141-3)의 입력에 연결되어 있고, 제3 멀티플렉서(141-3)의 출력은 제3 FF(141c)의 입력에 연결되어 있으므로 제2 FF(141b)의 비트 값은 제3 FF(141c)로 전달될 수 있다. 또한, 제3 FF(141c)의 출력은 제4 멀티플렉서(141-4)의 입력에 연결되어 있고, 제4 멀티플렉서(141-4)의 출력은 제4 FF(141d)의 입력에 연결되어 있으므로 제3 FF(141c)의 비트 값 또한 제4 FF(141d)로 전달될 수 있다.The outputs of each of the first to fourth flip-flops 141a to 141d are sequentially connected to the first to fourth multiplexers 141-1 to 141-4 so as to be connected to the input of the next flip-flop. Specifically, the output of the first FF 141a is connected to the input of the second multiplexer 141-2, and the output of the second multiplexer 141-2 is connected to the input of the second FF 141b. Accordingly, the second multiplexer 141-2 selects the output of the first FF 141a in response to the selection signal 701 and converts the bit value stored in the first FF 141a into the second FF 141b. Can be moved. Accordingly, the second FF 141b may receive the bit value stored in the first FF 141a, and the second FF 141b may store the transmitted bit value. Similarly, the output of the second FF 141b is connected to the input of the third multiplexer 141-3, and the output of the third multiplexer 141-3 is connected to the input of the third FF 141c. The bit value of the 2 FF 141b may be transferred to the third FF 141c. In addition, the output of the third FF (141c) is connected to the input of the fourth multiplexer (141-4), and the output of the fourth multiplexer (141-4) is connected to the input of the fourth FF (141d). The bit value of the 3 FF 141c may also be transferred to the fourth FF 141d.

상술한 방법에 의해 4개의 플립플롭(141a 내지 141d) 각각은 저장된 시드 코드의 비트 값을 출력하여 제1 초기 난수를 생성할 수 있고, 4개의 플립플롭(141a 내지 141d) 각각은 제1 난수를 생성한 후 4개의 플립플롭(141a 내지 141d) 각각에 저장된 시드 코드의 비트 값을 연결되어 있는 다음 플립플롭으로 이동시켜 다시 새로운 비트 값을 출력하여 제2 초기 난수를 생성할 수 있으며, 상술한 방법이 반복될 수 있다.Each of the four flip-flops 141a to 141d may generate a first initial random number by outputting a bit value of the stored seed code by the above-described method, and each of the four flip-flops 141a to 141d may generate a first random number. After generation, the bit value of the seed code stored in each of the four flip-flops 141a to 141d is moved to the next flip-flop to which it is connected, and a new bit value is output again to generate a second initial random number. This can be repeated.

도 12을 참조하면, 본 발명의 또 다른 일 실시 예에 따른 난수 패턴 생성부(210)는 도 11과 다르게 제4 플립플롭(141d)의 출력이 제1 멀티플렉서(141-1)의 입력에 연결되어 있고, 제1 멀티플렉서(141-1)의 출력은 제1 플립플롭(141a)의 입력에 연결되어 있다. 또한, 초기 난수를 생성하기 위한 최종 출력은 제4 플립플롭(141d)의 출력에 의해 결정될 수 있다. 따라서, 제4 플립플롭(141d) 출력은 최종 플립플롭(141d)의 출력에 해당되며 최종 플립플롭(141d)에서 출력되는 출력 값은 난수와 관련된 비트 값 및 제1 플립플롭(141a)에 저장되도록 제1 멀티플렉서(141-1)의 입력으로 피드백시키는 비트 값을 포함한다.Referring to FIG. 12, in the random number pattern generator 210 according to another embodiment of the present invention, unlike FIG. 11, the output of the fourth flip-flop 141d is connected to the input of the first multiplexer 141-1. And the output of the first multiplexer 141-1 is connected to the input of the first flip-flop 141a. Also, the final output for generating the initial random number may be determined by the output of the fourth flip-flop 141d. Accordingly, the output of the fourth flip-flop 141d corresponds to the output of the final flip-flop 141d, and the output value output from the final flip-flop 141d is stored in the bit value related to the random number and the first flip-flop 141a. It includes a bit value fed back to the input of the first multiplexer 141-1.

구체적으로, 제4 FF(141d)에 초기 저장된 비트 값이 시드 코드의 3rd 비트 값인 1이라고 하고, 난수 생성 장치는 4 비트의 난수를 생성한다고 할 때 제4 FF(141d)는 난수의 3rd 비트에 해당하는 비트 값인 1을 출력함과 동시에 제4 FF(141d)의 비트 값인 1은 제1 멀티플렉서(141-1)의 입력으로 피드백 되어 제1 FF(141a)에 전달될 수 있고, 제1 FF(141a)는 전달된 비트 값을 저장할 수 있다. 본 발명의 일 실시 예에 따른 난수 패턴 생성부(210)는 상술한 방법을 반복하여 초기 난수를 생성할 수 있다.Specifically, assuming that the bit value initially stored in the fourth FF 141d is 1, which is the 3rd bit value of the seed code, and the random number generator generates a 4-bit random number, the fourth FF 141d corresponds to the 3rd bit of the random number. At the same time as outputting the corresponding bit value 1, the bit value 1 of the fourth FF 141d may be fed back to the input of the first multiplexer 141-1 and transmitted to the first FF 141a, and the first FF ( 141a) may store the transmitted bit value. The random number pattern generator 210 according to an embodiment of the present invention may generate an initial random number by repeating the above-described method.

도 13를 참조하면, 난수 패턴 생성부(210)는 논리 연산부(143)를 더 포함할 수 있다. 논리 연산부(143)는 최종 플립플롭(141d)에서 출력된 비트 값 및 최종 플립플롭(141d) 이외의 플립플롭에서 출력된 비트 값을 입력 받을 수 있다. 논리 연산부(143)는 입력 받은 두 비트 값을 논리 연산할 수 있고, 논리 연산된 결과에 해당하는 비트 값을 제1 멀티플렉서(141-1)에 전달할 수 있으며, 제1 멀티플렉서(141-1)는 논리 연산부(143)로부터 전달 받은 비트 값을 선택 신호(701)에 응답하여 제1 FF(141a)로 출력시킬 수 있다. 따라서, 제1 FF(141a)은 논리 연산부(143)에서 논리 연산된 비트 값을 입력 받을 수 있고, 제1 FF(141a)는 입력 받은 비트 값을 저장할 수 있다.Referring to FIG. 13, the random number pattern generation unit 210 may further include a logic operation unit 143. The logic operation unit 143 may receive a bit value output from the final flip-flop 141d and a bit value output from a flip-flop other than the final flip-flop 141d. The logic operation unit 143 may perform a logical operation on two input bit values, transfer a bit value corresponding to the result of the logical operation to the first multiplexer 141-1, and the first multiplexer 141-1 The bit value received from the logic operation unit 143 may be output to the first FF 141a in response to the selection signal 701. Accordingly, the first FF 141a may receive a bit value logically operated by the logic operation unit 143, and the first FF 141a may store the received bit value.

논리 연산부(143)는 입력된 2개 중 1개만 참일 때 참이 되는 논리 연산에 해당하는 배타적 논리합(XOR) 연산, 입력된 2개 중 적어도 1개가 참이면 참이 되는 논리 연산에 해당하는 논리합(OR), 입력된 2개 모두 참일 때 참이 되는 논리 연산에 해당하는 논리곱(AND), 논리곱의 출력을 부정(NOT)하는 논리곱 부정(NAND) 또는 논리합의 출력을 부정하는 논리합 부정(NOR) 등 다양한 논리 연산을 할 수 있다. 한편, 논리 연산부(143)는 단순한 논리 게이트로 구성되는 것으로 기재하고 있으나 반드시 이에 한정되는 것은 아니며, 도 7의 피드백 다항식 모듈(702)과 같이 기 설정된 비트 수에 따라 고정된 다항식을 포함하는 형태로 구현될 수 있다. The logic operation unit 143 is an exclusive OR (XOR) operation corresponding to a logical operation that becomes true when only one of the two inputs is true, and an OR corresponding to a logical operation that becomes true when at least one of the two inputs is true ( OR), AND, which is a logical operation that becomes true when both inputs are true, and NAND, which negates the output of the logical product, or NAND, which negates the output of the OR NOR) and other logical operations can be performed. Meanwhile, the logic operation unit 143 is described as being composed of a simple logic gate, but is not limited thereto. As shown in the feedback polynomial module 702 of FIG. 7, a polynomial fixed according to a preset number of bits is included. Can be implemented.

따라서, 난수 패턴 생성부(210)은 상술한 과정을 반복하면서 도 12과 동일한 방법으로 초기 난수를 생성할 수 있다.Accordingly, the random number pattern generator 210 may generate an initial random number in the same manner as in FIG. 12 while repeating the above-described process.

도 14을 참조하면, 본 발명의 또 다른 일 실시 예에 따른 난수 패턴 생성부(210)는 복수 개의 논리 연산부를 포함할 수 있으며, 도 14에서 난수 패턴 생성부(210)는 제1 논리 연산부(143a) 및 제2 논리 연산부(143b)인 2개의 논리 연산부(143a, 143b)를 포함할 수 있다. 단, 상술한 2개의 논리 연산부(143a, 143b)는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니며 난수 패턴 생성부(210)는 2개 이상의 복수 개의 논리 연산부를 포함할 수 있다.Referring to FIG. 14, a random number pattern generation unit 210 according to another embodiment of the present invention may include a plurality of logic calculation units, and in FIG. 14, the random number pattern generation unit 210 is a first logic calculation unit ( 143a) and two logic operation units 143a and 143b, which are the second logic operation units 143b. However, the above-described two logic operation units 143a and 143b are only examples for explaining an embodiment of the present invention, and are not limited thereto, and the random number pattern generator 210 may include two or more I can.

구체적으로 제1 논리 연산부(143a)는 제4 FF(141d)에서 출력된 값과 제3 FF(141c)에서 출력된 값을 입력 받아 논리 연산한 제1 결과 값을 출력할 수 있다. 제2 논리 연산부(143b)는 제1 논리 연산부(143a)에서 출력된 제1 결과 값 및 제2 FF(141b)에서 출력된 값을 입력 받아 논리 연산한 제2 결과 값을 출력할 수 있다. 제2 논리 연산부(143b)는 출력된 제2 결과 값을 제1 멀티플렉서(141-1)에 전달할 수 있으며, 제1 멀티플렉서(141-1)는 전달 받은 제2 결과 값을 선택 신호(701)에 응답하여 제1 FF(141a)로 출력시킬 수 있다. 따라서, 제1 FF(141a)는 제2 논리 연산부(143b)에서 논리 연산된 제2 결과 값을 입력 받을 수 있고, 제1 FF(141a)는 입력 받은 논리 연산된 제2 결과 값을 저장할 수 있다. In more detail, the first logic operation unit 143a may receive a value output from the fourth FF 141d and a value output from the third FF 141c and output a first result value of the logical operation. The second logic operation unit 143b may receive a first result value output from the first logic operation unit 143a and a value output from the second FF 141b and output a second result value of logical operation. The second logic operation unit 143b may transmit the output second result value to the first multiplexer 141-1, and the first multiplexer 141-1 transmits the received second result value to the selection signal 701. In response, it may be output to the first FF 141a. Accordingly, the first FF 141a may receive a second result value logically calculated by the second logic operation unit 143b, and the first FF 141a may store the received second logical operation result value. .

상술한 제1 및 제2 논리 연산부(143a, 143b) 각각은 배타적 논리합(XOR), 논리합(OR), 논리곱(AND), 논리곱 부정(NAND) 또는 논리합 부정(NOR) 등 다양한 논리 연산을 할 수 있으며, 제1 논리 연산부(143a)와 제2 논리 연산부(143b)는 서로 같은 논리 연산을 할 수 있다. 또한, 제1 논리 연산부(143a)와 제2 논리 연산부(143b)는 서로 다른 논리 연산을 할 수도 있다. 한편, 제1 및 제2 논리 연산부(143a, 143b) 각각은 단순한 논리 게이트로 구성되는 것으로 기재하고 있으나 반드시 이에 한정되는 것은 아니며, 도 7의 피드백 다항식 모듈(702)과 같이 기 설정된 비트 수에 따라 고정된 다항식을 포함하는 형태로 구현될 수 있다.Each of the above-described first and second logic operation units 143a and 143b performs various logical operations such as exclusive OR (XOR), OR (OR), AND, AND, NAND, or NOR. The first logic operation unit 143a and the second logic operation unit 143b may perform the same logical operation. Also, the first logic operation unit 143a and the second logic operation unit 143b may perform different logical operations. Meanwhile, each of the first and second logic operation units 143a and 143b is described as being configured as a simple logic gate, but is not limited thereto. As shown in the feedback polynomial module 702 of FIG. It can be implemented in a form including a fixed polynomial.

따라서, 난수 패턴 생성부(210)는 상술한 과정을 반복하면서 난수를 생성할 수 있다.Therefore, the random number pattern generator 210 may generate a random number while repeating the above-described process.

이상의 설명은 본 발명의 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명의 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명의 실시예들은 본 발명의 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the embodiments of the present invention, and those of ordinary skill in the technical field to which the embodiments of the present invention belong to, various modifications and modifications without departing from the essential characteristics of the embodiments of the present invention Transformation will be possible. Accordingly, the embodiments of the present invention are not intended to limit the technical idea of the embodiments of the present invention, but to explain, and the scope of the technical idea of the embodiments of the present invention is not limited by these embodiments. The scope of protection of the embodiments of the present invention should be interpreted by the following claims, and all technical ideas within the scope equivalent thereto should be construed as being included in the scope of the rights of the embodiments of the present invention.

100: 랜덤 소수 생성 시스템
110: 웨어러블 기기 120: 랜덤 소수 생성장치
122: 생체 신호 획득부 124: 시드 코드 생성부
126: 난수 생성부 128: 랜덤 소수 생성부
210: 난수 패턴 생성부 220: 혼합 게이트 연산부
230: 난수 출력부 310: 랜덤 소수 판별부
320: 랜덤 소수 출력부
100: random prime number generation system
110: wearable device 120: random prime number generator
122: biosignal acquisition unit 124: seed code generation unit
126: random number generator 128: random prime number generator
210: random number pattern generation unit 220: mixed gate operation unit
230: random number output unit 310: random prime number determination unit
320: random decimal output unit

Claims (15)

랜덤으로 소수를 생성하는 장치에 있어서,
생체 신호를 이용하여 시드 코드를 생성하는 시드 코드 생성부;
상기 시드 코드를 기반으로 초기 난수를 생성하고, 상기 시드 코드와 상기 초기 난수를 연산 처리하여 난수를 생성하는 난수 생성부; 및
상기 난수의 소수 여부를 판별하여 랜덤 소수를 생성하는 랜덤 소수 생성부를 포함하되,
상기 시드 코드 생성부는,
상기 생체 신호가 변환된 디지털 신호로부터 기 설정된 시점에 대응되는 N 개(상기 N은 2 이상인 자연수)의 샘플 각각을 추출하고, 상기 추출된 N 개의 샘플 크기를 이진 코드로 변환시킨 N 개의 샘플 코드를 생성하며, 상기 생성된 N 개의 샘플 코드를 조합하여 상기 시드 코드를 생성하며,
상기 난수 생성부는, 상기 초기 난수에 포함된 비트 정보를 상기 시드 코드와 혼합 연산하여 생성된 난수 코드를 기반으로 상기 난수를 생성하는 것을 특징으로 하는 랜덤 소수 생성장치.
In the device for randomly generating prime numbers,
A seed code generator that generates a seed code by using a bio-signal;
A random number generator configured to generate an initial random number based on the seed code, and to generate a random number by calculating and processing the seed code and the initial random number; And
Including a random prime number generator for generating a random prime number by determining whether the random number is prime,
The seed code generation unit,
Each of the N samples corresponding to a preset point in time (where N is a natural number equal to or greater than 2) from the digital signal converted from the bio-signal is extracted, and N sample codes obtained by converting the extracted N sample sizes into binary codes And generates the seed code by combining the generated N sample codes,
Wherein the random number generator generates the random number based on a random number code generated by mixing and calculating bit information included in the initial random number with the seed code.
제1항에 있어서,
상기 난수 생성부는,
상기 시드 코드를 입력 받아 저장하고, 클락 신호에 응답하여 상기 시드 코드에 포함된 비트 값 각각을 순차적으로 이동시키면서 생성된 적어도 하나의 비트 정보를 포함하는 상기 초기 난수를 생성하는 난수 패턴 생성부;
상기 초기 난수에 포함된 비트 정보를 상기 시드 코드와 혼합 연산하여 난수 코드를 생성하는 혼합 게이트 연산부; 및
상기 난수 코드를 기 설정된 비트의 상기 난수로 출력하는 난수 출력부
를 포함하는 것을 특징으로 하는 랜덤 소수 생성장치.
The method of claim 1,
The random number generator,
A random number pattern generator configured to receive and store the seed code, and to generate the initial random number including at least one bit information generated by sequentially moving each bit value included in the seed code in response to a clock signal;
A mixed gate operation unit configured to generate a random number code by mixing the bit information included in the initial random number with the seed code; And
Random number output unit for outputting the random number code as the random number of a preset bit
A random prime number generator comprising a.
제2항에 있어서,
상기 혼합 게이트 연산부는,
상기 초기 난수와 상기 시드 코드를 비교하여 서로 같은 비트 값인 경우, 참(1)의 난수 코드를 생성하여 상기 난수가 출력되도록 하는 랜덤 소수 생성장치.
The method of claim 2,
The mixed gate operation unit,
A random prime number generator configured to generate a true (1) random number code to output the random number when the initial random number and the seed code are compared to have the same bit value.
제2항에 있어서,
상기 혼합 게이트 연산부는,
상기 초기 난수와 상기 시드 코드를 비교하여 서로 다른 비트 값인 경우, 참(1)의 난수 코드를 생성하여 상기 난수가 출력되도록 하는 랜덤 소수 생성장치.
The method of claim 2,
The mixed gate operation unit,
A random prime number generator configured to compare the initial random number and the seed code to generate a true (1) random number code to output the random number when the bit values are different from each other.
제1항에 있어서,
상기 랜덤 소수 생성부는,
기 설정된 소수 값을 저장하고, 상기 난수와 상기 소수 값을 비교하여 상기 난수의 소수 여부를 판별하는 랜덤 소수 판별부; 및
상기 난수가 소수인 것으로 판별된 경우, 상기 난수를 상기 랜덤 소수로 선정하여 출력하는 랜덤 소수 출력부
를 포함하는 것을 특징으로 하는 랜덤 소수 생성장치.
The method of claim 1,
The random prime number generator,
A random prime number determining unit that stores a preset prime value and determines whether the random number is prime by comparing the random number with the prime value; And
When the random number is determined to be a prime number, a random prime number output unit that selects and outputs the random number as the random prime number
A random prime number generator comprising a.
제5항에 있어서,
상기 랜덤 소수 생성부는,
상기 난수가 소수가 아닌 것으로 판별된 경우, 해당 난수를 폐기 처리하고 신규로 생성된 난수의 소수 여부를 판별하는 것을 특징으로 하는 랜덤 소수 생성장치.
The method of claim 5,
The random prime number generator,
When it is determined that the random number is not a prime number, the random number is discarded and it is determined whether the newly generated random number is a prime number.
제1항에 있어서,
상기 시드 코드 생성부는,
센서를 이용하여 측정된 사용자의 상기 생체 신호를 디지털 신호로 변환하고, 상기 디지털 신호로부터 기 설정된 시점에 대응되는 샘플을 추출하여, 상기 추출된 샘플의 크기를 난수 생성과 관련된 이진 코드로 변화시킨 상기 시드 코드를 생성하는 것을 특징으로 하는 랜덤 소수 생성장치.
The method of claim 1,
The seed code generation unit,
The biosignal of the user measured using a sensor is converted into a digital signal, a sample corresponding to a preset time point is extracted from the digital signal, and the size of the extracted sample is changed to a binary code related to random number generation. A random prime number generator, characterized in that for generating a seed code.
제1항에 있어서,
상기 시드 코드 생성부는,
기 설정된 주기마다 갱신된 생체 신호를 획득하고, 상기 갱신된 생체 신호를 이용하여 상기 시드 코드를 생성하는 것을 특징으로 하는 랜덤 소수 생성장치.
The method of claim 1,
The seed code generation unit,
A random prime number generator, characterized in that acquiring the updated bio-signal every preset period, and generating the seed code by using the updated bio-signal.
제8항에 있어서,
상기 시드 코드 생성부는,
상기 난수 생성부에서 상기 시드 코드를 이용하여 생성된 상기 초기 난수가 최대 길이의 시퀀스에 도달한 경우, 상기 갱신된 생체 신호를 이용하여 상기 시드 코드를 생성하는 것을 특징으로 하는 랜덤 소수 생성장치.
The method of claim 8,
The seed code generation unit,
And generating the seed code using the updated biosignal when the initial random number generated by the random number generator using the seed code reaches a sequence having a maximum length.
랜덤 소수 생성장치가 랜덤으로 소수를 생성하는 방법에 있어서,
생체 신호를 이용하여 시드 코드를 생성하는 시드 코드 생성 단계;
상기 시드 코드를 기반으로 초기 난수를 생성하고, 상기 시드 코드와 상기 초기 난수를 연산 처리하여 난수를 생성하는 난수 생성 단계; 및
상기 난수의 소수 여부를 판별하여 랜덤 소수를 생성하는 랜덤 소수 생성 단계를 포함하되,
상기 시드 코드 생성 단계는,
상기 생체 신호가 변환된 디지털 신호로부터 기 설정된 시점에 대응되는 N 개(상기 N은 2 이상인 자연수)의 샘플 각각을 추출하고, 상기 추출된 N 개의 샘플 크기를 이진 코드로 변환시킨 N 개의 샘플 코드를 생성하며, 상기 생성된 N 개의 샘플 코드를 조합하여 상기 시드 코드를 생성하며,
상기 난수 생성 단계는, 상기 초기 난수에 포함된 비트 정보를 상기 시드 코드와 혼합 연산하여 생성된 난수 코드를 기반으로 상기 난수를 생성하는 것을 특징으로 하는 랜덤 소수 생성방법.
In the method for randomly generating prime numbers by a random prime number generator,
A seed code generation step of generating a seed code using the bio-signal;
A random number generation step of generating an initial random number based on the seed code, and generating a random number by arithmetic processing the seed code and the initial random number; And
Including a random prime number generation step of generating a random prime number by determining whether the random number is prime,
The step of generating the seed code,
Each of the N samples corresponding to a preset point in time (where N is a natural number equal to or greater than 2) from the digital signal converted from the bio-signal is extracted, and N sample codes obtained by converting the extracted N sample sizes into binary codes And generates the seed code by combining the generated N sample codes,
The random number generation step comprises generating the random number based on a random number code generated by mixing and operating bit information included in the initial random number with the seed code.
제10항에 있어서,
상기 난수 생성 단계는,
상기 시드 코드를 입력 받아 저장하고, 클락 신호에 응답하여 상기 시드 코드에 포함된 비트 값 각각을 순차적으로 이동시키면서 생성된 적어도 하나의 비트 정보를 포함하는 상기 초기 난수를 생성하는 난수 패턴 생성 단계;
상기 초기 난수에 포함된 비트 정보를 상기 시드 코드와 혼합 연산하여 난수 코드를 생성하는 혼합 게이트 연산 단계; 및
상기 난수 코드를 기 설정된 비트의 상기 난수로 출력하는 난수 출력 단계
를 포함하는 것을 특징으로 하는 랜덤 소수 생성방법.
The method of claim 10,
The random number generation step,
A random number pattern generating step of receiving and storing the seed code and generating the initial random number including at least one bit information generated by sequentially moving each bit value included in the seed code in response to a clock signal;
A mixed gate operation step of generating a random number code by mixing the bit information included in the initial random number with the seed code; And
A random number output step of outputting the random number code as the random number of a preset bit
Random prime number generation method comprising a.
제11항에 있어서,
상기 혼합 게이트 연산 단계는,
상기 초기 난수와 상기 시드 코드를 비교하여 서로 같은 비트 값인 경우, 참(1)의 난수 코드를 생성하여 상기 난수가 출력되도록 하는 랜덤 소수 생성방법.
The method of claim 11,
The mixed gate operation step,
A method of generating a random prime number by comparing the initial random number with the seed code and generating a true (1) random number code to output the random number when the bit values are the same.
제10항에 있어서,
상기 랜덤 소수 생성 단계는,
기 설정된 소수 값을 저장하고, 상기 난수와 상기 소수 값을 비교하여 상기 난수의 소수 여부를 판별하는 랜덤 소수 판별 단계; 및
상기 난수가 소수인 것으로 판별된 경우, 상기 난수를 상기 랜덤 소수로 선정하여 출력하는 랜덤 소수 출력 단계
를 포함하는 것을 특징으로 하는 랜덤 소수 생성방법.
The method of claim 10,
The random prime number generation step,
A random prime number determining step of storing a preset prime value and determining whether the random number is prime by comparing the random number with the prime value; And
When the random number is determined to be a prime number, a random prime number output step of selecting and outputting the random number as the random prime number
Random prime number generation method comprising a.
제10항에 있어서,
상기 시드 코드 생성 단계는,
기 설정된 주기마다 갱신된 생체 신호를 획득하고, 상기 갱신된 생체 신호를 이용하여 상기 시드 코드를 생성하는 것을 특징으로 하는 랜덤 소수 생성방법.
The method of claim 10,
The step of generating the seed code,
A method for generating a random prime number, comprising acquiring an updated bio-signal every preset period and generating the seed code using the updated bio-signal.
제14항에 있어서,
상기 시드 코드 생성 단계는,
상기 난수 생성 단계에서 상기 시드 코드를 이용하여 생성된 상기 초기 난수가 최대 길이의 시퀀스에 도달한 경우, 상기 갱신된 생체 신호를 이용하여 상기 시드 코드를 생성하는 것을 특징으로 하는 랜덤 소수 생성방법.
The method of claim 14,
The step of generating the seed code,
And generating the seed code using the updated bio-signal when the initial random number generated by using the seed code in the random number generation step reaches a sequence having a maximum length.
KR1020190087871A 2019-06-14 2019-07-19 Method and Apparatus for Generating Random Prime KR102217928B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020190071039 2019-06-14
KR20190071039 2019-06-14

Publications (2)

Publication Number Publication Date
KR20200143183A KR20200143183A (en) 2020-12-23
KR102217928B1 true KR102217928B1 (en) 2021-02-19

Family

ID=74089261

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190087871A KR102217928B1 (en) 2019-06-14 2019-07-19 Method and Apparatus for Generating Random Prime

Country Status (1)

Country Link
KR (1) KR102217928B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116301721B (en) * 2022-12-27 2023-09-19 北京海泰方圆科技股份有限公司 Random number generation method and device, electronic equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100576714B1 (en) * 2003-12-23 2006-05-03 한국전자통신연구원 Apparatus and method for generating random number using digital logic

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3833412B2 (en) * 1999-04-09 2006-10-11 富士通株式会社 Expression data generation apparatus and method in finite field operation
KR20040084422A (en) * 2003-03-28 2004-10-06 박승배 Random numbers generator and method using digital bio-information
US9182943B2 (en) * 2013-03-08 2015-11-10 Qualcomm Incorporated Methods and devices for prime number generation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100576714B1 (en) * 2003-12-23 2006-05-03 한국전자통신연구원 Apparatus and method for generating random number using digital logic

Also Published As

Publication number Publication date
KR20200143183A (en) 2020-12-23

Similar Documents

Publication Publication Date Title
KR100374623B1 (en) Code division multiple communication method and code division multiple communication apparatus
WO2007014031A1 (en) Device and method for responding to influences of the mind
JPH10207695A (en) Pseudorandom number generation circuit
Arslan Tuncer et al. True random number generation from bioelectrical and physical signals
KR102217928B1 (en) Method and Apparatus for Generating Random Prime
Veljković et al. Low-cost implementations of on-the-fly tests for random number generators
JP5670849B2 (en) Pseudorandom number generation device and pseudorandom number generation method
Liu et al. An energy-efficient compressed sensing-based encryption scheme for wireless neural recording
Wen et al. The EEG signals encryption algorithm with K-sine-transform-based coupling chaotic system
Moosavi PPG-KeyGen: using photoplethysmogram for key generation in wearable devices
Chen et al. A fast digital chaotic generator for secure communication
KR102079318B1 (en) Random number generation apparatus and method thereof
Kaya et al. Generating Random Numbers from Biological Signals in LabVIEW Environment and Statistical Analysis.
Camara et al. A true random number generator based on gait data for the internet of you
Lyp et al. LISH: A new random number generator using ECG noises
Ahmad et al. Chaos-based encryption of biomedical EEG signals using random quantization technique
Kumar et al. A cellular automata-based healthcare data encryption technique for IoT networks
CN116405205A (en) Real-time entropy evaluation post-processing quantum random number generation method
Khan et al. Probing 3D chaotic Thomas’ cyclically attractor with multimedia encryption and electronic circuitry
Xu et al. A 4D Trigonometric-Based Memristor Hyperchaotic Map to Ultra-Fast PRNG
Raheja et al. An Efficient Encryption-Authentication Scheme for Electrocardiogram Data using the 3DES and Water Cycle Optimization Algorithm
CN100459487C (en) Chaotic cipher production method under limited precision
CN107911208B (en) A kind of method for generating chaos sequence and generator
Lee et al. Biometric Electroencephalogram Based Random Number Generator
Seymen On the establishment of pseudo random keys for body area network security using physiological signals

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant