JP6735062B2 - Random number sequence generation device, method and program - Google Patents

Random number sequence generation device, method and program Download PDF

Info

Publication number
JP6735062B2
JP6735062B2 JP2014252138A JP2014252138A JP6735062B2 JP 6735062 B2 JP6735062 B2 JP 6735062B2 JP 2014252138 A JP2014252138 A JP 2014252138A JP 2014252138 A JP2014252138 A JP 2014252138A JP 6735062 B2 JP6735062 B2 JP 6735062B2
Authority
JP
Japan
Prior art keywords
random number
sequence
number sequence
generation device
cipher
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2014252138A
Other languages
Japanese (ja)
Other versions
JP2016115066A (en
Inventor
有登 仲野
有登 仲野
清本 晋作
晋作 清本
三宅 優
優 三宅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
KDDI Corp
Original Assignee
KDDI Corp
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 KDDI Corp filed Critical KDDI Corp
Priority to JP2014252138A priority Critical patent/JP6735062B2/en
Publication of JP2016115066A publication Critical patent/JP2016115066A/en
Application granted granted Critical
Publication of JP6735062B2 publication Critical patent/JP6735062B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、乱数列生成装置、方法及びプログラムに関する。 The present invention relates to a random number sequence generation device, method and program.

従来より、UUID(Universally Unique Identifier)など、重複しない値を生成する技術が存在する(非特許文献1)。UUIDには複数のバージョンが存在し、バージョン1ではMACアドレスとタイムスタンプで重複しないことを保証している。また、UUIDには他のバージョンとして、乱数を利用するバージョンやハッシュ値を利用するバージョンも標準化されている。 2. Description of the Related Art Conventionally, there is a technique of generating non-overlapping values such as UUID (Universally Unique Identifier) (Non-Patent Document 1). There are multiple versions of UUID, and version 1 guarantees that the MAC address and the time stamp do not overlap. In addition, as the other versions of the UUID, a version that uses a random number and a version that uses a hash value are standardized.

P.Leach,M.Mealling,R.Salz,A Universally Unique IDentifier(UUID) URN Namespace RFC4122P. Leach, M.; Mealling, R.; Salz, A Universally Unique IDentifier (UUID) URN Namespace RFC4122

しかしながら、UUIDのバージョン1では、規則性が高く、だれもが容易に生成できるため、PIN(Personal identification number)やパスコードとしての利用には適さない。また、他のバージョンでは、規則性が低いものの、一意性が保証されておらず、だれもが生成可能であるという性質はバージョン1と同様である。 However, since UUID version 1 has high regularity and can be easily generated by anyone, it is not suitable for use as a PIN (Personal identification number) or a passcode. Further, in other versions, although the regularity is low, the uniqueness is not guaranteed, and the property that anyone can generate is similar to the version 1.

そこで、一意性が保証されていて衝突が起こらず、かつ、第3者による不正発行が困難な乱数列を生成する装置が求められている。 Therefore, there is a demand for an apparatus that generates a random number sequence that guarantees uniqueness, does not cause a collision, and is difficult for unauthorized third parties to issue.

本発明は、一意性が保証され、かつ、不正発行が困難な乱数列を生成できる乱数列生成装置、方法及びプログラムを提供することを目的とする。 An object of the present invention is to provide a random number sequence generation device, method, and program capable of generating a random number sequence whose uniqueness is guaranteed and which is difficult to be illegally issued.

具体的には、以下のような解決手段を提供する。
(1) 一意の番号を生成する番号生成部と、前記一意の番号を、暗号アルゴリズムによって暗号化する暗号作成部と、前記一意の番号と、前記暗号作成部によって作成された暗号とを連結させた連結列を作成する列作成部と、所定の規則を用いて、前記連結列を一意の乱数列に変換する変換部と、を備える乱数列生成装置。
Specifically, the following solutions are provided.
(1) A number generation unit that generates a unique number, a cipher creation unit that encrypts the unique number by a cryptographic algorithm, the unique number, and the cipher created by the cipher creation unit are connected. A random number sequence generation device comprising: a sequence creating unit that creates the connected sequence, and a conversion unit that converts the connected sequence into a unique random number sequence using a predetermined rule.

(1)に係る乱数列生成装置は、一意の番号を生成し、生成した一意の番号を、暗号アルゴリズムによって暗号化し、一意の番号と、作成した暗号とを連結させた連結列を作成し、所定の規則を用いて、連結列を一意の乱数列に変換する。
したがって、(1)に係る乱数列生成装置は、一意の番号を含むことによって一意性が保証され、かつ、変換によって一意の番号の規則性が隠されると共に暗号を含むことによって不正発行が困難な乱数列を生成することができる。
The random number sequence generation device according to (1) generates a unique number, encrypts the generated unique number by a cryptographic algorithm, and creates a concatenated sequence that concatenates the unique number and the created cipher, The concatenated sequence is converted into a unique random number sequence using a predetermined rule.
Therefore, the random number sequence generation device according to (1) guarantees uniqueness by including the unique number, and the regularity of the unique number is hidden by the conversion, and it is difficult to illegally issue by including the code. A random number sequence can be generated.

(2) 前記変換部は、前記連結列を構成する要素の順番を並び替え、並び替えた変更連結列を作成し、前記変更連結列を前記乱数列に変換する、(1)に記載の乱数列生成装置。 (2) The random number according to (1), wherein the conversion unit rearranges the order of the elements forming the connected sequence, creates a rearranged changed connected sequence, and converts the changed connected sequence into the random number sequence. Column generator.

(2)に係る乱数列生成装置は、連結列の要素の順番を並び替えて変換することにより、さらに規則性を隠すことができるので、不正発行が困難な乱数列を生成することができる。 The random number sequence generation device according to (2) can further hide the regularity by rearranging and converting the order of the elements of the concatenated sequence, and thus can generate a random number sequence that is difficult to be illegally issued.

(3) 前記暗号作成部は、前記暗号を所定の桁数に変換した変換暗号列を作成する暗号列変換部と、前記列作成部は、前記変換暗号列と、前記一意の番号とから前記連結列を作成する、(1)又は(2)に記載の乱数列生成装置。 (3) The cipher creation unit creates an converted cipher string by converting the cipher to a predetermined number of digits, and the string creation unit uses the converted cipher string and the unique number to create the converted cipher string. The random number sequence generation device according to (1) or (2), which creates a connected sequence.

(3)に係る乱数列生成装置は、指定された桁数の乱数列を生成することができる。 The random number sequence generation device according to (3) can generate a random number sequence with a designated number of digits.

(4) 前記乱数列の要素に基づいてチェックデジットを算出し、算出した前記チェックデジットを前記乱数列に付加するチェックデジット付加部をさらに備える、(3)に記載の乱数列生成装置。 (4) The random number sequence generation device according to (3), further including a check digit adding unit that calculates a check digit based on the elements of the random number sequence and adds the calculated check digit to the random number sequence.

(4)に係る乱数列生成装置は、チェックデジットを付加することにより、PINの入力ミスの検出など、正しく発行されたものであることをチェック可能な乱数列を生成することができる。 The random number sequence generation device according to (4) can generate a random number sequence that can be checked to be correctly issued, such as detection of a PIN input error, by adding a check digit.

(5) 前記変換部は、前記連結列を構成する要素ごとを符号に変換する変換表を用いて変換する、(1)から(4)のいずれか一に記載の乱数列生成装置。 (5) The random number sequence generation device according to any one of (1) to (4), wherein the conversion unit performs conversion by using a conversion table that converts each element forming the connected sequence into a code.

(5)に係る乱数列生成装置は、要素ごとを符号に変換することにより、不正発行が困難な乱数列を容易に生成することができる。 The random number sequence generation device according to (5) can easily generate a random number sequence that is difficult to be illegally issued by converting each element into a code.

(6) 前記番号生成部は、日付と日付ごとのカウンタとを連結した番号を前記一意の番号とする、(1)から(5)のいずれか一に記載の乱数列生成装置。 (6) The random number sequence generation device according to any one of (1) to (5), wherein the number generation unit sets a number obtained by connecting a date and a counter for each date as the unique number.

(6)に係る乱数列生成装置は、日付と日付ごとのカウンタとを連結した番号によって、一意性が保証された乱数列を容易に生成することができる。 The random number sequence generation device according to (6) can easily generate a random number sequence whose uniqueness is assured by the number that connects the date and the counter for each date.

(7) 前記暗号アルゴリズムに用いられる秘密鍵を記憶するセキュアな保護記憶部をさらに備える(1)から(6)のいずれか一に記載の乱数列生成装置。 (7) The random number sequence generation device according to any one of (1) to (6), further including a secure protected storage unit that stores a secret key used for the encryption algorithm.

(7)に係る乱数列生成装置は、秘密鍵をセキュアな保護記憶部に記憶することにより暗号化処理の秘匿性が高まるので、不正発行がより困難な乱数列を生成することができる。 Since the random number sequence generation device according to (7) stores the private key in the secure protection storage unit, the confidentiality of the encryption process is enhanced, and thus the random number sequence that is more difficult to be illegally issued can be generated.

(8) (1)に記載の乱数列生成装置が実行する方法であって、前記番号生成部が、一意の番号を生成する番号生成ステップと、前記暗号作成部が、前記一意の番号を、秘密鍵を用いた暗号アルゴリズムによって暗号化する暗号作成ステップと、前記列作成部が、前記一意の番号と、前記暗号作成部によって作成された暗号とを連結させた連結列を作成する乱数列作成ステップと、前記変換部が、所定の規則を用いて、前記連結列を一意の乱数列に変換する変換ステップと、を備える方法。 (8) A method executed by the random number sequence generation device according to (1), wherein the number generation unit generates a unique number, and the cipher generation unit generates the unique number. A cipher creation step of enciphering with a cipher algorithm using a secret key, and a random number sequence creation in which the string creation unit creates a concatenated string that connects the unique number and the cipher created by the cipher creation unit. And a conversion step in which the conversion unit converts the connected sequence into a unique random number sequence using a predetermined rule.

(8)に係る方法は、(1)と同様に、一意性が保証され、かつ、不正発行が困難な乱数列を生成することができる。 Similar to (1), the method according to (8) can generate a random number sequence whose uniqueness is guaranteed and which is difficult to be illegally issued.

(9) コンピュータに、(8)に記載の各ステップを実行させるためのプログラム。 (9) A program for causing a computer to execute the steps described in (8).

(9)に係るプログラムは、コンピュータに、一意性が保証され、かつ、不正発行が困難な乱数列を生成するように機能させることができる。 The program according to (9) can cause a computer to function so as to generate a random number sequence whose uniqueness is guaranteed and which is difficult to be illegally issued.

本発明によれば、一意性が保証され、かつ、不正発行が困難な乱数列を生成することができる。 According to the present invention, it is possible to generate a random number sequence whose uniqueness is guaranteed and which is difficult to be illegally issued.

本発明の一実施形態に係る乱数列生成装置の構成を示すブロック図である。It is a block diagram which shows the structure of the random number sequence generator which concerns on one Embodiment of this invention. 本発明の一実施形態に係る乱数列生成装置の変換表の例を示す図である。It is a figure which shows the example of the conversion table of the random number sequence generator which concerns on one Embodiment of this invention. 本発明の一実施形態に係る乱数列生成装置の処理の例を示すフローチャートである。It is a flow chart which shows an example of processing of a random number sequence generation device concerning one embodiment of the present invention.

以下、本発明の実施形態について、図を参照しながら説明する。
図1は、本発明の一実施形態に係る乱数列生成装置10の構成を示すブロック図である。乱数列生成装置10は、番号生成部11と、暗号作成部12と、列作成部13と、変換部14と、チェックデジット付加部15と、保護記憶部30と、変換表311を記憶する記憶部31とを備える。各部を詳述する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of a random number sequence generation device 10 according to an exemplary embodiment of the present invention. The random number sequence generation device 10 stores a number generation unit 11, a cipher generation unit 12, a sequence generation unit 13, a conversion unit 14, a check digit addition unit 15, a protection storage unit 30, and a conversion table 311. And a part 31. Each part will be described in detail.

番号生成部11は、一意の番号を生成する。具体的には、番号生成部11は、日付と日付ごとのカウンタとによる番号を一意の番号とする。例えば、番号生成部11は、乱数列生成装置10の処理開始日から日付ごとにカウントアップした3桁の日付番号を作成する。次に、番号生成部11は、日付ごとに0からカウントアップするカウンタであって、乱数列生成装置10による乱数列の生成ごとにカウントアップするカウンタ(例えば、5桁のカウンタ)からカウントを取得する。次に、番号生成部11は、取得したカウントを、日付番号に連結させた8桁の一意の番号を生成する。
カウントアップの方法は、いずれの場合も、10進(すなわち、0〜9)に限らず、例えば、30進でもよい。30進の場合、カウントアップの方法は、例えば、0〜9と、a〜zのうちの選択された20個のアルファベットとを用いて順にアップし桁上がりするとしてもよく、他の記号などの符号を用いて順にアップし桁上がりするとしてもよい。一意の番号に出現する符号は、後述する変換部14で用いられる所定の規則(例えば、変換表311など)にも、対応して用いられる。
The number generation unit 11 generates a unique number. Specifically, the number generation unit 11 sets a number based on the date and a counter for each date as a unique number. For example, the number generation unit 11 creates a 3-digit date number counted up for each date from the processing start date of the random number sequence generation device 10. Next, the number generation unit 11 is a counter that counts up from 0 for each date and acquires a count from a counter (for example, a 5-digit counter) that counts up each time the random number sequence generation device 10 generates a random number sequence. To do. Next, the number generation unit 11 generates an 8-digit unique number by connecting the acquired count to the date number.
In any case, the count-up method is not limited to decimal (that is, 0 to 9), and may be, for example, decimal. In the case of the 30-digit system, the count-up method may be, for example, 0 to 9 and 20 alphabets selected from a to z to sequentially increment and carry. It is also possible to use symbols to sequentially increase and carry. The code appearing in the unique number is also used corresponding to a predetermined rule (for example, the conversion table 311 or the like) used in the conversion unit 14 described later.

暗号作成部12は、番号生成部11によって生成された一意の番号を、暗号アルゴリズムによって暗号化する。
暗号アルゴリズムは、一方向性関数である鍵付きハッシュ関数などであってよく、秘密鍵Kを用いるものであってよい。
The cipher creation unit 12 encrypts the unique number generated by the number generation unit 11 with a cryptographic algorithm.
The cryptographic algorithm may be a one-way function keyed hash function or the like, and may use the secret key K.

暗号作成部12は、作成した暗号を所定の桁数に変換した変換暗号列を作成するとしてもよい。具体的には、暗号作成部12は、暗号の一部(例えば、上位6桁)を抜き取った変換暗号列を作成する。すなわち、暗号作成部12は、暗号を所定の桁数に変換でき、例えば、所定の桁数が指定された場合、指定された桁数の変換暗号列を作成することができる。 The cipher creation unit 12 may create a converted cipher string by converting the created cipher to a predetermined number of digits. Specifically, the cipher creation unit 12 creates a converted cipher string by extracting a part of the cipher (for example, upper 6 digits). That is, the cipher creation unit 12 can convert the cipher into a predetermined number of digits, and, for example, when a predetermined number of digits is designated, can generate a converted cipher string having the designated number of digits.

列作成部13は、番号生成部11によって生成された一意の番号と、暗号作成部12によって作成された暗号とを連結させた連結列を作成する。
列作成部13は、暗号作成部12によって変換暗号列が作成された場合、変換暗号列と、一意の番号とから連結列を作成する。
The column creation unit 13 creates a concatenated string in which the unique number generated by the number generation unit 11 and the cipher created by the cipher creation unit 12 are concatenated.
When the cipher creating unit 12 creates the converted cipher string, the string creating unit 13 creates a concatenated string from the converted cipher string and the unique number.

変換部14は、所定の規則を用いて、連結列を一意の乱数列に変換し、連結列に一意の番号が含まれていることが分からないようにする。
所定の規則は、一意の乱数列を構成する要素ごとを符号に変換する変換表311(後述する図2参照)などであってもよい。
The conversion unit 14 uses a predetermined rule to convert the concatenated sequence into a unique random number sequence so that it is not known that the concatenated sequence includes a unique number.
The predetermined rule may be, for example, a conversion table 311 (see FIG. 2 described later) that converts each element forming a unique random number sequence into a code.

変換部14は、連結列を構成する要素の順番を並び替え、並び替えた変更連結列を作成し、作成した変更連結列を一意の乱数列に変換するとしてもよい。 The conversion unit 14 may rearrange the order of the elements forming the concatenated sequence, create a rearranged modified concatenated sequence, and convert the created modified concatenated sequence into a unique random number sequence.

保護記憶部30は、暗号アルゴリズムに用いられる秘密鍵Kを、セキュアに記憶する。保護記憶部30は、変換部14が用いる所定の規則(例えば、変換表311など)も記憶するとしてよい。
保護記憶部30は、メモリ保護機能及びレジスタ保護機能などを具備したソフトウェアセキュアエレメントであってもよい。ソフトウェアセキュアエレメントは、メモリ上に保管されているデータ、プログラムが行うメモリへのアクセス、CPUで実行される演算などを保護することが可能である。ソフトウェアセキュアエレメントは、暗号アルゴリズムで利用する秘密鍵K、秘密鍵Kを含む処理、計算、及び変換表311(後述する図2参照)を安全に処理又は保管することが可能であり、攻撃者による解析などから保護する。
The protection storage unit 30 securely stores the secret key K used for the encryption algorithm. The protection storage unit 30 may also store a predetermined rule used by the conversion unit 14 (for example, the conversion table 311 or the like).
The protection storage unit 30 may be a software secure element having a memory protection function and a register protection function. The software secure element can protect data stored in the memory, access to the memory performed by the program, operations executed by the CPU, and the like. The software secure element can securely process or store the secret key K used in the cryptographic algorithm, the process including the secret key K, the calculation, and the conversion table 311 (see FIG. 2 described later). Protect from analysis.

チェックデジット付加部15は、連結列から、変換部14によって変換された一意の乱数列の要素に基づいてチェックデジットを算出し、算出したチェックデジットを一意の乱数列に付加する。具体的には、チェックデジット付加部15は、暗号作成部12によって作成された所定の桁数の変換暗号列から変換部14によって変換された一意の乱数列に基づいて、チェックデジットを付加する。
このように桁数が適切に調整され、チェックデジットが付加されて作成された乱数列は、一意性が保証され、かつ、不正発行が困難な乱数列なので、カードなどに印刷されて利用されることが可能である。
The check digit addition unit 15 calculates a check digit from the concatenated sequence based on the elements of the unique random number sequence converted by the conversion unit 14, and adds the calculated check digit to the unique random number sequence. Specifically, the check digit adding unit 15 adds a check digit based on the unique random number sequence converted by the converting unit 14 from the converted cipher string having a predetermined number of digits created by the cipher creating unit 12.
The random number sequence created by properly adjusting the number of digits and adding the check digit in this way is a random number sequence that guarantees uniqueness and is difficult to illegally issue, so it is printed on a card and used. It is possible.

図2は、本発明の一実施形態に係る乱数列生成装置10の変換表311の例を示す図である。図2の変換表311は、連結列に出現する符号が30進であることに対応した例である。図2の変換表311は、行が30文字(英数字0〜9及びa〜zのうちの30文字)と、列が30文字(英数字0〜9及びa〜zのうちの30文字)とに構成されている。
変換部14は、変換対象の連結列の2桁ずつをそれぞれ変換表311の行と列とに対応させ、対応する行及び列の交点に記憶されている符号に変換する。例えば、変換部14は、変換対象の連結列が「0ac1・・・」の場合、「0」と「a」とを「c0」に、「c」と「1」とを「ds」のように、変換表311を用いて変換する。
FIG. 2 is a diagram showing an example of the conversion table 311 of the random number sequence generation device 10 according to the embodiment of the present invention. The conversion table 311 of FIG. 2 is an example corresponding to that the code appearing in the concatenated string is the base 30. In the conversion table 311 shown in FIG. 2, a row has 30 characters (alphanumeric characters 0 to 9 and a to z characters 30) and a column has 30 characters (alphanumeric characters 0 to 9 and a to z characters 30). It is composed of and.
The conversion unit 14 associates each two digits of the connected column to be converted with a row and a column of the conversion table 311, and converts into a code stored at the intersection of the corresponding row and column. For example, when the connected string to be converted is “0ac1... ”, the conversion unit 14 sets “0” and “a” to “c0” and “c” and “1” to “ds”. Conversion table 311 using the conversion table 311.

<16桁の一意の乱数列の生成の例>
乱数列生成方法の一例として、乱数列生成装置10が、英数字のうち30文字を利用して16桁の乱数列を生成する場合を説明する。乱数列の構成は次のとおりとする。
S(ymd||counter||Trunc(E(ymd||counter),n))||chksm
ここで、ymdは発行日、counterはその日の発行数を管理するカウンタ、Eは暗号アルゴリズムである。Eは鍵付きハッシュ関数などの一方向性関数であってもよい。
Trunc(x,n)は、xから上位nビットを抜き取り、英数字を割り当てる関数である。Sは入力値の並び替えと表変換を行う関数である。chksmは、チェックデジットである。なお、記号「||」は、前後の文字列を連結することを表している。
<Example of generating 16-digit unique random number sequence>
As an example of the random number sequence generation method, a case where the random number sequence generation device 10 generates a 16-digit random number sequence by using 30 of alphanumeric characters will be described. The configuration of the random number sequence is as follows.
S(ymd||counter||Trunc(E K (ymd||counter), n))||chksm
Here, ymd is an issue date, counter is a counter for managing the number of issues on that day, and E K is an encryption algorithm. E K may be a one-way function such as a keyed hash function.
Trunc(x,n) is a function that extracts upper n bits from x and assigns alphanumeric characters. S is a function that sorts input values and performs table conversion. chksm is a check digit. The symbol "||" represents that the preceding and following character strings are connected.

乱数列生成装置10は、一意の番号(ymd||counter)を生成する。
すなわち、乱数列生成装置10は、発行日ymdに3桁を割り当て、開始日を「000」とし、1日ごとにカウントアップする。乱数列生成装置10は、カウンタcounterに5桁を割り当て、その日の一意の乱数列の発行を「00000」から順にカウントアップする。
The random number sequence generation device 10 generates a unique number (ymd||counter).
That is, the random number sequence generation device 10 assigns 3 digits to the issue date ymd, sets the start date to “000”, and counts up every day. The random number sequence generation device 10 allocates five digits to the counter counter and counts up the issuance of the unique random number sequence of the day from “00000” in order.

次に、乱数列生成装置10は、暗号E(ymd||counter)を作成する。
すなわち、乱数列生成装置10は、「発行日||カウンタ」を、秘密鍵Kを利用する暗号アルゴリズム(例えば、AES(Advanced Encryption Standard)など)又は一方向性関数に入力する。
Next, the random number sequence generation device 10 creates the cipher E K (ymd||counter).
That is, the random number sequence generation device 10 inputs the “issue date||counter” into a cryptographic algorithm (for example, AES (Advanced Encryption Standard) or the like) using the secret key K or a one-way function.

次に、乱数列生成装置10は、関数Trunc(E(ymd||counter),n)(例えば、n=6)により、作成した暗号の上位6桁を抜き取る。
すなわち、乱数列生成装置10は、暗号部分に6桁を割り当て、得られた暗号から上位の6桁を抜き取る。
Next, the random number sequence generation device 10 extracts the upper 6 digits of the created cipher by the function Trunc(E K (ymd||counter), n) (for example, n=6).
That is, the random number sequence generation device 10 assigns 6 digits to the encrypted portion and extracts the upper 6 digits from the obtained encryption.

次に、乱数列生成装置10は、(ymd||counter)を連結させた連結列ymd||counter||Trunc(E(ymd||counter),n)を作成する。 Next, the random number sequence generation device 10 creates a concatenated sequence ymd||counter||Trunc(E K (ymd||counter),n) in which (ymd||counter) is concatenated.

次に、乱数列生成装置10は、連結列を、変換表311により2桁ずつ変換し、一意の乱数列S(ymd||counter||Trunc(E(ymd||counter),n))を生成する。関数Sは、連結列の要素を並び替えてもよい。
すなわち、乱数列生成装置10は、発行日(3桁)、カウンタ(5桁)、暗号部分(6桁)によって作成した連結列に対して、2桁ずつを変換表311を用いて変換し、変換した14桁のコードを、一意の乱数列の上位14桁とする。
Next, the random number sequence generation device 10 converts the concatenated sequence by two digits by the conversion table 311, and the unique random number sequence S(ymd||counter||Trunc(E K (ymd||counter),n)). To generate. The function S may rearrange the elements of the connected sequence.
That is, the random number sequence generation device 10 uses the conversion table 311 to convert every two digits for the concatenated sequence created by the issue date (three digits), the counter (five digits), and the encryption part (six digits). The converted 14-digit code is used as the upper 14 digits of the unique random number sequence.

次に、乱数列生成装置10は、チェックデジットが付加された一意の乱数列S(ymd||counter||Trunc(E(ymd||counter),n))||chksmを生成する。
すなわち、乱数列生成装置10は、一意の乱数列の各要素の和を30で割った余りを、チェックデジットとする。例えば、乱数列生成装置10は、14桁のコードを上位の7桁と下位7桁とに分けてそれぞれチェックデジットを算出し、算出したチェックデジットをそれぞれ15桁目、16桁目とする。
Next, the random number sequence generation device 10 generates a unique random number sequence S(ymd||counter||Trunc(E K (ymd||counter),n))||chksm to which a check digit is added.
That is, the random number sequence generation device 10 uses the remainder obtained by dividing the sum of each element of the unique random number sequence by 30 as the check digit. For example, the random number sequence generation device 10 divides a 14-digit code into upper 7 digits and lower 7 digits to calculate check digits, and sets the calculated check digits as the 15th digit and the 16th digit, respectively.

このように作成された乱数列は、他の装置によって作成することができないものである。例えば、他の装置は、同様の手順で一意の乱数列を生成しようとしても、秘密鍵Kが得られないので、生成できない。すなわち、乱数列生成装置10は、他の装置では生成できない、かつ、同じ乱数列が存在しない一意の乱数列を生成する。 The random number sequence created in this way cannot be created by another device. For example, another device cannot generate a unique random number sequence by the same procedure because it cannot obtain the secret key K. That is, the random number sequence generation device 10 generates a unique random number sequence that cannot be generated by another device and does not have the same random number sequence.

図3は、本発明の一実施形態に係る乱数列生成装置10の処理の例を示すフローチャートである。乱数列生成装置10は、コンピュータ及びその周辺装置が備えるハードウェア並びに該ハードウェアを制御するソフトウェアによって構成される。以下の処理は、制御部(例えば、CPU)が、所定のソフトウェアに従い実行する処理である。 FIG. 3 is a flowchart showing an example of processing of the random number sequence generation device 10 according to the embodiment of the present invention. The random number sequence generation device 10 is configured by hardware included in a computer and its peripheral devices and software that controls the hardware. The following process is a process executed by a control unit (for example, a CPU) according to predetermined software.

ステップS101において、CPU(番号生成部11)は、一意の番号を生成する。より具体的には、CPUは、日付ごとのカウンタをカウントアップし、カウントアップしたカウントと、日付に基づく日付番号とを連結させた一意の番号を生成する。 In step S101, the CPU (number generation unit 11) generates a unique number. More specifically, the CPU counts up the counter for each date, and generates a unique number by concatenating the counted up count and the date number based on the date.

ステップS102において、CPU(暗号作成部12)は、一意の番号から、暗号アルゴリズムにより暗号を作成する。より具体的には、CPUは、ステップS101で生成された一意の番号を、秘密鍵Kを用いた暗号アルゴリズムによって暗号化する。 In step S102, the CPU (encryption creating unit 12) creates an encryption from the unique number by an encryption algorithm. More specifically, the CPU encrypts the unique number generated in step S101 with a cryptographic algorithm using the secret key K.

ステップS103において、CPU(暗号作成部12)は、暗号を所定の桁数に変換する。より具体的には、CPUは、ステップS102において作成した暗号の上位の所定の桁数を抜き取る。 In step S103, the CPU (cipher creation unit 12) converts the cipher into a predetermined number of digits. More specifically, the CPU extracts a predetermined upper digit number of the cipher created in step S102.

ステップS104において、CPU(列作成部13)は、連結列を作成する。より具体的には、CPUは、ステップS103において変換した暗号と、ステップS101で生成した一意の番号とを連結する。 In step S104, the CPU (column creating unit 13) creates a linked column. More specifically, the CPU connects the cipher code converted in step S103 and the unique number generated in step S101.

ステップS105において、CPU(変換部14)は、連結列の要素を並び替える。より具体的には、CPUは、ステップS104において作成した連結列の要素を並び替える。 In step S105, the CPU (conversion unit 14) rearranges the elements of the connected sequence. More specifically, the CPU rearranges the elements of the linked sequence created in step S104.

ステップS106において、CPU(変換部14)は、連結列を、変換表311により変換し、一意の乱数列を生成する。より具体的には、CPUは、ステップS105で作成した連結列を構成する要素の2桁ずつを、変換表311により変換し、一意の乱数列を生成する。 In step S106, the CPU (conversion unit 14) converts the concatenated string by the conversion table 311 to generate a unique random number string. More specifically, the CPU uses the conversion table 311 to convert every two digits of the elements forming the concatenated string created in step S105 to generate a unique random number string.

ステップS107において、CPU(チェックデジット付加部15)は、一意の乱数列からチェックデジットを算出し、算出したチェックデジットを一意の乱数列に付加する。より具体的には、CPUは、ステップS106において生成した一意の乱数列の要素に基づいてチェックデジットを算出し、算出したチェックデジットを一意の乱数列に付加する。その後、CPUは、処理を終了する。 In step S107, the CPU (check digit adding unit 15) calculates a check digit from the unique random number sequence and adds the calculated check digit to the unique random number sequence. More specifically, the CPU calculates a check digit based on the element of the unique random number sequence generated in step S106, and adds the calculated check digit to the unique random number sequence. After that, the CPU ends the process.

本実施形態によれば、乱数列生成装置10は、変換表311によって変換されて一意の番号の規則性が隠された文字列と暗号とを含むことによって不正発行が困難な一意の乱数列を生成する。さらに、乱数列生成装置10は、連結列の要素の順番を並び替えて変換することにより、さらに規則性を隠し、不正発行が困難な一意の乱数列を生成する。乱数列生成装置10は、指定された桁数の一意の乱数列を生成する。乱数列生成装置10は、チェックデジットを付加した一意の乱数列であって、PINの入力ミスの検出など、正しく発行されたものであることをチェック可能な一意の乱数列を生成する。乱数列生成装置10は、要素ごとを符号に変換した、不正発行が困難な乱数列を容易に生成する。乱数列生成装置10は、日付と日付ごとのカウンタとを連結した番号によって、一意性が保証された乱数列を容易に生成する。乱数列生成装置10は、秘密鍵Kをセキュアな保護記憶部30に記憶し、暗号化処理の秘匿性を高め、不正発行がより困難な一意の乱数列を生成する。
このように、乱数列生成装置10は、一意性が保証されて衝突が起こらず、かつ、第3者による不正発行が困難な一意の乱数列を生成する。
さらに、乱数列生成装置10は、電子マネーへのチャージや有料サービスの利用などが受けられるカードであって、小売店などで販売されPINやパスコードが印刷されるカードなどに適した、所定の桁数の乱数列を生成可能である。
According to the present embodiment, the random number sequence generation device 10 includes a unique random number sequence that is difficult to be illegally issued by including a character string that is converted by the conversion table 311 and the regularity of the unique number is hidden, and the cipher. To generate. Further, the random number sequence generation device 10 rearranges the order of the elements of the concatenated sequence and converts the elements to further hide the regularity and generate a unique random number sequence that is difficult to be illegally issued. The random number sequence generation device 10 generates a unique random number sequence having a designated number of digits. The random number sequence generation device 10 generates a unique random number sequence to which a check digit is added and which can be checked to be correctly issued such as detection of a PIN input error. The random number sequence generation device 10 easily generates a random number sequence in which each element is converted into a code and which is difficult to be illegally issued. The random number sequence generation device 10 easily generates a random number sequence in which uniqueness is guaranteed by a number that connects a date and a counter for each date. The random number sequence generation device 10 stores the secret key K in the secure protection storage unit 30, enhances the confidentiality of the encryption process, and generates a unique random number sequence that is more difficult to be illegally issued.
In this way, the random number sequence generation device 10 generates a unique random number sequence in which uniqueness is guaranteed, no collision occurs, and it is difficult for a third party to illegally issue it.
Further, the random number sequence generation device 10 is a predetermined card suitable for charging electronic money, using pay services, and the like, which is sold at retail stores and has a PIN or passcode printed thereon. It is possible to generate a random number sequence of digits.

以上、本発明の実施形態について説明したが、本発明は上述した実施形態に限るものではない。また、本発明の実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、本発明の実施形態に記載されたものに限定されるものではない。 Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. Further, the effects described in the embodiments of the present invention only list the most suitable effects that occur from the present invention, and the effects according to the present invention are limited to those described in the embodiments of the present invention. is not.

乱数列生成装置10による一連の処理は、ソフトウェアにより行うこともできる。一連の処理をソフトウェアによって行う場合には、そのソフトウェアを構成するプログラムが、汎用のコンピュータなどにインストールされる。また、当該プログラムは、コンピュータ読み取り可能な記録媒体(例えば、CD−ROMのようなリムーバブルメディアなど)に記録されてユーザに配布されてもよいし、ネットワークを介してユーザのコンピュータにダウンロードされることにより配布されてもよい。 A series of processes by the random number sequence generation device 10 can also be performed by software. When the series of processes is performed by software, a program forming the software is installed in a general-purpose computer or the like. Further, the program may be recorded in a computer-readable recording medium (for example, a removable medium such as a CD-ROM) and distributed to the user, or may be downloaded to the user's computer via a network. May be distributed by

10 乱数列生成装置
11 番号生成部
12 暗号作成部
13 列作成部
14 変換部
15 チェックデジット付加部
30 保護記憶部
31 記憶部
311 変換表
10 Random Number Sequence Generation Device 11 Number Generation Unit 12 Cryptography Creation Unit 13 Sequence Creation Unit 14 Conversion Unit 15 Check Digit Addition Unit 30 Protected Storage Unit 31 Storage Unit 311 Conversion Table

Claims (9)

一意の番号を生成する番号生成部と、
前記一意の番号を、暗号アルゴリズムによって暗号化する暗号作成部と、
前記一意の番号と、前記暗号作成部によって作成された暗号とを連結させた連結列を作成する列作成部と、
所定の規則を用いて、前記連結列を一意の乱数列に変換する変換部と、
を備える乱数列生成装置。
A number generator that generates a unique number,
A cipher creation unit that encrypts the unique number by a cryptographic algorithm,
A column creation unit that creates a concatenated string that connects the unique number and the cipher created by the cipher creating unit;
A conversion unit for converting the concatenated sequence into a unique random number sequence using a predetermined rule,
A random number sequence generation device comprising.
前記変換部は、前記連結列を構成する要素の順番を並び替え、並び替えた変更連結列を作成し、前記変更連結列を前記乱数列に変換する、請求項1に記載の乱数列生成装置。 The random number sequence generation device according to claim 1, wherein the conversion unit rearranges the order of the elements forming the connected sequence, creates a rearranged changed connected sequence, and converts the changed connected sequence into the random number sequence. .. 前記暗号作成部は、前記暗号を所定の桁数に変換した変換暗号列を作成し、
前記列作成部は、前記変換暗号列と、前記一意の番号とから前記連結列を作成する、請求項1又は2に記載の乱数列生成装置。
The cipher creating unit creates a converted cipher string by converting the cipher to a predetermined number of digits,
The random number sequence generation device according to claim 1 or 2, wherein the sequence creation unit creates the concatenated sequence from the converted encrypted sequence and the unique number.
前記乱数列の要素に基づいてチェックデジットを算出し、算出した前記チェックデジットを前記乱数列に付加するチェックデジット付加部をさらに備える、請求項3に記載の乱数列生成装置。 The random number sequence generation device according to claim 3, further comprising a check digit addition unit that calculates a check digit based on an element of the random number sequence and adds the calculated check digit to the random number sequence. 前記変換部は、前記連結列を構成する要素ごとを符号に変換する変換表を用いて変換する、請求項1から4のいずれか一項に記載の乱数列生成装置。 The random number sequence generation device according to any one of claims 1 to 4, wherein the conversion unit performs conversion by using a conversion table that converts each element forming the connected sequence into a code. 前記番号生成部は、日付と日付ごとのカウンタとを連結した番号を前記一意の番号とする、請求項1から5のいずれか一項に記載の乱数列生成装置。 The random number sequence generation device according to any one of claims 1 to 5, wherein the number generation unit sets a number obtained by connecting a date and a counter for each date as the unique number. 前記暗号アルゴリズムに用いられる秘密鍵を記憶するセキュアな保護記憶部をさらに備える請求項1から6のいずれか一項に記載の乱数列生成装置。 The random number sequence generation device according to claim 1, further comprising a secure protection storage unit that stores a secret key used for the encryption algorithm. 請求項1に記載の乱数列生成装置が実行する方法であって、
前記番号生成部が、一意の番号を生成する番号生成ステップと、
前記暗号作成部が、前記一意の番号を、暗号アルゴリズムによって暗号化する暗号作成ステップと、
前記列作成部が、前記一意の番号と、前記暗号作成ステップによって作成された暗号とを連結させた連結列を作成する乱数列作成ステップと、
前記変換部が、所定の規則を用いて、前記連結列を一意の乱数列に変換する変換ステップと、
を備える方法。
A method executed by the random number sequence generation device according to claim 1, comprising:
A number generation step in which the number generation unit generates a unique number,
A cipher creating step in which the cipher creating section encrypts the unique number by a cryptographic algorithm;
The sequence creation unit, a random number sequence creation step of creating a concatenated sequence in which the unique number and the cipher created in the cipher creation step are concatenated;
A conversion step in which the conversion unit converts the connected sequence into a unique random number sequence using a predetermined rule;
A method comprising.
コンピュータに、請求項8に記載の各ステップを実行させるためのプログラム。
A program for causing a computer to execute each step according to claim 8.
JP2014252138A 2014-12-12 2014-12-12 Random number sequence generation device, method and program Active JP6735062B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014252138A JP6735062B2 (en) 2014-12-12 2014-12-12 Random number sequence generation device, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014252138A JP6735062B2 (en) 2014-12-12 2014-12-12 Random number sequence generation device, method and program

Publications (2)

Publication Number Publication Date
JP2016115066A JP2016115066A (en) 2016-06-23
JP6735062B2 true JP6735062B2 (en) 2020-08-05

Family

ID=56141921

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014252138A Active JP6735062B2 (en) 2014-12-12 2014-12-12 Random number sequence generation device, method and program

Country Status (1)

Country Link
JP (1) JP6735062B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2001272886A1 (en) * 2000-10-11 2002-04-22 Trustcopy Pte Ltd. Remote printing of secure and/or authenticated documents
JP4177650B2 (en) * 2002-11-28 2008-11-05 大日本印刷株式会社 Unique number generation device, generation method, generation program and recording medium thereof, and application processing system
JP4901272B2 (en) * 2006-04-04 2012-03-21 シヤチハタ株式会社 Information generation processing program, information generation apparatus, and information generation method
JP2008072241A (en) * 2006-09-12 2008-03-27 Ricoh Co Ltd Wireless communication apparatus and method
JP4857230B2 (en) * 2007-03-30 2012-01-18 株式会社日立製作所 Pseudorandom number generator and encryption processing device using the same

Also Published As

Publication number Publication date
JP2016115066A (en) 2016-06-23

Similar Documents

Publication Publication Date Title
US11516201B2 (en) Encryption and decryption techniques using shuffle function
US9934400B2 (en) System and methods for encrypting data
US9292707B1 (en) System and method for cascading token generation and data de-identification
TW201812638A (en) Storage design method of blockchain encrypted radio frequency chip
KR101393806B1 (en) Multistage physical unclonable function system
CN110663215B (en) Elliptic curve point multiplication device and method in white-box scene
WO2019114122A1 (en) Encryption method for login information, device, electronic device, and medium
US20150304103A1 (en) Method of generating unique and hardly predictable numbers of coupons
US11438156B2 (en) Method and system for securing data
CN107592963B (en) Method and computing device for performing secure computations
WO2019114084A1 (en) Encrypting/decrypting method for multi-digit number and encrypting/decrypting server
CN107852328B (en) Enhanced obfuscation or randomization for secure product identification and verification
JP6735062B2 (en) Random number sequence generation device, method and program
KR101584220B1 (en) Encoding Method for Maintaining Sorting Order of Encrypted Data
JPWO2021214922A5 (en) Memory processor, memory verification device, memory update device, memory protection system, method and program
KR101076747B1 (en) Method and apparatus for random accessible encryption and decryption by using a hierarchical tree structure of stream cipher module
US20170244554A1 (en) Method and apparatus for encrypting and decrypting data
Schroeder Pad and Chaff: secure approximate string matching in private record linkage
KR102123586B1 (en) One-time encryption method using random matrix with uniform distribution
CN117978399A (en) Software identity verification method and device based on intelligent password key and storage medium
Vidya et al. Secrecy Archiving Public Ascertaining for Immune Cloud Storage
Kumar et al. A New Digital Encryption Scheme: Binary Matrix Rotations Encryption Algorithm

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170816

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180330

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180417

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180828

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20190115

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200713

R150 Certificate of patent or registration of utility model

Ref document number: 6735062

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150