WO2008010441A1 - dispositif de cryptage, programme et procédé - Google Patents

dispositif de cryptage, programme et procédé Download PDF

Info

Publication number
WO2008010441A1
WO2008010441A1 PCT/JP2007/063797 JP2007063797W WO2008010441A1 WO 2008010441 A1 WO2008010441 A1 WO 2008010441A1 JP 2007063797 W JP2007063797 W JP 2007063797W WO 2008010441 A1 WO2008010441 A1 WO 2008010441A1
Authority
WO
WIPO (PCT)
Prior art keywords
internal
variable
array
pseudo
value
Prior art date
Application number
PCT/JP2007/063797
Other languages
English (en)
French (fr)
Inventor
Yukiyasu Tsunoo
Teruo Saito
Hiroyasu Kubo
Tomoyasu Suzaki
Original Assignee
Nec Corporation
Nec Software Hokuriku, Ltd.
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 Nec Corporation, Nec Software Hokuriku, Ltd. filed Critical Nec Corporation
Priority to US12/374,397 priority Critical patent/US8374351B2/en
Priority to CA2658476A priority patent/CA2658476C/en
Priority to CN2007800277332A priority patent/CN101496342B/zh
Priority to EP07790601.4A priority patent/EP2048811A4/en
Priority to JP2008525838A priority patent/JPWO2008010441A1/ja
Publication of WO2008010441A1 publication Critical patent/WO2008010441A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/582Pseudo-random number generators
    • 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
    • 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
    • H04L9/0668Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator producing a non-linear pseudorandom sequence
    • 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/12Transmitting and receiving encryption devices synchronised or initially set up in a particular manner

Definitions

  • the present invention relates to an encryption apparatus, a computer program and a method for concealing data during data communication and storage.
  • a typical stream cipher includes a key stream generation unit that generates a key stream, and a combination unit that combines the key stream and plaintext.
  • a pseudorandom number is generated using a secret key as a seed (key stream generation unit), and the pseudorandom number and plaintext are XORed (combining unit) to generate a ciphertext.
  • XOR means bitwise exclusive OR.
  • Stream ciphers are often implemented with simple processing such as XOR at the coupling part. Therefore, the security of stream ciphers depends on the security of pseudorandom numbers generated by the key stream generator.
  • the ability to obtain plaintext P can be achieved.
  • Distinguisher a means for indicating such a bias or characteristic
  • distinguisher a means for indicating such a bias or characteristic
  • distinguisher the discovery or creation of a means for indicating such a bias or characteristic constitutes “Distingui sher. " If the Distinguisher can be configured, the Distinguishing Attack It will be applied.
  • RC4 is a No. method developed by Ron Rivest, RFC2246 (TLS), WEP,
  • RC4 has the feature that the processing unit n bits are variable, increasing the processing unit n requires 2n of memory, and the key schedule is extremely slow.
  • n is more than 8 bits, and few are more than 32 bits.
  • RC4 has the power to implement the latest processor size such as 32bit / 64bit processors.
  • This distinguisher makes it possible to distinguish from a true random number sequence with a data amount of about 2130 ⁇ .
  • FIG. 2 is a diagram showing an improved RC4 algorithm (32-bit RC4) proposed by G. Gong et al.
  • the RC4 stream code proposed by G. Gong et al. Has 2 ⁇ entries in the self-sequence S, and the entry size of the self-sequence S is a bit.
  • the RC4 stream No. GGHN (n, m) proposed by G. Gong et al. Has two processing powers, KSA (K, S) and PRGA (S). Composed.
  • KSA K, S
  • K initial setting
  • PRGA is a process for generating a key stream, and generates a pseudo-random number every time based on the state S.
  • + represents arithmetic addition on mod N or mod M
  • N 2 ′ ⁇ 8 ⁇
  • M 2 ′ ⁇ 32 ⁇ .
  • L represents the number of bytes of the secret key.
  • KSA K, S
  • PRGA PRGA
  • the value S [l] at address 1 is A and the value S [A] at address A is B
  • the value S [A + B] at address A + B is kO + ⁇ + ⁇ .
  • address 1 value S [l] is A
  • address A value S [A] is B
  • address 2 value S [2] is C
  • address A + C value S [A + C] Is D
  • address C + D value S [C + D] force S k0 + B + C + D.
  • the size of the internal memory is four times that of RC4, and the S entry is updated by arithmetic addition, so it has been reported that the security against attacks seeking internal memory is also improved.
  • Non-Patent Document 1 G. Gong, .C. Gupta, M. Hell, and Y. Nawaz, "Towards a General R C4_Like Keystream Generator," S LOIS Conference on Information Security and Cryptology, CISC 2005, LNCS 3822, pp.162-174, Springer Verlag, 2005.
  • Non-Patent Document 2 L Mantin, and A. Shamir: "A Practical Attack on Broadcast RC4, ⁇ Fas t Software Encryption, FSE 2001, LNCS 2355, pp.152-164, Springer-Verlag, 2001
  • Non-Patent Document 3 S. Paul, B. Preneel, and G. Sekar: "Distinguishing Attacks on the Str eam Cipher Py,” e STREAM, the ECRYPT Stream Cipher Project, Report 2005/081, 2005.
  • represents arithmetic multiplication.
  • Xokuku n represents the left n-bit rotation of data X.
  • Lsb (X) is the least significant bit of data X
  • LSB (X) is the least significant byte of data X
  • lsb (X) X mod 2
  • Figure 5 shows that in the self-train S, the value S [l] at address 1 is A and the value S [A] at address A should be kO + A is 0, which is contradictory. Yes.
  • FIG. 6 in array S, the value S [l] at address 1 is A, the value S [A] at address A 3 ⁇ 40 + A, the value S [A + C] at address A + C is 2-C, It is shown that the values S [2] of address 2 should be kO + 2, resulting in forces S and C, which are contradictory.
  • LSB (02) LSB (kO + 2-Sl [l]) ⁇ ⁇ ⁇ (5)
  • Equation (4) The probability of establishment of Equation (4) depends on the structure of PRGA and does not depend on the structure of KSA. Yes.
  • the probabilities pl and p2 for satisfying conditions 1 and 2 of cases 1 and 2 are as follows.
  • the probability p2 that condition 2 is satisfied is the probability considering cases 1 and 2.
  • Event e in this decryption is an event that satisfies Equation (4), and the distribution of event e in the random number can be regarded as X, and the distribution of event e in the output sequence of GGHN (8, 32) can be regarded as Y. Yes
  • the amount of data obtained here is the value under the assumption that the KSA of GGHN (8,32) is completely random permutation and! /, And the theoretical data obtained from the structural bias of PRGA. Amount.
  • GGHN (8, 32) can be distinguished from a true random number sequence by using the first two keys of the key stream in a secret key of about 2 " ⁇ 30 ⁇ theoretically. is there.
  • Figure 9 shows the amount of data required for decryption (theoretical value), and the amount of data required for decryption when the S-box entries are assumed to be uniformly random and output equal by the initial processing. It is a figure explaining the flow which calculates
  • the S-box entries are uniformly random and output evenly by the initial processing. This means that all 256 possible values of S can appear at the time of attack.
  • Equation (4) is a distinguisher, it is possible to distinguish between the output sequence of GGHN (8, 32) and the true random number sequence.
  • Figures 10 and 11 summarize the results of the experiment.
  • Figure 10 shows the probabilities obtained by computer experiments and the amount of data required for decoding.
  • Fig. 11 shows the results of confirming whether the distinguisher in Fig. 8 works by changing the amount of data N to be given by computer experiments.
  • Equation (4) When Equation (4) is used as a distinguisher, as shown in Fig. 9, we confirmed whether the output sequence of GGHN (8, 32) and the true random number sequence can be distinguished.
  • the experimental procedure is as follows.
  • the key stream can be distinguished from the true random number sequence with a high probability, and there is a problem that the security is low.
  • the present invention was created based on recognition of the above-mentioned problems by the present inventors and the like, and its purpose is to provide a highly secure encryption device, program, and method for concealing data. It is in.
  • the present invention provides a measure with tolerance to the analysis technique that has been the subject.
  • consideration is given to the implementation of countermeasures, so as not to compromise the security and implementability claimed by cryptographic designers.
  • An encryption device is an encryption device that generates a pseudo-random number sequence based on a secret key and generates a ciphertext by applying the pseudo-random number sequence to plaintext. Then, as an internal state used for generating the pseudo-random number sequence, an internal state based on a state based on rearrangement of a finite number of numerical sequences is used, and at least one temporary variable used for generating the pseudo-random number sequence Based on the result of the force S, one of the internal states, or a combination of numerical values, linear or non-linear, linear and non-linear, depending on a number smaller than the number of internal states, It is a temporary variable whose value is a predetermined result of executing the left or right rotation shift, and the generated pseudo-random number is used as one or more numerical values of the internal state and the temporary variable.
  • the internal state is based on a state based on the rearrangement of the finite number of numerical columns, and the update of the internal state is performed by a linear operation other than the rearrangement and a non-linear state. You can do it using shape arithmetic.
  • an internal state based on a state based on the rearrangement of the finite number of numerical columns, and the update of the internal state includes a linear operation and a non-linear operation other than the rearrangement.
  • the number of states of the internal state may increase monotonously.
  • the number of states in the internal state may be monotonously decreased.
  • the internal state is based on a state based on the rearrangement of the finite number of numerical columns, and the internal state is updated by performing a linear operation and a non-linear operation other than the rearrangement.
  • the number of states in the internal state may be vibrated.
  • the internal state may be updated every time the pseudo random number sequence is output. Or you may make it carry out more than the output of the said pseudorandom number sequence. Alternatively, it may be performed less than the output of the pseudo random number sequence.
  • the direction and / or numerical value (shift number) of the rotate shift may be dynamically changed depending on the numerical value of the internal state.
  • the direction and numerical value (shift number) of the rotate shift may be changed in accordance with a predetermined table value.
  • the apparatus creates the initial state of array S by stirring the elements of array S by repeating the rearrangement and arithmetic addition of the elements of array S.
  • the first processing unit (KSA) that determines the initial value of k from the elements of array S, and the addition result of element S [j] of array S and internal variable k with respect to the first and second index variables i and j
  • the value of the internal variable k is updated with the rotated value, and the reference result S [((S [i] + S [j]))] of the arrangement S with S [i] + S [j] and the internal variable k
  • the key stream is output, and the element S [(S [i] + S [j])] of the array S referenced to generate the key stream is set to the internal variable immediately after the key stream output.
  • PRGA second processing unit
  • the apparatus creates an initial state of the array S by stirring the elements of the array S by repeating the rearrangement and arithmetic addition of the elements of the array S.
  • the first processing unit (KSA) that determines the initial value of k from the elements of array S, and the first index variable i Based on the result of arithmetic addition of the array element S [i] with the first shift number rotated and the second index variable j, the value of the second index variable j is updated and the second index variable j is updated. Arithmetic between the value obtained by rotating the array element S [j] of the variable j by the second shift number and the internal variable k.
  • the value of the internal variable k is updated, and the distribution by S [i] + S [j] Based on the result of arithmetic addition of the value obtained by rotating the element S [(S [i] + S [j])] by the third shift number and the internal variable k, a key stream is output, and the key stream is Second process of updating the array element S [(S [i] + S [j])] referenced for generation using the internal variable k and array element S [i] immediately after the key stream output Part (PRGA).
  • the S entry referred to may be configured to include a second processing unit (PRGA) that updates the internal variable k immediately after outputting the key stream.
  • the first processing unit (KSA) and the second processing unit (PRGA) may be implemented as a computer program (software).
  • an internal state based on a state based on rearrangement of a finite number of numerical sequences is used as the internal state used for generating the pseudo-random number sequence, and the pseudo-random number sequence is used.
  • At least one of the temporary variables used to generate the internal state is based on the result of linear or non-linear, a combination of linear and non-linear using one of the internal states or a plurality of numerical values.
  • a temporary variable whose value is a predetermined result of left or right rotate shift depending on a number smaller than the number of the pseudo-random number, and the pseudo-random number is a numerical value of one or more of the internal states. And a predetermined calculation with the temporary variable.
  • a method including each procedure of the first processing unit (KSA) and the second processing unit (PRGA) is provided.
  • the present invention can provide a highly secure encryption device for concealing data during data communication or storage.
  • FIG. 1 is a block diagram showing an embodiment of the present invention.
  • FIG. 2 A diagram showing an improved RC4 algorithm proposed in 32bit RC4 (CISC 2005).
  • FIG. 3 is a diagram showing a state transition (1) of PRGA.
  • FIG. 4 is a diagram showing state transition (2) of PRGA.
  • FIG. 5 is a diagram showing an analysis (1) of PRGA.
  • FIG. 6 shows a PRGA analysis (3).
  • FIG. 7 shows an analysis of PRGA.
  • FIG. 8 is a diagram showing an analysis ( 4 ) of PRGA.
  • FIG. 9 is a diagram showing the amount of data (theoretical value) required for decoding.
  • FIG. 10 is a diagram showing the amount of data (experimental value) necessary for decoding.
  • FIG. 11 is a diagram showing experimental results (distinguisher).
  • FIG. 12 A diagram showing an algorithm of stream No. shown by G. Gong et al.
  • FIG. 13 is a diagram showing a change algorithm of the present invention.
  • FIG. 14 is a diagram showing a specific example 1 of a problem to be solved.
  • FIG. 15 is a diagram showing a specific example 2 of a problem to be solved.
  • FIG.16 This is a diagram showing the measure (1).
  • FIG.17 This is a diagram showing the measure (2).
  • FIG. 13 is a diagram for explaining a modified algorithm of the present invention.
  • FIG. 13 shows the parts to be changed in the original algorithm in the present invention.
  • the number of rotations is n bits when GGHN (n, m) is used.
  • FIG. 12 shows the original algorithm as a comparative example of FIG.
  • the n-bit left rotate process has a small speed degradation. I think.
  • Fig. 16 shows an example of countermeasures by changing KSA (K, S) according to the present invention.
  • the variable k is updated with the arithmetic addition of the left 8xr bit rotation of a [i] and the variable k.
  • S [i] is updated with the operation result (exclusive OR operation) of S [i] and a [i] left 8x (3-r) bit rotated.
  • the countermeasure means of FIG. 16 corresponds to dynamically changing the direction and / or the number of shifts depending on the value of the internal state.
  • the direction of the rotate shift and the number of shifts may be changed according to a predetermined table value.
  • Fig. 17 shows another example of countermeasures by changing PRGA (S).
  • the value of j is updated with the result of arithmetic addition of S [i] right 24 bits rotated (S [i] >>> 24) and j, and S [j] 16 bits rotated right (S [j] >> ⁇ Update the value of k with the result of the arithmetic addition of 16) and k, and the arithmetic of k with the right 8-bit rotation of S [(S [i] + S [j]) mod N]
  • the addition result is out.
  • is determined according to the value of X.
  • the internal state is based on a state based on the rearrangement of the finite number of numerical columns, and the update of the internal state is performed by a linear operation other than the rearrangement, and You may make it perform using a nonlinear calculation.
  • the internal state is based on a state based on the rearrangement of the finite number of numerical columns, and the internal state is updated by performing linear operations and nonlinear operations other than the rearrangement of the columns.
  • the number of states of the internal state may be monotonously increased.
  • the number of states in the internal state may be monotonously decreased by using a linear operation and a nonlinear operation other than the rearrangement of columns as the update of the internal state.
  • the internal state is based on the state based on the rearrangement of the finite number of numerical columns, and the internal state is updated by performing a linear operation and a non-linear operation other than the rearrangement. By using it, the number of states in the internal state may be vibrated.
  • the internal state may be updated every time the pseudo-random number sequence is output. Or you may make it carry out more than the output of the said pseudorandom number sequence. Alternatively, it may be performed less than the output of the pseudo random number sequence. This will be described below with reference to examples.
  • FIG. 1 is a diagram for explaining an embodiment of the present invention.
  • 14 and 15 are block diagrams showing specific examples 1 and 2 of the problem to be solved by the present invention as a comparative example.
  • Fig. 1 in the processing of ⁇ > n, left rotation processing (k + S [j]) is performed on k (0), and k (l) is obtained. (S [(S [i] + S [j]) mod N] + k (l)) mod M is out (l).
  • Fig. 14 shows, as specific example 1 of the problem to be solved by the present invention, Fig. 5 to Fig.
  • the index i becomes 1 (see 1 output from the box at the tip of the arrow of j (0)).
  • the box that surrounds S with a square is an S-box. For example, if an index (for example, 1) is input and S [l] is A, the box will output A. Is done.
  • variable k (lower 8 bits)
  • FIG. 15 is a diagram showing a specific example 2 of the problem to be solved by the present invention as a comparative example of FIG. 1.
  • FIG. 11 is a diagram showing a process of processing to the state transition of the least significant byte of the serving IJS. The state change is indicated by an S box and is not shown in the figure.
  • index i is 1.
  • Address i value S [i] (lower 8 bits) is C and address j value SQ] (lower 8 bits) is 2—C, so the address needed to generate output 02 Is
  • index i is 1 at time 1 as in FIG.
  • the value of address i, S [i] (lower 8 bits) is A, and index j is the lower 8 bits of A.
  • Roln represents Rotate-Left-Shift by n_bit.
  • Address i value S [i] (lower 8 bits) is A and address j value S [j] is B (lower 8 bits are 0), so it is needed to generate output Ol
  • the address is
  • Address j value] (lower 8 bits) is A, and the value of variable k is
  • index i is 2.
  • the encryption device includes, for example, a CPU of a server device, a storage device, a network, and the like.
  • the secret key information is stored in the storage device of the server device.
  • the rotate shift calculation is performed by the CPU ALU (arithmetic unit).

Description

明 細 書
暗号装置及びプログラムと方法
技術分野
[0001] [関連出願の記載]
本発明は、 日本国特許出願:特願 2006— 199681号(平成 18年 7月 21日出願) の優先権主張に基づくものであり、同出願の全記載内容は引用をもって本書に組み 込み記載されてレ、るものとする。
本発明は、データの通信や蓄積の際にデータを秘匿するための暗号装置及びコン ピュータ 'プログラムと方法に関する。
背景技術
[0002] <ストリーム喑号概説〉
データを秘匿するための手法に暗号がある。暗号の中で、高速な暗号化及び復号 を行うために、平文をビット単位あるいはバイト単位などで逐次、暗号化するストリーム 暗号がある。典型的なストリーム暗号は、鍵ストリームを生成する鍵ストリーム生成部と 、鍵ストリームと平文を結合する結合部と、力 なる。例えば、暗号処理では、秘密鍵 をシードとして擬似乱数を生成し (鍵ストリーム生成部)、その擬似乱数と平文を XORし (結合部)、暗号文を生成する。ここで、 XORはビット毎の排他的論理和を意味する。
[0003] 平文を P、擬似乱数を R、暗号文を Cとすると、
P XOR R = C
の関係となる。
[0004] 復号処理では、同じシードから擬似乱数を生成して暗号文と XORすることで、平文 を得ること力 Sでさる。
[0005] C XOR R = (P XOR R) XOR R
= P XOR (R XOR R)
= P XOR 0
= P
の関係となり、 C XOR R = P
が得られる。
[0006] <ストリーム喑号の安全性〉
ストリーム暗号は、結合部が XORなど簡単な処理で実現されることが多い。そのた めストリーム暗号の安全性は、鍵ストリーム生成部が生成する擬似乱数の安全性に依 存する。
[0007] ここで!/、う、擬似乱数の安全性は、観測済みの擬似乱数列から、今後発生する擬 似乱数列が予測できなレ、ことに依存して!/、る。
[0008] 例えば、鍵ストリーム生成部力 a, b, c, a, b, c, ...のように繰り返す鍵ストリームを 生成したならば、観測済みの擬似乱数から、今後発生する擬似乱数の予測がつくた めに、暗号文が解読されてしまう。それは、結合部の逆演算を実行できるからである。
[0009] すなわち、擬似乱数 Rの予測がつけば、暗号文 Cを観測して、
C XOR R = P
により、平文 Pを得ること力 Sできる。
[0010] 前述のように考えると、鍵ストリーム生成部が生成する擬似乱数が予測不可能な乱 数 (真の乱数)を生成するならば、そのストリーム暗号は安全であるといえる。逆にい えば、鍵ストリーム生成部が生成する擬似乱数が真の乱数と区別できるような情報を 見つけることができれば、そのストリーム喑号は何がしかの安全性が低下していると考 えることが出来る。
[0011] <ストリーム喑号の安全性評価手法の一例〉
前述ような考え方に基づいて、ストリーム暗号の安全性を評価する手法がある。出 力された暗号文や擬似乱数列が、真の乱数列と区別がつくことを示す暗号の攻撃手 法を、「Distinguishing Attackjとよふ。
[0012] 真の乱数との区別は、出力された暗号文や擬似乱数列が、何がしかの偏りや、特 徴を持ってレ、ること力 S示せれば、区別できたと判断する。
[0013] Distinguishing Attackでは、このような偏りや特徴を示す手段を、「Distinguisher」と 呼び、このような偏りや特徴を示す手段を発見したり作成したりすることを、「Distingui sherを構成する」と言う。 Distinguisherが構成できるならば、 Distinguishing Attackカ 適用でさることになる。
[0014] ある喑号に対して、 Distinguishing Attackが適用できるならば、その喑号は平文また は鍵の情報を漏らしている可能性があるので、安全な暗号であると保証することが出 来ない。
[0015] 従って、 Distinguishing Attackが適用できる喑号に修正を加え、 Distinguishing Atta ckが適用出来なくなれば、暗号の安全性が向上したと考えることが出来る。
[0016] <ストリーム喑号の具体例〉
RC4は、 Ron Rivest氏によって開発された喑号方式であり、 RFC2246(TLS), WEP,
WPAなど喑号標準としてよく利用されるストリーム喑号である。 RC4の仕様は、 RFC22
46(TLS)などで公開されて!/、ると言ってよ!/、。
[0017] RC4は、処理単位 nビットが可変という特徴を持ちながらも、処理単位 nを大きくする とメモリが 2n必要となり、鍵スケジュールも極端に低速になる。
[0018] そのため、現実的に、 nは 8ビットを越える実装は少なぐ 32ビットを越える実装は不 可能であった。
[0019] よって、 RC4は、 32bit/64bitプロセッサといった最近のプロセッサ ·サイズに適した実 装が出来な力 た。
[0020] 32ビット RC4ではこれらの制限が生じないよう、 32bit/64bitプロセッサで高速かつ小 メモリで実装可能なアルゴリズムに改良された。 2005年に G. Gongらが発表した論文( 非特許文献 1)である。
[0021] 非特許文献 1の論文では、処理単位が 32bitの場合、速度は、 RC4の約 3.1倍高速、 メモリは RC4の約 2"{-22}倍に抑えることに成功している。
[0022] また、内部変数 kを追加することにより、過去に報告された RC4の脆弱性(統計的な 偏り)が生じなレ、アルゴリズムに改良されて!/、る。
[0023] <発明が対象とする攻撃手法の要点〉
G. Gongらのアルゴリズムの場合、連続する出力の最下位ビットが必ず一致するとい う distinguisherの構成が可能となる。
[0024] この distinguisherにより、約 2130}のデータ量で真の乱数系列と区別可能となる。
[0025] <攻撃手法の例示のための、 G. Gongら提案した改良アルゴリズムの説明〉 図 2は、非特許文献 1において、 G. Gongらによって提案された RC4の改良アルゴリ ズム(32bit RC4)を示す図である。 G. Gongらによって提案された RC4型ストリーム喑 号は、酉己列 Sのエントリ数が 2 }個、酉己列 Sのエントリサイズカ¾ビットである。
[0026] また、非特許文献 1の提案では、 n=8, m=32のモデルについてのみ KSAの初期定数 aiを定義しているので、本明細書における解析でも、 n=8, m=32のモデルについて、 詳しく解析を行う。以下では、基本処理単位 n, mを元に便宜上 GGHN(n,m)と記述す
[0027] 図 2に示されるように、 G. Gongらによって提案された RC4型ストリーム喑号 GGHN(n, m)は、 KSA(K,S)と PRGA(S)の二つの処理力、ら構成される。
[0028] KSA(K,S)は、いわゆる初期設定であり、 40ビットから 256ビットの鍵 Kを基にして、 3
2ビット 256個の配列を並べ替え、初期状態 Sを作り出す処理を行う。
[0029] PRGA(S)は、鍵スト一リームを生成する処理であり、状態 Sに基づいて毎時刻、擬似 乱数を生成する。
[0030] ここで、 +は mod N上または mod M上の算術加算を表し、 N=2'{8}、 M=2'{32}である。
また Lは秘密鍵のバイト数を表している。
[0031] まず、 KSA(K,S)の動作を説明する。
[0032] KSAでは、酉己列 Sの初期値として、初期変数 aiを代入し(S[i]=a.)、 Sエントリどうしの sw & \«¾) [5 [1],5 ]] )と算術加算(5[ = 5[ + 5 mod M)を繰り返すことで、 Sエントリ を攪拌している。
[0033] KSAにおいて、内部変数 kも Sエントリ(k = k+ S[i] mod M)を使って初期化されるた め、 PRGAにおける kの初期値は未知である。
[0034] Sエントリの攪拌において、ループ回数 rが可変であるが、 Sエントリの出現確率がラ ンダムになるように、 m=32のとき r=20を選択するよう定められている。 G. Gongらによる 提案では、 m=64のときは、 r=40を設定するよう定められている。
[0035] KSA(K,S)が終了した直後で PRGA(S)が開始されていない状態を時刻 t = 0とする。
時刻 t = 0のとき、 KSA(K,S)の動作が終了し、秘密鍵 Kによって配歹 IJSの状態が十分 攪拌されてレ、ることが期待されて!/、る。
[0036] 次に、 PRGA(S)の動作を説明する。 [0037] PRGAでは、インデックスお jに基づく配列 Sの参照結果(S[(S[i]+S[j])mod N])と、変 数 kの算術加算を行って、 1ワード(1ワード =32ビット)を鍵ストリーム (out=S[(S[i]+S[j]) mod N]+k) mod M)として出力する。また鍵ストリームを生成するために参照した Sェン トリ (S[(S[i]+S[j])mod N])を、鍵ストリーム出力直後に kを用いて更新している (S[(S[i]+S[ j])mod N]=k+S[i] mod M)。図 2における out(=S[(S[i]+S[j])mod N]=k+S[i] mod M )が 出力となる鍵ストリームである。
[0038] 図 3では、時刻 t = lにおける動作 (PRGAの状態遷移)を示している。配列 Sにおい て、アドレス 1の値 S[l]が A、アドレス Aの値 S[A]が Bの時に、アドレス A+Bの値 S[A+ B] は、 kO+Α+Βになる。
[0039] 図 4では、時亥 ijt = 2における動作(PRGAの状態遷移)を示している。配列 Sにおい て、アドレス 1の値 S[l]が A、アドレス Aの値 S[A]が B、アドレス 2の値 S[2]が C、アドレス A+Cの値 S[A+C]が D、アドレス A+Bの値 S[A+B]力 ¾0+A+B、の時に、アドレス C+Dの値 S[C+D]力 S、 k0+B+C+Dになる。
[0040] G. Gongらによって提案された RC4型ストリーム喑号の安全性は、彼らの提案論文( 非特許文献 1 )のなかでで報告されている。
[0041] それによれば、鍵ストリームは Sエントリに変数 kを算術加算することでマスクされるた め、 KSAによって kがー様分布に従うとするならば出力系列に偏りが生じないことを示 している。
[0042] また内部メモリのサイズは RC4の 4倍となり、 Sエントリが算術加算によって更新される ため、内部メモリを求める攻撃に対しても安全性が向上していると報告されている。
[0043] ただし、全ての S-boxエントリ (配歹 IJSの要素)と変数 kが同時に偶数になると、以降常 に偶数が続くという「weak state」が存在する。しかし、内部メモリのサイズからみて、 we ak stateの存在確率は起こりえないくらいに十分小さいので、安全性に問題がないと されている。
[0044] 非特許文献 1: G. Gong, .C. Gupta, M. Hell, and Y. Nawaz, "Towards a General R C4_Like Keystream Generator, "S LOIS Conference on Information Security and Cr yptology, CISC 2005, LNCS 3822, pp.162-174, Springer Verlag, 2005.
非特許文献 2 : L Mantin, and A. Shamir: "A Practical Attack on Broadcast RC4,〃Fas t Software Encryption, FSE 2001, LNCS 2355, pp.152- 164,Springer-Verlag, 2001 非特許文献 3 : S. Paul, B. Preneel, and G. Sekar: "Distinguishing Attacks on the Str eamCipher Py," e STREAM, the ECRYPT Stream Cipher Project, Report 2005/081, 2005.
発明の開示
発明が解決しょうとする課題
[0045] 非特許文献;!〜 3の開示事項は、本書に引用をもって繰り込み記載されているもの とする。以下の分析は、本発明によって与えられたものである。
[0046] <発明が対象とする GGHN(n,m)攻撃手法 Distinguishing Attackの説明〉
GGHN(8,32)を解析するにあたり、変数の表記や定義について説明する。
[0047] ·は、算術乗算を表す。
IIは、データの連結(concatenation)を表す。
Xくくく nは、データ Xの左 nビットローテイトを表す。
また lsb(X)はデータ Xの最下位ビット、 LSB(X)はデータ Xの最下位バイトとし、 lsb(X) = X mod 2
LSB(X) = X mod 2"{8}
となる。
時亥 ijtにおける変数 i, j, kを it, jt, ktと表記する。
また時亥 ijtにおける x番目の S-boxエントリを St[x]と表記する。
時刻 tで出力される鍵ストリームを Otとし、最初の鍵ストリームを出力する時刻を t=lと する。
[0048] ここで、 PRGAの初期値を i0 = 0, j0 = 0と定義し、 k0は未知となる。
[0049] また解析を行う上で、攻撃者は鍵ストリームを自由に入手可能であるものとする。
[0050] < 1番目の出力ワードと 2番目の出力ワード間の偏り〉
まず GGHN(8,32)の 1番目の出力ワードと 2番目の出力ワード間に偏りが生じることを 説明するため、以下の <ケース 1〉の条件が成り立つ場合について考察する。
[0051] <ケース 1〉
1. LSB(Sl[il] + Sl[jl]) = LSB(Sl[il])、ただし、 LSB(Sl[il]) 半 1 2. LSB(S2[i2] + S2[j2]) = i2
[0052] ケース 1の時、 t=l、 2における配列 Sの最下位バイトの状態遷移について図 5及び図 6に示す。図 5には、酉己列 Sにおいて、アドレス 1の値 S[l]が Aであり、アドレス Aの値 S[ A]が kO+Aであるべきところが 0となり、矛盾することが示されている。図 6には、配列 S において、アドレス 1の値 S[l]が A、アドレス Aの値 S[A]力 ¾0+A、アドレス A + Cの値 S[A +C]が 2-C、アドレス 2の値 S[2]が kO+2であるべきところ力 S、 Cとなり、矛盾することが示 されている。
[0053] 図 2より、 t=lのとき、 il=lであり、 LSB(Sl[il]) = Aとおくと、 jl = Aとなる。
[0054] ここで、ケース 1の条件 1を満たす時、
LSB(S1[1] + S1[A]) = LSB(S1[1])
LSB(S1[A]) = 0… (1)
となるため、
LSB(kl) = LSB(kO + Sl[jl]) = LSB(kO)
となる。
[0055] ただし、 A = 1のとき、
LSB(S1[1] + Sl[l]) = LSB(S1[1])
LSB(S1[1]) = 0≠ 1
となり、式 (1)と矛盾するため、
LSB(Sl[il]) 半 1の条件が導かれる。
[0056] t=lで出力される鍵ストリームにおいて以下の関係が成り立つ。
LSB(Ol) = LSB(kO) · · · (2)
[0057] 同様に t=2のとき、 i2=2であり、 LSB(S2[i2]) = Cとおくと、 j2 = A + Cとなる。
[0058] ここで、ケース 1の条件 2を満たす時、
LSB(S2[2] + S2[A+C]) = 2
LSB(S2[A+C]) = 2 - C
となる。
[0059] t=2で出力される鍵ストリームにおいて、以下の関係が成り立つ。
LSB(02) = LSB(k0 + 2)… (3) [0060] よって、式 (2)、(3)より、 1番目と 2番目の出力ワード 01、 02について以下の関係式 が必ず成り立つ。
[0061] lsb(Ol) = lsb(02) · · · (4)
[0062] また、ケース 2についても同様に考える。
[0063] <ケース 2〉
1. LSB(Sl[il] + Sl[jl]) = LSB(Sl[ilコ)、ただし、 LSB(Sl[il])≠ 1
2. LSB(S2[i2] + S2[j2]) = j2
[0064] ケース 2の場合、 t=l、 2における配歹 IJSの最下位バイトの状態遷移について、図 5及 び図 7に示す。図 7には、アドレス 1の値 S[l]が A、アドレス 2の値 S[2]が C、アドレス Aの 値 S[A]が kO+A、アドレス A+ Cの値 S[A+C]が kO+A+ Cであるべきところ力 となり、矛 盾することが示されている。
[0065] t=lにおける内部変数 kはケース 1と同じため、配歹 IJSの状態遷移や鍵ストリームにお ける関係式 (2)も同じとなる。
[0066] t=2のときケース 2の条件 2を満たす時、
LSB(S2[2] + S2[A+C]) = A + C
LSB(S2[A+C]) = A
となる。
[0067] t=2で出力される鍵ストリームにおいて以下の関係が成り立つ。
[0068] LSB(02) = LSB(kO + 2 - Sl[l]) · · · (5)
[0069] よって、ケース 2の条件 1、 2を満たす時も式 ( 、(5)より、式 (4)が必ず成り立つ。
[0070] このように、ケース 1、 2ともに、 1番目の出力ワード 01と 2番目の出力ワード 02間で 同じ関係式 (4)が成り立つ。
[0071] 次に、この式が distinguisherとして利用できることを説明する。
[0072] < Distinguisherが成り立つ確率と必要なデータ量〉
ここでは、 distinguisherとして利用する式 (4)の成立確率につ!/、て説明する。
[0073] もし GGHN(8,32)の出力する系列が真の乱数系列であれば、 distinguisherである式(
1)が成り立つ確率は 2'{-1}となる。
[0074] 式 (4)の成立確率は、 PRGAの構造に依存したものであり、 KSAの構造には依存しな い。
[0075] よって、以下の検討では、 KSA終了後の変数 kと配歹 IJSがそれぞれ独立で一様分布 に従うものとする。
[0076] まず、ケース 1、 2の条件 1、 2が成り立つ確率 pl、 p2は以下のとおりである。ここで条 件 2が成り立つ確率 p2はケース 1、 2を考慮した確率である。
[0077] pi = 1/256 - 255/256
p2 = 1/256 · 1/256 + 255/256 - 2/256
[0078] ここで条件 1、 2のいずれかの条件を満たさない時、式 (1)が成り立つ確率を、理想的 に 1/2と仮定すると、 GGHN(8,32)の出力系列において、式 (4)が成り立つ確率 Pdは、 以下で与えられる。
[0079] pd = 1 ·ρ1 ·ρ2+1/2 ·(1-ρ1 ·ρ2)
= 1/2 ·(1+2 -15.01})
[0080] よって、真の乱数系列における確率 1/2と比べて大きくなる。
[0081] 次に、式 (4)を distinguisherとしたとき、 GGHN(8,32)の出力系列と真の乱数系列を区 別するために必要なデータ量を検討する。
[0082] 非特許文献 2によると、 2つの分布を区別するのに必要なデータ量は、以下のように なること力 S示されている。
[0083] 確率 pで発生する事象分布 Xと、確率 p(q+l)で発生する事象分布 Yにおいてあるィ ベント eが生じる時、無視できない成功確率で Xと Yを区別するには、 0(l/pq"{2})のサ ンプノレが必要である。
[0084] ただし、上記定理は、 pくく 1のときに成り立つ。
[0085] 非特許文献 3には、 p=l/2のとき、 2つの分布を区別するのに必要なデータ量は以 下のようになることが示されている。
[0086] 確率 p = 1/2で発生する事象分布 Xと確率 l/2(q+l)で発生する事象分布 Yにおいて あるイベント eが生じる時、無視できない成功確率で Xと Yを区別するには 0(l/q"{2})の サンプノレが必要である。
[0087] 本解読におけるイベント eは、式 (4)が成り立つ事象であり、乱数におけるイベント eの 分布を X、 GGHN(8,32)の出力系列におけるイベント eの分布を Yとみなすことができる 〇
[0088] よって、 p = 2'{-l}、 q = 2'{_15.01}と考えることができるため、解読に必要なデータ量 は Ο(2'{30·02)となる。
[0089] ここで求まるデータ量は、 GGHN(8,32)の KSAが完全にランダムな permutationと!/、う 仮定の元での値であり、 PRGAの構造的な偏りから求まる理論的なデータ量である。
[0090] よって、 GGHN(8,32)は、理論的に約 2"{30}の秘密鍵における鍵ストリームの先頭 2ヮ ードを利用することで、真の乱数列との区別が可能である。
[0091] < 1番目の出力ワードと 2番目の出力ワード間の偏り〉の説明(段落 0050力、ら 0070) では、鍵ストリームの先頭 2ワードについて distinguisherの構成方法を説明した力 ケ ース 1につ!/、ては任意の時亥 Ijtにお!/、て連続する鍵ストリーム 2ワードにつ!/、て同様の 関係が成り立つ。
[0092] よって、鍵ストリームの先頭数ワードを捨てるという対策は効果が無い。
[0093] 前述した <発明が対象とする GGHN(n,m)攻撃手法 Distinguishing Attackの説明〉 は、図 5乃至図 9に、まとめることができる。
[0094] 図 9は、解読に必要なデータ量 (理論値)をあらわしており、初期処理によって S-box エントリが一様にランダムで出力均等と仮定した場合の、解読に必要なデータ量の理 論値を求める流れを説明する図である。
[0095] 図 9では、初期処理によって S-boxエントリが一様にランダムで出力均等と仮定して いる。これは、攻撃する時刻において、 Sの値 256通りがすべて出現する可能性があ るということである。図 9における、確率 pl(=l/256)、確率 p2(=255/256)は、図 5におけ る、条件 1が発生する確率、と、条件 2が発生する確率にそれぞれ対応する。また、図 9における、確率 ρ3 (=(1/256) · (1/256)+(255/256)(2/256)=512/2562)は、図 7におけ る条件 3、または、図 6における条件 4が発生する確率に対応する。解読に必要なデ ータ量 (理論値)は、 0(q— 2)=0(23° °2)となる。
[0096] 図 8に示すように、 G. Gongら提案した改良アルゴリズムの distinguisherを構成す ること力 S出来る。図 8は、
lsb(Ol) = lsb(02)
の式を、 distinguisherとすることを説明する図である。 [0097] 連続する出力の下位 8bitは以下のようになる。
Ol=k0
O2=k0 + 2A (条件 3)、
O2 = k0+2 (条件 4)
[0098] よって、式 (4)を distinguisherとすれば、 GGHN(8,32)の出力系列と真の乱数系列との 区別が可能となる。
[0099] 本発明者等は、このことを、確めるための実験を行ったので、以下に説明する。図 1 0と図 11は、実験の結果をまとめたものである。図 10には、計算機実験によって得ら れた確率と解読に必要なデータ量が示されている。図 11には、計算機実験によって 、与えるデータ量 Nを変化させながら、図 8の distinguisherが機能するか確かめた結 果が示されている。
[0100] すなわち、図 11では、与えるデータ量 Nを変化させながら、図 8の distinguisherにつ いて成立回数 Xを求めた。 100通りの秘密鍵について実験を行い棄却率を求めた。
X - 2 N-1} > (1/2) · ( 2 N-1} - 2'{N- 2} )
を満たすとき、乱数でないと棄却するほ L数であれば 30.5%となる)。以下に、該実験 の説明をする。
[0101] <実験結果の説明〉
式 (4)を distinguisherとしたとき、図 9のように、 GGHN(8,32)の出力系列と真の乱数系 列が区別可能であるかどうか確認した。実験の手順は以下のとおりである。
[0102] 1. 秘密鍵を 2"{w}回ランダムに変更し、 GGHN(8,32)の鍵ストリームをそれぞれ 2ヮ ード生成する。
[0103] 2. 1.で生成した 2"{w}個の鍵ストリームについて式 (1)の成立回数をカウントする。
[0104] 3. 2.でカウントされた回数 Xが以下の関係式を満たした時、出力系列が乱数でな いと棄却する。ここで βは平均値、 σは標準偏差を表す。
[0105] μ ~χ > σ /2
[0106] よって本実験においては、
2 w-l}-x > l/2-(2 w-l}-2 w-2}) -l/2}
の関係式を満たした時、出力系列が乱数でな!、として棄却する。 [0107] 4. 1.で与えた 2"{w}個の秘密鍵グループを独立に 100通り与え、 1〜3を繰り返し、 棄却率を求める。
[0108] 実験結果を表として示した図 11によると、 2128}のデータを与えたとき、棄却率が 85 %となり、乱数における棄却率と比べて、 50%以上のアドバンテージが得られた。
[0109] よって、式 (4)を、 distinguisherとしたときの攻撃手法によって、 GGHN(8,32)の出力系 歹 IJは、約 2"{30}ワードの鍵ストリームを用いることによって、極めて高い確率で真の乱 数歹 IJとの区別が可能である事が実験的にも確認できた。
[0110] このように、従来の GGHN(8,32)の出力系列は、式 (4)
{lsb(Ol) = lsb(02)}
を、 distinguisherとしたときの攻撃手法によって、鍵ストリームが高い確率で真の乱 数列との区別が可能であり、安全性が低いという課題がある。
[0111] 本発明は、本発明者等による上記課題の認識に基づき創案されたものであって、 その目的は、データを秘匿するための安全性の高い暗号装置、プログラム、方法を 提供することにある。
課題を解決するための手段
[0112] 本願で開示される発明は、前記課題を解決するため、概略以下の構成とされる。
[0113] 本発明は、上記課題となった解析手法に、耐性を持つ対策を提供する。また、対策 の実装にぉレ、て、暗号の設計者らの主張する安全性と実装性を損なうことのなレ、よう 考慮している。
[0114] 本発明の 1つのアスペクト (側面)に係る暗号装置は、秘密鍵に基づき擬似乱数列 を生成し、前記擬似乱数列を平文に作用させることにより暗号文を生成する暗号装 置であって、前記擬似乱数列の生成に用いる内部状態として、有限個の数値の列の 並び替えを基礎とする状態に基づく内部状態を用い、前記擬似乱数列の生成に用 いる一時変数の少なくとも一つ力 S、前記内部状態のうちの一つ、又は、複数個の数 値を使用した、線形、又は、非線形、線形及び非線形の組み合わせの結果に基づき 、内部状態の数より小さい数に依存し、あらかじめ定められた、左又は右ローティトシ フトを実行した結果を値とする一時変数であり、前記生成される擬似乱数を、前記内 部状態のうちの 1つ又は複数個の数値と、前記一時変数との演算によって生成する。 [0115] 本発明において、前記有限個の数値の列の並び替えを基礎とする状態に基づく内 部状態であって、前記内部状態の更新を、並び替え以外の、線形演算、及び、非線 形演算を用いて行うようにしてもょレ、。
[0116] 本発明において、前記有限個の数値の列の並び替えを基礎とする状態に基づく内 部状態であって、前記内部状態の更新として、並び替え以外の、線形演算及び非線 形演算を用いることにより、前記内部状態の状態数が、単調増加する、ようにしてもよ い。あるいは、前記内部状態の状態数が、単調減少する、ようにしてもよい。
[0117] 本発明において、前記有限個の数値の列の並び替えを基礎とする状態に基づく内 部状態であって、前記内部状態の更新として、並び替え以外の線形演算及び非線 形演算を用いることにより、内部状態の状態数を振動させる、ようにしてもよい。
[0118] 本発明においては、前記内部状態の更新を、前記擬似乱数列の出力ごとに行うよ うにしてもよい。あるいは、前記擬似乱数列の出力よりも多く行うようにしてもよい。ある いは、前記擬似乱数列の出力よりも少なく行うようにしてもよい。
[0119] 本発明においては、前記ローテイトシフトの方向及び/又は数値(シフト数)を、前 記内部状態の数値に依存して動的に変更するようにしてもよい。
[0120] 本発明においては、前記ローテイトシフトの方向及び数値 (シフト数)を、あらかじめ 定められたテーブルの値に従って変更するようにしてもよい。
[0121] 本発明の別のアスペクトに係る装置は、配列 Sの要素の並び替えと算術加算を繰り 返すことで配列 Sの要素を攪拌し配列 Sの初期状態を作成し、その際、内部変数 kの 初期値を配列 Sの要素から求める第 1の処理部(KSA)と、第 1、第 2のインデックス変 数 iと jに関して配列 Sの要素 S [j]と内部変数 kの加算結果をローテイトシフトした値で 内部変数 kの値を更新し、 S [i] + S [j]による配設 Sの参照結果 S [ (S [i] + S [j] ) ]と 内部変数 kとの加算結果に基づき、鍵ストリームを出力し、前記鍵ストリームを生成す るために参照した配列 Sの要素 S [ (S [i] + S [j] ) ]を、鍵ストリーム出力の直後に内部 変数 kと配列要素 S [i]を用いて更新する第 2の処理部(PRGA)と、を備えて!/、る。
[0122] 本発明の別のアスペクトに係る装置は、配列 Sの要素の並び替えと算術加算を繰り 返すことで配列 Sの要素を攪拌し配列 Sの初期状態を作成し、その際、内部変数 kの 初期値を配列 Sの要素から求める第 1の処理部(KSA)と、第 1のインデックス変数 iの 配列要素 S [i]を第 1のシフト数ローテイトシフトした値と、第 2のインデックス変数 jとを 算術加算した結果に基づき、第 2のインデックス変数 jの値を更新し、第 2のインデック ス変数 jの配列要素 S [j]を第 2のシフト数ローテイトシフトした値と内部変数 kとの算術 加算結果に基づき内部変数 kの値を更新し、 S [i] + S [j]による配設要素 S [ (S [i] + S [j] ) ]を第 3のシフト数ローテイトシフトした値と内部変数 kとの算術加算結果に基づ き、鍵ストリームを出力し、前記鍵ストリームを生成するために参照した配列要素 S [ ( S [i] + S [j] ) ]を、鍵ストリーム出力の直後に内部変数 kと配列要素 S [i]を用いて更 新する第 2の処理部(PRGA)と、を備えている。
[0123] 本発明においては、初期設定配列 aを用い、配歹 l]aの並べ替えを行って攪拌し、内 部変数 kを対応する配列要素 aをローテイトシフトしたものと算術加算して求め、配列 Sを、酉己列 aの要素をローテイトシフトしたものと配列 Sの要素との所定の演算によって 求める第 1の処理部(KSA)と、第 1、第 2のインデックス変数 i、jに関して配列 Sの参照 結果 S [j]と内部変数 kとを算術加算し、 3 ] + 3 [ ]にょる配設3の参照結果と内部 変数 kに基づき、鍵ストリームを出力し、鍵ストリームを生成するために参照した Sのェ ントリを、鍵ストリーム出力直後に内部変数 kを用いて更新する第 2の処理部(PRGA) と、を備えた構成としてもよい。上記第 1の処理部(KSA)と第 2の処理部(PRGA)は、 コンピュータ.プログラム(ソフトウェア)として実装してもよい。
[0124] また、本発明に係る方法においては、擬似乱数列の生成に用いる内部状態として、 有限個の数値の列の並び替えを基礎とする状態に基づく内部状態を用い、前記擬 似乱数列の生成に用いる一時変数の少なくとも一つを、前記内部状態のうちの一つ 、又は、複数個の数値を用いた、線形、又は、非線形、線形及び非線形の組み合わ せの結果に基づき、内部状態の数より小さい数に依存し、あらかじめ定められた、左 又は右ローテイトシフトを実行した結果を値とする一時変数とし、前記擬似乱数を、前 記内部状態のうちの 1つ又は複数個の数値と、前記一時変数との予め定められた所 定の演算によって生成する。本発明によれば、上記第 1の処理部(KSA)と第 2の処理 部 (PRGA)の各手順を含む方法が提供される。
発明の効果
[0125] 本発明によれば、 GGHN(n,m)における distinguisherの構成を困難とし、 GGHN(n,m) がもつ、速度性能の低下を回避することができる。このため、本発明は、データの通 信や蓄積の際にデータを秘匿するための安全性の高い暗号装置を提供することが できる。
図面の簡単な説明
[0126] [図 1]本発明の一実施形態を示すブロック図である。
[図 2]32bit RC4 (CISC 2005)で提案された RC4の改良アルゴリズムを示す図である。
[図 3]PRGAの状態遷移(1)を示す図である。
[図 4]PRGAの状態遷移(2)を示す図である。
[図 5]PRGAの解析(1)を示す図である。
[図 6]PRGAの解析(3)を示す図である。
[図 7]PRGAの解析( を示す図である。
[図 8]PRGAの解析(4)を示す図である。
[図 9]解読に必要なデータ量 (理論値)を示す図である。
[図 10]解読に必要なデータ量 (実験値)を示す図である。
[図 11]実験結果(distinguisher)を示す図である。
[図 12]G. Gong らによってしめされたストリーム喑号のアルゴリズムを示す図である。
[図 13]本発明の変更アルゴリズムを示す図である。
[図 14]解決しょうとする課題の具体例 1を示す図である。
[図 15]解決しょうとする課題の具体例 2を示す図である。
[図 16]対策案(1)を示す図である。
[図 17]対策案(2)を示す図である。
発明を実施するための最良の形態
[0127] 上記した本発明についてさらに詳細に説明する。図 13は、本発明の変更アルゴリ ズムを説明するための図である。図 13には、本発明において、元のアルゴリズムの変 更すべき箇所が示されてレ、る。
[0128] 上記課題となった解析手法は、 PRGAの構造的な脆弱性を利用したものである。
[0129] しかも、解析手法では、 KSAによって全ての内部記憶が一様分布に従うとみなして いた。 [0130] よって、本発明の 1つの側面においては、 KSAに変更は施さず、 PRGAのみ改良を おこなった。
[0131] 図 13に示す対策手段におけるアルゴリズムの変更(図 2の PRGAのアルゴリズムから の変更)は、変数 kの更新の際に、左ローテイト処理 k=((k+S[j])くくく n) mod M
を行っている点である(ただし、 N = 2'{n}、 M = 2'{m})。
[0132] ローテイト数は、 GGHN(n,m)としたとき、 nビットとする。
[0133] 本発明によれば、擬似乱数列の生成に用いる一時変数の少なくとも一つである内 部変数 kを、前記内部状態のうちの一つ又は、複数個の数値を使用した、線形、又は 、非線形、線形及び非線形の組み合わせの結果に基づき、 nビットローテイトシフト(( k + S[j])くくく n)を実行した結果とし、前記生成される擬似乱数を、前記内部状態のう ちの 1つ又は複数個の数値と、前記一時変数との演算によって生成する(out = (S[(S( i)+S[j]) mod N] +k ) mod M)。
[0134] ここで、本発明による対策手段の効果を説明するため、ケース 1における内部変数 k 0と S 1 [A]、 S2[A+C]をバイト単位の変数を用いて以下のように表現する。
[0135] ここで、右側が下位ビットであり、 LSB(kO) = k00である。
ただ'し、式 ( 1)より、 LSB(S 1 [A]) = B0 = 0である。
[0136] k0 = k03 | | k02 | | k01 | | k00
S I [A] = B3 II B2 II B l | | B0
S2[A+C] = A3 II A2 | | Al | | AO
[0137] このとき、算術加算で生じるバイトを跨ぐ桁あがりの影響を無視すると、図 13に示し た PRGAは、最下位バイトにおいて、一様分布に従う独立な変数が必ず 2個以上揷入 されるため、式 (1)に、偏りが生じなくなる。
[0138] 同様に、どのバイト間で比較しても、一様な分布に従う独立な変数が必ず 2個以上 揷入されることから、偏りは生じないと考えられる。
[0139] 実際には、桁上がりがバイトを超えて影響するが、基本的な考え方に影響は無い。
[0140] また、図 13の対策手段における実装性を考慮すると、処理の増加は、ローティト処 理 1回分である。
[0141] 図 13の比較例として、元のアルゴリズムを図 12に示す。変数 kの更新は、 k=(k+S[j]) mod M
にて fiつている。
[0142] また、本発明にお!/、て、実装ターゲットとして、 32ビット /64ビットプロセッサ上でのソ フトウェアの実装を想定した場合、 nビットの左ローテイト処理は速度の劣化が小さい ものと思料される。
[0143] また、本発明によれば、新たな内部メモリを用いることなぐ改良が可能であるため、 メモリの増加も無い。
[0144] よって、本発明による、図 13の対策手段は、
•設計者らの設計方針を崩すことなぐ
•実装性の利点を損なうこともない、
暗号モデルを実現できるものと期待される。
[0145] 次に、図 16に、本発明による、 KSA(K, S)の変更による対策手段の例を示す。 a[i]を 左 8xrビットローテイトしたものと変数 kとを算術加算した値で、変数 kを更新している。 S [i]と、 a[i]を左 8x(3-r)ビットローテイトしたものとの演算結果 (排他的論理和演算)にて 、 S[i]を更新している。
[0146] 図 16の、 KSA(K, S)の変更による対策手段でも、 S_boxはある程度、ランダムになる ことが実験により確認できており、かつ、各バイトで見たとき出力均等となる。
[0147] そして、 KSAの速度は、約 2.5倍高速(RC4の KSAと比べて約 8倍低速)となり、初期 値テーブルを使用しないので、例えば 1Kbyteのメモリを削減することができる。
[0148] なお、図 16の対策手段は、ローテイトシフトの方向及び/又はシフト数を、前記内 部状態の数値に依存して動的に変更することに対応する。ローテイトシフトの方向及 びシフト数を、あらかじめ定められたテーブルの値に従って変更するようにしてもよい
[0149] 図 17に、 PRGA(S)の変更による対策手段の別の例を示した。 S[i]を右 24ビットローテ イトシフトしたもの(S[i]》〉24)と jとの算術加算結果で jの値を更新し、 S[j]を右 16ビット ローテイトシフトしたもの(S[j]》〉16)と kとの算術加算結果で kの値を更新し、 S[(S[i]+S [j]) mod N]を右 8ビットローテイトしたものと kとの算術加算結果を outとしている。
[0150] この対策手段の場合、鍵ストリーム間の関係(1番目と 2番目の出力バイト Olと 02) が、
01 = k0 + X02 = kO + Y
となり、 Xの値に応じて、 Υの値が決定する関係となる。
[0151] よって、インデックスの仮定で参照される S-boxエントリを選択できたとしても。仮定で 用いたインデックス情報を、上記の関係式に持ち込めな!/ヽ (X, Yの情報によらな!/、恒 等式に持ち込めない)ため、 Distinguishing Attackの適用が困難になる。
[0152] なお、本発明において、前記有限個の数値の列の並び替えを基礎とする状態に基 づく内部状態であって、前記内部状態の更新を、並び替え以外の、線形演算、及び 、非線形演算を用いて行うようにしてもよい。
[0153] 本発明において、前記有限個の数値の列の並び替えを基礎とする状態に基づく内 部状態であって、前記内部状態の更新として、列の並び替え以外の、線形演算及び 非線形演算を用いることにより、前記内部状態の状態数を、単調増加させるようにし てもよい。あるいは、前記内部状態の更新として、列の並び替え以外の、線形演算及 び非線形演算を用いることにより、前記内部状態の状態数を、単調減少させるように してもよい。
[0154] 本発明において、前記有限個の数値の列の並び替えを基礎とする状態に基づく内 部状態であって、前記内部状態の更新として、並び替え以外の線形演算及び非線 形演算を用いることにより、内部状態の状態数を振動させる、ようにしてもよい。
[0155] 本発明においては、前記内部状態の更新を、前記擬似乱数列の出力ごとに行うよ うにしてもよい。あるいは、前記擬似乱数列の出力よりも多く行うようにしてもよい。ある いは、前記擬似乱数列の出力よりも少なく行うようにしてもよい。以下実施例に即して 説明する。
実施例
[0156] 図 1は、本発明の一実施例を説明するための図である。図 14、図 15は、比較例とし て、本発明が解決しょうとする課題の具体例 1、 2を示すブロック図である。以下、本 発明の一実施例を説明する。図 1に示すように、《く nの処理では、 k (0)に対して、左 ローテイト処理(k+S[j])くくく nを行って k(l)としている。 (S[(S[i]+S[j]) mod N]+k(l)) mod Mを out(l)としている。 [0157] 図 14は、本発明が解決しょうとする課題の具体例 1として、図 5から図 7 (ケース 2の 条件での t=l、 2における酉己列 Sの最下位バイトの状態遷移)への処理の過程を示した 図である。状態変化は、 Sの箱で示されており、図には表れていない。はじめに、図 1 4の比較例を参照して説明する(アルゴリズムは図 12に示される)。
[0158] 時刻 1において、インデックス iが 1となる(j(0)の矢印の先の箱から出力される 1参照 )。インデックス i(0)と 1を入力する十字ボックスは、算術加算を表しており、 i= (i+ 1) mod N= lを出力する。
[0159] アドレス iの値 S[l] (下位 8ビット)が Aであり、インデックス jが Aとなる。なお、図 1、図
14、図 15において、 Sを四角で囲むボックスは S— boxであり、例えばインデックス(例 えば 1)を入力し、 S[l]が Aの場合、ボックスからは、 Aが出力される図式とされる。 j(0) と Aを入力とするボックス(算術加算器)は、 j(0)= (j(0)+A) mod N=Aを出力している。
[0160] アドレス jの値 ] (下位 8ビット)が 0であり、
変数 kの値(下位 8ビット)は
0 + kO = kO
となる。
[0161] アドレス iの値 S[i] (下位 8ビット)が Aであり、アドレス jの値 ] (下位 8ビット)が 0であ るため、出力 Olを生成するために必要なアドレスは、
S [i] + S [j] =A+ 0=A
となる。
[0162] アドレス Aの値 S[A] (下位 8ビット)が 0であり、変数 kの値(下位 8ビット)カ 0である ため、出力 Olの値(下位 8ビット)は、
0 + kO = kO
となる。
[0163] 出力 Olを生成した後、アドレス Aの値 S[A] (下位 8ビット)は、
kO + A
に更新される。
[0164] 時刻 2において、インデックス iは 2となる。
[0165] アドレス iの値 S[i] (下位 8ビット)が Cであり、インデックス jは、 A + Cとなる。 [0166] アドレス jの値 ] (下位 8ビット)が Aであり、変数 kの値(下位 8ビット)は、 kO + A
となる。
[0167] アドレス iの値 S[i] (下位 8ビット)が Cであり、アドレス jの値 SQ] (下位 8ビット)が Aであ るため、出力 02を生成するために必要なアドレスは、
S [i] + S [j] =A+ C
となる。
[0168] アドレス A+ Cの値 S[A+C] (下位 8ビット)が Aであり、変数 kの値(下位 8ビット)カ 0 + Aであるため、出力 02のィ直(下位 8ビット)は、
A+kO + A=kO + 2A
となる。
[0169] 出力 02を生成した後、アドレス A+ Cの値 S[A+C] (下位 8ビット)は、
kO + A + C
に更新される。
[0170] 図 15は、図 1の比較例として、本発明が解決しょうとする課題の具体例 2を示す図 であり、図 5から図 6 (ケース 1の条件での t=l、 2における配歹 IJSの最下位バイトの状態 遷移)への処理の過程を示した図である。状態変化は Sの箱で示されており、図には 表れていない。
[0171] 図 15を参照すると、時刻 1において、インデックス iが 1となる。
[0172] アドレス iの値 S[i] (下位 8ビット)が Aであり、インデックス jが Aとなる。
[0173] アドレス jの値 ¾] (下位 8ビット)が 0であり、変数 kの値(下位 8ビット)は、 O + kO =kO
となる。
[0174] アドレス iの値 S[i] (下位 8ビット)が Aであり、アドレス jの値 ] (下位 8ビット)が 0であ るため、出力 Olを生成するために必要なアドレスは、
S [i] + S [j] =A+ 0=Aとなる。
[0175] アドレス Aの値 S[A] (下位 8ビット)が 0であり、変数 kの値(下位 8ビット)カ 0である ため、出力 Olの値(下位 8ビット)は、 0 + kO = kO
となる。
[0176] 出力 Olを生成した後、アドレス Aの値 S[A] (下位 8ビット)は、
kO + A
に更新される。
[0177] 時刻 2において、インデックス iは 2となる。
[0178] アドレス iの値 S[i] (下位 8ビット)が Cであり、インデックス jは A+ Cとなる。
[0179] アドレス jの値 ] (下位 8ビット)が 2— Cであり、変数 kの値(下位 8ビット)は、
kO + 2-C
となる。
[0180] アドレス iの値 S[i] (下位 8ビット)が Cであり、アドレス jの値 SQ] (下位 8ビット)が 2— C であるため、出力 02を生成するために必要なアドレスは、
S [i] + S [j] =C + 2-C = 2
となる。
[0181] アドレス 2の値 S[2] (下位 8ビット)が Cであり、変数 kの値(下位 8ビット)が kO + 2— C であるため、出力 02の値(下位 8ビット)は、
C + kO + 2— C = k0 + 2
となる。
[0182] 出力 02を生成した後、アドレス 2の値 S[2] (下位 8ビット)は、
kO + 2-C + C = kO + 2
に更新される。
[0183] 図 14、図 15の比較例と相違して、本発明の一の実施例では、図 1に示すように、処 理の過程にローテイトシフト(くくく n)が追加されて!/、る。 k(0)=ローティトシフト(くくく n)は 、 ((k+S '])<«n) mod M
[0184] 本実施例においても、図 14と同様、時刻 1において、インデックス iが 1となる。ァドレ ス iの値 S[i] (下位 8ビット)が Aであり、インデックス jが Aの下位 8ビットとなる。
[0185] アドレス jの値 S[j] (下位 8ビット)が B (下位 8ビットが 0)であり、変数 kの値は Roln (kO + B)となる。なお、 Rolnは、 Rotate-Left-Shift by n_bitを表している。すなわち、 Rol n(kO + B)は、図 13の k= ((k+S[jKくく n) mod Mに対応し、 kO= ( (kO + B)«<n)m od Mが実行される。
[0186] アドレス iの値 S[i] (下位 8ビット)が Aであり、アドレス jの値 S[j]が B (下位 8ビットが 0) であるため、出力 Olを生成するために必要なアドレスは、
S[i] + S[j]=A+0=A
となる。
[0187] アドレス Aの値 S[A]が B (下位 8ビットが 0)であり、変数 kの値が Roln (kO + B)である ため、出力 Olの値(下位 8ビット)は、
O + Roln (kO + B) =Roln (kO + B)
となる。
[0188] 出力 Olを生成した後、アドレス Aの値 S[A] (下位 8ビット)は、
Roln (kO + B) +A
に更新される。
[0189] 時刻 2において、インデックス iは 2となる。
[0190] アドレス iの値 S[i] (下位 8ビット)が Cであり、インデックス jは A+Cの下位 8ビットとな
[0191] アドレス jの値 ] (下位 8ビット)が Aであり、変数 kの値は、
Roln (Roln(kO + B) +A)
となる。
[0192] アドレス iの値 S[i] (下位 8ビット)が Cであり、アドレス jの値 ] (下位 8ビット)が Aであ るため、出力 02を生成するために必要なアドレスは、
S[i] + S[j]=A+C
となる。
[0193] アドレス A+Cの値 S[A+C] (下位 8ビット)が Aであり、変数 kの値が Roln (Roln (kO + B) + A)であるため、出力 02の値(下位 8ビット)は、
A + Roln (Roln (kO + B) +A)
となる。
[0194] 出力 02を生成した後、アドレス A+Cの値 S[A+C] (下位 8ビット)は、 Roln (Roln (kO + B) +A) + C
に更新される。
[0195] 次に、図 1の本実施例において、図 15に基づくと、時刻 1において、インデックス
1となる。
[0196] アドレス iの値 S[i] (下位 8ビット)は Aであり、インデックス jは Aの下位 8ビットとなる。
[0197] アドレス jの値 ] (下位 8ビット)は B (下位 8ビットが 0)であり、変数 kの値は、
Roln (kO + B)
となる。
[0198] アドレス iの値 S[i]が Aであり、アドレス jの値 SQ]が B (下位 8ビットが 0)であるため、出 力 Olを生成するために必要なアドレスは、
S [i] + S [j] =A+ 0=A
となる。
[0199] アドレス Aの値 S[A] (下位 8ビット)が B (下位 8ビットが 0)であり、変数 kの値が Roln ( kO + B)であるため、出力 Olの値(下位 8ビット)は、
O + Roln (kO + B) =Roln (kO + B)
となる。
[0200] 出力 Olを生成した後、アドレス Aの値 S[A] (下位 8ビット)は、
Roln (kO + B) +A
に更新される。
[0201] 時刻 2において、インデックス iは 2となる。
[0202] アドレス iの値 S[i] (下位 8ビット)が Cであり、インデックス jは、 A+ Cの下位 8ビットと なる。
[0203] アドレス jの値 ] (下位 8ビット)が 2— Cであり、変数 kの値は、
Roln (Roln (kO + B) + 2- C)
となる。
[0204] アドレス iの値 S[i]が Cであり、アドレス jの値 SQ]が 2— Cであるため、出力 02を生成 するために必要なアドレスは、
S [i] + S [j] =C + 2-C = 2 となる。
[0205] アドレス 2の値 S[2] (下位 8ビット)が Cであり、変数 kの値が、
Roln (Roln (kO + B) + 2- C)
であるため、出力 02の値(下位 8ビット)は、
C + Roln (Roln (kO + B) + 2— C)
となる。
[0206] 出力 02を生成した後、アドレス 2の値 S[2] (下位 8ビット)は、
Roln (Roln (kO + B) + 2— C) + C
に更新される。
[0207] 本発明によれば、データの通信や蓄積の際にデータを秘匿するための安全性の高
V、暗号装置を得ることができる。
[0208] なお、図 13、図 16、図 17を参照して説明した本発明に係るプログラムは、鍵ストリ ームを生成する任意のアプリケーションに適用いることができる。本発明に係る暗号 装置は、例えばサーバ装置の CPU、記憶装置、ネットワーク等を含む構成とされる。 秘密鍵情報は、サーバ装置の記憶装置に記憶される。図 1に示した構成において、 ローテイトシフト演算は、 CPUの ALU (演算装置)で行われる。
[0209] 以上、本発明を上記実施例に即して説明したが、本発明は上記実施例の構成にの み制限されるものでなく、本発明の範囲内で当業者であればなし得るであろう各種変 形、修正を含むことは勿論である。

Claims

請求の範囲
[1] 秘密鍵に基づき擬似乱数列を生成し、前記擬似乱数列を平文に作用させることに より暗号文を生成する暗号装置であって、
前記擬似乱数列の生成に用いる内部状態として、有限個の数値の列の並び替えを 基礎とする状態に基づく内部状態を用い、
前記擬似乱数列の生成に用いる一時変数の少なくとも一つを、
前記内部状態のうちの一つ、又は、複数個の数値を用いた、線形、又は、非線形、 線形及び非線形の組み合わせの結果に基づき、内部状態の数より小さ!/、数に依存 し、あらかじめ定められた、左又は右ローテイトシフトを実行した結果を値とする一時 変数とし、
前記擬似乱数を、前記内部状態のうちの 1つ又は複数個の数値と、前記一時変数 との予め定められた所定の演算によって生成する手段を備えている、
ことを特徴とする暗号装置。
[2] 前記有限個の数値の列の並び替えを基礎とする状態に基づく内部状態に関して、 前記内部状態の更新を、並び替え以外の、線形演算、および、非線形演算を用い て行う、ことを特徴とする請求項 1に記載の暗号装置。
[3] 前記有限個の数値の列の並び替えを基礎とする状態に基づく内部状態に関して、 前記内部状態の更新を、並び替え以外の、線形演算及び非線形演算を用いて行 い、前記内部状態の状態数を、単調増加と単調減少のうちの一方にしたがって変化 させる、ことを特徴とする請求項 1に記載の暗号装置。
[4] 前記有限個の数値の列の並び替えを基礎とする状態に基づく内部状態に関して、 前記内部状態の更新を、並び替え以外の、線形演算及び非線形演算を用いて行 い、前記内部状態の状態数を振動させる、ことを特徴とする請求項 1に記載の暗号装 置。
[5] 前記内部状態の更新を、
前記擬似乱数列の出力ごとに行う、
前記擬似乱数列の出力よりも多く行う、
前記擬似乱数列の出力よりも少なく行う、 のうち選択されたいずれか一つで行う、ことを特徴とする、請求項 1乃至 4のいずれ か一項に記載の暗号装置。
[6] 前記ローテイトシフトの方向及び/又はシフト数を、前記内部状態の数値に依存し て動的に変更する、ことを特徴とする、請求項 1乃至 5のいずれか一項に記載の暗号 装置。
[7] 前記ローテイトシフトの方向及びシフト数を、あらかじめ定められたテーブルの値に 従って変更する、ことを特徴とする、請求項 1乃至 5のいずれか一項に記載の暗号装 置。
[8] 前記擬似乱数列の生成に用いる内部状態として、配列 Sの要素の並び替えと算術 加算を繰り返すことで配列 Sの要素を攪拌し配列 Sの初期状態を作成し、その際、前 記一時変数をなす内部変数 kの初期値を配列 Sの要素から求める第 1の処理部と、 前記擬似乱数 (以下、「鍵ストリーム」と称する)を生成するにあたり、第 1、第 2のイン デッタス変数 iと jに関して配列 Sの要素 S [j]と内部変数 kの加算結果をローティトシフ トした値で内部変数 kの値を更新し、
S [i] + S [j]による配設 Sの参照結果 S [ (S [i] + S [j] ) ]と内部変数 kとの加算結果 に基づき、鍵ストリームを出力し、
前記鍵ストリームを生成するために参照した配列 Sの要素 S [ (S [i] + S [j] ) ]を、鍵 ストリーム出力の直後に内部変数 kと配列要素 S [i]を用いて更新する第 2の処理部と を備えている、ことを特徴とする請求項 1記載の暗号装置。
[9] 酉己列 Sの要素数 Nとローテイトシフトのシフト数 nとが N = 2nの関係とされる、ことを特 徴とする請求項 8記載の暗号装置。
[10] 前記擬似乱数列の生成に用いる内部状態として、配列 Sの要素の並び替えと算術 加算を繰り返すことで配列 Sの要素を攪拌し配列 Sの初期状態を作成し、その際、前 記一時変数をなす内部変数 kの初期値を配列 Sの要素から求める第 1の処理部と、 前記擬似乱数 (以下、「鍵ストリーム」と称する)を生成するにあたり、
第 1のインデックス変数 iの配列要素 S [i]を第 1のシフト数ローテイトシフトした値と、 第 2のインデックス変数 jとを算術加算した結果に基づき、第 2のインデックス変数 jの 値を更新し、
第 2のインデックス変数 jの配列要素 S [j]を第 2のシフト数ローテイトシフトした値と内 部変数 kとの算術加算結果に基づき内部変数 kの値を更新し、
S [i] + S [j]による配設要素 S [ (S [i] + S [j] ) ]を第 3のシフト数ローテイトシフトした 値と内部変数 kとの算術加算結果に基づき、鍵ストリームを出力し、
前記鍵ストリームを生成するために参照した配列要素 S [ (S [i] + S [j] ) ]を、鍵ストリ ーム出力の直後に内部変数 kと配列要素 S [i]を用いて更新する第 2の処理部と、 を備えている、ことを特徴とする請求項 1記載の暗号装置。
[11] 初期設定配歹 IJaを用い、配歹 IJaの並べ替えを行って攪拌し、前記一時変数をなす内 部変数 kを、対応する配列要素 aをローテイトシフトしたものと算術加算して求め、前 記擬似乱数列の生成に用いる内部状態として配列 Sを、配歹 IJaの要素をローティトシ フトしたものと配列 Sの要素との所定の演算によって求める第 1の処理部と、
前記擬似乱数 (以下、「鍵ストリーム」と称する)を生成するにあたり、第 1、第 2のイン デッタス変数 i、 jに関して配列 Sの参照結果 S [j]と内部変数 kとを算術加算し、 S [i] + S [j]による配設 Sの参照結果と内部変数 kに基づき、鍵ストリームを出力し、 鍵ストリームを生成するために参照した Sのエントリを、鍵ストリーム出力直後に内部 変数 kを用いて更新する第 2の処理部と、
を備えている、ことを特徴とする請求項 1記載の暗号装置。
[12] 秘密鍵に基づき擬似乱数歹 IJを生成し、前記擬似乱数列を平文に作用させることに より暗号文を生成する暗号装置を構成するコンピュータに、
前記擬似乱数列の生成に用いる内部状態として、有限個の数値の列の並び替えを 基礎とする状態に基づく内部状態を用い、
前記擬似乱数列の生成に用いる一時変数の少なくとも一つを、
前記内部状態のうちの一つ、又は、複数個の数値を使用した、線形、又は、非線形 、線形及び非線形の組み合わせの結果に基づき、内部状態の数より小さい数に依存 し、あらかじめ定められた、左又は右ローテイトシフトを実行した結果を値とする一時 変数とし、
前記擬似乱数を、前記内部状態のうちの 1つ又は複数個の数値と、前記一時変数 との予め定められた所定の演算によって生成する、処理
を実行させるプログラム。
[13] 請求項 12記載のプログラムにおいて、
前記有限個の数値の列の並び替えを基礎とする状態に基づく内部状態に関して、 前記内部状態の更新を、並び替え以外の、線形演算、および、非線形演算を用い て行う、ことを特徴とするプログラム。
[14] 請求項 12記載のプログラムにおいて、
前記有限個の数値の列の並び替えを基礎とする状態に基づく内部状態に関して、 前記内部状態の更新として、並び替え以外の、線形演算及び非線形演算を用いて 行い、前記内部状態の状態数を、単調増加と単調減少のうちの一方にしたがって変 化させる、ことを特徴とするプログラム。
[15] 請求項 12記載のプログラムにおいて、
前記有限個の数値の列の並び替えを基礎とする状態に基づく内部状態に関して、 前記内部状態の更新として、並び替え以外の線形演算及び非線形演算を用いて 行い、内部状態の状態数を振動させる、ことを特徴とするプログラム。
[16] 請求項 12記載のプログラムにおいて、
前記内部状態の更新を、
前記擬似乱数列の出力ごとに行う、
前記擬似乱数列の出力よりも多く行う、
前記擬似乱数列の出力よりも少なく行う、
のうちの選択されたいずれか一つで行う、ことを特徴とする、プログラム。
[17] 請求項 12記載のプログラムにおいて、
前記ローテイトシフトの方向及び/又はシフト数を、前記内部状態の数値に依存し て動的に変更する、ことを特徴とする、プログラム。
[18] 請求項 12記載のプログラムにおいて、
前記ローテイトシフトの方向及びシフト数を、あらかじめ定められたテーブルの値に 従って変更する、ことを特徴とする、プログラム。
[19] 前記擬似乱数列の生成に用いる内部状態として、配列 Sの要素の並び替えと算術 加算を繰り返すことで配列 sの要素を攪拌し配列 sの初期状態を作成し、その際、前 記一時変数をなす内部変数 kの初期値を配列 Sの要素から求める第 1の処理と、 前記擬似乱数 (以下、「鍵ストリーム」と称する)を生成する処理として、
第 1、第 2のインデックス変数 iと jに関して配列 Sの要素 S [j]と内部変数 kの算術カロ 算結果をローテイトシフトした値で内部変数 kの値を更新し、
S [i] + S [j]による配設 Sの参照結果 S [ (S [i] + S [j] ) ]と内部変数 kとの算術加算 結果に基づき、鍵ストリームを出力し、
前記鍵ストリームを生成するために参照した配列 Sの要素 S [ (S [i] + S [j] ) ]を、鍵 ストリーム出力の直後に内部変数 kと配列要素 S [i]を用いて更新する第 2の処理と、 を前記コンピュータに実行させる請求項 12記載のプログラム。
[20] 前記擬似乱数列の生成に用いる内部状態として、配列 Sの要素の並び替えと算術 加算を繰り返すことで配列 Sの要素を攪拌し配列 Sの初期状態を作成し、その際、前 記一時変数をなす内部変数 kの初期値を配列 Sの要素から求める第 1の処理と、 前記擬似乱数 (以下、「鍵ストリーム」と称する)を生成する処理として、
第 1のインデックス変数 iの配列要素 S [i]を第 1のシフト数ローテイトシフトした値と、 第 2のインデックス変数 jとを算術加算した結果に基づき、第 2のインデックス変数 jの 値を更新し、
第 2のインデックス変数 jの配列要素 S [j]を第 2のシフト数ローテイトシフトした値と内 部変数 kとの算術加算結果に基づき内部変数 kの値を更新し、
S [i] + S [j]による配設要素 S [ (S [i] + S [j] ) ]を第 3のシフト数ローテイトシフトした 値と内部変数 kとの算術加算結果に基づき、鍵ストリームを出力し、
前記鍵ストリームを生成するために参照した配列要素 S [ (S [i] + S [j] ) ]を、鍵ストリ ーム出力の直後に内部変数 kと配列要素 S [i]を用いて更新する第 2の処理と、 を前記コンピュータに実行させる請求項 12記載のプログラム。
[21] 初期設定配列 aを用い、配列 aの並べ替えを行って攪拌し、前記一時変数をなす内 部変数 kを、対応する配列要素 aをローテイトシフトしたものと算術加算して求め、前 記擬似乱数列の生成に用いる内部状態として配列 Sを、配歹 IJaの要素をローティトシ フトしたものと配列 Sの要素との所定の演算によって求める第 1の処理と、 前記擬似乱数 (以下、「鍵ストリーム」と称する)を生成する処理として、
第 1、第 2のインデックス変数 i、 jに関して配列 Sの参照結果 S [j]と内部変数 kとを算 術加算し、
S [i] + S [j]による配設 Sの参照結果と内部変数 kに基づき、鍵ストリームを出力し、 鍵ストリームを生成するために参照した Sのエントリを、鍵ストリーム出力直後に内部 変数 kを用いて更新する第 2の処理と、
を前記コンピュータに実行させる請求項 12記載のプログラム。
コンピュータを用いて擬似乱数列を生成する方法であって、
擬似乱数列の生成に用いる内部状態として、有限個の数値の列の並び替えを基礎 とする状態に基づく内部状態を用い、
前記擬似乱数列の生成に用いる一時変数の少なくとも一つを、
前記内部状態のうちの一つ、又は、複数個の数値を用いた、線形、又は、非線形、 線形及び非線形の組み合わせの結果に基づき、内部状態の数より小さ!/、数に依存 し、あらかじめ定められた、左又は右ローテイトシフトを実行した結果を値とする一時 変数とし、
前記擬似乱数を、前記内部状態のうちの 1つ又は複数個の数値と、前記一時変数 との予め定められた所定の演算によって生成する、
ことを特徴とする擬似乱数列の生成方法。
PCT/JP2007/063797 2006-07-21 2007-07-11 dispositif de cryptage, programme et procédé WO2008010441A1 (fr)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US12/374,397 US8374351B2 (en) 2006-07-21 2007-07-11 Encryption device, program, and method
CA2658476A CA2658476C (en) 2006-07-21 2007-07-11 Encryption device, program, and method
CN2007800277332A CN101496342B (zh) 2006-07-21 2007-07-11 加密装置、程序及方法
EP07790601.4A EP2048811A4 (en) 2006-07-21 2007-07-11 ENCRYPTING DEVICE, PROGRAM AND METHOD
JP2008525838A JPWO2008010441A1 (ja) 2006-07-21 2007-07-11 暗号装置及びプログラムと方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2006-199681 2006-07-21
JP2006199681 2006-07-21

Publications (1)

Publication Number Publication Date
WO2008010441A1 true WO2008010441A1 (fr) 2008-01-24

Family

ID=38956774

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2007/063797 WO2008010441A1 (fr) 2006-07-21 2007-07-11 dispositif de cryptage, programme et procédé

Country Status (8)

Country Link
US (1) US8374351B2 (ja)
EP (1) EP2048811A4 (ja)
JP (1) JPWO2008010441A1 (ja)
KR (1) KR101032592B1 (ja)
CN (1) CN101496342B (ja)
CA (1) CA2658476C (ja)
RU (1) RU2009106061A (ja)
WO (1) WO2008010441A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8923513B2 (en) 2008-08-11 2014-12-30 Assa Abloy Ab Secure wiegand communications
US10452877B2 (en) 2016-12-16 2019-10-22 Assa Abloy Ab Methods to combine and auto-configure wiegand and RS485

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567781A (zh) * 2009-06-09 2009-10-28 刘海云 利用排序产生的序号码加密的方法及密码机
US8244909B1 (en) * 2009-06-18 2012-08-14 Google Inc. Method, apparatus and networking equipment for performing flow hashing using quasi cryptographic hash functions
FR2952735B1 (fr) * 2009-11-18 2011-12-09 St Microelectronics Rousset Procede et dispositif de detection d'attaques par injection de fautes
EP2336931B1 (fr) * 2009-11-18 2013-01-09 STMicroelectronics (Rousset) SAS Procédé de vérification de signature
FR2984553B1 (fr) 2011-12-15 2015-11-06 Proton World Int Nv Procede et dispositif de detection de fautes
US9269418B2 (en) * 2012-02-06 2016-02-23 Arm Limited Apparatus and method for controlling refreshing of data in a DRAM
CN104331645B (zh) * 2014-11-24 2017-05-10 中国航空工业集团公司洛阳电光设备研究所 一种测试系统的加密方法
EP3493457A1 (en) * 2017-11-30 2019-06-05 Gemalto Sa Method for protecting a source of entropy used in countermeasures securing a whitebox cryptographic algorithm
KR102183312B1 (ko) 2018-11-14 2020-11-26 국민대학교산학협력단 Duss 지원 가능한 양자난수 엔트로피 암호화용 코드 발급 장치 및 방법
KR102156568B1 (ko) 2018-12-21 2020-09-16 국민대학교산학협력단 구명용 비상신호 발신장치 및 방법
CN114514569B (zh) * 2019-10-10 2024-03-01 日本电信电话株式会社 秘密多重迭代计算装置、方法以及记录介质
KR102253953B1 (ko) * 2020-06-11 2021-05-20 제주대학교 산학협력단 K-익명성 모델 및 데이터 교란화를 이용한 위치추적정보 보안 기법 및 장치
CN113282949B (zh) * 2021-07-26 2021-11-02 中国电力科学研究院有限公司 数据加密方法、数据解密方法、装置及电力数据交互系统

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006199681A (ja) 2004-12-20 2006-08-03 Daicel Chem Ind Ltd 酢酸の製造方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5297207A (en) * 1993-05-24 1994-03-22 Degele Steven T Machine generation of cryptographic keys by non-linear processes similar to processes normally associated with encryption of data
US5345508A (en) * 1993-08-23 1994-09-06 Apple Computer, Inc. Method and apparatus for variable-overhead cached encryption
US20020009208A1 (en) * 1995-08-09 2002-01-24 Adnan Alattar Authentication of physical and electronic media objects using digital watermarks
US7174013B1 (en) * 1998-10-20 2007-02-06 Lucent Technologies Inc. Efficient universal hashing method
CN1714377A (zh) * 2002-10-07 2005-12-28 小林朗 用于生成伪随机数的方法及伪随机数生成器
WO2006100801A1 (ja) * 2005-03-23 2006-09-28 Kddi Corporation キーストリーム暗号化装置および方法ならびにプログラム
US8019802B2 (en) * 2005-08-24 2011-09-13 Qualcomm Incorporated Cryptographically secure pseudo-random number generator

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006199681A (ja) 2004-12-20 2006-08-03 Daicel Chem Ind Ltd 酢酸の製造方法

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
G. GONG ET AL.: "SKLOIS Conference on Information Security and Cryptology, CISC 2005, LNCS", vol. 3822, 2005, SPRINGER VERLAG, article "Towards a General RC4-Like Keystream Generator", pages: 162 - 174
GONG G. ET AL.: "Towards a General RC4-like Keystream Generator", GUANG GONG'S HOME PAGE, XP003020437, Retrieved from the Internet <URL:http://www.calliope.uwaterloo.ca/~ggong/publication/CISC141.pdf> *
MANTIN; A. SHAMIR: "LNCS", vol. 2355, 2001, SPRINGER-VERIAG, article "A Practical Attack on Broadcast RC4, "Fast Software Encryption, FSE 2001", pages: 152 - 164
S. PAUL; B. PRENEEL; G. SEKAR: "Distinguishing Attacks on the StreamCipher Py", ESTREAM, THE ECR.YPT STREAM CIPHER PROJECT, REPORT 2005/081, 2005
See also references of EP2048811A4 *
TSUNOO Y. ET AL.: "The Most Efficient Distinguishing Attack on VMPC and RC4", ESTREAM, THE ECRYPT SYSTEM CIPHER PROJECT, XP003020439, Retrieved from the Internet <URL:http://www.ecrypt.eu.org/stream/papersdir/037.pdf> *
WU H.: "Cryptanalysis of a 32-bit RC4-like Stream Cipher", CRYPTOLOGY EPRINT ARCHIVE, 2005/219, XP003020438, Retrieved from the Internet <URL:http://www.eprint.iacr.org/2005/219.pdf> *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8923513B2 (en) 2008-08-11 2014-12-30 Assa Abloy Ab Secure wiegand communications
US8943562B2 (en) 2008-08-11 2015-01-27 Assa Abloy Ab Secure Wiegand communications
US10452877B2 (en) 2016-12-16 2019-10-22 Assa Abloy Ab Methods to combine and auto-configure wiegand and RS485

Also Published As

Publication number Publication date
EP2048811A4 (en) 2015-10-21
KR101032592B1 (ko) 2011-05-06
CA2658476A1 (en) 2008-01-24
EP2048811A1 (en) 2009-04-15
KR20090041408A (ko) 2009-04-28
US20090323956A1 (en) 2009-12-31
CA2658476C (en) 2014-11-04
CN101496342A (zh) 2009-07-29
CN101496342B (zh) 2012-05-30
US8374351B2 (en) 2013-02-12
RU2009106061A (ru) 2010-08-27
JPWO2008010441A1 (ja) 2009-12-17

Similar Documents

Publication Publication Date Title
WO2008010441A1 (fr) dispositif de cryptage, programme et procédé
US8358781B2 (en) Nonlinear feedback mode for block ciphers
US7899190B2 (en) Security countermeasures for power analysis attacks
US7697681B2 (en) Parallelizable integrity-aware encryption technique
KR101143041B1 (ko) 리볼빙 버퍼들을 이용한 스트림 암호 설계 방법
US7720225B2 (en) Table splitting for cryptographic processes
Singh Modified Vigenere encryption algorithm and its hybrid implementation with Base64 and AES
Altigani et al. A polymorphic advanced encryption standard–a novel approach
Huang et al. A secure data encryption method employing a sequential–logic style mechanism for a cloud system
Achkoun et al. SPF-CA: A new cellular automata based block cipher using key-dependent S-boxes
US20220382521A1 (en) System and method for encryption and decryption using logic synthesis
Soe et al. Performance analysis of data encryption standard (DES)
Gupta et al. Correlation power analysis on KASUMI: attack and countermeasure
Hafsa et al. Hybrid encryption model based on advanced encryption standard and elliptic curve pseudo random
Ghosh et al. Isomorphic cipher reduction
US20100128870A1 (en) Pseudo-random number generation device, program, and method for stream encoding
El-Fotouh et al. Statistical testing for disk encryption modes of operations
Kebande Extended-Chacha20 Stream Cipher With Enhanced Quarter Round Function
Muthavhine et al. Using the Muthavhine Function to Modify Skipjack Algorithm to Prevent LC and DC Attacks on IoT Devices
Jagetiya et al. Evolution of Information Security Algorithms
Gaffar Securing Digital Audio Files Using Rotation and XOR Operations
Maharjan Comparative Study of CAST and TWOFISH algorithm using various Modes of Operations
Alsuwaiedi et al. A new modified DES algorithm based on the development of binary encryption functions
Nimbe et al. An improved symmetric cipher encryption for securing data
Maity et al. Improving security of SPN-type block cipher against fault attack

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200780027733.2

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 07790601

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2008525838

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 2658476

Country of ref document: CA

Ref document number: 12374397

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2007790601

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 1020097003460

Country of ref document: KR

ENP Entry into the national phase

Ref document number: 2009106061

Country of ref document: RU

Kind code of ref document: A