WO2006121149A1 - 擬似乱数発生システム、暗号化システム及び復号化システム - Google Patents

擬似乱数発生システム、暗号化システム及び復号化システム Download PDF

Info

Publication number
WO2006121149A1
WO2006121149A1 PCT/JP2006/309537 JP2006309537W WO2006121149A1 WO 2006121149 A1 WO2006121149 A1 WO 2006121149A1 JP 2006309537 W JP2006309537 W JP 2006309537W WO 2006121149 A1 WO2006121149 A1 WO 2006121149A1
Authority
WO
WIPO (PCT)
Prior art keywords
random number
pseudo
function
number sequence
words
Prior art date
Application number
PCT/JP2006/309537
Other languages
English (en)
French (fr)
Inventor
Makoto Matsumoto
Takuji Nishimura
Mutsuo Saito
Mariko Hagita
Original Assignee
Ochanomizu University
Hiroshima University
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 Ochanomizu University, Hiroshima University filed Critical Ochanomizu University
Priority to DE112006001221T priority Critical patent/DE112006001221T5/de
Priority to US11/920,276 priority patent/US8553880B2/en
Publication of WO2006121149A1 publication Critical patent/WO2006121149A1/ja

Links

Classifications

    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • H04L9/0662Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator

Definitions

  • the present invention relates to a pseudo random number generation system, an encryption system, and a decryption system in a block cipher and a stream cipher using a shared key.
  • data is transmitted in an encrypted manner so that communication between the two points A and B can be performed safely without being known by a third party.
  • the encryption techniques used at that time are widely used at present, such as DES, Triple D ES, and AES. This is a method of converting the data to be transmitted into data that cannot be shared by a third party, based on the shared encryption key shared only between A and B that communicate.
  • DES Data Encryption Standard
  • NIST National Institute for Standardization
  • Triple DES is an encryption method that enhances its security by repeating DES three times.
  • AES Advanced Encryption Standard
  • Rijindael was developed by mathematicians J. Daemen and V. Rijmen, and was publicly invited by NIST as a data encryption standard to replace DES.
  • a method in which a cryptographic random number sequence is generated by the Blum-Blum-Shub (BBS) method, which generates pseudo-random numbers using a quadratic remainder, and an exclusive OR with a ciphertext is used.
  • the BBS method is a policy that squares the encryption key k one after another, creates a residue of the product N of the secret two prime numbers, and uses the sequence of the least significant bits as the encryption random number sequence. If this N is sufficiently large, this sequence is very cryptographically superior, that is, it is difficult to predict the next bit with a better probability than random, even if it collects many consecutive data.
  • the fact that it is a pseudo-random number sequence is described in the document "Shi Blum, M.
  • the BBS method described above has sufficient security so that it is slow because it calculates the square of a large number and the remainder of a large number N of that value.
  • the amount of computation for generating random sequences is greatly slowed down, and pseudorandom numbers that can be generated at high speed are cryptographically safe!
  • Patent Documents 1 to 5 As methods for dealing with these problems, for example, there are Patent Documents 1 to 5.
  • Patent Document 1 and Patent Document 2 multiple encryption functions are prepared, and by selecting which encryption function to encrypt based on key information and external data, encryption varies depending on the plaintext. It is possible to encrypt information with the key function, thereby preventing leakage of information and obtaining an authentication effect.
  • the Patent Documents 3 to 5 provide a method for creating a cryptographic random number sequence with good properties.
  • Patent Document 3 generates a cryptographic random number sequence by rewriting a plain text sequence with a finite state automaton, and is closely related to the present invention.
  • Patent Literature 1 Japanese Patent Publication No. 11 15940
  • Patent Document 2 Japanese Patent Publication No. 11-265146
  • Patent Document 3 Japanese Patent Publication No. 11-500849
  • Patent Document 4 Patent Publication No. 2003-37482
  • Patent Document 5 Patent Publication 2004 38020
  • An object of the present invention is to improve safety without increasing the amount of calculation and to solve these problems.
  • the present invention is a pseudo-random number generation system that outputs a cryptographically secure safe pseudo-random number sequence from a predetermined number sequence, and sets an initial value in advance.
  • Storage means for a predetermined number of bits (words), pseudo random number generation means for generating a pseudo random number sequence from the number sequence, and the safe pseudo random number from the pseudo random number sequence
  • Safe pseudo-random number generating means for generating a sequence, wherein the safe pseudo-random number generating means cuts out the pseudo-random number sequence into words and sets the least significant bit to 1, the value of the storage means, the cut-out word, Is stored in the storage means, and a part or all of the bit string resulting from the repeated multiplication is output as the safe pseudorandom number.
  • the safe pseudo-random number generation means may output a predetermined number of bits as the safe pseudo-random number sequence from the higher-order bits of the bit sequence resulting from the multiplication.
  • the present invention is a pseudo-random number generation system that outputs a safe pseudo-random number sequence that is cryptographically safe even if a predetermined sequence power is provided.
  • the function selecting means selects a function using the pseudo random number sequence for each word of the generated pseudo random number sequence, and the function executing means functions to convert the pseudo random number sequence word into a function with the selected function.
  • the pseudo-random number generation system is characterized in that the secure pseudo-random number sequence is generated by converting the pseudo-random number sequence.
  • the pseudo-random number generation means may generate a pseudo-random number using a linear order state function.
  • the function selecting means and the function executing means may convert the word into the safe pseudo-random number sequence by repeating selection / conversion for a predetermined number of times for each word.
  • a storage unit for a predetermined number of bits (words) in which an initial value is set in advance is provided, and the pseudo-random number generation unit generates the pseudo-random number sequence from the number sequence and then generates the generated pseudo-random number.
  • the column is cut into words, the least significant bit is set to 1, the result of multiplying the value of the storage unit and the cut word by the word length power of 2 is stored in the storage means, and the result of repeated multiplication is A part or all of the bit string may be used as the pseudo random number string.
  • the present invention provides an encryption system for encrypting a document with a shared key given in advance, the document storage means storing the document, and a plurality of types of functions.
  • the function executing means determines the parameters of each of the selected functions using the bit data of the extended key, and preliminarily determines the block size of the document from the document storage means.
  • the present invention provides a decryption system for decrypting an encrypted document with a pre-assigned shared key, the encrypted document storage means for storing the encrypted document, and a plurality of types used for encryption.
  • An inverse function executing means for executing a plurality of types of inverse functions corresponding to a function, an extended key generating means for generating an extended key from the shared key, and a type of the inverse function of the inverse function executing means using the extended key.
  • an inverse function selection means for selecting with the allowance of duplication, wherein the inverse function execution means determines parameters of each of the selected inverse functions using bit data of the extended key, and the encryption
  • the decryption system is characterized in that the encrypted document from the document storage means is decrypted by converting the plurality of inverse functions with a block size determined in advance.
  • the present invention provides an encryption system for encrypting a document with a pre-given shared key, a document storage unit storing the document, and a predetermined number of bits.
  • the function execution means for executing a plurality of types of functions in units of blocks of a predetermined number of words, the pseudo random number generation means for generating a pseudo random number sequence from the shared key, and the function A function selection unit that selects a function type of the execution unit by allowing duplication, and the function selection unit sequentially selects the function using the pseudo-random number for each block unit of the document from the document storage unit.
  • the function executing means converts and encrypts the document using the block of the pseudo-random number sequence as a parameter with the selected function.
  • the present invention provides a decryption system for decrypting an encrypted document with a pre-assigned shared key, the encrypted document storage means for storing the encrypted document, Inverse function execution means for executing a plurality of types of inverse functions corresponding to a plurality of types of functions used for encryption in units of blocks of a predetermined number of words, where the number of bits is a word, and the shared key Pseudo-random number generation means for generating a pseudo-random number sequence from, and inverse function selection means for selecting an inverse function type of the inverse function execution means while allowing duplication, and the inverse function selection means includes the encryption For each block unit of the encrypted document from the document storage means, an inverse function is selected by the pseudorandom number, and the inverse function executing means uses the block of the pseudorandom number sequence as a parameter in the selected inverse function.
  • the decryption system is characterized in that the encrypted document is converted and decrypted.
  • the extended key generation unit or the pseudo random number generation unit may generate a pseudo random number using a linear order state function.
  • the function selecting unit and the function executing unit may encrypt the document by repeating a predetermined number of times selection / conversion for each block.
  • a storage unit for a predetermined number of bits (words) in which an initial value is set in advance is provided, and the pseudo-random number generation unit generates the pseudo-random number sequence from the number sequence and then generates the generated pseudo-random number.
  • a part or the whole of the bit string obtained by repeatedly multiplying the word into a word by setting the least significant bit to 1 and repeatedly multiplying the word cut into the memory unit by using the word length power of 2 may be used as the pseudo-random number string. Good.
  • the function execution means may include an inter-word function for a plurality of words, and the inter-word function may change the interval of the plurality of words each time a document is encrypted.
  • the extended key generation unit or the pseudo random number generation unit may generate a pseudo random number using a linear order state function.
  • the inverse function selection means and the inverse function execution means may repeat the selection / conversion of a predetermined number of times for each block to decrypt the encrypted document.
  • a storage unit for a predetermined number of bits (words) in which an initial value is set in advance is provided, and the pseudo-random number generation unit generates the pseudo-random number sequence from the number sequence and then generates the generated pseudo-random number.
  • a part or the whole of the bit string obtained by repeatedly multiplying the word into a word by setting the least significant bit to 1 and repeatedly multiplying the word cut into the memory unit by using the word length power of 2 may be used as the pseudo-random number string.
  • the inverse function executing means may include an interword inverse function for a plurality of words, and the interword inverse function may change the interval of the plurality of words every time the encrypted document is decrypted.
  • the pseudo random number generation system described above includes a plurality of the storage means, and the safe pseudo random number generation means cuts the pseudo random number sequence into the same number of nodes as the storage means. Further, the value of each storage means and each extracted word are multiplied in parallel to output the above-mentioned safe pseudorandom number.
  • the safe pseudorandom number generation means performs an operation other than multiplication on the value of the storage means and the extracted word, and uses the value of another storage means for the calculation. Good.
  • an encryption system and a decryption system that realizes a block cipher and a stream cipher with high speed and high security by using the information of the shared key not only for creating a cryptographic function but also for selecting a function.
  • a pseudo-random number generation system that generates a highly secure cryptographic random number sequence with a long cycle by rewriting a pseudo-random number sequence that is cryptographically secure by simple conversion.
  • the pseudo-random number generation system by repeating the above conversion using a large number of insecure pseudo-random number sequences that can be generated at a high speed rather than directly generating sufficiently secure cryptographic random number sequences, High security and high speed encryption can be realized. Also, if a cryptographic random number generation method by rewriting a cryptographically insecure pseudorandom number sequence with a simple conversion is used, for example, it is guaranteed that the period is 2 19937 — 1, and a highly secure cryptographic random number sequence A column can be realized. This period is extremely longer than any known cryptographic random number sequence and can be used for a long period of time.
  • the security of encryption can be improved as compared with the conventional method.
  • Embodiments 1 and 4 are embodiments in which the pseudo random number generation system is used for document encryption / decryption.
  • Embodiments 2, 3, and 5 are embodiments of an encryption key system and a decryption key system.
  • Embodiment 1 A product of a cryptographically insecure pseudo-random number sequence that also generates a sequence power prepared in advance and a word written in a one-word memory are successively taken, and the result is stored in the one-word memory.
  • a pseudo-random number generation system characterized in that a secure cryptographic random number sequence is generated from the higher-order bits. By using a shared key for the numerical sequence, the generated cryptographic random number sequence can be used for document encryption / decryption by stream cipher.
  • (Embodiment 2) Encryption characterized by generating a cipher document by converting a document divided into blocks into a function selected by a pseudo random number sequence (extended key) generated from a shared key for each block It is a basic example (block cipher) of a system and a decoding system.
  • (Embodiment 3) An encryption system and a decryption characterized by generating a cipher document by converting a document divided into blocks with a function selected by a pseudorandom sequence generated from a shared key for each block System (stream cipher).
  • (Embodiment 4) Generation of a pseudo-random number sequence characterized by generating a secure cryptographic random number sequence by converting a block of a pseudo-random number sequence that also generates a sequence power prepared in advance with a function selected by the pseudo-random number sequence system. By using a shared key for the number sequence, the generated encrypted random number sequence can be used for document encryption by the cipher stream.
  • (Embodiment 5) We propose a method for performing more efficient encryption by adding a “JUMP process” described later to the same encryption system and decryption system as in Embodiment 3. This JUMP process can also be used in the encryption system and decryption system of the second embodiment and the pseudorandom number sequence generation system of the fourth embodiment.
  • a product of a cryptographically insecure pseudo-random number sequence generated with a sequence (shared key) force prepared in advance and a word written in a one-word memory are successively taken, and the result is obtained as 1
  • It is a pseudo-random number generation system characterized in that it is stored in a word memory and a secure cryptographic random number sequence is generated from the upper bits.
  • the stream cipher is E, E,
  • Each side performs decoding by applying D 1, D 2,...
  • a pseudo-random sequence r, r, ... that is the source of BL is generated
  • the transmission side and the reception side need only have means for generating a pseudo-random number sequence.
  • FIG. 4 (a) shows the flow of processing of the conventional stream cipher described above.
  • the memory 420 state memory
  • PN pseudo random number sequence
  • the encryption function 470 (corresponding to E (r, b.) In the above example) is Calculate the ciphertext C (cry ptography).
  • a small circle in the function indicates that an inverse function can be created, that is, it can be easily calculated by a computer.
  • the meaning of this small circle is the same in the following figures.
  • E and D are EXOR.
  • rock cipher It is called rock cipher.
  • the next state function 462 is In the above-mentioned prior art BBS (Blum—Blum—Shub), the memory holds an integer with a large number of digits, and its square is calculated by modulo M, or the output function
  • the cryptographic strength function 470 is complex (for example, a hash function).
  • the cryptographic strength function 470 is complex (for example, a block cipher), and the cryptographic strength is maintained.
  • the next state function is complicated, the generation speed of the pseudo random number sequence PN decreases. Also, the PN period and distribution cannot be calculated.
  • PN can be generated at high speed and the period and distribution can be calculated.
  • An example is the Mersenne Twister (MT). (For Mersenne Twister: http: ⁇ ww w. Math. Keio.ac.jp/ ⁇ matsumoto/mt. Html, M. Matsumoto and T. Nishimura, ersen ne Twister: A 623— dimensionally equidistributed uniform pseudorandom number gen erator ” , ACM Trans, on Modeling and Computer Simulation Vol.8, No.l, January pp .3-30 (1998).) This pseudo-random number can be generated at high speed and has a long period. If it is simple, the internal state of the output string force is assumed, so it cannot be said that it is cryptographically safe.
  • the pseudo-random number generation system (called cryptMT) of this embodiment is not cryptographically secure!
  • the pseudo-random number sequence PN may be converted into a secure pseudo-random number sequence SPN (secure pseudorandom numoers). Convert.
  • FIG. 5 is a diagram showing a processing flow of the pseudorandom number generation system of the present embodiment.
  • the left-hand part of PN in Fig. 4 (a) is processed.
  • this configuration may be repeated many times.
  • the processing up to SPN generation in Fig. 5 may be further linked to the PN position as input in Fig. 5.
  • next-state function 462 is linear, eg: MT).
  • the next state function 562 of the PN ⁇ SPN conversion part is not linear but can be calculated at high speed (eg, multiplication as if it were a 32-bit integer).
  • the power of using these effective methods is the cryptMT of this embodiment.
  • the MT output word string after initialization is M (0), M (l), M (2), and so on.
  • This is the pseudo-random number sequence PN (a pseudo-random number sequence that may not be safe) shown in Fig. 4 (a), and is sent to Fig. 5 (corresponding to the PN in the upper left of Fig. 5).
  • M (n) is the one in which the least significant bit of MT output is forced to 1.
  • the initial value may be any other value (other than zero).
  • the processing of (2) and (5) may be performed as follows.
  • the data with the least significant bit of the nth word of pseudorandom numbers generated by Mersenne Twister set to 1 is M (n), and a sequence using hash function is created from the shared key data in 3 2-bit memory accum.
  • the least significant bit of this sequence may be forced to 1.
  • n l, 2, 3, ...
  • Mersenne Twister (mtl9937ar. C) is used as a pseudorandom number, so that it is possible to mathematically prove that the output cryptographic random number sequence has a period of 2 19937 — 1. This cycle is longer than any known cryptographic random number sequence and can be used for a long period of time with confidence.
  • the cryptographic random number generation method that is generated using this algorithm by converting pseudo-random numbers that are cryptographically insecure but fast, such as Mersenne Twister, using a 32-bit product and a relatively fast function is It is very fast, 1.5 times more than the fastest optimized version of AES, the current American standard cryptographic random number generator.
  • the pseudo-random number generation system according to the present embodiment described above is slower in the multiplication part than the random number generation depending on the hardware characteristics.
  • a memory for storing the multiplication result (Akiyumu) Prepare a number of (eg, four), and use them alternately to increase the calculation speed.
  • Modern CPUs for personal computers can execute multiple multiplications in parallel, so this is possible.
  • FIG. 8 is a diagram showing a flow of processing when four memories (accumulators) are used in the pseudorandom number generation system (FIG. 5) of the present embodiment. 8 corresponds to the processing shown on the left side of the SPN (safe pseudorandom number sequence) in FIG.
  • PN1, PN2, PN3, ⁇ 4 ⁇ are the outputs of insecure pseudorandom numbers (PN) selected in order.
  • Next state function 862 and output function 864 are similar to next state function 562 and output function 564 of FIG.
  • the output of the secure pseudorandom number (SPN) is obtained by alternately extracting a part of the bit string from the four memories (output function 864).
  • the first memory accumulates the result of multiplying the 1, 5, 9, 13 ⁇ th (PN1, PN 5, PN9, ⁇ 13 ⁇ ) pseudorandom output.
  • the second memory (memory 2-822), the result of multiplying the pseudo-tongue L number output 2, 6, 10, 14 ⁇ th (PN2, PN6, PN10, ⁇ 14 ⁇ ) is accumulated.
  • the third memory (memory 3-823), the result of multiplying the pseudo random number output 3, 7, 11, 15... th (PN3, PN7, PN11, ⁇ 15 ⁇ ) is accumulated, and the fourth The result of multiplying the pseudo-tongue L number output by 4, 8, 12, 16 ... (PN4, PN6, PN12, PN 16 ...) is accumulated in the memory (memory 4-1824) .
  • logical sum, exclusive logical sum and shift may be performed only by multiplication.
  • the numerical value stored in another memory not just the generated random number, can be given or exempted as an object of computation. Can do.
  • each random number is calorie-calculated.
  • FIG. 9 shows an example of the flow of processing when the above-mentioned (1) and (4) are performed by preparing four memories (accumulators) in the pseudo-random number generation system (FIG. 5) of the present embodiment.
  • FIG. 9 Note that, as in FIG. 8 described above, the processing shown on the left side of the SPN (safe pseudorandom number sequence) in FIG. 5 is supported.
  • the upper 16 bits of Accl, the upper 16 bits of Acc2, the upper 16 bits of Acc3, and the upper 16 bits of Acc4 are output in this order as safe pseudorandom numbers. Note that the output order does not have to be this order.
  • the system of the present embodiment is mounted on a terminal such as a normal personal computer.
  • the encryption key system 110 is installed in the terminal that encrypts and transmits the document
  • the decryption key system 150 is installed in the terminal that receives and decrypts the document.
  • a number sequence (shared key 122) and a pseudo-random number generation system 130 of this embodiment are prepared for both the encryption system 110 and the decryption system 150.
  • the pseudo random number generation program 132 of the pseudo random number generation system 130 uses the pseudo random number sequence (safe pseudo random number sequence) from the shared key 122 using the method of the present embodiment described above. ) 125 is produced.
  • the encryption program 136 encrypts the document 124 by taking the EXOR of the secure pseudorandom number sequence 125 and the document 124 to generate the encrypted document 140. To do.
  • the decryption system 150 the method of the present embodiment described above from the shared key 122 is used by the pseudorandom number generation program 132 of the pseudorandom number generation system 130. A secure pseudo-random number sequence 125 is generated.
  • the decryption key program 166 decrypts the cipher key document 140 by taking the EXOR of the secure pseudorandom number sequence 125 and the decryption key document 124 to obtain the original document 124.
  • the encryption system 110 and the decryption system 150 use the same pseudo-random number generation program 132 from the same shared key 12 2 to generate the same secure pseudo-random number sequence 125, and therefore the corresponding encryption / decryption processing. Can be performed.
  • Embodiment 2 is a cryptographic key system characterized by generating a cryptographic key document by converting a document divided into blocks with a function selected by a pseudo-random number sequence generated from a shared key for each block, and It is a basic example of a decoding key system and is a block cipher.
  • a pseudorandom number sequence generated from a shared key is used for function selection and function parameters.
  • a pseudo-random number sequence is consumed as the document is longer. In Embodiment 2, however, only a certain length is consumed. For this reason, in this embodiment, a pseudo-random number sequence of a certain length generated from the shared key is called an “extended key”.
  • a conventional block cipher such as AES has the configuration shown in Fig. 4 (b). That is, the plaintext M block is taken into the memory 420, converted (EXOR shown in 466) using the pseudo random number sequence PN, and written into the memory 420. This is repeated several times to obtain ciphertext C.
  • the lower right function 460 is a complex bijection. As explained in Fig. 4 (a) above, a small circle in the function indicates that an inverse function can be created, that is, it can be easily calculated by a computer.
  • the conventional block cipher creates a single complex cryptographic function from the key information and uses it to convert plaintext, so it is biased toward the function created in a high-speed cryptographic system.
  • attacks by encrypting known plaintext such as differential cryptanalysis and linear cryptanalysis, are often used.
  • the attacking person is able to encrypt any document, the data used for decryption is collected, and the cipher can be broken more easily than a full key search.
  • FIG. 6 is a diagram showing a processing flow of the cryptographic system of the present embodiment. The processing of the cryptographic system of Embodiment 3 described later is also as shown in FIG.
  • pseudo-random number sequence PN force parameter (function 660 in Fig. 6, where there is no white circle) is flexible and can realize stronger encryption.
  • the pseudo key sequence PN is generated by using the Mersenne Twister as described above as the shared key 430 shown in FIG. 4 (a), any number of PNs can be generated. Therefore, it is possible to increase the number of times plaintext conversion is performed by the function 660 and to increase the encryption strength.
  • encryption can be performed with different combinations of functions for each block (that is, it can be used as a stream cipher).
  • an encryption method using shared secret key information of 1 block 4 words (may be 8 words or 16 words) and 128 bits or more will be described as an example.
  • the shared key is expanded to the required size with a hash function and a pseudo-random number sequence PN, That is, an extended key (corresponding to the PN at the upper left in Fig. 6) is generated.
  • the document is divided into block sizes (4 words) and converted into blocks.
  • the following seven types of functions that can convert block-size data at high speed and have completely different properties are used.
  • these functional families are called PEF (primitive encryption family).
  • intraword functions four types of functions that perform calculations within words and three types of functions (interword functions) that perform calculations across multiple words in a block are prepared.
  • the inverse function corresponding to the intra-word function is referred to as the intra-word inverse function
  • the inverse function corresponding to the inter-word function is referred to as the inter-word inverse function.
  • the t-th operation uses the t-th block data of the extended key (pseudo-random number sequence PN).
  • the last block of the extended key is used for function selection.
  • EXOR The data of the t block of the extended key is added to each word of the block by exclusive OR for each word.
  • the document is divided into block sizes, and the above function is selected and converted into each block depending on the extended key (pseudo-random number sequence PN) as follows.
  • the t-th block data of the extended key is used as the parameter of the function (function 660 in FIG. 6) for the t-th operation (conversion).
  • the last block of the extended key is used for function selection. As illustrated in FIG. 6, the last block of PN is sent to selector 640, and function 660 is selected by selector 640.
  • each block of the document in FIG. 6, the block of plaintext M captured in the memory 620
  • the seven types of functions described above are applied, for example, “horizontal shift 'X'vertical rotation' (Replace) ⁇ (+ or EXOR) ”is applied in the order of one set, and the block is converted by performing eight sets.
  • each bit from the last block of the extended key is used 2 X 8 times one after the other. If 0, the former is used. If 1, the latter is used. Shall be selected.
  • t 40 operations (conversion)
  • the extended key is generated with a size of 41 blocks, and the last 41 blocks are used for function selection.
  • the above functions (1) to (7) are merely examples, and other operations that can be processed at high speed may be prepared. Moreover, the combination and order of the above functions are merely examples, and other combinations and orders may be used. The number of repetitions may be other than the above eight sets. Also, it is possible to perform all types of conversion in the first set and the last set, and select one of all types of functions using the extended key in the set between, for example, 5 times or more. May be used. The reason why one set is performed a plurality of times is that in the present embodiment, the same conversion is applied to all the blocks, and therefore it is necessary to improve safety.
  • Decryption can be calculated in as much time as encryption in this embodiment, in which reverse mapping of each transformation is performed in the reverse order of encryption.
  • the encryption system and the decryption system of this embodiment are mounted on a terminal such as a normal personal computer.
  • the encryption system 110 is installed in the terminal that encrypts and transmits the document
  • the decryption system 150 is installed in the terminal that receives and decrypts the document.
  • the encryption key system 110 includes a shared key 122 and a plurality of functions 126 used for the encryption key
  • the decryption key system 150 includes a plurality of inverse functions 128 ( Corresponding to each function of function 126, a function that performs the reverse operation is prepared.
  • the encryption key system and the decryption key system of the present embodiment have the shared key information.
  • Information (a pseudo-random number sequence generated from a shared key) is used as a key for selecting an encryption function and a parameter for the selected function, which enables a high-speed, high-security system. Realized.
  • the pseudorandom number generation program 232 generates a pseudorandom number sequence 225 (in this embodiment, an extended key) from the shared key 122.
  • the function selection program 234 selects a function to be used for the encryption of the document 124 from the function 126.
  • the encryption program 236 uses the pseudo random number sequence (extended key) 225 as a parameter of the function selected by the function selection program 234 and executes the function to encrypt the document 124. As a result, an encrypted document 140 is generated.
  • the pseudorandom number generation program 232 generates the same pseudorandom number sequence (extended key) 225 as the transmission terminal 110 from the shared key 122.
  • the inverse function selection program 264 selects an inverse function used for decryption of the encrypted document 140 received from the inverse function 128.
  • the inverse function corresponding to the function selected at the transmitting terminal 110 is selected.
  • the decryption program 266 executes the inverse function using the pseudo random number sequence (extended key) 225 as the parameter of the inverse function selected by the inverse function selection program 264, and decrypts the encrypted document 140.
  • the original document 124 is obtained.
  • Embodiment 3 is a cryptographic key system characterized by generating a cryptographic key document by converting a document divided into blocks with a function selected by a pseudo-random number sequence generated from a shared key for each block, and It is an example of a decoding key system and is a stream cipher.
  • the shared key information (a pseudo-random number sequence generated from the shared key) is used for function selection and function parameters.
  • Embodiment 2 Block Cipher
  • stream cipher for each block of the document, Determine the number and parameters to convert. That is, when there are two identical blocks, in Embodiment 2, these two blocks are converted to the same ciphertext, but in Embodiment 3, the functions and parameters selected are different, resulting in different ciphertexts. .
  • Embodiment 2 does not use a fixed-length pseudorandom number sequence (extended key), but Embodiment 3 consumes pseudorandom numbers according to the length of the document. become.
  • one block is Tuple words.
  • the Tuple value should be 2 and should be between 4 and 16.
  • the log with Tuple 2 as the base is specified as Log— Tuple.
  • Encrypted array to store documents (plain text) is double array
  • BL is a set of document blocks
  • PARAM is a parameter given to the function
  • PARAM is a set of Tuple word power data, just like BL, and a pseudo-random sequence PN power is obtained.
  • Tuple 4 is taken as an example
  • I l, 2, 3, 4
  • the 5th bit is set to 1 in order to rotate even if the parameter is 0 and to facilitate reverse conversion.
  • I think key is a 32-bit random pattern.
  • bits that are 1 in key are
  • mtl9937ar.c Mersenne Twister (mtl9937ar.c) described above is used as a method for generating the pseudo-random number sequence PN (corresponding to the PN at the upper left in Fig. 6).
  • mtl9937ar.c has a function to receive an arbitrary length array as an initial value.
  • the pseudo-random number sequence was read 4 words at a time. Since the internal array length of 624 can be divided by 4, a pseudo-random number sequence is regenerated for the entire array every time 624Z4 readings are performed.
  • Pseudo-random number sequence PN is stored in 4 words of 4 words func—choice [0] — [3], and rewritten to new 4 words using product and EOR. (Later, these 4 words are cut into 3 bits each, and the above 5 + 3 types of PEF are selected.)
  • hmndecode (key [], init value []) When is called, decryption is performed.
  • key, init—value is an array that is used to initialize the Mersenne Twister.
  • Embodiment 4 is characterized in that a block of a pseudo random number sequence generated from a number sequence (shared key) prepared in advance is converted by a function selected by the pseudo random number sequence to generate a secure cryptographic random number sequence.
  • This is a pseudo random number sequence generation system.
  • the number sequence is used as a function selection and function parameter.
  • the generated encryption random number sequence can be used for encryption / decryption of the document by the stream cipher.
  • pseudo-random number sequences used for experiments are generated at high speed, but if you look at some words, other words are known, so they are not cryptographically secure. For this reason, conventionally, an encryption method with a large amount of calculation represented by the BBS method has been used to generate a cryptographic random number sequence.
  • This embodiment is a pseudo-random number generation system characterized by rewriting a high-speed pseudo-random number sequence to an encrypted random number sequence with a small amount of calculation by using key information for function selection, which is a point of the present invention.
  • High-speed and safe stream ciphers can be configured.
  • the Mersenne Twister (mtl9937ar.c) described in the first embodiment is used as a method for generating the pseudorandom number PN. This is because a pseudo-random number sequence with a long cycle can be generated. Other pseudo random number generation methods may be used.
  • the initial value of the 624-word secret pseudo-random number sequence is obtained using the shared key in both the encryption and the decryption.
  • the shared secret key that you continue to use
  • a part of the initial value created here is changed to a session key and the pseudo-random number sequence used for that communication It is assumed that the initial value is used, and that the random number uses the value power next to the initial value.
  • the pseudo-random number sequence PN is created as many as needed, and a safe pseudo-random number sequence is output as follows. Rewrite the 12 ⁇ word data in the pseudorandom number sequence PN using the 12 ⁇ + 1st word to the 12 ⁇ + 11th word data as follows.
  • the mth word data of the pseudo random number is represented by R (m).
  • Mersenne Twister has full guarantee of period and some guarantee of distribution. Since the period is very long, the period of the generated secure pseudo-random number sequence becomes too long to be used up and can be used for a long time without changing the shared key.
  • the system of the present embodiment is mounted on a terminal such as a normal personal computer.
  • the encryption key system 110 is installed in the terminal that encrypts and transmits the document
  • the decryption key system 150 is installed in the terminal that receives and decrypts the document.
  • a number sequence shared key 122
  • a function 126 a function 126
  • a pseudo random number generation system 330 of this embodiment are prepared for both the encryption system 110 and the decryption system 150.
  • a pseudo-random number sequence PN that may not be secure is generated from the shared key 122 by a conventional technique.
  • the function selection program 334 selects a function to be used for the encryption of PN from the function 126.
  • the pseudo-random number generation program 332 executes the function using the PN as a parameter of the function selected by the function selection program 334, and encrypts the PN.
  • a secure pseudorandom number sequence 325 is generated and temporarily stored in the storage area.
  • the encryption program 336 encrypts the document 124 by taking the EXOR of the pseudo random number sequence 325 and the document 124 to generate the encrypted document 140.
  • the decryption system 150 also generates a pseudo-random number sequence PN that may not be secure from the shared key 122 by the conventional technique.
  • the function selection program 334 selects a function to be used for the encryption of PN from the function 126.
  • the pseudo-random number generation program 332 executes the function using the PN as a parameter of the function selected by the function selection program 334, and encrypts the PN.
  • a secure pseudorandom number sequence 325 is generated and temporarily stored in the storage area.
  • the decryption key program 366 decrypts the encrypted key document 140 by taking the EXOR of the pseudo random number sequence 325 and the encrypted key document 140 to obtain the original document 124.
  • the encryption system 110 and the decryption system 150 use the same shared key 122 and function 126 to generate the same secure pseudo-random number sequence 325, so that the decryption process corresponding to the encryption is performed. Can do.
  • Embodiment 5 proposes a method for performing more efficient encryption by adding “JUMP processing” described later to the systems of Embodiments 2 to 4 described above.
  • JUMP processing is added to the same encryption key system and decryption key system as in the third embodiment, but the functions (PEF) used are different from those in the third embodiment. Prepare and explain.
  • a pseudorandom number sequence is generated from the shared key (number sequence) by the same method as in Embodiments 2 to 4 (for example, Mersen Neuster), and this is used as a pseudorandom number sequence P used in this embodiment.
  • the pseudo random number sequence PN is sent to the selector 740 to determine which function 760 is selected.
  • Embodiments 2 to 4 shown in FIG. 6 The difference from Embodiments 2 to 4 shown in FIG. 6 is that a history memory 750 for recording the number of steps of block conversion is added.
  • a jump whose value is calculated in this way is a jump that specifies to each function how far away the information of each word is to be passed.
  • jump is doubled twice as 1 for the first step, 2 for the second step, 4 for the third step, and so on.
  • This jump processing is performed by the history memory 750 issuing an instruction to the selector 740.
  • the selected function 760 receives a parameter that is as large as the block size.
  • a pseudo random number sequence PN generated from a shared key (number sequence) is used as a function parameter.
  • JUMP processing is performed between words with few inter-word functions (in this embodiment, This is a process to ensure that sufficient agitation is achieved with a small number of iterations.
  • bitwise EXOR, AND, OR, addition, and multiplication (modulo 2 ⁇ 32) ) can be performed as binary operations, and right shift, left shift, and bit inversion can be performed as unary operations. These are operations that usually go into the latest CPU instruction set!
  • t is 4, 8, or 16.
  • JUMP ⁇ 1, 2, 4, 8, ⁇ , t / 2 ⁇
  • PF JUMP X PARAM X BL ⁇ BL.
  • JUMP, PARAM, and BL correspond to the three input lines to the function 760 in Fig. 7, respectively.
  • the key information (shared key) is sent to the Mersen Neuster (MT) process as in the other embodiments described above. Create a multiplicative constant table and an additive constant table using MT. Multiplicative constant table and additive constant table will be explained in detail later To do.
  • the plaintext block is encrypted.
  • 1 block 4 words, and the number of conversions is 4 times.
  • document encryption is the same as that in Embodiment 3 except for the JUMP process.
  • one block encryption is performed as follows.
  • * is the instruction that multiplies the left side by the right side and assigns to the left side
  • * is the instruction that assigns the right side and EXOR to the left side and assigns to the left side
  • I is the bitwise OR
  • >> 5 is 5-bit right shift Represents.
  • the document decryption in the present embodiment is the same as that in the third embodiment except for the JUMP process.
  • JUMP 1 ⁇ ((3 * Iteration- 1)% Log Tuple)
  • % is an operation for calculating the remainder
  • 1 means that 1 is doubled by the number of times to the right of ⁇ .
  • PFl As functions used in this embodiment, four types of PFl, PF2, PF3, and PF4 are mainly used as functions for converting each word in the block, and PF5 is used as a function for converting information between words.
  • PF6, PF7, and PF8 one type as a function, and nine types of functions are prepared. In the following, these nine functions will be described in order. Note that these PF1 to PF9 functions are examples, and other operations that can be processed at high speed may be prepared.
  • PF1 to PF4 are intra-word functions that convert each word in the block mainly within the word.
  • an inverse function (inverse function in a word) that performs the inverse process of the function is used.
  • c is selected by the following method j 0 1 ⁇ 31 ⁇ from the table of odd random numbers m 1, m 2,.
  • the least significant bit is set to 1 so that m, ..., m are all odd numbers.
  • the C: m, and k is the most significant 5 bits of, viewed as an integer from 0 to 31.
  • the values of ell are 1, 2, 2, and 3 for PFl, PF2, PF3, and PF4, respectively.
  • the table was prepared because the inverse of c (modulo 2 ⁇ 3 ) was used for decryption.
  • this multiplicative constant table m this multiplicative constant table m,.
  • the binary operation ports are +, EOR, +, and EOR for PF1, PF2, PF3, and PF4, respectively.
  • a pseudorandom number s that takes a value between 16 and 23 is generated as follows.
  • PF5 to PF8 are interword functions that perform conversion mainly to mix information between words (in this embodiment, between two words).
  • an inverse function (inverse function between words) that performs the reverse operation of the processing of each function is used.
  • the decryption function uses an inverse function that performs the reverse operation of the above process.
  • Embodiment 6 in each of Embodiments 2 to 5, a cryptographically secure pseudorandom number sequence SPN generated by the method of cryptMT (Embodiment 1) described above from a number sequence (shared key) prepared in advance is used.
  • the pseudo random number sequence PN used in these embodiments.
  • a cryptographically secure pseudo-random number sequence is used for selecting a function to be used for the encryption key and for the parameter of the function, it is possible to perform encryption that is more difficult to decrypt.
  • FIG. 1 is a diagram showing a system configuration example in the case of performing document encryption and decryption using the pseudorandom number generation system according to the first embodiment of the present embodiment.
  • FIG. 2 is a diagram showing a system configuration example of an encryption key system and a decryption key system according to Embodiments 2, 3, and 5 of the present embodiment.
  • FIG. 3 is a diagram showing a system configuration example in the case of performing document encryption and decryption using the pseudo random number generation system according to the fourth embodiment of the present embodiment.
  • FIG. 4 (a) is a diagram showing a flow of processing of a conventional stream cipher. (b) It is a figure which shows the flow of a process of the conventional block cipher.
  • FIG. 5 is a diagram illustrating a processing flow of the pseudorandom number generation system according to the first embodiment.
  • FIG. 6 is a diagram showing a processing flow of the cryptographic key system of the second and third embodiments and the pseudorandom number generation system of the fourth embodiment.
  • FIG. 7 is a diagram illustrating a processing flow of the cryptographic key system according to the fifth embodiment.
  • FIG. 8 is a diagram showing a processing flow of application example 1 when four memories are used in the pseudorandom number generation system according to the first embodiment.
  • FIG.9 In the pseudorandom number generation system of Embodiment 1, when four memories are used 10 is a diagram showing a flow of processing in application example 2.
  • FIG. 10 is a diagram showing a flow of processing in application example 2.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

[課題]処理が高速で安全性の高い擬似乱数発生システム、暗号化システム及び復号化システム。 [解決手段]本発明の擬似乱数発生システムでは、高速に生成できる安全でない擬似乱数列に対して簡単な変換を繰返し行うことで、安全性が高く高速で、かつ周期の長い擬似乱数列を生成することができる。また、本発明の暗号化システム及び復号化システムでは、共有鍵122から1つの解読されにくい大きな暗号化関数を生成するのではなく、高速な異なるタイプの変換を行なう関数126を複数個用意し、それらを共有鍵122の情報によって決まる組合せで文書を複数回変換して暗号化する。各関数が基本的で高速なので、組み合わせた全体の変換も高速である。また、関数の組み合わせも反復数も変えられるので、将来の仕様強化が容易である。また、どの関数がどのような順番で施されたか分からないため、安全性が高い。

Description

明 細 書
擬似乱数発生システム、暗号ィ匕システム及び復号ィ匕システム
技術分野
[0001] 本発明は、共有鍵を用いたブロックサイファ及びストリームサイファにおける擬似乱 数発生システム、暗号ィ匕システム及び復号ィ匕システムである。
背景技術
[0002] 第三者に見られては困る文書を電子データとして保存する時には、データは暗号 化され、ノ スワードを知らなければ解読できないように変換される。ここで利用される 暗号技術として、現在広く使用されているのは、データを固定サイズのブロックに区 切り、それぞれのブロックを秘密鍵に依存した特定の関数で暗号ィ匕する、ブロックサ ィファと呼ばれる暗号ィ匕方式と、データの位置によって異なる関数で暗号ィ匕されるス トリームサイファと呼ばれる暗号ィ匕方式である。ストリームサイファではデータと暗号乱 数列の排他的論理和を求めることが多 、。
また、インターネットを用いて電子商取引を行なう際にも、第三者に知られることなく 、安全に 2点 A, B間で通信を行なうために、データは暗号ィ匕して伝送されている。そ の時に利用される暗号技術として、現在広く利用されているのは、 DESや Triple D ES, AESに代表される共有鍵暗号方式である。これは、通信を行なう A, B間でのみ 共有している共有暗号鍵をもとに、送信するデータを第三者に分力 ないデータに 変換する方法である。
[0003] DES (Data Encryption Standard)は、これまでアメリカ合衆国政府の国立標 準研究所 (NIST)が、データ暗号の標準として推奨してきた共有鍵暗号方式である 。 Triple DESは DESを 3回繰り返すことで、その安全性を高めた暗号方式である。 AES (Advanced Encryption Standard)は、 DESに代わるデータ暗号の標準と して NISTが公募し、数学者 J.Daemen, V.Rijmenによって開発された Rijindaelと呼 ばれる暗号ィ匕方式である。これらはすべて、共有鍵を利用して、固定サイズのブロッ クに区切られたデータを高速に暗号ィ匕する共有鍵暗号方式であり、ブロックサイファ である。この変換に必要な計算量は大変小さぐ実用性が高い。 ストリームサイファでは、平方剰余により擬似乱数を生成する Blum— Blum— Shub (BBS)法により暗号乱数列を生成し、文書との排他的論理和を暗号文とする方法が 知られている。 BBS法は、暗号鍵 kを次々に二乗して、秘密の 2つの素数の積 Nでの 剰余を作り、その最下位ビットを並べて作った列を暗号乱数列とする方針である。こ の Nが十分大きければ、この列が暗号的に大変優れたもの、すなわち連続するいくつ ものデータを集めても、次のビットをランダムより良い確率で予測することが難しい、と いう性質をもつ擬似乱数列になっていることは、文献「し Blum, M. Blum, M. Shub: " A Simple Unpredictable Psudo- Random Number Generator", SIAM J. Comput. Voll 5, No.2, May 1986」で示されている。よって、これを用いれば、たくさんの文字を推定 しても、法則を見つけることは大変に難しぐ他の部分列を推定するには、全数チェッ ク相当の計算が必要となると考えられて 、る。
[0004] し力しながら、従来の共有鍵暗号方式のブロックサイファでは、鍵情報から一つの 複雑な暗号ィ匕関数を作り、これを用いて平文を変換するため、高速な暗号システム は作られる関数に偏りがあり、暗号解読のための情報を得られやす 、という問題があ る。たとえば暗号を解読しょうとする際には、差分解読法や、線形解読法などの、既 知の平文を暗号ィ匕させることによる攻撃がよく用いられて 、る。すなわち攻撃する人 物が、任意の文書を暗号化させられる状況では、解読に用いるデータを採取され、 鍵の全数検索よりも簡単に暗号が破られるという問題があった。また、共有鍵暗号方 式のストリームサイファでも、例えば上記の BBS法では大きな数の自乗と、その値の 大きな数 Nでの剰余を計算するため低速であるように、十分な安全性を持つ暗号乱 数列を生成するための計算量は大きく低速になり、高速に生成できる擬似乱数は暗 号的に安全でな!、と!、う問題がある。
また、これまでに知られているストリームサイファ用暗号乱数列は周期が短く長く使 V、続けることができな 、と!/、う問題があった。
[0005] これらの問題に対処する方法として、例えば特許文献 1〜特許文献 5がある。特許 文献 1および特許文献 2では、複数の暗号化関数を用意し、鍵情報や外部からのデ ータにより、どの暗号ィ匕関数で暗号ィ匕するかを選択することで、平文によって異なる 暗号ィ匕関数で暗号ィ匕し、これにより情報の漏洩を防いだり、認証効果を得たりしてい る。また、特許文献 3〜特許文献 5では、性質の良い暗号乱数列の作り方を与えてい る。特に特許文献 3では、平文列を有限状態オートマトンで書き換えて暗号乱数列を 生成していて、本発明と関係が深い。線形フィードバックシフトレジスタ(linear feed back shift register (LFSR) )にもとづいた擬似乱数生成装置である力 ソフトゥ エア実装した場合の処理速度が充分ではないという問題がある。また、 LFSRにもと づいた擬似乱数生成装置についての従来技術としては、たとえば、文献「B. Schneie r, "Applied Cryptography," John Wiley & Sons, Inc., 1996.pp. 369〜428」に開示さ れている。
[0006] 特許文献 1:特許公開平 11 15940号公報
特許文献 2:特許公開平 11 - 265146号公報
特許文献 3:特許公開平 11 - 500849号公報
特許文献 4:特許公開 2003 - 37482号公報
特許文献 5:特許公開 2004 38020号公報
発明の開示
発明が解決しょうとする課題
[0007] しかしながら、上記の特許文献 1および特許文献 2の方法を用いて十分な効果を得 るには、なるべく多くの暗号ィ匕関数を用意しなくてはならないが、複数の暗号化関数 を保存するには、その個数倍のメモリや関数作成のための計算量が必要となるという 問題がある。
また、特許文献 3〜特許文献 5の方法を用いて暗号乱数列を作っても、十分に長い 周期を得ることはできず、速さまたは安全性に問題が生じる。
本発明の課題は、計算量を増やさずに安全性を高め、これらの問題を解決すること である。
課題を解決するための手段
[0008] 上記の課題を解決するために、本発明は、あらかじめ与えられた数列から暗号学的 に安全な安全擬似乱数列を出力する擬似乱数発生システムであって、あらかじめ初 期値を設定した、あらかじめ定めたビット数 (ワード)の記憶手段と、前記数列から擬 似乱数列を生成する擬似乱数生成手段と、前記擬似乱数列から前記安全擬似乱数 列を生成する安全擬似乱数生成手段とを備えており、前記安全擬似乱数生成手段 は、前記擬似乱数列をワードに切り出して最下位ビットを 1にし、前記記憶手段の値と 前記切り出したワードとを 2のワード長乗を法として乗算した結果を前記記憶手段に 格納し、繰り返し乗算した結果のビット列の一部または全体を前記安全擬似乱数とし て出力することを特徴とする擬似乱数発生システムである。
前記擬似乱数発生システムにおいて、前記安全擬似乱数生成手段は、前記乗算 した結果のビット列の上位ビットからあらかじめ定めたビット数を前記安全擬似乱数列 として出力してもよい。
また、本発明は、あらかじめ与えられた数列力も暗号学的に安全な安全擬似乱数 列を出力する擬似乱数発生システムであって、あら力じめ定めたビット数のワード単 位に、複数種類の関数を実行する関数実行手段と、前記数列力 擬似乱数列を生 成する擬似乱数生成手段と、前記関数実行手段の関数の種類を重複を許して選択 する関数選択手段とを備えており、前記関数選択手段は、前記生成された擬似乱数 列の前記ワードごとに前記擬似乱数列を用いて関数を選択し、前記関数実行手段は 、前記選択された関数で、前記擬似乱数列のワードを関数のパラメータとして用い、 前記擬似乱数列を変換して、前記安全擬似乱数列を生成することを特徴とする擬似 乱数発生システムである。
前記擬似乱数発生システムにおいて、前記擬似乱数生成手段は、線形次状態関 数を用いて擬似乱数を生成してもよ 、。
また、前記関数選択手段及び前記関数実行手段は、前記ワードごとに、あらかじめ 定めた回数選択 ·変換を繰り返して、前記ワードを前記安全擬似乱数列に変換しても よい。
さらに、あらかじめ初期値を設定した、あらかじめ定めたビット数 (ワード)の記憶手 段を備えており、前記擬似乱数生成手段は、前記数列から擬似乱数列を生成した後 に、該生成した擬似乱数列をワードに切り出して最下位ビットを 1にし、前記記憶手 段の値と前記切り出したワードとを 2のワード長乗を法として乗算した結果を前記記憶 手段に格納し、繰り返し乗算した結果のビット列の一部または全体を前記擬似乱数 列としてもよい。 [0010] また、本発明は、あら力じめ与えられた共有鍵で文書を暗号ィ匕する暗号ィ匕システム であって、前記文書を記憶している文書記憶手段と、複数種類の関数を実行する関 数実行手段と、前記共有鍵から拡張鍵を生成する拡張鍵生成手段と、前記拡張鍵を 用いて前記関数実行手段の関数の種類を重複を許して選択する関数選択手段とを 備えており、前記関数実行手段は、前記拡張鍵のビットデータを用いて前記選択さ れた複数の関数それぞれのパラメータを決定し、前記文書記憶手段からの文書をあ らカじめ定めたブロックサイズで、前記複数の関数で変換して暗号ィ匕することを特徴 とする暗号ィ匕システムである。
また、本発明は、あらかじめ与えられた共有鍵で暗号ィ匕文書を復号する復号ィ匕シス テムであって、前記暗号化文書を記憶する暗号化文書記憶手段と、暗号化に用いる 複数種類の関数に対応する複数種類の逆関数を実行する逆関数実行手段と、前記 共有鍵から拡張鍵を生成する拡張鍵生成手段と、前記拡張鍵を用いて前記逆関数 実行手段の逆関数の種類を重複を許して選択する逆関数選択手段とを備えており、 前記逆関数実行手段は、前記拡張鍵のビットデータを用いて前記選択された複数の 逆関数それぞれのパラメータを決定し、前記暗号化文書記憶手段からの暗号化文書 をあら力じめ定めたブロックサイズで、前記複数の逆関数で変換して復号することを 特徴とする復号ィ匕システムである。
[0011] また、本発明は、あら力じめ与えられた共有鍵で文書を暗号ィ匕する暗号ィ匕システム であって、前記文書を記憶している文書記憶手段と、あらかじめ定めたビット数をヮー ドとして、あらカゝじめ定めたワード数のブロック単位に、複数種類の関数を実行する関 数実行手段と、前記共有鍵から擬似乱数列を生成する擬似乱数生成手段と、前記 関数実行手段の関数の種類を重複を許して選択する関数選択手段とを備えており、 前記関数選択手段は、前記文書記憶手段からの文書の前記ブロック単位ごとに、前 記擬似乱数により関数を順次選択し、前記関数実行手段は、前記選択された関数で 、前記擬似乱数列のブロックをパラメータとして用いて、前記文書を変換して暗号ィ匕 することを特徴とする暗号ィ匕システムである。
また、本発明は、あらかじめ与えられた共有鍵で暗号ィ匕文書を復号する復号ィ匕シス テムであって、前記暗号化文書を記憶する暗号化文書記憶手段と、あらかじめ定め たビット数をワードとして、あら力じめ定めたワード数のブロック単位に、暗号化に用い る複数種類の関数に対応する複数種類の逆関数を実行する逆関数実行手段と、前 記共有鍵から擬似乱数列を生成する擬似乱数生成手段と、前記逆関数実行手段の 逆関数の種類を重複を許して選択する逆関数選択手段とを備えており、前記逆関数 選択手段は、前記暗号化文書記憶手段からの暗号化文書の前記ブロック単位ごと に、前記擬似乱数により逆関数を選択し、前記逆関数実行手段は、前記選択された 逆関数で、前記擬似乱数列のブロックをパラメータとして用いて、前記暗号化文書を 変換して復号することを特徴とする復号ィ匕システムである。
[0012] 前記暗号ィ匕システムにおいて、前記拡張鍵生成手段又は前記擬似乱数生成手段 は、線形次状態関数を用いて擬似乱数を生成してもよ 、。
また、前記関数選択手段及び前記関数実行手段は、前記ブロックごとに、あらかじ め定めた回数選択'変換を繰り返して、前記文書を暗号化してもよい。
さらに、あらかじめ初期値を設定した、あらかじめ定めたビット数 (ワード)の記憶手 段を備えており、前記擬似乱数生成手段は、前記数列から擬似乱数列を生成した後 に、該生成した擬似乱数列をワードに切り出して最下位ビットを 1にし、前記記憶手 段に前記切り出したワードを 2のワード長乗を法として繰り返し乗算した結果のビット 列の一部または全体を前記擬似乱数列としてもよい。
また、前記関数実行手段は、複数ワードに対するワード間関数を含み、該ワード間 関数は、文書を暗号化するごとに、該複数ワードの間隔を変化してもよい。
[0013] 前記復号化システムにおいて、前記拡張鍵生成手段又は前記擬似乱数生成手段 は、線形次状態関数を用いて擬似乱数を生成してもよ 、。
また、前記逆関数選択手段及び前記逆関数実行手段は、前記ブロックごとに、あら カゝじめ定めた回数選択 ·変換を繰り返して、前記暗号化文書を復号してもよい。 さらに、あらかじめ初期値を設定した、あらかじめ定めたビット数 (ワード)の記憶手 段を備えており、前記擬似乱数生成手段は、前記数列から擬似乱数列を生成した後 に、該生成した擬似乱数列をワードに切り出して最下位ビットを 1にし、前記記憶手 段に前記切り出したワードを 2のワード長乗を法として繰り返し乗算した結果のビット 列の一部または全体を前記擬似乱数列としてもよい。 また、前記逆関数実行手段は、複数ワードに対するワード間逆関数を含み、該ヮー ド間逆関数は、暗号化文書を復号するごとに、該複数ワードの間隔を変化してもよい
[0014] また、上記に記載の擬似乱数発生システムであって、前記記憶手段を複数備えて おり、前記安全擬似乱数生成手段は、前記擬似乱数列を前記記憶手段と同数のヮ ードに切り出し、各記憶手段の値と各切り出したワードとの乗算を並列に行なって前 記安全擬似乱数を出力することを特徴としてもょ ヽ。
さらに、前記安全擬似乱数生成手段は、前記記憶手段の値と前記切り出したワード につ 、て乗算以外の演算も行な 、、前記演算には他の記憶手段の値も用いることを 特徴としてもよい。
上記の 、ずれかに記載の擬似乱数発生システム、暗号ィ匕システム及び復号ィ匕シス テムの機能をコンピュータ 'システムに構築させるプログラムも、本発明である。
発明の効果
[0015] 本発明では、共有鍵の情報を、暗号ィ匕関数を作るためだけでなぐ関数の選択にも 用いることにより高速で安全性の高いブロックサイファとストリームサイファを実現する 暗号化システム及び復号化システム、及び暗号的に安全でな ヽ擬似乱数列を簡単 な変換で書き換えることにより周期が長く安全性の高い暗号乱数列を生成する擬似 乱数発生システムを構成した。
本発明の実施形態 1の擬似乱数発生システムでは、直接十分に安全な暗号乱数 列を生成するのではなぐ高速に生成できる安全でない擬似乱数列を大量に用いて 上記の変換を繰り返し行うことで、安全性が高く高速な暗号ィ匕を実現できる。また、暗 号的に安全でない擬似乱数列を簡単な変換で書き換えることによる暗号乱数列生成 法を用いれば、例えば周期が 219937— 1であることが保障されていて、安全性の高い 暗号乱数列を実現できる。この周期は従来知られているどの暗号乱数列よりも極端 に長ぐ安心して長期間利用することができる。
[0016] また、本発明の実施形態 2〜5の擬似乱数発生システム、暗号ィ匕システム及び復号 化システムでは、鍵情報力 一つの解読されにく 、大きな暗号化関数を生成するの ではなぐ高速な異なるタイプの変換を複数個用意し、それらを鍵情報によって決ま る組合せで複数回変換に用いることで暗号ィ匕する。それぞれの変換が基本的で高 速なので、組み合わせた全体の変換も大変に高速である。また、関数の組み合わせ 方も反復数も変えられるので、将来の仕様強化が容易である。関数属のうち、どれが どのような順番で施されたかわ力 ないため安全性が高い。このため、従来の特許文 献 1および特許文献 2のように複数の大掛力りな暗号ィ匕関数を用意するほどの負担 をかけずに、鍵により使われる関数の種類が異なり解読の困難なシステムを実現でき るよつになった。
また、実施形態 6に示すように、実施形態 2〜5に実施形態 1の方法を加えることで 、より解読が難しいシステムを実現することができる。
このように、本発明によれば従来の方式に比べて暗号の安全性を高めることができ る。
発明を実施するための最良の形態
[0017] 以降、本発明の擬似乱数発生システム、暗号ィ匕システム及び復号ィ匕システムの実 施形態を、具体的な例を挙げて詳細に説明する。実施形態 1及び 4は擬似乱数発生 システムを文書の暗号化'復号ィ匕に用いる場合を例とした実施形態である。また、実 施形態 2, 3, 5は暗号ィ匕システム及び復号ィ匕システムの実施形態である。
なお、以降で用いる用語を以下のように定義する。
ワード: 本実施形態では、 1ワード = 32ビットとする。
ブロック: 何ワードごとに暗号化を行なうかの単位ブロック。(例えば 1ブロック =4ヮ ード)
[0018] (実施形態 1) あらかじめ用意した数列力も生成した暗号的に安全でない擬似乱数 列のワードと、 1ワードのメモリに書かれたワードとの積を次々にとり、結果を該 1ワード のメモリに格納し、その上位ビットから安全な暗号乱数列を生成することを特徴とする 擬似乱数発生システム。数列に共有鍵を用いることにより、生成した暗号乱数列をス トリームサイファによる文書の暗号化 ·復号ィ匕に用いることができる。
(実施形態 2) ブロックに分割した文書を、ブロックごとに共有鍵から生成した擬似乱 数列 (拡張鍵)により選択される関数で変換して暗号ィ匕文書を生成することを特徴と する暗号化システム及び復号化システムの基本的な例(ブロックサイファ)である。 (実施形態 3) ブロックに分割した文書を、ブロックごとに共有鍵から生成した擬似乱 数列により選択される関数で変換して暗号ィ匕文書を生成することを特徴とする暗号 化システム及び復号化システム (ストリームサイファ)である。
(実施形態 4) あらかじめ用意した数列力も生成した擬似乱数列のブロックを、当該 擬似乱数列により選択される関数で変換して、安全な暗号乱数列を生成することを 特徴とする擬似乱数列発生システム。数列に共有鍵を用いることにより、生成した暗 号乱数列をストリームサイファによる文書の暗号化'復号ィ匕に用いることができる。 (実施形態 5) 実施形態 3と同様の暗号化システム及び復号化システムに、後述する 「JUMP処理」を加えることにより、より効率的な暗号ィ匕を行なう手法を提案する。なお 、この JUMP処理は実施形態 2の暗号化システム及び復号化システム及び実施形態 4の擬似乱数列発生システムにおいても使用することができる。
(実施形態 6) 実施形態 2〜5の各実施形態で用いる擬似乱数列を、実施形態 1の 方法で生成することにより、より複雑な暗号ィ匕を行なう手法を提案する。
以降、各実施形態を順に詳しく説明する。
[0019] < 1.実施形態 1 >
実施形態 1は、あらかじめ用意した数列(共有鍵)力も生成した暗号的に安全でな い擬似乱数列のワードと、 1ワードのメモリに書かれたワードとの積を次々にとり、結果 を該 1ワードのメモリに格納し、その上位ビットから安全な暗号乱数列を生成すること を特徴とする擬似乱数発生システムである。暗号ィ匕通信における共有鍵を数列とし て用いることにより、生成した暗号乱数列をストリームサイファによる文書の暗号化'復 号ィ匕に用いることができる。
[0020] (1 - 1.従来のストリームサイファの概要と問題点)
文書のブロック bの集合を BLとすると、ストリームサイファとは、暗号化側で E , E ,
1 2
…なる暗号ィ匕関数
E: BL→BL'
の列を用意し、復号ィ匕側で D , D ,…なる復号ィ匕関数
1 2
D: BL'→BL
の列を用意し、 BLの全てのブロック bで D (E (b) ) =bとなるようにしておいて、メッセ 一ジ=ブロックの列 b , b ,…を暗号化して E (b ) , E (b ) ,…として送信し、復号ィ匕
1 2 1 1 2 2
側はそれぞれに D , D ,…を施して復号ィ匕するものである。
1 2
典型的には、 BLの元力 なる擬似乱数列 r , r ,…を生成して
1 2
E (b) := b EXOR r
D (b) := b EXOR r
とするものである。すなわち、送信側、受信側は擬似乱数列 の生成手段を持って いればよい。
[0021] 上述の従来のストリームサイファの処理の流れを示したのが、図 4 (a)である。擬似 乱数列 PN (pseudorandom numbers)を生成するのに、メモリ 420 (状態メモリ)を 用い、それに次状態関数 462を作用させ、メモリ 420に書き込む。これを繰り返すこと により、メモリ 420の内容は次々に変換される。このメモリ 420の内容を、出力関数 46 4を用いて変換し、擬似乱数列 PNとして用いる。
生成された PN (上述の例では列 (r )に該当)と、平文メッセージ M (ブロックの列)に 対し、暗号ィ匕関数 470 (上記の例では E (r , b.)に該当)を計算して、暗号化文 C (cry ptography)を卞昇する。
図 4 (a)の暗号ィ匕関数 470に示すように、関数に小さな丸がついているのは、逆関 数がつくれる、すなわち計算機で容易に計算できることを示している。この小さな丸の 意味は、以降の図においても同じである。ここでは、復号化関数 D (r , c )があって、 D (r , E (r , b) ) =bとなるということである。上述したストリームサイファの典型的な例 では、 Eも Dも EXORである。
ストリームサイファであって、 E =E = ···,従って D =D =…となっているものをブ
1 2 1 2
ロックサイファという。
[0022] 図 4 (a)に示す従来のストリームサイファ(例えば、 B. Schneier, "Applied Cryptograp hy," John Wiley & Sons, Inc., 1996.pp. 369〜428)では、次状態関数 462が複雑で ある(例えば、上述の従来技術 BBS (Blum— Blum— Shub)では、メモリは大きな桁 数の整数を保持し、その自乗を modulo Mで計算するのが次状態関数)か、出力関 数 464が複雑 (例えば、ハッシュ関数)である力 暗号ィ匕関数 470が複雑である(例え ば、ブロック暗号)か、のいずれかによつて暗号強度を保持している。 し力しながら、次状態関数を複雑にすると、擬似乱数列 PNの生成速度が落ちる。 また、 PN周期や分布が計算できない。
次状態関数を線形にすれば PNを高速生成でき、周期 ·分布も計算できる。例とし て、メルセンヌツイスター(MT)がある。(メルセンヌツイスターについては、 http:〃 ww w. math. keio.ac.jp/~matsumoto/mt. html, M. Matsumoto and T. Nishimura, ersen ne Twister: A 623— dimensionally equidistributed uniform pseudorandom number gen erator", ACM Trans, on Modeling and Computer Simulation Vol.8, No.l, January pp .3-30 (1998)を参照のこと。)この擬似乱数は高速に発生でき、周期が長い。しかし、 出力関数が単純であれば、出力列力 内部状態が推測されるので、暗号学的に安 全であるとはいえない。
(1 2.本実施形態の擬似乱数発生システム)
これに対し、本実施形態の擬似乱数発生システム (cryptMTと呼ぶ)は、暗号学的 には安全ではな!、かも知れな 、擬似乱数列 PNを、安全擬似乱数列 SPN (secure pseudorandom numoers)に変換する。
図 5は、本実施形態の擬似乱数発生システムの処理の流れを示す図である。なお、 図 5に示された PN (安全ではないかも知れない擬似乱数列)の前には、図 4 (a)の P Nの左側部分の処理を行なっている。なお、本実施形態において、この構成を何度 も繰り返すようにしてもよい。つまり、図 5の SPN生成までの処理を、図 5の入力となる PNの位置にさらにつなげてもよい。
図 5に示す本実施形態の構成において、次のような場合力 Sスピード対安全性で最も 効果がある。
•PN生成部分(図 5につながる図 4 (a)の PNの左側部)には、高速高次元分布な線 形生成法(図 4 (a)の次状態関数 462が線形、例:上述の MT)を用いる。
•PN→SPN変換部分の次状態関数 562は、線形ではないが高速に計算できるもの (例: 32ビット整数とみての乗算)を用いる。
•SPN変換部分の出力関数 564は、単純で高速なもの(例: 32ビットから、上位 8ビッ トのみをとり、残りは捨てる)を用いる。
これらの効果のある方法を用いたの力 本実施形態の cryptMTである。ただし、乗 算を用いており、偶数の積は modulo 2(32}で可逆でないため、 MTの出力の最下位 ビットを強制的に 1にする必要がある。
以降、図 4 (a)及び図 5を参照しながら、本実施形態の擬似乱数発生システムを用 いて、ストリームサイファにより文書 (平文)の暗号ィ匕及び復号ィ匕を行なう場合の処理 を説明する。なお、ここでは上述したように図 4 (a)の次状態関数 462にメルセンヌッ イスターを使用する例で説明する。
(1)共有鍵 (図 4 (a)の鍵 430)を初期シード配列として、非線形初期化法 (init— by —array)により 624ワードのデータを生成し、メルセンヌツイスター(以後 MT) mtl9 937ar. cを初期化する。これは、図 4 (a)の鍵変換 432の処理に該当し、これにより MT (次状態関数 462)の状態メモリ (メモリ 420)を初期化する。出力関数 464は、単 にメモリ 420の最初のワードを出力する。
(2)初期化後の MTの出力ワード列を M (0) , M (l) , M (2) ,…とする。これが図 4 (a )に示す擬似乱数列 PN (安全ではないかも知れない擬似乱数列)であり、図 5に送ら れる(図 5の左上の PNに該当)。なお、上述したように M (n)は MTの出力の最下位 ビットを強制的に 1にしたものである。
(3) 1ワード = 32ビットのメモリ(変数) accumを用意する。これが図 5のメモリ 520に 該当する。
(4) accumに初期値 (例えば 1)を代入する。なお、初期値は他の値 (ただし、ゼロ以 外)でもよい。
(5)以後、代入
accum accum X M (n) (mod2l
を繰り返す (次状態関数 562)。ここで、最初の 64回は空回しし、 65回目力もあらかじ め定めた回数まで accumの上位 8ビットを次々に出力する(出力関数 564)。これに より、暗号学的に安全な 8ビット整数擬似乱数列(SPN)を出力することができる。 なお、上述の演算の繰返し回数は例であり、システムに応じて必要な回数とすれば よい。また、上述の accumの上位 8ビットの代わりに、 accumのビット列の全部又は一 部(例えば 1ビットおきに出力するなど)を、安全擬似乱数列として次々に出力するよ うにしてもよい。 (6)出力された安全な SPNと、文書 (平文 M)との EXORをとることにより(暗号化関 数 570に該当)、暗号文 Cを出力する。
[0025] また、上記(2) (5)の処理を、次のようにしてもよい。メルセンヌツイスターにより生 成した擬似乱数の nワード目のデータの最下位ビットを 1にしたデータを M (n)とし、 3 2ビットのメモリ accumに、共有鍵データからハッシュ関数を用いた数列をつくって ac cumの初期値とする。ここで、この数列の最下位ビットを強制的に 1にしてもよい。次 【こ、 n= l, 2, 3, · ··【こつ ヽて、
accum accum X M (n) (mod2l
を計算し、 accumの上位 8ビットを出力して、暗号学的に安全な 8ビット整数擬似乱 数として出力する。
[0026] (1 - 3.効果)
本実施形態では擬似乱数として、メルセンヌツイスター (mtl9937ar. c)を用いた ことで、出力される暗号乱数列は周期が 219937— 1であることが数学的に証明できる。 この周期は従来知られているどの暗号乱数列よりも長ぐ安心して長期間利用するこ とがでさる。
また、 accumに非線形な演算 (乗算)を行うことと、線形性の残る最下位ビットを使 わな 、ことで、暗号乱数列として十分な安全性を持つ。
また、メルセンヌツイスターのように、暗号的に安全でないが高速な擬似乱数を、 32 ビットの積と 、う比較的速い関数で変換したことにより、このアルゴリズムを用いて生 成する暗号乱数生成法は、現在アメリカのスタンダード暗号乱数生成法である AES の最速オプティマイズ版の 1. 5倍以上と、非常に高速である。
また、 MTの内部空間の大きさにより、 time— memory— trade— off攻撃に対して も耐'性が強い。
[0027] (1 4.本実施形態の応用例)
(1)応用例 1
上述で説明した本実施形態の擬似乱数発生システムは、ハードウェアの特性によ つては乱数生成に比べて、乗算する部分の速度が遅 、。
本応用例では、この問題に対応するために、乗算結果を記憶するメモリ(アキユミュ レータ)を複数 (例えば 4個)用意し、それらを交互に使用することによって計算速度 を上げる。最近のパソコン用 CPUは複数個の乗算を並列に実行することができるた め、このような処理が可能である。
図 8は、本実施形態の擬似乱数発生システム(図 5)において、 4個のメモリ(アキユミ ユレータ)を使用した場合の処理の流れを示す図である。なお、図 8は、図 5の SPN ( 安全擬似乱数列)の左側に示した処理に対応して!/、る。
図 8において、 PN1, PN2, PN3, ΡΝ4· ··は、安全でない疑似乱数(PN)の出力 を順番に選択したものである。次状態関数 862および出力関数 864は、図 5の次状 態関数 562および出力関数 564と同様である。なお、安全疑似乱数 (SPN)の出力 は、 4つのメモリから、交互にビット列の一部を取り出して出力する(出力関数 864)。
[0028] 1番目のメモリ(メモリ 1—821)には疑似乱数出力の 1, 5, 9, 13· ··番目(PN1, PN 5, PN9, ΡΝ13· ··)を掛けた結果が累積され、 2番目のメモリ(メモリ 2— 822)には、 疑似舌 L数出力の 2, 6, 10, 14· ··番目(PN2, PN6, PN10, ΡΝ14· ··)を掛けた結 果が累積され、 3番目のメモリ(メモリ 3— 823)には、疑似乱数出力の 3, 7, 11, 15 …番目(PN3, PN7, PN11, ΡΝ15· ··)を掛けた結果が累積され、 4番目のメモリ(メ モリ 4一 824)には、疑似舌 L数出力の 4, 8, 12, 16· ··番目(PN4, PN6, PN12, PN 16· ··)を掛けた結果が累積される。
なお、利用する疑似乱数出力の順序および各メモリから出力する際の順序はこのと おりでなくてもよい。
[0029] (2)応用例 2
また、乗算だけでなぐ加算と論理和と排他的論理和とシフト (特に右シフト)を行な つてもよい。ここで、応用例 1と同様に複数のアキユミユレータ (メモリ)を用意すれば、 あるメモリには、生成された乱数だけでなぐ他のメモリに記憶された数値も演算の対 象として与免ることができる。
具体的には、例えば、
(1)各アキユミユレータに乱数を加算する。(応用例 1のようにそれぞれ別の乱数をカロ 算する)。
(2)各アキユミユレータの内容と「別のアキユミユレータの一つの内容を右シフトした結 果」の排他的論理和を各アキユミユレータに入れる。
(3)「各アキユミユレータと数値 1の論理和をとつた結果」と「乱数 (上記(1)において別 のアキユミユレータに与えられた乱数であって、その別のアキユミユレータは(2)で選 ばれたものではないもの)と 1の論理和をとつたもの」を乗算した結果を各アキユミユレ ータに人れる。
(4)各アキユミユレータの所定の上位ビットを所定の順序で出力する。
の処理を行なう。
[0030] 図 9は、本実施形態の擬似乱数発生システム(図 5)において、 4個のメモリ(アキユミ ユレータ)を用意して上述の(1) (4)を行なう場合の処理の流れの例を示した図で ある。なお、上述の図 8と同様、図 5の SPN (安全擬似乱数列)の左側に示した処理 に対応している。
図 8 (応用例 1)と同様に、 4ワードのメモリ(メモリ 1—921 ,メモリ 2— 922,メモリ 3— 923,メモリ 4— 924)を Accl , Acc2, Acc3, Acc4とし、安全でない疑似乱数(PN )の出力(PNl, PN2, PN3, ΡΝ4· · ·)を nol, ηο2, ηο3, ηο4· · ·とする。図 9に示す 流れ図は、上述の(1)〜(4)の処理を、次に示す Step l Step 4のように行なう 場合の例を示している。
[0031] (l) Step 1
Accl Accl + nol
Acc2 Acc2 + no 2
Acc3 Acc3 + no 3
Acc4 Acc4 + no4
(2) Step 2
Temp Accl
Accl Accl EXOR (Acc2 > > 11)
Acc2 Acc2 EXOR (Acc3 > > 11)
Acc3 Acc3 EXOR (Acc4 > > 11)
Acc4 Acc4 EXOR (Temp > > 11)
(「EXOR」は排他的論理和、「 > > 11」は 11ビット右シフト。なお、シフト量は 11で なくてもよい。 )
(3) Step 3
Accl (Accl OR D > < (no4 OR 1)
Acc2 (Acc2 OR D > < (nol OR 1)
Acc3 (Acc3 OR 1) > < (no2 OR 1)
Acc4 (Acc4 OR 1) > < (no3 OR 1)
( TOR Jは論理和)
(4) Step 4
Acclの上位 16ビット、 Acc2の上位 16ビット、 Acc3の上位 16ビット、 Acc4の上位 16ビットをこの順で安全な疑似乱数として出力する。なお、出力順序はこの順でなく てもよい。
Step 1から Step 4を、次の疑似乱数列に対して繰り返す。
[0032] (1 - 5.本実施例を用いた暗号ィ匕システム及び復号ィ匕システムの構成例)
最後に、本実施形態の擬似乱数発生システムを用いて、ストリームサイファにより文 書 (平文)の暗号ィ匕及び復号ィ匕を行なう場合のシステム構成を、図 1のシステム構成 図を参照しながら説明する。
本実施形態のシステムは、例えば通常のパソコン等の端末に実装するものする。図 1に示すように、文書を暗号ィ匕して送信する側の端末には暗号ィ匕システム 110を、文 書を受信して復号ィ匕する側の端末には復号ィ匕システム 150を実装する。また、暗号 化システム 110及び復号ィ匕システム 150の双方に、数列(共有鍵 122)及び本実施 形態の擬似乱数発生システム 130を用意する。
暗号ィ匕システム 110にお 、て、擬似乱数発生システム 130の擬似乱数生成プログ ラム 132により、共有鍵 122から上述で説明した本実施形態の手法を用いて安全な 擬似乱数列 (安全擬似乱数列) 125を生成する。次に、ストリームサイファの典型的な 例として、暗号ィ匕プログラム 136は、安全な擬似乱数列 125と文書 124の EXORをと ることにより文書 124を暗号ィ匕して、暗号化文書 140を生成する。
[0033] 一方、復号ィ匕システム 150においては、擬似乱数発生システム 130の擬似乱数生 成プログラム 132により、共有鍵 122から上述で説明した本実施形態の手法を用 ヽ て安全な擬似乱数列 125を生成する。次に、復号ィ匕プログラム 166は、安全な擬似 乱数列 125と復号ィ匕文書 124の EXORをとることにより暗号ィ匕文書 140を復号し、元 の文書 124を得る。暗号化システム 110と復号化システム 150とでは、同じ共有鍵 12 2から同じ擬似乱数生成プログラム 132を用いて、同じ安全な擬似乱数列 125を生 成するため、対応する暗号化 ·復号化の処理を行なうことができる。
[0034] < 2.実施形態 2 >
実施形態 2は、ブロックに分割した文書を、ブロックごとに共有鍵から生成した擬似 乱数列により選択される関数で変換して暗号ィ匕文書を生成することを特徴とする暗 号ィ匕システム及び復号ィ匕システムの基本的な例であり、ブロックサイファである。関数 の選択及び関数のパラメータには、共有鍵から生成した擬似乱数列が用いられる。こ こで、後述の実施形態 3では、文書が長いほど擬似乱数列を消費するが、本実施形 態 2は、一定の長さしか消費しない。このため、本実施例では、共有鍵から生成した 一定の長さの擬似乱数列を「拡張鍵」とよぶ。
[0035] (2- 1.従来のブロックサイファの概要と問題点)
AESなどの従来のブロックサイファは、図 4 (b)に示す構成である。すなわち、平文 Mのブロックをメモリ 420に取り込み、擬似乱数列 PNを使って変換 (466に示す EX OR)を行ない、メモリ 420に書き込む。これを数回繰り返して暗号文 Cを得る。ここで 、右下の関数 460は複雑な全単射である。なお、上述の図 4 (a)で説明したとおり、関 数に小さな丸がついているのは、逆関数がつくれる、すなわち計算機で容易に計算 できることを示している。
し力しながら、上述したように、従来のブロックサイファは、鍵情報から一つの複雑な 暗号ィ匕関数を作り、これを用いて平文を変換するため、高速な暗号システムでは作ら れる関数に偏りがあり、暗号解読のための情報を得られやすいという問題がある。た とえば暗号を解読しょうとする際には、差分解読法や、線形解読法などの、既知の平 文を暗号化させることによる攻撃がよく用いられている。すなわち攻撃する人物が、任 意の文書を暗号化させられる状況では、解読に用いるデータを採取され、鍵の全数 検索よりも簡単に暗号が破られてしまう。
[0036] (2- 2.処理の流れ) これに対し、本実施形態では、次のような構成をとることにより、従来の問題点を解 決する。
図 6は、本実施形態の暗号ィ匕システムの処理の流れを示す図である。なお、後述の 実施形態 3の暗号ィ匕システムの処理も同図に示す通りである。
本実施形態 (及び実施形態 3)では、ブロック bの集合 BLにつ 、て、
F : PARAM X BL→BL
の形をした単純な関数と、逆操作に当たる
F,: PARAM X BL→BL
の関数を複数個用意し (F' (P, F (P, b) ) =bとなるものである)、図 6に示すように、 擬似乱数列 PN (図 6の左上に示す PN)をパラメータ Pとして消費しながら、平文 Mの ブロックが取り込まれたメモリ 620の内容を繰り返し変換して、暗号文 Cを得る。変換 の際、どの関数 660 (上記の Fに該当)を使うかは、 PNをセレクタ 640に送って選択 する。
[0037] 上記の構成をとることにより、本実施形態 (及び実施形態 3)では関数の組み合わせ の自由度が指数的に増大し、強固な暗号が実現できる。
また、擬似乱数列 PN力 パラメータ(図 6における関数 660で、白丸のついていな いところ)を取り込むため柔軟性があり、より強固な暗号が実現できる。
さらに、共有鍵を図 4 (a)に示す鍵 430として、上述のメルセンヌツイスターなどを用 いて擬似乱数列 PNを生成すれば、 PNはいくらでも生成することができる。そのため 、関数 660による平文の変換の繰り返し回数を増やすことができ、暗号化の強度を上 げることができる。
また、図 6において、平文が複数のブロック力もなる場合には、各ブロックに対して 異なる組み合わせの関数による暗号ィ匕を行なうことができる(つまり、ストリームサイフ ァとして使える)。
[0038] (2— 3.前提条件)
本実施形態では、 1ブロック =4ワード(8ワードまたは 16ワードでもよい)、 128ビット 以上の共有秘密鍵情報での暗号化方式を例に挙げて説明する。
前処理として、共有鍵を必要なサイズにハッシュ関数で拡張して擬似乱数列 PN、 すなわち拡張鍵(図 6の左上の PNに該当)を生成する。本実施例では、文書はプロ ックサイズ (4ワード)に分割し、ブロックごとに変換するものとする。
[0039] (2-4.用意する関数)
ブロックの変換には以下の 7種類の、ブロックサイズのデータを高速で変換すること ができる、性質の全く異なる関数(図 6の関数 660に該当)を用いる。以降、これらの 関数族を PEF (primitive encryption family)とよぶ。本実施形態では、ワード内 の計算を行なう関数 (ワード内関数) 4種類と、ブロック内の複数のワードを跨ぐ計算を 行なう関数 (ワード間関数) 3種類を用意する。なお、復号ィ匕において、ワード内関数 に対応する逆関数をワード内逆関数、ワード間関数に対応する逆関数をワード間逆 関数という。
t回目の演算 (変換)には拡張鍵 (擬似乱数列 PN)の tブロック目のデータを用いる 。また、拡張鍵の最後の 1ブロックは関数の選択に用いる。
[0040] (a)ワード内の計算(4種類)
(1) EXOR: ブロックの各ワードに、拡張鍵の tブロック目のデータをワードごとに排 他的論理和で加える。
(2) +: ブロックの各ワードに、拡張鍵の tブロック目のデータをワードごとに mod232 で加える。
(3) X: ブロックの各ワードに、拡張鍵の tブロック目の、対応するそれぞれのワード の最下位ビットを 1に変えたものを mod232で掛け算する。なお、この変換については 、最下位ビットを 1に変えた拡張鍵のワードの掛け算の逆関数をすベて計算して辞書 引きできるよう保存しておく。
(4)横シフト: ブロックの各ワードにっ 、て、拡張鍵の tブロック目の対応するそれぞ れのワードの下 5ビットずつを数字として用いて、その大きさの分だけのビットを右に シフトする。ワードの右にはみ出た部分をビット反転させて、左に書く。
[0041] (b)ワードを跨ぐ計算 (3種類)
(5)縦回転: 1ブロックをワードの 4個(1ブロック =4ワードの場合。なお、 1ブロック = 8ワードとする場合は 8個、 1ブロック = 16ワードとする場合は 16個)の配列とみなし、 4行 32列(1ブロック =8ワードとする場合は 8行 32列、 1ブロック = 16ワードとする場 合は 16行 32列)の 0, 1力もなる行列とみなす。拡張鍵の tブロック目力も 1ワード取り 出す。この 1ワードでビットが 1のところに対応する列をビット反転させて、さらに下方 向に 1行分シフトする。一番下の行のデータは一番上に書く(ローテート)。
(6)置換: 拡張鍵の tブロック目力も 2ビット(1ブロック =4ワードの場合。なお、 1ブロ ック =8ワードとする場合は 3ビット、 1ブロック = 16ワードとする場合は 4ビット)を 4回 取り出し、それぞれを数として見た値 kにつ 、て配列されたブロックの k行目と( (k+ 5 ) mod4)行目(1ブロック =4ワードの場合。なお、 1ブロック =8ワードとする場合は(( k+ 5) mod8)行目, 1ブロック = 16ワードとする場合は((k+ 5) modl6)行目)を入 れ換えることを、 4回行う。
(7)和置換: 拡張鍵の tブロック目力も 2ビット(1ブロック =4ワードの場合。なお、 1 ブロック =8ワードとする場合は 3ビット、 1ブロック = 16ワードとする場合は 4ビット)を 4回取り出し、それぞれを数として見た値 kについて配列されたブロックの k行目に((k + 7) mod4)行目(1ブロック =4ワードの場合。なお、 1ブロック =8ワードとする場合 は((k+ 7) mod8)行目, 1ブロック = 16ワードとする場合は((k+ 7) modl6)行目) を排他的論理和で加えることを 4回行う。
(2- 5.文書の暗号化)
文書の暗号化は、文書をブロックサイズに区切り、それぞれのブロックに上述の関 数を以下のように拡張鍵 (擬似乱数列 PN)に依存して選択して変換する。上述したよ うに、 t回目の演算(変換)には拡張鍵の tブロック目のデータを関数(図 6の関数 660 )のパラメータとして用いる。また、拡張鍵の最後の 1ブロックは関数の選択に用いる。 図 6で説明すると、 PNの最後の 1ブロックをセレクタ 640に送り、セレクタ 640により関 数 660を選択する。
本実施形態では、文書の各ブロック(図 6ではメモリ 620に取り込まれた平文 Mのブ ロック)に対し、上述した 7種類の関数を、例えば「横シフト' X '縦回転'(置換または 和置換) ·( +または EXOR)」の順に施すことを 1セットとし、これを 8セット行なうことに よりブロックを変換する。ただし、後ろ 2つのそれぞれ 2種類の関数を ()内に示してい る箇所においては、拡張鍵の最終ブロックから 1ビットずつを 2 X 8回次々に用いて、 0なら前者を、 1なら後者を選択するものとする。この場合、 t=40回の演算 (変換)を 行なうことになるため、拡張鍵は 41ブロックのサイズに生成し、最後の 41ブロック目を 関数の選択に用いる。
なお、上記(1)〜(7)の関数は一例であり、高速に処理できる他の演算を用意して もよい。また、上記の関数の組み合わせや順序は一例であり、他の組み合わせや順 序でもよい。また、繰り返し回数も上記の 8セット以外の回数でもよい。また、最初の 1 セットと最後の 1セットで全種類の変換を行ない、間のセットで全種類の関数の中から 拡張鍵を用いてどれかを選択することを例えば 5回以上繰り返すなどの方法を用い てもよい。 1セットを複数回行なう理由は、本実施形態では全てのブロックに対して同 じ変換を施すため、安全性を高める必要があるからである。
[0043] (2-6.文書の復号化)
復号化は、暗号化の逆の順番で、それぞれの変換の逆写像を施せばよぐ本実施 形態では暗号化と同じくらいの時間で計算できる。
[0044] (2- 7.効果)
本実施形態の暗号ィ匕システム及び復号ィ匕システムによれば、それぞれの変換が高 速であることから大量の文書を高速に暗号ィ匕でき、施された関数のタイプとその順番 がわからな!、ことから、従来のブロックサイファよりも解読が困難となる。
[0045] (2-8.本実施例を用いた暗号ィ匕システム及び復号ィ匕システムの構成例)
最後に、本実施形態の暗号化システム及び復号化システムを用いて、文書の暗号 通信を行なう場合のシステム構成例を、図 2を参照しながら説明する。なお、後述の 実施形態 3,実施形態 5も同様のシステム構成とすることができる。
本実施形態の暗号ィ匕システム及び復号ィ匕システムは例えば通常のパソコン等の端 末に実装するものとする。図 2に示すように、文書を暗号ィヒして送信する側の端末に は暗号ィ匕システム 110を、文書を受信して復号ィ匕する側の端末には復号ィ匕システム 150を実装する。また、暗号ィ匕システム 110には共有鍵 122及び暗号ィ匕に用いる複 数の関数 126を用意し、復号ィ匕システム 150には共有鍵 122及び復号ィ匕に用いる複 数の逆関数 128 (関数 126の各関数に対応し、それぞれ逆の操作をする関数)を用 意する。
[0046] 上述したように、本実施形態の暗号ィ匕システム及び復号ィ匕システムは、共有鍵の情 報 (共有鍵から生成した擬似乱数列)を暗号化関数の選択及び選択された関数のパ ラメータとして用いて 、ることが主要な特徴であり、これにより高速で安全性の高 ヽシ ステムを実現している。暗号ィ匕システム 110では、まず、擬似乱数生成プログラム 23 2により、共有鍵 122から擬似乱数列 225 (本実施形態においては拡張鍵)を生成す る。次に、生成された擬似乱数列 (拡張鍵) 225を用いて、関数選択プログラム 234 は関数 126から文書 124の暗号ィ匕に用いる関数を選択する。また、暗号化プロダラ ム 236は、擬似乱数列 (拡張鍵) 225を関数選択プログラム 234で選択された関数の パラメータとして用 Vヽて関数を実行して文書 124を暗号化する。これにより暗号化文 書 140を生成する。
一方、復号ィ匕システム 150では、まず、擬似乱数生成プログラム 232により、共有鍵 122から送信端末 110と同じ擬似乱数列 (拡張鍵) 225を生成する。次に、生成され た擬似乱数列 (拡張鍵) 225を用いて、逆関数選択プログラム 264は逆関数 128から 受信した暗号ィ匕文書 140の復号に用いる逆関数を選択する。ここでは、送信端末 11 0で選択された関数に対応する逆関数が選択されることになる。復号化プログラム 26 6は、擬似乱数列 (拡張鍵) 225を逆関数選択プログラム 264で選択された逆関数の パラメータとして用いて逆関数を実行し、暗号ィ匕文書 140を復号する。これにより元 の文書 124を得る。
< 3.実施形態 3 >
実施形態 3は、ブロックに分割した文書を、ブロックごとに共有鍵から生成した擬似 乱数列により選択される関数で変換して暗号ィ匕文書を生成することを特徴とする暗 号ィ匕システム及び復号ィ匕システムの例であり、ストリームサイファである。共有鍵の情 報 (共有鍵から生成した擬似乱数列)は、関数の選択及び関数のパラメータに用いら れる。
本実施形態のシステム構成例は上述の実施形態 2で図 2を用いて説明した通りで ある。また、その処理の流れは実施形態 2で図 6を用いて説明した通りである。本実 施形態と、上述の実施形態 2との違いは、実施形態 2 (ブロックサイファ)では、一度複 数の関数を選択してパラメータを決定したら、同じ関数及びパラメータですべてのブ ロックを変換する力 本実施形態 (ストリームサイファ)では、文書のブロックごとに、関 数とパラメータを決めて変換する。すなわち、全く同じブロックが 2つあったときに、実 施形態 2ではこの 2つのブロックは同じ暗号文に変換されるが、実施形態 3では選択 される関数もパラメータも違うため違う暗号文になる。また、上述したように、実施形態 2は、一定の長さの擬似乱数列 (拡張鍵)し力使わないが、実施形態 3の方は、文書 の長さに応じて擬似乱数を消費することになる。
[0048] (3— 1.前処理)
共有鍵に基づき擬似乱数を発生させて、 32種類の乗算値 (32ビット符号なしの整 定数で、どれも奇数なもの)を準備する。そして、それらの mod232での乗法逆数値を 計算して表にしておく。
[0049] (3- 2.ユーザが決めるマクロ定数)
(1) 1ブロックのワード数 (Tuple)を定義する。
# define Log― Tuple 2
# define Tuple (1UL< < Log— Tuple)
本実施形態においては、 1ブロックは Tuple個のワードとする。
Tupleの値は 2巾であり、 4以上 16以下である必要がある。
Tupleの 2を底としたログを、 Log— Tupleとして指定する。
上記は、 1ブロック =4ワードとする場合の記述である。
(2)文書のブロックの暗号ィ匕関数による変換回数 (Iteration)を定義する。
# deiine Iteration 10
上記は、変換回数を 10回とする場合の記述である。
[0050] (3- 3.グローバル変数)
暗号ィヒした 、文書 (平文)を入れておく配列は二重配列
msg[Msg― Length] [Tuple]
である。本実施形態で用いるグローバル変数は次の通りである。
(1)暗号化した!ヽ文書 (平文)を格納する。
unsigned long msg [Msg― Length] [Tuplej;
(2)配列 msgを直接書き換えて暗号ィ匕する。
hmnencode (key [] , init value []) (3)配列 msgを直接書き換えて復号化する。
hmndecode (key [] , init― value [] )
[0051] (3-4.用意する関数)
Tuple個のワード力もなるブロックの変換に用いる関数(PEF) (図 6の関数 660に 該当)として、本実施形態では、あらかじめ、ワード内の計算を行なう関数 5種類と、ブ ロック内の複数のワードを跨ぐ計算を行なう関数 3種類の計 8種類の関数を用意する これらの関数は全て、
PEF : BL X PARAM→BL
なる写像である。ここで、 BLは文書のブロックの集合であり、 PARAMは関数に与え るパラメータであり、 PARAMは BLと同じく Tuple個のワード力 なるデータの集合で あり、擬似乱数列 PN力 得る。
ここでは、 Tuple =4の場合を例として
(w , w , w , w ) -^PEt (w , w , w , w; p , ρ , ρ , ρノ
1 2 3 4 1 2 3 4 1 2 3 4
の形で記述することにする。
以降、 PEFの 8種類の関数とその逆関数 (—inv)をそれぞれ説明する。なお、これ らの(1)〜(8)の関数は一例であり、高速に処理できる他の演算を用意してもよい。
[0052] (a)ワード内の計算(ワード内関数及びそれに対応するワード内逆関数) 5種類
、 1 ) crypt― plus
crypt― plus
w^w +p (i= l, 2, 3, 4).
crypt― plus― inv
w. w.— p. (i= l, 2, 3, 4).
[0053] (2) crypt_exor
crypt― exor
w w EOR p (i= l, 2, 3, 4).
crypt― exor― inv
w^w EOR p (i= l, 2, 3, 4). [0054] (3) crypt_multi
最近の CPUは掛け算命令を持っているが、割り算は遅い。そのため、本実施形態 では上述の(3— 1.前処理)で述べたように Multi— Size個( = 32個)の掛け算用乱 数定数を用意し、 global変数の配列 multi— tableに格納する。
実際の処理としては、
1) prepare— multi ()を呼び出すと、 multi— tableに乱数が格納される。
2)下位ビットを強制的に変換し、 mod7で 3のものと、 mod 16で 7のものを multi— ta ble内に交互におく。これらは、 mod232での乗法群を生成する。
3) prepare_multi_inv ()を呼び出すと、 inv— tableに multi— tableの乗法逆数 が格納される。
crypt― multi
w^w X mutli一 table [pの上位 5ビット]
w-^w— p
を i= l, 2, 3, 4について行う。すなわち、パラメータ pの上位 5ビットに対応する乗算 用定数を mutli— table[]から読み出し、それを wに掛ける。 pの下位 27ビットが捨て られるのはもった!/ヽな 、ので、 wから pを弓 I V、ておく。
crypt― multi― mv
w-^w +p
w^w X inv一 table [pの上位 5ビット]
を i= l, 2, 3, 4【こつ!ヽて行う。
[005ΰ」 (4) crypt― hori― rotate
crypt― hori― rotate
ワードごとに、ビットを反転しながら横ローテートを行う。すなわち
s ϋの上位 5ビット、ただし下力も 4ビット目は常に 1にセット
w^- (wのビット反転の右 32— sシフト)と(wの左 sシフト)の OR
w-^w— p
を i= l, 2, 3, 4で行う。 4ビット目を 1にするのは、パラメータが 0でもローテートをする ため。 crypt― hori― rotate― inv
上述の逆変換
[0056] (5) crypt― hori― rightshift
crypt― hori― rightshift
ワードごとに、ビットを反転しながら横ローテートを行う。すなわち
s pの上位 5ビット、ただし下から 5ビット目は常に 1にセット
w^w EOR (wのビット反転の右 sシフト)
w w +p
を i= l, 2, 3, 4で行う。 5ビット目を 1にするのは、パラメータが 0でもローテートをする ためと、逆変換を易しくするため。
crypt― hori― rightshift― mv
上記の逆変換
[0057] (b)ワードを跨ぐ計算 (ワード間関数及びそれに対応するワード間逆関数) 3種類
(oノ crypt― vert― rotate
crypt― vert― rotate
key p +p
keyを 32ビットランダムパターンと思う。
w , w , w , wに関して、 keyにおいて 1になっているビットについては縦方向にビ
1 2 3 4
ット反転しながらローテートする。乱数力 Sもった 、な 、ので
w w +p
を i= l, 2, 3, 4【こつ!/ヽて行う。
crypt― vert― rotate― mv
上記の逆変換
[0058] (7) crypt add permute
crypt― add― permute
i= l, 2, 3, 4について、
w. w.+w.
という和を行う。ここで jは pの最下位 Low— Mask = 2ビットを用いて決められるが、た またまそれが iと同じであるときには jを mod Low— Maskで incrementしておく。 P— P
1 4の有効活用のために
w^w EOR Ό
を i= l, 2, 3, 4でやっておく。
crypt― ada― permute― mv
上記の逆変換
[0059] (8j crypt― exor― permute
crypt― exor― permute
i= l, 2, 3, 4について、
w w EXOR w
という和を行う。ここで jは pの最下位 Low— Mask = 2ビットを用いて決められる力 た またまそれが iと同じであるときには jを mod Low— Maskで incrementしておく。
P— P
1 4の有効活用のために
w-^w— p
を i= l, 2, 3, 4でやっておく。
crypt― exor― permute― inv
上記の逆変換
[0060] (3— 5.擬似乱数列)
ここでは擬似乱数列 PN (図 6の左上の PNに該当)の生成方法として、上述のメル センヌツイスター(mtl9937ar. c)を用いる。 mtl9937ar. cは、任意長の配列を初 期値として受け取る機能を持つ。
擬似乱数列は 4ワードずつ読み込むようにした。内部配列長の 624が 4でわりきれる ため、 624Z4回読み込むごとに配列全体に擬似乱数列を生成しなおす。
genrand― founnt32、paramノ
により、 param[0]〜param[3]に 32ビット長符号なし整数乱数が読み込まれる。 暗号化する際の
crypt― . . . (.unsignea long block [Tuple])
では、どれも内部で genrand fourint32 (param)を呼び出して ρ , ρ , ρ , ρを 生成している。それに対し、復号化する際の
crypt― . . .― mv (block [] , paramu)
では、 paramのところに p〜pを指定する。この違いは、復号化する場合には擬似乱
1 4
数列を逆向きに生成しなくてはならないことに起因する。復号ィ匕する場合には、擬似 乱数列を配列 temp— randに!、つたん記録しておき、逆向きに使う。
[0061] (3-6.文書の暗号化)
hmnencode (key [] , mit― value [] )
を呼び出すと、文書(図 6においては、メモリ 620に取り込んだ平文 Mのブロック)の暗 号ィ匕を行なう。 key, init— valueは配列で、あわせてメルセンヌツイスターの初期化 に使われる。
(1) multi— tableに乗算定数をしまう。
(2)擬似乱数列 PNを 4ワード func— choice[0]— [3]の 4つに格納し、積と EORを 用いて新たな 4ワードに書き換える。(あとでこの 4ワードを 3ビットずつに切り出し、上 述の 5 + 3種の PEFの選択を行う。 )
(3)まずは平文に対して次の 3つを施す。
crypt― multi msg LI] );
crypt― vert― rotate、msg LI] );
crypt― hori― rightshift (msg [i] );
(4)その後は Iterate回、 func— choiceを用 、て PEF関数を選択し(図 6のセレクタ 640の処理に該当)、 MTで生成した擬似乱数列 PNをパラメータとして与えながら変 換を繰り返す。
(5)最後に再び
crypt― multi msg LI] );
crypt― vert― rotate、msg LI] );
crypt― hori― rightshift (msg [i] );
を作用させる。
[0062] (3- 7.文書の復号化)
hmndecode (key [] , init value [] ) を呼び出すと、復号化を行なう。 key, init— valueは配列で、あわせてメルセンヌツイ スターの初期化に使われる。
(1) multi— tableに乗算定数をしまう。
( 2) inv— tableにその乗算に関する逆元をしまう。
(3)擬似乱数を 4ワード func— choice [0]〜 [3]の 4つに格納し、積と EORを用いて 新たな 4ワードに書き換える。(あとでこの 4ワードを 3ビットずつに切り出し、上述の 5 + 3種の PEFの選択を行う。 )
(4)後で使われるべき乱数ブロックを、 3 +Iteration+ 3個作って配列 temp— rand にしまっておく。
(5)暗号文に対して、 3つの逆変換を施す。
crypt― hori― nghtshift― inv (msg [i] , temp― rand [ k」 );
crypt― vert― rotate― mv、msg LI] , temp― rand [ k」 );
crypt― multi― inv (msg [i] , temp― rand [ k] );
(6)その後は Iterate回、 func— choiceを用いて PEF関数を選択し、格納しておい た MTの出力を与えながら逆変換を繰り返す。
(7)最後に再び
crypt― hori― nghtshift― inv (msg [i] , temp― rand [ k」 );
crypt― vert― rotate― mv、msg LI] , temp― rand [ k」 );
crypt― multi― inv (msg [i] , temp― rand [ k] );
を作用させる。
[0063] <4.実施形態 4 >
実施形態 4は、あらかじめ用意した数列(共有鍵)から生成した擬似乱数列のブロッ クを、当該擬似乱数列により選択される関数で変換して、安全な暗号乱数列を生成 することを特徴とする擬似乱数列発生システムである。ここで、数列は、関数の選択 及び関数のパラメータとして用いられる。数暗号ィ匕通信における共有鍵を数列として 用いることにより、生成した暗号乱数列をストリームサイファによる文書の暗号ィ匕 ·復号 化に用いることができる。
[0064] (4 1.擬似乱数列の生成) 一般に実験などに利用されている擬似乱数列は、高速に生成されるが、いくつかの ワードを見ると他のワードがわかってしまうため、暗号学的には安全でない。このため 、従来、暗号乱数列の生成には、 BBS法に代表される計算量の大きな暗号化方式 が用いられている。本実施形態は、本発明のポイントである、鍵情報を関数選択に用 いることで、高速な擬似乱数列を少ない計算量で暗号乱数列に書き換えることを特 徴とした擬似乱数発生システムであり、高速で安全なストリームサイファを構成するこ とがでさる。
ここでは擬似乱数 PNの生成方法として実施形態 1で説明したメルセンヌツイスター (mtl9937ar. c)を用いる。高速で周期が長い擬似乱数列を生成できるためである 。なお、他の擬似乱数生成方法を用いてもよい。
前処理として、あら力じめ暗号化'復号ィ匕を行う双方で、共有鍵を用いて 624ワード の秘密の擬似乱数列の初期値を求めておく。使い続ける共有秘密鍵の他に、一回 の通信ごとにセッション鍵を受け取る場合には、ここで作成した初期値の一部をセッ シヨン鍵に変えたものを、その通信で用いる擬似乱数列の初期値とし、乱数は初期値 の次の値力 使うものとする。
擬似乱数列 PNは、必要になった分だけ次々に作ることとして、以下のように安全な 擬似乱数列を出力する。擬似乱数列 PNの 12ηワード目のデータを、 12η+ 1ワード 目から 12η+ 11ワード目のデータを用いて次のように書き換える。以下、擬似乱数の mワード目のデータを R (m)であらわす。
x=R (12n)とし、 R(12n+ 1)のデータを上から 2ビットずつ 10回見て、この値によ り次の操作で Xを書き換えて 、く。
t回目の 2ビットが
(1) 00ならば、 Xを、 x+R(12n+t+ l) mod232に書き換える。
(2) 01ならば、 Xを、 X EXOR R (12n+ t+ l)に書き換える。
(3) 10ならば、 Xを、 x XR(12n+ t+ l) *に書き換える。ただし、 p *は、 pの最下位ビ ットを 1にした数とする。
(4) 11ならば、 Xを、 X shift R (12n+ t+ l)に書き換える。ただし、 s shift tは、 t の上 5ビットの大きさの分だけの sのビットを右にシフトし、ワードの右にはみ出た部分 をビット反転させて、左に書いたものとする。
10回書き換えたら、 Xを暗号乱数列の nワード目として出力する。
[0066] なお、上記(1)〜 (4)の関数は一例であり、高速に処理できる他の演算を用意して もよい。また、必要な強度に応じて変換の回数を増やし、また強制的に掛け算とシフト があらわれるようにするなどの方法で、安全性を高めることができる。 1つのワードを求 めるのに m+ 2ワード(mは 6〜16くら 、;)用いて変換の回数を m回とし、 1回目と m— 1回目の変換をシフト、 2回目と m回目の変換を掛け算と決めるなど必要に応じて調 整すると良い。
メルセンヌツイスターには、周期の完全な保障と、分布のある程度の保障がある。周 期がとても長いことから、生成した安全擬似乱数列の周期も使い切ることができないく らい長くなり、共有鍵を取り替えずに長く使い続けることができる。
[0067] (4- 2.本実施例を用いた暗号ィ匕システム及び復号ィ匕システムの構成例)
最後に、本実施形態の擬似乱数発生システムを用いて、ストリームサイファにより文 書 (平文)の暗号化及び復号化を行なう場合のシステム構成例を、図 3のシステム構 成図を参照しながら説明する。
本実施形態のシステムは、例えば通常のパソコン等の端末に実装するものする。図 1に示すように、文書を暗号ィ匕して送信する側の端末には暗号ィ匕システム 110を、文 書を受信して復号ィ匕する側の端末には復号ィ匕システム 150を実装する。また、暗号 化システム 110及び復号ィ匕システム 150の双方に、数列(共有鍵 122)、関数 126、 及び本実施形態の擬似乱数発生システム 330を用意する。
暗号ィ匕システム 110では、まず、共有鍵 122から従来技術の手法により安全ではな いかもしれない擬似乱数列 PNを生成する。次に、生成された PNを用いて、関数選 択プログラム 334は関数 126から PNの暗号ィ匕に用いる関数を選択する。また、擬似 乱数生成プログラム 332は、 PNを関数選択プログラム 334で選択された関数のパラ メータとして用いて関数を実行し、 PNを暗号化する。これにより、安全な擬似乱数列 325を生成して、記憶領域に一時的に格納する。次に、ストリームサイファの典型的 な例として、暗号ィ匕プログラム 336は、擬似乱数列 325と文書 124の EXORをとること により文書 124を暗号ィ匕して、暗号化文書 140を生成する。 [0068] 一方、復号ィ匕システム 150でも、共有鍵 122から従来技術の手法により安全ではな いかもしれない擬似乱数列 PNを生成する。次に、生成された PNを用いて、関数選 択プログラム 334は関数 126から PNの暗号ィ匕に用いる関数を選択する。また、擬似 乱数生成プログラム 332は、 PNを関数選択プログラム 334で選択された関数のパラ メータとして用いて関数を実行し、 PNを暗号化する。これにより、安全な擬似乱数列 325を生成して、記憶領域に一時的に格納する。次に、復号ィ匕プログラム 366は、擬 似乱数列 325と暗号ィ匕文書 140の EXORをとることにより暗号ィ匕文書 140を復号し、 元の文書 124を得る。
暗号ィ匕システム 110と復号ィ匕システム 150とでは、同じ共有鍵 122及び関数 126を 用いて、同じ安全な擬似乱数列 325を生成するため、暗号化に対応する復号化の処 理を行なうことができる。
[0069] < 5.実施形態 5 >
実施形態 5は、上述の実施形態 2〜4のシステムに、後述する「JUMP処理」をカロえ ることにより、より効率の良い暗号ィ匕を行なう手法を提案する。なお、ここでは実施形 態 3と同様の暗号ィ匕システム及び復号ィ匕システムに JUMP処理を追加する例で説明 するが、使用する関数 (PEF)等については、実施形態 3とは異なるものを用意して説 明する。
本実施形態の暗号化システムの処理の流れを、図 7に示す。
まず、共有鍵 (数列)から上述の実施形態 2〜4と同様の方法 (例えばメルセンヌッ イスター)により擬似乱数列を生成して、これを本実施形態で使用する擬似乱数列 P
Nとする(図 7の左上部)。
次に、擬似乱数列 PNをセレクタ 740に送り、どの関数 760を選ぶかを決定する。図
6で示した実施形態 2〜4との違いは、ブロックの変換が何ステップ目であるかを記録 する履歴メモリ 750が追加されている点であり。これにより jumpという値が計算される jumpは、「各ワードの情報を、どれだけ離れたワードに渡すか」を各関数に指定す るものである。 1つのブロックを変換するとき、 jumpは 1ステップ目の変換では 1, 2ス テツプ目は 2, 3ステップ目は 4,…と二倍二倍に増えて行き、 t (lブロック内のワード 数)以上になったら 1に戻す。この jumpの処理は、履歴メモリ 750がセレクタ 740に指 示を出すことにより行なう。
[0070] また、本実施形態では、関数の選択にお!、ても、第 1ステップでは本実施形態で用 いる 9種類の関数(PF1〜PF9)のうち力 ワード内関数 PF1〜PF4 (ワード内の計算 を行なう関数)の 1つを選び、第 2ステップではワード間関数 PF5〜PF8 (ブロック内 の複数のワード間に跨る計算を行なう関数)の 1つを選び、第 3ステップでは PF9を選 び、第 4ステップでは PF1〜PF4の 1つを選び、…という具合に、ステップごとに関数 選択の範囲が変わる。この処理も履歴メモリ 750がセレクタ 740に指示を出すことによ り行なう。なお、本実施形態で用いる 9種類の関数 (PF1〜PF9)については後で詳 しく説明する。
また、選択された関数 760は、ブロックサイズと同程度の大きさのパラメータを受け 取る。関数のパラメータには、実施形態 2〜4と同様、共有鍵 (数列)から生成した擬 似乱数列 PNを用いる。
[0071] 上述の jumpの効用は、次の通りである。 1ブロック =tワードとして、ワード間関数を 用いてワード間に跨る変換を行なう場合、あるワードの情報を他の全てのワードに早 く渡すためには、隣接する次のワードのみに情報を渡すのは、あるワードの情報が他 の全てのワードに達するのに t回の繰り返しが必要なため、最も効率的な方法ではな い。高速に変換するには 2ワードなど少ないワード間の計算の方がよぐ変換を行なう ごとに、最初は 1ワード隣り(間隔 1)、次は 2ワード隣り(間隔 2)、次は 4ワード隣り(間 隔 4)、…という具合にワードの間隔を倍倍にしていくのが最も効率的である。
ここで対象となる 2ワードを參で表すと、上記のワードの間隔とは、
參參 間隔 1の関係
參〇參 間隔 2の関係
參〇〇〇拳 間隔 4の関係
である。
このように、全ての自然数 tが log (t)桁の 2進数によって表されることにより、 log (t
2 2
)回の繰り返しによって、 0, 1, · ··, t—lの全ての距離のワードに対して情報を渡すこ とができる。すなわち、 JUMP処理はワード間関数が少ないワード間(本実施形態に おいては 2ワード間)の計算であっても、少ない繰り返し回数で十分な撹拌がされるよ うにするための処理である。
(5— 1.前提条件及び前処理)
(1) Wを 32bit= lワード符号なし整数の集合とする。
ここには、二項演算としてビットごとの EXOR, AND, OR,足し算,掛け算(modulo 2ί32))、単項演算として右シフト,左シフト,ビット反転が行える。これらは最近の CP Uの命令セットに通常入って!/、る演算である。
(2)ブロック bの集合 BLを、
BL=Wt
で定義する。ただし、 tは 4, 8,または 16とする。
(3)パラメータ pの集合 P ARAMを、
PARAM=Wt X {0, 1, 2, · ··, t/2}
で定義し、飛ばし値 jの集合 JUMPを
JUMP= { 1, 2, 4, 8, · ··, t/2}
で定義する。
(4)次の形の関数 (PEF)を 9種類 (PF1, . . . , PF9)用意する。これが図 7でいうと ころの関数 760に該当する。なお、 9種類の PEFの詳細は後で詳しく説明する。 PF : JUMP X PARAM X BL→BL.
これらの JUMP, PARAM, BLが図 7の関数 760への入力線 3本にそれぞれ対応 している。
ここで、 PFの逆関数
PF,: JUMP X PARAM X BL→BL.
も復号ィ匕のために構成しておく。ここで、
PF,(j, P, PF (j, P, b) ) =b
である必要があり、また高速に計算できるものが望ましい。
(5)本実施形態では、鍵情報 (共有鍵)は上述の他の実施形態と同様にメルセンヌッ イスター(MT)の処理に送られる。 MTを用いて乗法定数テーブル、加法定数テー ブルを作成する。乗法定数テーブル、加法定数テーブルについては後で詳しく説明 する。
なお、上記以外の前提条件及び前処理は、上述の実施形態 3の(3— 1.前処理) 〜(3— 3.グローバル変数)で説明した通りであり、あらかじめ Iteration (変換回数) と Log_Tuple (ブロック内のワード数の対数)を決めておく。
[0073] (5- 2.文書の暗号化)
次に、平文ブロックを暗号ィ匕する。ここでは、 1ブロック =4ワード、変換回数を 4回と して説明する。なお、本実施形態において、文書の暗号化は、 JUMP処理以外の部 分は実施形態 3と同様である。
今、与えられた平文ブロックはワード長変数 t個の配列
B : = (b , b , . . . , b )
0 1 {t- 1}
に格納されて 、るものとする。
本実施形態の一ラウンドは次のようになって 、る。
1)ラウンドの開始
2) PF 1〜PF4から 1つランダムに選んで、それを用 、て Bを書き換える
3) PF5〜PF8から 1つランダムに選んで、それを用いて Bを書き換える
4) PF9を用いて Bを書き換える
5)ラウンドの終了
上記を 4ラウンド行 、、 1ブロック分の暗号ィ匕ブロックを得る。
[0074] 具体的には、 1ブロックの暗号化は、次のようにして行われる。
(0) jump 1
(1) MTから 4ワードの擬似乱数を取得
(2)この 4ワードから 2ビットの擬似乱数を 8組生成し、 c , c , c , . . . , cとする(生
1 2 3 8 成方法にっ 、ては後で説明する)
(3) c =0, 1, 2, 3に従って、 PF1, PF2, PF3, PF4のうちの 1つ PF*を選択する
(4) MTから 4ワードの擬似乱数を取得し、これを Pとする
(5) PF* (jump, P, B)を用いて Bを書き換える。 jumpを 2倍し、 t以上になったら 1に する
(6) c =0, 1, 2, 3に従って、 PF5, PF6, PF7, PF8のうちの一つ PF*を選択する (7) MTから 4ワードの擬似乱数を取得、 Pとする
(8) PF* (jump, P, B)を用いて Bを書き換える。 jumpを 2倍し、 t以上になったら 1に する
(9) MTから 4ワードの擬似乱数を取得、 Pとする
(10) PF9 (jump, P, B)を用いて Bを書き換える。 jumpを 2倍し、 t以上になったら 1 にする
(3)〜(10)を 4回繰り返す。 2回目では c , cの代わりに c , cを使う。
1 2 3 4
3回目では c , c , 4回目では c , cをそれぞれ使う。なお、図 7でいうと、 jumpが履歴
5 6 7 8
メモリ 750に格納されている。
[0075] 次に、上述の(2)の c〜cの生成方法を説明する。
1 8
上記(1)で取得した 4ワードを func choice [0] , . . . , func choice [3]として、 次の変換を行う。
func― choice [2] = (func― choice [0] | 1) ;
func― choice [3] = (func― choice [1] | 1);
func― choice [0] = (func― choice [3] > > 5);
func― choice [1] = (func― choice [2」 > > 5);
ここで、 * =は左辺に右辺を掛けて左辺に代入する命令, は左辺に右辺と EXO Rをとつて、左辺に代入する命令, Iはビットごとの OR, > > 5は 5ビット右シフトを表 す。こうして、 func choice [0]の上位 2ビットが c ,次の 2ビットが c ,と順番にとって
― 0 1
いく。ラウンドの回数が 16より多いときには、例えば func— choice [l]の上位ビットか ら用いるようにする。
[0076] (5 - 3.文書の復号化)
本実施形態における文書の復号ィヒは、 JUMP処理以外の部分は実施形態 3と同 様である。
(1)復号に用いる JUMPの初期値を求める。
これは暗号ィ匕に用いる上述の 2つの定数、 Iteration (変換回数)と Log— Tuple ( ブロック内のワード数の対数)から、次の式で求める事が出来る。
JUMP = 1 < < ( (3 * Iteration- 1) %Log Tuple) ここで、%は剰余を求める演算であり、 1 くく は、 1を < <の右の回数だけ 2倍す るという意味である。
(2) JUMPの変化は、暗号化の逆にする。
すなわち、 1ブロック =4ワードの場合は、繰り返し毎に 4, 2, 1と半分にしていき、 1 の次は 4に戻る。
(3)このように JUMPが決定されれば、暗号ィ匕の時に使用した関数に対応する逆関 数を選択し、この JUMP値および暗号ィ匕時と同じパラメータを与えることができる。
[0077] (5-4.用意する関数)
本実施形態で用いる関数として、ブロック内のそれぞれのワードを主にワード内で 変換する関数として PFl, PF2, PF3, PF4の 4種類、ワード間の情報を混ぜるため の変換を行なう関数として PF5, PF6, PF7, PF8の 4種類、関数として 1種類、計 9 種類の関数を用意する。以降、これら 9種類の関数について順に説明する。なお、こ れらの PF1〜PF9の関数は一例であり、高速に処理できる他の演算を用意してもよ い。
[0078] (1) PF1〜PF4 (ワード内関数)
PF1〜PF4は、ブロック内のそれぞれのワードを主にワード内で変換するワード内 関数である。復号ィ匕にはそれぞれ関数の逆の処理を行なう逆関数 (ワード内逆関数) を用いる。
ブロックを b , b , · ··, b なる tワードとし、ノ ラメータを p , p , . . . , p なる tヮ
0 1 {t- 1} 0 " 1 {t- 1 } ードとする。まず、
b b EXOR p
j j j
なる代入を行う。 (j = 0, 1, · ··, t— 1)。つぎに、奇数定数をかける:
b b X c (mod 2ί32),以下 modはいつもついているが省略)(j = 0, 1, · ··, t— 1)。 j j j
cは、あら力じめ MTにより生成された奇数乱数のテーブル m , m , · ··, m より次 j 0 1 {31} の方法で選ばれる。 m , · ··, m はすべて奇数であるよう、最下位ビットを 1にしてあ
0 {31}
る。また、 c: =m であり、 kは の最上位 5ビットを 0〜31の整数と見たものであ
j M j (j + ell)
る。ここで、 ellの値は PFl, PF2, PF3, PF4のときそれぞれ 1, 2, 2, 3である。なお 、テーブルを用意したのは復号ィ匕の際に cの逆数 (modulo 2ί3 )を用いるからであ る。
本実施形態では、暗号ィ匕を行う前処理としてこの乗法定数テーブル m , ···, m
O {31} を MTにより作成し、その modulo 2ί3での乗法逆数のテーブルを作成して保存す る。さらに、ある加法定数テーブル add , ···, add も MTにより作成して保存する。
[0079] 次に、
b — b Dadd
{(j+ jump) mod t} { (j+ jump) mod t} { [bj > > (32—5)]}
なる代入を行なう。 j = 0, 1, 2, ···, t— 1を、この順序で計算する。これは、まず bの 上位 5ビットを見て、それに対応する addのテーブル (加法定数テーブル)の値と、 b ί]
(添え字は modulo tで見る)の値とを二項演算口を取って、その結果を b
+] ump} t]+]tunp に格納するということである。二項演算口は、 PF1, PF2, PF3, PF4のときにそれぞ れ + , EOR, +, EORである。
次に、以下のようにして 16〜23に値をとる擬似乱数 sを生成する。
s^((p >>(32-4))
] j I 0xl0)&0xl7
ここで、 &はビットごとの AND演算である。
sを用いて、 bに対して次の二つの変換のいずれかを行う。
b 〜 b)<< (32— s)) I (b >>s).
b^b EXOR ((〜sim b) >>s).
j j j j
上はローテート(ただし、左力もあふれた分はビット反転〜をとる)である。下は、ビッ ト反転したものを右に sシフトしたものを bに足すものである(シフトと呼ぶ)。 PF1, PF 2, PF3, PF4で、それぞれローテート、ローテート、シフト、シフトを選ぶ。
[0080] (2)PF5〜PF8(ワード間関数)
PF5〜PF8は、は、主にワード間(本実施形態においては 2ワード間)の情報を混 ぜるための変換を行なうワード間関数である。復号化にはそれぞれの関数の処理の 逆の操作を行なう逆関数 (ワード間逆関数)を用いる。
1)PF5
まず j = 0とし、
b + (b Xp)
j j {j-jump} j
を行なう。 s^((p >>(32-4)) I 0xl0)&0xl7
j j
により 16〜23に値をとる擬似乱数を生成し、
b^b EXOR ((〜sim b) >>s).
j j j j
を行う。これを j = 0, 1, 2, ···, t 1とこの順に繰り返す。
[0081] 2)PF6〜PF8
j = 0とする。
s (p>>(32— log (t)))
j 2
により、 sに pの上位 log (t)ビットを格納する。 s=jとなったときは、 sから 1を引く(mod
j 2
ulo tで計算する)。これにより、 sと jは異なる。ここで、
PF6では、
b^(b EXOR (b Xb))-p
j j {j-jump} s j
b b EXOR (b >>16)
j j j
なる代入を行う。添え字は modulo tで考える。
PF7, PF8では、
b (b EXOR (b X (b D-p));
j j {j-jump} s j
b^b EXOR (b >>c);
j j j
なる代入を行う。ここで、口は、 PF7の時にはビットごとの OR, PF8では EXORである 。また、 cは、 PF7のときには 16、 PF8のときには 17である。
[0082] (3)PF9
k=2(p +p )+1 mod 2l32)
0 {t-l}
としておいて、 jump oddを jump以下の最大の奇数とする。ブロック b , b , ···, b
― 0 1 (t において、 kのビットパターンで 1になっているところを、 jump oddとばしに巡回
-1} ―
置換する。すなわち、以下の置換を行う。
1) kのビットパターンで 1になっている部分に対応する bのビットを抽出し、保存して
0
おく。これは、 bと kのビットごと AND演算の結果を保存することと等しい。
0
2)次に、 bにおける上記のビットを、 b における対応するビットによって置換
0 {—jump— odd)
する。ここで、 bの添え字は modulo tで計算するものとする。
3)次に、 b における対応するビットを、 b に対応するビットによって置
{—jump— odd) {— 2jump_odd} 換する。このように、玉突き的に b における対応するビットを、
(―] X]ump_o }
b における対応するビットに置換する、という操作 =0, 1, … 一 1に
(- (j + 1) X jump— odd)
ついて行う。
4)最後に、 b における対応するビットを、保存しておいた bの対応する
{_ (.t+ 1) Xjump.odd} 0 ビットに置換する。
復号ィ匕には、上述の処理の逆の操作を行なう逆関数を用いる。
[0083] < 6.実施形態 6 >
実施形態 6は、実施形態 2〜5の各実施形態において、あらかじめ用意した数列( 共有鍵)から上述の cryptMT (実施形態 1)の方法で生成した暗号学的に安全な擬 似乱数列 SPNを、これらの実施形態で用いる擬似乱数列 PNとする手法である。この 手法では、暗号ィ匕に用いる関数の選択及び関数のパラメータに暗号学的に安全な 擬似乱数列を用いるため、より解読が困難な暗号ィ匕を行なうことができる。
図面の簡単な説明
[0084] [図 1]本実施形態の実施形態 1の擬似乱数発生システムを用いて文書の暗号化及び 復号ィ匕を行なう場合のシステム構成例を示す図である。
[図 2]本実施形態の実施形態 2, 3, 5の暗号ィ匕システム及び復号ィ匕システムのシステ ム構成例を示す図である。
[図 3]本実施形態の実施形態 4の擬似乱数発生システムを用いて文書の暗号化及び 復号ィ匕を行なう場合のシステム構成例を示す図である。
[図 4] (a)従来のストリームサイファの処理の流れを示す図である。 (b)従来のブロック サイファの処理の流れを示す図である。
[図 5]実施形態 1の擬似乱数発生システムの処理の流れを示す図である。
[図 6]実施形態 2, 3の暗号ィ匕システム及び実施形態 4の擬似乱数発生システムの処 理の流れを示す図である。
[図 7]実施形態 5の暗号ィ匕システムの処理の流れを示す図である。
[図 8]実施形態 1の擬似乱数発生システムにおいて、 4個のメモリを使用した場合の 応用例 1の処理の流れを示す図である。
[図 9]実施形態 1の擬似乱数発生システムにおいて、 4個のメモリを使用した場合の 応用例 2の処理の流れを示す図である。

Claims

請求の範囲
[1] あらかじめ与えられた数列力 暗号学的に安全な安全擬似乱数列を出力する擬似 乱数発生システムであって、
あらかじめ初期値を設定した、あらかじめ定めたビット数 (ワード)の記憶手段と、 前記数列から擬似乱数列を生成する擬似乱数生成手段と、
前記擬似乱数列から前記安全擬似乱数列を生成する安全擬似乱数生成手段と を備えており、
前記安全擬似乱数生成手段は、前記擬似乱数列をワードに切り出して最下位ビッ トを 1にし、前記記憶手段の値と前記切り出したワードとを 2のワード長乗を法として乗 算した結果を前記記憶手段に格納し、繰り返し乗算した結果のビット列の一部または 全体を前記安全擬似乱数として出力すること
を特徴とする擬似乱数発生システム。
[2] 請求項 1に記載の擬似乱数発生システムであって、
前記安全擬似乱数生成手段は、前記乗算した結果のビット列の上位ビットからあら 力じめ定めたビット数を前記安全擬似乱数列として出力すること
を特徴とする擬似乱数発生システム。
[3] あらかじめ与えられた数列力 暗号学的に安全な安全擬似乱数列を出力する擬似 乱数発生システムであって、
あらかじめ定めたビット数のワード単位に、複数種類の関数を実行する関数実行手 段と、
前記数列から擬似乱数列を生成する擬似乱数生成手段と、
前記関数実行手段の関数の種類を重複を許して選択する関数選択手段と を備えており、
前記関数選択手段は、前記生成された擬似乱数列の前記ワードごとに前記擬似乱 数列を用いて関数を選択し、
前記関数実行手段は、前記選択された関数で、前記擬似乱数列のワードを関数の パラメータとして用い、前記擬似乱数列を変換して、前記安全擬似乱数列を生成す ることを特徴とする擬似乱数発生システム。
[4] 請求項 1〜3のいずれかに記載の擬似乱数発生システムであって、 前記擬似乱数生成手段は、線形次状態関数を用いて擬似乱数を生成すること を特徴とする擬似乱数発生システム。
[5] 請求項 3又は 4に記載の擬似乱数発生システムであって、
前記関数選択手段及び前記関数実行手段は、前記ワードごとに、あらかじめ定め た回数選択 ·変換を繰り返して、前記ワードを前記安全擬似乱数列に変換すること を特徴とする擬似乱数発生システム。
[6] 請求項 3〜5の!、ずれかに記載の擬似乱数発生システムであって、
さらに、あらかじめ初期値を設定した、あらかじめ定めたビット数 (ワード)の記憶手 段
を備えており、
前記擬似乱数生成手段は、前記数列から擬似乱数列を生成した後に、該生成した 擬似乱数列をワードに切り出して最下位ビットを 1にし、前記記憶手段の値と前記切 り出したワードとを 2のワード長乗を法として乗算した結果を前記記憶手段に格納し、 繰り返し乗算した結果のビット列の一部または全体を前記擬似乱数列とすること を特徴とする擬似乱数発生システム。
[7] あら力じめ与えられた共有鍵で文書を暗号ィ匕する暗号ィ匕システムであって、
前記文書を記憶して!/、る文書記憶手段と、
複数種類の関数を実行する関数実行手段と、
前記共有鍵から拡張鍵を生成する拡張鍵生成手段と、
前記拡張鍵を用いて前記関数実行手段の関数の種類を重複を許して選択する関 数選択手段と
を備えており、
前記関数実行手段は、前記拡張鍵のビットデータを用いて前記選択された複数の 関数それぞれのパラメータを決定し、前記文書記憶手段からの文書をあらかじめ定 めたブロックサイズで、前記複数の関数で変換して暗号ィ匕すること
を特徴とする暗号化システム。
[8] あらカゝじめ与えられた共有鍵で暗号ィ匕文書を復号する復号ィ匕システムであって、 前記暗号化文書を記憶する暗号化文書記憶手段と、
暗号ィ匕に用いる複数種類の関数に対応する複数種類の逆関数を実行する逆関数 実行手段と、
前記共有鍵から拡張鍵を生成する拡張鍵生成手段と、
前記拡張鍵を用いて前記逆関数実行手段の逆関数の種類を重複を許して選択す る逆関数選択手段と
を備えており、
前記逆関数実行手段は、前記拡張鍵のビットデータを用いて前記選択された複数 の逆関数それぞれのパラメータを決定し、前記暗号化文書記憶手段からの暗号化文 書をあら力じめ定めたブロックサイズで、前記複数の逆関数で変換して復号すること を特徴とする復号化システム。
[9] あら力じめ与えられた共有鍵で文書を暗号ィ匕する暗号ィ匕システムであって、
前記文書を記憶して!/、る文書記憶手段と、
あらかじめ定めたビット数をワードとして、あら力じめ定めたワード数のブロック単位 に、複数種類の関数を実行する関数実行手段と、
前記共有鍵から擬似乱数列を生成する擬似乱数生成手段と、
前記関数実行手段の関数の種類を重複を許して選択する関数選択手段と を備えており、
前記関数選択手段は、前記文書記憶手段からの文書の前記ブロック単位ごとに、 前記擬似乱数により関数を順次選択し、
前記関数実行手段は、前記選択された関数で、前記擬似乱数列のブロックをパラ メータとして用いて、前記文書を変換して暗号化すること
を特徴とする暗号化システム。
[10] あらカゝじめ与えられた共有鍵で暗号ィ匕文書を復号する復号ィ匕システムであって、 前記暗号化文書を記憶する暗号化文書記憶手段と、
あらかじめ定めたビット数をワードとして、あら力じめ定めたワード数のブロック単位 に、暗号化に用いる複数種類の関数に対応する複数種類の逆関数を実行する逆関 数実行手段と、 前記共有鍵から擬似乱数列を生成する擬似乱数生成手段と、
前記逆関数実行手段の逆関数の種類を重複を許して選択する逆関数選択手段と を備えており、
前記逆関数選択手段は、前記暗号化文書記憶手段からの暗号化文書の前記プロ ック単位ごとに、前記擬似乱数により逆関数を選択し、
前記逆関数実行手段は、前記選択された逆関数で、前記擬似乱数列のブロックを パラメータとして用いて、前記暗号化文書を変換して復号すること
を特徴とする復号化システム。
[11] 請求項 7に記載の暗号ィ匕システムであって、
前記拡張鍵生成手段は、線形次状態関数を用いて擬似乱数を生成すること を特徴とする暗号化システム。
[12] 請求項 9に記載の暗号ィ匕システムであって、
前記擬似乱数生成手段は、線形次状態関数を用いて擬似乱数を生成すること を特徴とする暗号化システム。
[13] 請求項 9又は 12に記載の暗号ィ匕システムであって、
前記関数選択手段及び前記関数実行手段は、前記ブロックごとに、あらかじめ定 めた回数選択 ·変換を繰り返して、前記文書を暗号化すること
を特徴とする暗号化システム。
[14] 請求項 7, 9, 11〜13のいずれかに記載の暗号化システムであって、
さらに、あらかじめ初期値を設定した、あらかじめ定めたビット数 (ワード)の記憶手 段を備えており、
前記擬似乱数生成手段は、前記数列から擬似乱数列を生成した後に、該生成した 擬似乱数列をワードに切り出して最下位ビットを 1にし、前記記憶手段に前記切り出 したワードを 2のワード長乗を法として繰り返し乗算した結果のビット列の一部または 全体を前記擬似乱数列とすること
を特徴とする暗号化システム。
[15] 請求項 7, 9, 11〜14のいずれかに記載の暗号化システムであって、
前記関数実行手段は、複数ワードに対するワード間関数を含み、該ワード間関数 は、文書を暗号化するごとに、該複数ワードの間隔を変化すること
を特徴とする暗号化システム。
[16] 請求項 8に記載の復号ィ匕システムであって、
前記拡張鍵生成手段は、線形次状態関数を用いて擬似乱数を生成すること を特徴とする復号化システム。
[17] 請求項 10に記載の復号ィ匕システムであって、
前記擬似乱数生成手段は、線形次状態関数を用いて擬似乱数を生成すること を特徴とする復号化システム。
[18] 請求項 10又は 17に記載の復号ィ匕システムであって、
前記逆関数選択手段及び前記逆関数実行手段は、前記ブロックごとに、あらかじ め定めた回数選択 ·変換を繰り返して、前記暗号化文書を復号すること
を特徴とする復号化システム。
[19] 請求項 8, 10, 16〜18のいずれかに記載の復号化システムであって、
さらに、あらかじめ初期値を設定した、あらかじめ定めたビット数 (ワード)の記憶手 段を備えており、
前記擬似乱数生成手段は、前記数列から擬似乱数列を生成した後に、該生成した 擬似乱数列をワードに切り出して最下位ビットを 1にし、前記記憶手段に前記切り出 したワードを 2のワード長乗を法として繰り返し乗算した結果のビット列の一部または 全体を前記擬似乱数列とすること
を特徴とする復号化システム。
[20] 請求項 8, 10, 16〜19のいずれかに記載の復号化システムであって、
前記逆関数実行手段は、複数ワードに対するワード間逆関数を含み、該ワード間 逆関数は、暗号化文書を復号するごとに、該複数ワードの間隔を変化すること を特徴とする復号化システム。
[21] 請求項 1又は 2に記載の擬似乱数発生システムであって、
前記記憶手段を複数備えており、
前記安全擬似乱数生成手段は、前記擬似乱数列を前記記憶手段と同数のワード に切り出し、各記憶手段の値と各切り出したワードとの乗算を並列に行なって前記安 全擬似乱数を出力すること
を特徴とする擬似乱数発生システム。
[22] 請求項 21に記載の擬似乱数発生システムであって、
前記安全擬似乱数生成手段は、前記記憶手段の値と前記切り出したワードにっ 、 て乗算以外の演算も行な 、、前記演算には他の記憶手段の値も用いること を特徴とする擬似乱数発生システム。
[23] 請求項 1〜6, 21〜22のいずれかに記載の擬似乱数発生システムの機能をコンビ ユータ ·システムに構築させるプログラム。
[24] 請求項 7, 9, 11〜15のいずれかに記載の暗号ィ匕システムの機能をコンピュータ' システムに構築させるプログラム。
[25] 請求項 8, 10, 16〜20のいずれかに記載の復号ィ匕システムの機能をコンピュータ' システムに構築させるプログラム。
PCT/JP2006/309537 2005-05-13 2006-05-12 擬似乱数発生システム、暗号化システム及び復号化システム WO2006121149A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
DE112006001221T DE112006001221T5 (de) 2005-05-13 2006-05-12 Pseudozufallszahlenerzeugungssystem, Verschlüsselungssystem und Entschlüsselungssystem
US11/920,276 US8553880B2 (en) 2005-05-13 2006-05-12 Pseudorandom number generating system, encryption system, and decryption system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005141725A JP4774509B2 (ja) 2005-05-13 2005-05-13 擬似乱数発生システム
JP2005-141725 2005-05-13

Publications (1)

Publication Number Publication Date
WO2006121149A1 true WO2006121149A1 (ja) 2006-11-16

Family

ID=37396655

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/309537 WO2006121149A1 (ja) 2005-05-13 2006-05-12 擬似乱数発生システム、暗号化システム及び復号化システム

Country Status (4)

Country Link
US (1) US8553880B2 (ja)
JP (1) JP4774509B2 (ja)
DE (1) DE112006001221T5 (ja)
WO (1) WO2006121149A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008001918A1 (fr) * 2006-06-30 2008-01-03 Kiyoto Yui Dispositif de production de nombres aléatoires, dispositif de chiffrement/déchiffrement utilisant un tel dispositif, programme et support d'enregistrement de programme
JP2008286964A (ja) * 2007-05-17 2008-11-27 Kddi Corp ストリーム暗号の暗号化装置、復号化装置、暗号化方法、復号化方法およびプログラム
JP2011520391A (ja) * 2008-05-08 2011-07-14 ハリス コーポレイション 有限体アルゴリズムを使用したランダム数発生器を含む暗号化システム
JP2012514353A (ja) * 2008-12-29 2012-06-21 ノーテル・ネットワークス・リミテッド 通信チャネルでの暗号化の存在を隠すための帯域効率的な方法及びシステム

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8687800B2 (en) * 2006-08-15 2014-04-01 Alcatel Lucent Encryption method for message authentication
US8687802B2 (en) * 2009-03-30 2014-04-01 The Regents Of The University Of California Method and system for accelerating the deterministic enciphering of data in a small domain
US8923519B2 (en) * 2009-05-29 2014-12-30 Alcatel Lucent Method of efficient secure function evaluation using resettable tamper-resistant hardware tokens
US8971530B2 (en) * 2009-06-24 2015-03-03 Intel Corporation Cryptographic key generation using a stored input value and a stored count value
WO2011140368A1 (en) * 2010-05-05 2011-11-10 Eric Myron Smith Hybrid mode cryptographic method and system with message authentication
FR2963713A1 (fr) * 2010-08-04 2012-02-10 St Microelectronics Grenoble 2 Procede de chiffrement d'un flux de donnees
US20120284528A1 (en) * 2010-10-07 2012-11-08 Stephen Orovitz Multi-purpose multi-dimensional, variable and multi-key e-mail and data encryption method
EP4086891A1 (en) * 2010-10-21 2022-11-09 Acoustic 3d Holdings Limited Acoustic diffusion generator
US9778912B2 (en) * 2011-05-27 2017-10-03 Cassy Holdings Llc Stochastic processing of an information stream by a processing architecture generated by operation of non-deterministic data used to select data processing modules
JP2014240921A (ja) * 2013-06-12 2014-12-25 株式会社東芝 暗号装置、暗号処理方法及び暗号処理プログラム
US9363075B2 (en) 2013-10-18 2016-06-07 International Business Machines Corporation Polymorphic encryption key matrices
CA3054681A1 (en) 2017-02-03 2018-08-09 Fasetto, Inc. Systems and methods for data storage in keyed devices
CN107196760B (zh) * 2017-04-17 2020-04-14 徐智能 具有可调整性的伴随式随机重构密钥的序列加密方法
JP6834771B2 (ja) * 2017-05-19 2021-02-24 富士通株式会社 通信装置および通信方法
JP2021505938A (ja) * 2017-12-01 2021-02-18 ファセット・インコーポレーテッド データ暗号化を改善するシステムおよび方法
TWI705685B (zh) * 2019-02-01 2020-09-21 益力半導體股份有限公司 雙重網路加密系統

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10153954A (ja) * 1996-11-22 1998-06-09 Nippon Signal Co Ltd:The 暗号装置
JPH1124558A (ja) * 1997-06-30 1999-01-29 Nippon Telegr & Teleph Corp <Ntt> 暗号装置
JPH11149367A (ja) * 1997-11-19 1999-06-02 Sony Corp 乱数発生方法及び乱数発生方法を実行する為のプログラムが格納された記録媒体、乱数発生装置

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US53627A (en) * 1866-04-03 Improvement in stop-cocks
JPS54144148A (en) * 1978-05-01 1979-11-10 Aisuke Katayama Exponential conversion type high speed multiplying system
US4667301A (en) * 1983-06-13 1987-05-19 Control Data Corporation Generator for pseudo-random numbers
JP3053106B2 (ja) 1990-11-02 2000-06-19 株式会社日立製作所 暗号化処理装置、及び復号化処理装置
US5727063A (en) 1995-11-27 1998-03-10 Bell Communications Research, Inc. Pseudo-random generator
JPH1115940A (ja) 1997-06-19 1999-01-22 Toppan Printing Co Ltd 情報記録用カード
JPH11109859A (ja) * 1997-10-06 1999-04-23 Nec Corp 擬似乱数発生方法および装置
DE69826963T2 (de) * 1997-11-04 2005-11-17 Nippon Telegraph And Telephone Corp. Gerät für die modulare Inversion zur Sicherung von Information
US6285761B1 (en) * 1998-03-04 2001-09-04 Lucent Technologies, Inc. Method for generating pseudo-random numbers
JPH11265146A (ja) 1998-03-16 1999-09-28 Matsushita Electric Ind Co Ltd 認証子生成方法及び認証子生成装置
US6804354B1 (en) 1999-12-02 2004-10-12 Honeywell International Inc. Cryptographic isolator using multiplication
JP4640663B2 (ja) * 2000-06-30 2011-03-02 ネッツエスアイ東洋株式会社 秘密情報生成装置及び方法
WO2002037260A1 (fr) * 2000-10-24 2002-05-10 Hmi Co., Ltd. Generateur de nombres aleatoires
JP3724399B2 (ja) 2001-01-23 2005-12-07 株式会社日立製作所 疑似乱数生成装置またはそれを用いた暗号復号処理装置
JP2003084668A (ja) * 2001-09-12 2003-03-19 Sony Corp 乱数生成装置、乱数生成方法及び乱数生成プログラム
JP2004158899A (ja) * 2002-06-24 2004-06-03 Sony Corp データシーケンスの暗号化または復号化のためのデータ処理方法、およびデータ処理装置
JP4629300B2 (ja) 2002-07-05 2011-02-09 富士通株式会社 暗号学的擬似乱数発生装置及びプログラム
US7085791B2 (en) * 2003-02-14 2006-08-01 Lucent Technologies Inc. Method and apparatus for generating a pseudo random number
US7379955B1 (en) * 2004-03-16 2008-05-27 The United States Of America As Represented By The Director, National Security Agency Device for and method of generating pseudo-random sequence uniformly distributed over any range

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10153954A (ja) * 1996-11-22 1998-06-09 Nippon Signal Co Ltd:The 暗号装置
JPH1124558A (ja) * 1997-06-30 1999-01-29 Nippon Telegr & Teleph Corp <Ntt> 暗号装置
JPH11149367A (ja) * 1997-11-19 1999-06-02 Sony Corp 乱数発生方法及び乱数発生方法を実行する為のプログラムが格納された記録媒体、乱数発生装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TAKAYASU H. ET AL.: "Stable Infinite Variance Fluctuations in Randomly Amplified Langevin Systems", PHYSICAL REVIEW LETTERS, vol. 79, no. 6, 11 August 1997 (1997-08-11), pages 966 - 969, XP003002149 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008001918A1 (fr) * 2006-06-30 2008-01-03 Kiyoto Yui Dispositif de production de nombres aléatoires, dispositif de chiffrement/déchiffrement utilisant un tel dispositif, programme et support d'enregistrement de programme
JP2008286964A (ja) * 2007-05-17 2008-11-27 Kddi Corp ストリーム暗号の暗号化装置、復号化装置、暗号化方法、復号化方法およびプログラム
JP2011520391A (ja) * 2008-05-08 2011-07-14 ハリス コーポレイション 有限体アルゴリズムを使用したランダム数発生器を含む暗号化システム
JP2012514353A (ja) * 2008-12-29 2012-06-21 ノーテル・ネットワークス・リミテッド 通信チャネルでの暗号化の存在を隠すための帯域効率的な方法及びシステム

Also Published As

Publication number Publication date
US20090296928A1 (en) 2009-12-03
JP2006317802A (ja) 2006-11-24
JP4774509B2 (ja) 2011-09-14
DE112006001221T5 (de) 2008-03-27
US8553880B2 (en) 2013-10-08

Similar Documents

Publication Publication Date Title
WO2006121149A1 (ja) 擬似乱数発生システム、暗号化システム及び復号化システム
JP5822970B2 (ja) 擬似ランダム生成、データ暗号化、およびメッセージ暗号化ハッシングのための暗号化デバイス
EP1583278B1 (en) Stream Cipher Design with Revolving Buffers
US20040028224A1 (en) Cyphering/decyphering performed by an integrated circuit
CA2335143A1 (en) Enhanced block ciphers with data-dependent rotations
KR20110004474A (ko) 갈루아 폐체 암호 시스템
JP2006527865A (ja) ラインドールブロック暗号化装置、及びその暗号化並びに復号化方法
EP3371928A1 (en) Key sequence generation for cryptographic operations
WO2000001111A1 (en) Secure data encoder and decoder
WO2013187887A1 (en) A method of cryption
JP5207153B2 (ja) 擬似乱数発生システム
JP6187624B1 (ja) 情報処理装置、情報処理方法及びプログラム
CN107493164B (zh) 一种基于混沌系统的des加密方法和系统
JP5268011B2 (ja) 暗号化システム及び復号化システム
KR20020087331A (ko) 부분 라운드간 파이프라인 기법을 이용한 AES Rijndael암호 및 복호 회로
JP5268010B2 (ja) 暗号化システム及び復号化システム
KR20060014420A (ko) 암호화/암호 해독용 장치, 메모리 요구량 감소 방법 및컴퓨터 프로그램 제품
JP4990843B2 (ja) 暗号演算装置、その方法、及びプログラム
KR200279546Y1 (ko) 문서 암/복호화장치
KR100406724B1 (ko) 모듈러 엔에 대한 곱셈의 역원 연산기 및 그를 포함하는데이터 암호화 장치
JP2003500681A (ja) 暗号テキストの分散性を高めるためにデータアレイに基数変換、論理演算及び疑似乱数ジェネレータを用いる暗号化エンジン
Abdel-Gawad et al. 2D encryption mode
KR20230138459A (ko) 동형 암호 방법 및 관련 디바이스 및 시스템
CN117318986A (zh) 一种基于多重加密的数据传输方法及系统
JP5818768B2 (ja) マスク生成装置、情報処理装置、及びその方法、プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
DPE1 Request for preliminary examination filed after expiration of 19th month from priority date (pct application filed from 20040101)
WWE Wipo information: entry into national phase

Ref document number: 1120060012215

Country of ref document: DE

NENP Non-entry into the national phase

Ref country code: RU

RET De translation (de og part 6b)

Ref document number: 112006001221

Country of ref document: DE

Date of ref document: 20080327

Kind code of ref document: P

122 Ep: pct application non-entry in european phase

Ref document number: 06746334

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 11920276

Country of ref document: US