WO2007126049A1 - プログラム難読化システム、プログラム難読化装置及びプログラム難読化方法 - Google Patents

プログラム難読化システム、プログラム難読化装置及びプログラム難読化方法 Download PDF

Info

Publication number
WO2007126049A1
WO2007126049A1 PCT/JP2007/059158 JP2007059158W WO2007126049A1 WO 2007126049 A1 WO2007126049 A1 WO 2007126049A1 JP 2007059158 W JP2007059158 W JP 2007059158W WO 2007126049 A1 WO2007126049 A1 WO 2007126049A1
Authority
WO
WIPO (PCT)
Prior art keywords
conversion
input
program
multiplication
information
Prior art date
Application number
PCT/JP2007/059158
Other languages
English (en)
French (fr)
Inventor
Yuichi Futa
Taichi Sato
Rieko Asai
Motoji Ohmori
Masahiro Mambo
Original Assignee
Panasonic Corporation
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 Panasonic Corporation filed Critical Panasonic Corporation
Priority to CN2007800154489A priority Critical patent/CN101432755B/zh
Priority to JP2008513289A priority patent/JP4938766B2/ja
Priority to US12/297,929 priority patent/US8479018B2/en
Publication of WO2007126049A1 publication Critical patent/WO2007126049A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • 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/002Countermeasures against attacks on cryptographic mechanisms
    • 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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/302Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/16Obfuscation or hiding, e.g. involving white box

Definitions

  • Program obfuscation system Program obfuscation system, program obfuscation device and program obfuscation method
  • the present invention relates to a computer program obfuscation technique as an information security technique.
  • encryption technology is embodied as encryption software which is a computer program, and is used for secret communication, protection of privacy, confirmation of a communication partner, etc.
  • obfuscation processing (steps S 9001 to S 9002) is applied to a normal program 9000 prior to obfuscation such as an encryption program for common key encryption and a decryption program. Generate and output a custom program 9002. The details of this obfuscation method are explained below.
  • a plurality of program instructions constituting normal program 9000 are divided into processing l to n (n is a natural number) using keys key to key in common key encryption.
  • step S9001 And generate a processing division program 9001 including the processing l to n (step S9001).
  • step S9001 insert the output value conversion ⁇ and the output value inverse conversion ⁇ 1 ;
  • output value conversion ⁇ and output value inverse conversion ⁇ 1 are inserted, and immediately after process 3, the output value
  • a table RT is generated by tabulating the process 1 and the output value conversion ⁇ , and the output value is generated.
  • a table RT is generated by tabulating the inverse transformation ⁇ 1 , the processing 2 and the output value transformation ⁇ ,
  • Program 9002 is generated (step S9002).
  • FIG. 40 shows an example of a table generated by the conventional obfuscation method. As shown in the figure, for each input value in included in the set 9011, the intermediate value a is calculated by processing 1
  • step S 9003 1 calculation (step S 9003), and for each intermediate value a, it is a random bijective transformation
  • Patent Document 1 International Publication WO02Z46890 Pamphlet
  • Non-Patent Document 1 Okamoto Takuaki, Yamamoto Hiroshi, “Contemporary Cryptography”, Industrial Books (1997)
  • Non-Patent Document 2 H. Cohen, A Course in Computational Algebraic Number Tneory, G f
  • the present invention is directed to a program obfuscation system, a program obfuscation apparatus, a program obfuscation method, a program obfuscation program, and a program obfuscation program, in which the difficulty of program analysis is further enhanced in order to respond to the above requests.
  • the purpose is to provide a recording medium that
  • the present invention is a program obfuscation apparatus for obfuscating an information security program including a security operation that securely or reliably handles target information using key information,
  • a plurality of basic operations including a first basic operation requiring a plurality of inputs and a second basic operation requiring only a part of the plurality of inputs are arranged in an order determined by key information so as to be equivalent to security operations.
  • Conversion means for arranging the input dependent inverse conversion which is the input dependent conversion and its inverse conversion, and the input dependence immediately before arranged for each second basic operation And a table for generating a table that obtains an operation result equivalent to a set of operations consisting of the second basic operation and the input dependent inverse transformation placed immediately after, and generating a reference instruction that refers to the table. It is characterized by comprising generation means, and output means for outputting an obfuscated program including the generated table and the reference instruction.
  • the second basic operation of the first basic operation requiring multiple inputs and the second basic operation requiring only a part of the multiple inputs may be performed before or after the second basic operations.
  • An input-dependent conversion that depends on inputs not required in the second basic operation and an input-dependent inverse conversion that is an inverse conversion thereof are arranged to reduce the difference in the number of inputs of the first basic operation and the second basic operation, It is possible to further increase the difficulty of program analysis against attacks due to the difference in the number of inputs.
  • the conversion means further needs, in each of the first basic operations included in the information security program, either before or after the first basic operation, or in both of the first basic operations.
  • the input dependent transformation which depends on the input and the input dependent inverse transformation which is the inverse transformation may be arranged.
  • an input-dependent conversion that depends on an input that is not required in the second basic operation and / or its inverse conversion may be performed either before or after the first basic operation, or both.
  • the placement of certain input-dependent inverse transforms can make program analysis more difficult.
  • the input dependent conversion is subtraction
  • the input dependent inverse conversion is addition
  • the conversion means further includes, for each of the other basic operations except for the basic operation placed at the beginning of the information security program, immediately before the basic operation and immediately before the basic operation. Arrangement of a first conversion operation that performs a first conversion on the operation result of the basic operation, and a second conversion operation that performs a second conversion that is the inverse conversion of the first conversion on the operation result of the first conversion operation
  • the table generation unit further obtains a table equivalent to a set of operations consisting of a basic operation placed at the beginning of the information security program and a first conversion operation placed immediately after that.
  • the conversion means decomposes the basic operation, the subtraction, the addition, the first conversion operation, and the second conversion operation for each digit to generate a plurality of digit operations,
  • To obtain the operation result equivalent to the generated digit operation generate a digit operation table, generate a digit operation reference instruction referring to the digit operation table, and generate each basic operation arranged in the middle , Generated so as to obtain an operation result equivalent to a set of operations consisting of the subtraction placed immediately before, the basic operation and the addition placed immediately after, the second conversion operation, and the first conversion operation.
  • Equivalent to the digit operation Generates a digit operation table from which an arithmetic result can be obtained, generates a digit operation reference instruction that refers to the digit operation table, and performs a basic operation placed at the end of the information security program and a second conversion placed immediately before that.
  • a digit operation reference instruction that generates a digit operation table from which an operation result equivalent to the generated digit operation is obtained so as to obtain an operation result equivalent to a set of operations including operations, and refers to the digit operation table
  • the output means may output the obfuscated program including the generated digit operation table and the digit operation reference instruction.
  • the table generation unit is configured to generate a predetermined number of digit operation tables. You may select one table from a common table.
  • the table generation means selects from a predetermined number of shared tables, the total amount of tables to be held can be reduced.
  • the security operation is an exponentiation operation C n mod n on target information C using a secret key d which is key information under the modulus n, and the security operations are arranged in an order determined by the key information
  • the plurality of basic operations having different numbers of inputs are equivalent to modular exponentiation operations C n mod n, and each bit of multiplication residue operation, squaring residue operation, and force secret key d as the basic operation by the binary method
  • the transformation means is arranged based on the value, and the conversion means is provided one before the multiplication remainder operation or the second remainder operation immediately before and after the multiplication residue operation or the second remainder operation placed in the middle.
  • the table generation means arranges the subtraction, the multiplication remainder operation or the remainder operation immediately before for each of the multiplication residue operation or the second remainder operation placed in the middle, Multiplication residue operation and placement immediately after The Choi as to generate a table for obtaining a calculation result of a set of operations equivalent comprising the addition power.
  • the security operation is a modular exponentiation operation C n mod n on the target information C using the secret key d which is key information under the modulus n .
  • the security is to some extent It is possible to use established RSA cryptographic techniques.
  • the security operation is an exponentiation residue operation C n mod n on target information C using the secret key d which is key information under the modulus n, and the number of inputs arranged in the order determined by the key information
  • the plurality of different basic operations are based on each bit value of the multiplication residue operation, the square residue operation, and the force secret key d as the basic operation by the binary method so that the plurality of basic operations become equivalent to the exponentiation residue operation C n mod n
  • the conversion means decomposes each modular multiplication operation arranged in the middle and arranges the multiplication operation and the modular operation, and immediately before and immediately after the arranged multiplication operation, Subtraction and addition depending on one input value to the multiplication operation are arranged, and each 2nd modular multiplication operation arranged in the middle is decomposed into 2 multiplication operation and remainder operation, and 2 Immediately before and after the multiplication operation, the two multiplication operations are performed.
  • said table generating means for each multiplication operation or each square operation, which is disposed intermediate the decrease, which is arranged immediately before A table may be generated to obtain an operation result equivalent to the operation of one ffi ⁇ consisting of an arithmetic operation, the multiplication operation or the squaring operation and the addition immediately after the operation! /.
  • the modular multiplication operation and the modular multiplication residue operation in the modular exponentiation operation C n mod n are respectively decomposed to arrange the multiplier operation and modular operation, and the modular multiplication operation and modular multiplication operation. Since the subtraction and addition are arranged immediately before and after the operation, and the subtraction and addition are arranged immediately before and immediately after the 2 multiplication operation, the difficulty of program analysis can be further enhanced. Since the subtraction and addition depending on the input value are arranged, the operation result is equivalent to the case of not arranging.
  • FIG. 1 is a diagram showing a conversion from a normal program 5001 to an obfuscated program 5002 in the first embodiment.
  • FIG. 2 is a diagram showing the obfuscation mark of multiplication and the obfuscation mark of 2 multiplication in the first embodiment.
  • FIG. 3 is a block diagram showing the configuration of an obfuscation system 1 according to a second embodiment.
  • FIG. 4 is a view showing the concept of the first obfuscation method by obfuscation system 1;
  • FIG. 5 is a diagram showing the configuration of transform multiplication residue processing.
  • FIG. 5 (b) shows the case of 2 ⁇ i ⁇ k ⁇ 1
  • Fig. 6 shows the configuration of the conversion multiplication residue processing in which input value conversion and output value conversion are inserted when 2 ⁇ i ⁇ k-l.
  • Fig. 6 (b) shows The configuration of multiplication and remainder processing after division in the case of ⁇ i ⁇ k ⁇ 1 is shown.
  • FIG. 8 shows a configuration of a conversion multiplication process divided into each digit when 2 ⁇ i ⁇ k-1.
  • Fig. 8 (a) shows the transform multiplication process before division
  • Fig. 8 (b) shows the transform multiplication process after division.
  • FIG. 10 shows the configuration of each addition process in the case of division by digit.
  • FIG. 11 shows the configuration of divided conversion remainder processing.
  • FIG. 12 shows the configuration of multiplication processing in the case where each digit is further divided.
  • FIG. 14 is a diagram showing the configuration of multiplication processing 1002 divided for RT.
  • FIG. 15 is a diagram showing the configuration of multiplication processing 1002 divided for RT. On the drawing
  • FIG. 16 is a diagram showing the configuration of multiplication processing 1004 divided for RT (2 ⁇ i ⁇ k ⁇ l).
  • FIG. 17 shows a configuration of multiplication processing 1004 divided for RT (2 ⁇ i ⁇ k ⁇ l).
  • input value conversion and output value conversion are clarified.
  • FIG. 18 is a diagram showing the configuration of multiplication processing 1009 divided for RT.
  • FIG. 19 is a diagram showing the configuration of multiplication processing 1009 divided for RT. On the drawing k
  • FIG. 20 A configuration of divided remainder processing 1005 is shown. Continue to Figure 21.
  • FIG. 21 shows the configuration of divided remainder processing 1005. Continue to Figure 22.
  • FIG. 22 shows the configuration of divided remainder processing 1005. Continue to Figure 23.
  • FIG. 23 The structure of the divided remainder processing 1005 is shown. Continue from Figure 22.
  • FIG. 25 A specific example of the table of RM shown in Fig. 17 for RT (2 ⁇ i ⁇ k-l) is shown.
  • Figures 26 (a), 26 (b), 26 (c) and 26 (d) show the conversion in RM shown in Figure 17 for RT. (2 ⁇ i ⁇ k-1) respectively.
  • FIG. 27 The details of RM shown in Fig. 19 are shown for RT.
  • FIG. 28 A specific example of RM table shown in Fig. 19 is shown for RT.
  • Fig. 29 Fig. 29 (a), Fig. 29 (b), Fig. 29 (c) and Fig. 29 (d) are each for RT in Fig.
  • FIG. 30 Details of RA shown in Fig. 15 for RT.
  • FIG. 31 A specific example of the table of RA shown in Fig. 15 for RT is shown.
  • Fig. 32 [Fig. 32] Fig. 32 (a), Fig. 32 (b) and Fig. 32 (c) show the R shown in Fig. 15 for RT.
  • Fig. 33 is a diagram illustrating the configuration of the obfuscation device 100.
  • FIG. 34 is a diagram showing the configuration of a cryptographic processing device 300.
  • FIG. 35 is a flowchart showing an operation at the time of obfuscation processing by the obfuscation device 100.
  • FIG. 36 is a flowchart showing an operation of decryption processing by the cryptographic processing device 300.
  • FIG. 37 is a flowchart showing an operation of a signature generation process by the cryptographic processing device 300.
  • FIG. 38 A flowchart showing an operation of the table by the obfuscation device 100.
  • ⁇ 39 is a diagram showing a procedure of processing of a conventional obfuscation method.
  • FIG. 40 is a view showing an example of a table of a conventional obfuscated reading method.
  • FIG. 41 Details of RM shown in Fig. 15 for RT.
  • Figs. 42 (a), 42 (b) and 42 (c) show the R shown in Fig. 15 for RT respectively.
  • FIG. 43 A specific example of the RM table shown in Fig. 15 for RT is shown.
  • a secret key d which is a positive integer is used to calculate M which is a decrypted text of a ciphertext C.
  • Such an operation may be called a security operation.
  • n is a product of a prime number p and a prime number q
  • indicates a power of X
  • X mod Y is a value when X is divided by Y. It shows the remainder.
  • the normal program 5001 before obfuscation which is a decryption program of RSA encryption, includes 2 multiplication S5011, multiplication S5012, ⁇ , multiplication S5013! /.
  • the order in which multiplication and 2 multiplication are applied depends on the value of the secret key d.
  • the secret key d is n bits long, and as an example, the secret key d is "01 ⁇ ⁇ ⁇ 1".
  • This obfuscation method uses the output value conversion ⁇ S 5031 and the output value inverse immediately after the operation KS 5011).
  • Output value inverse transform ⁇ 1 is inserted, and immediately after operation 3, output value transform ⁇ and output value inverse transform ⁇
  • this obfuscation method is taped with calculation XI (S5011) and output value conversion ⁇ S5031
  • Norei ⁇ is generated to generate the tape Nore RT 5021, the output value reverse conversion ⁇ — 1 S 5032, operation X 2 (S 501
  • output value conversion and output value inverse conversion are inserted as a set before and after an operation on the way except for the first and last operations.
  • the first operation and output value conversion are tabulated.
  • the output value inverse conversion, the operation and the output value inverse conversion are tabulated.
  • the output value reverse conversion and the corresponding Make calculations and calculations are inserted as a set before and after an operation on the way except for the first and last operations.
  • the input values to be used are different between multiplication and 2 multiplication. That is, as shown in FIG. 2 (a), in the multiplication, the second input value in1 is multiplied by the second input value in2, as shown in FIG. 2 (b). In multiplication, only the first input value inl is used to perform 2 multiplication of the first input value inl.
  • the output of the multiplication table depends on both inl and in2, and the output of the 2-multiplication table depends only on inl.
  • the order of multiplication and 2 multiplication may be inferred, and as a result, the value of the secret key may be known.
  • the second embodiment shown below is intended to solve the problems according to the first embodiment and to prevent an attack due to the difference in the number of inputs between multiplication and 2 multiplication.
  • the configuration of the obfuscation system 1 according to the second embodiment is shown in FIG.
  • the obfuscation system 1 receives the secret key d as an input value, generates an obfuscation program with the input value, and outputs the obfuscated program generated, and a medium for recording the obfuscated program output. 200 and read obfuscated program from medium 200 and execute obfuscated program read out And a cryptographic processing device 300 which generates a decrypted text from the ciphertext or generates signature data from the message.
  • the obfuscation apparatus 100 performs obfuscation to calculate X ′ ′ d mod n for the secret key d and the target data X used for decryption of the RSA encryption and signature generation.
  • the program is generated, and the generated obfuscation program is recorded on the medium 200.
  • the cryptographic processing device 300 reads the obfuscated program recorded on the medium 200, and the obfuscated reading is performed by the CPU included in the cryptographic processing device 300.
  • the decrypted text is generated from the ciphertext, or the message strength also generates the signature data.
  • the public key and the secret key are calculated as follows.
  • L is mutually prime (the greatest common divisor with L is 1) and smaller than L, and a natural number e is randomly selected.
  • GCD (e, L) indicates the greatest common divisor of e and L.
  • the ciphertext c is calculated by performing the following cryptographic operation on the plaintext m using the public key integer e and the integer n. However, the plaintext m is smaller than the integer n.
  • the RSA encryption method is described in detail on pages 110 to 113 of Non-Patent Document 1.
  • the key generation method is the same as the RSA encryption method.
  • the signature value S is calculated by raising the hash value h to the power of d.
  • the value encrypted by RSA encryption is the signature data S.
  • Hash (D) is calculated, and S'e mod n ( Calculate the signature data S (corresponding to the value decrypted by RSA encryption). Next, it is checked whether Hash (D) and S'e mod n are equal. If they are equal, the signature data S is accepted as the correct signature. If not equal, it is rejected as the signature data S is an incorrect signature.
  • the RSA signature is described in detail on pages 175 to 176 of Non-Patent Document 1.
  • the normal program before obfuscation to be obfuscated by the obfuscator 100 includes an instruction to calculate a power value X "d mod n for the target data X.
  • Such a modular exponentiation is used for security. Sometimes called operation.
  • This normal program uses a binary exponentiation operation as the exponentiation operation.
  • the power operation by the binary method is a method of calculating the value of an expression (generally called power surplus) such as X "d mod n by repeating multiplication and 2 multiplication. Details of the binary method The method is described in Non-Patent Document 2 below.
  • the normal program 400 before obfuscation is converted into an intermediate program 420 (step S 401), and obfuscation is further performed. It is converted into the computer program 440 (step S402).
  • the normal program 400 before obfuscation shown in FIG. 4 includes an instruction block 401 that performs a modular exponentiation operation according to the binary method, and the instruction block 401 includes instructions 411, 412 and 413.
  • Such a normal program 400 may be called an information security program.
  • variable X has a value that is the target data of modular exponentiation operation. Is stored in the variable len, and the total bit length of the secret key d is stored in the variable len. The result value in the middle of calculation is stored in the variable Y. Also, the variable i indicates the bit position of interest in the secret key d. Here, it is assumed that the least significant bit of the bit of the secret key d is the 0th bit, and the bits are counted from the lower order.
  • variable X is substituted into variable Y.
  • variable len stores the total bit length of the secret key d.
  • variable Y is multiplied by 2 in modulus n and the result is stored in the variable Y.
  • instruction 415 look at the bit indicated by the value of variable i in secret key d, and if the value of that bit is “1”, further multiply variable Y by variable X in modulus n and execute the result as a variable Store in Y
  • variable Y stores the value obtained by raising the variable X to the power of d in the modulus n.
  • each bit of the secret key d is viewed, and only 2 multiplication is performed when the value of the bit is "0", and 2 multiplication when "1". And multiply. Therefore, the secret key d can be recovered if it is divided whether the power with only 2 multiplication or 2 multiplication and multiplication is performed. Therefore, in the obfuscation process, it is necessary to distinguish between 2 multiplication and multiplication in the process corresponding to each bit of the secret key d.
  • multiplication arrangement information 421 is generated, which includes initialization instruction 422, one or more 2-fold remainder instructions, and one or more 2-fold remainder instructions and a set of instructions that also become multiplication residue instructions.
  • the 2 multiplication residue instruction and the multiplication residue instruction may be called basic residue operations or simply basic operations.
  • the 2 multiplication residue instruction and the multiplication residue instruction may be referred to as a second basic operation and a first basic operation, respectively.
  • the first basic operation, the multiplication residue instruction requires a plurality of inputs
  • the second basic operation, the second multiplication operation requires only a part of the plurality of inputs.
  • the initial instruction 422 is arranged at the head, and then, the combinations of one or more 2 multiplication residue instructions and one or more 2 multiplication residue instructions and multiplication residue instructions are used.
  • a command is placed according to the value of the secret key d.
  • the order of arrangement of these instructions in the multiplication arrangement information 421 defines the execution order of the initialization instruction 422, the 2 multiplication remainder instruction and the multiplication remainder instruction.
  • the intermediate program 420 in FIG. 4 shows a state where the secret key d is "101 ⁇ ⁇ ⁇ 01".
  • the multiplication allocation information 421 is composed of an initialization instruction 422, a combination instruction 423, a 2 multiplication residue instruction 42 4, a combination instruction 425, ⁇ , a 2 multiplication residue instruction 426 and a combination instruction 427, arranged in this order .
  • the multiplication remainder is multiplication followed by a remainder (mod) calculation
  • the second multiplication remainder is a calculation after squaring and then a remainder calculation.
  • variables obtained by converting the intermediate value Y into all 2 multiplication residue instructions and all multiplication residue instructions contained in the multiplication arrangement information 421 in the intermediate program 420 Z and target data X as input and variable Z as output 2 input 1 output processing Converts the management table (RT, ⁇ ⁇ ⁇ , RT) into an instruction that refers to it.
  • RT is the ith
  • initial instruction 422 is converted into an initial instruction 442 that substitutes the value of the variable X into the variable Z.
  • an initialization instruction 442 a table reference instruction 443, 4
  • a method of obfuscation processing by the obfuscator 100 (second obfuscation method) will be described.
  • step S401 the normal program 400 before obfuscation is converted into an intermediate program 420 (step S401). Up to this point, it is the same as the first obfuscation method.
  • the 2 multiplication remainder instruction and multiplication remainder instruction in multiplication arrangement information 421 of intermediate program 420 are referred to as operation instructions, and k number of operation instructions are arranged in multiplication arrangement information 421.
  • operation instructions the 2 multiplication remainder instruction and multiplication remainder instruction in multiplication arrangement information 421 of intermediate program 420
  • k number of operation instructions are arranged in multiplication arrangement information 421.
  • the output value conversion ⁇ is a conversion using the intermediate value ⁇ ⁇ ⁇ , which is the output of the operation instruction of the preceding stage, and the target data X.
  • input value conversion ⁇ 1 is the output of the corresponding output value conversion ⁇ Conversion using the intermediate value z and the target data X.
  • the input value conversion is the same conversion as the inverse conversion of the output value conversion ⁇ .
  • the output value conversion ⁇ 473 is inserted immediately after the i-th operation instruction 472.
  • input value conversion ⁇ 1 471 is inserted immediately before the operation instruction 472 of the eye.
  • the operation instruction 472 and the output value conversion ⁇ 473 are put together to form one table RT 470, and an instruction referring to the table RT 470 is generated.
  • a method of obfuscation processing by the obfuscator 100 (third obfuscation method) will be described.
  • the first obfuscation method and the second obfuscation method are used.
  • the ordinary program 400 before obfuscation is converted into an intermediate program 420.
  • this obfuscation processing method (third obfuscation method), in the same way as the second obfuscation method, the output value conversion and the input value conversion are carried out in the multiplication arrangement information 421 of the intermediate program 420. Make an insertion. Up to this point, it is the same as the second method.
  • the transformation ⁇ 1 is an inverse transformation of the transformation ⁇
  • the transformation ⁇ 1 and the transformation ⁇ are respectively
  • input dependent value subtraction is an operation that subtracts f (X) obtained by subjecting the target data X to conversion f, and input dependent value addition adds f (X) obtained by subjecting the target data X to conversion f. Is the operation to be performed.
  • input dependent value addition is an inverse conversion of input dependent value subtraction.
  • intermediate value Z and target data X are integers of 1024 bits, for example, one table size It becomes 2 2Q48 X (the size of the table output byte size) bytes, which is very large and difficult to implement.
  • a process that takes as input a small value (for example, a 4-bit or 8-bit integer) as the post-conversion multiplication residue processing and the post-conversion 2-multiplication residue processing. It divides into (It is called division processing) and it makes a table.
  • a small value for example, a 4-bit or 8-bit integer
  • a method of obfuscation processing by the obfuscator 100 (a fourth obfuscation method) will be described.
  • the obfuscation processing method (the fourth obfuscation method), as in the third obfuscation method, Perform expansion of arithmetic instruction. Up to this point, it is the same as the third obfuscation method.
  • the output value conversion A513 is inserted immediately after the multiplication 512.
  • the output value conversion A513 is composed of an input dependent value addition 513a and a conversion ⁇ 513b.
  • a transformation ⁇ ⁇ 1 514 is inserted immediately before the remainder operation 515, and a transformation ⁇ ; 516 is inserted immediately after the remainder operation 515.
  • the transformation ⁇ - 1 is an inverse transformation of the transformation ⁇ .
  • the arithmetic 821 exists alone, that is, no transformation is inserted.
  • the conversion a 513 b on the multiplication processing side is offset by the conversion ⁇ _1 514 on the remainder operation processing side, so the processing in the entire division processing is the same as before conversion It can be seen that
  • the processing including the conversion multiplication processing, including the conversion ⁇ - ⁇ 14, the remainder operation 515, and the conversion ⁇ 516, is called conversion residue processing.
  • conversion multiplication processing and conversion residue processing are further divided into processing for each intermediate value ⁇ and each digit of the target data X.
  • Z is divided from the least significant digit into Z, Z, Z, ... every 4 bits each, X is the bottom
  • the conversion ⁇ , the conversion ⁇ , and the conversion f are conversions that can be restored to the conversion before division when the conversion of each digit is combined.
  • the transformation ⁇ uses a bijective transformation ⁇ that also converts 4-bit numbers into 4-bit numbers.
  • conversions include conversion by logical operation such as logical AND or logical sum or bitwise exclusive OR with a predetermined value.
  • logical operation such as logical AND or logical sum or bitwise exclusive OR with a predetermined value.
  • these conversions be random permutations rather than logical operations such as logical product, logical sum, and exclusive logical sum.
  • FIG. Fig. 8 shows a state of division of the conversion multiplication process in the case of 2 ⁇ i ⁇ k-1
  • Fig. 8 (a) shows the conversion multiplication process before the division.
  • a transform and multiplication process 520 shown in FIG. 8 (b) is obtained.
  • the processing of each digit is divided and converted so that the value after each addition processing is output. This takes advantage of the fact that a large number of multiplications is the sum of a small number of multiplications.
  • the conversion table RM, '.', RM of each digit can be obtained as follows.
  • Equation 531 results in Equation 531
  • expressions that are grouped in two 4 results in Equation 532 corresponds to the conversion of the first digit
  • the expression to be grouped in two 8 2 Equation 533 is obtained, which corresponds to conversion of the digit.
  • 4 bits are grouped into 4 bits each.
  • an equation corresponding to the conversion of each digit up to the most significant digit is obtained. In these formulas, omit the index i for simplicity! /.
  • the corresponding tables to be converted are RM 521, RM 522, RM 523, ⁇ ⁇ ⁇ .
  • addition processing 1 for each digit, since it is necessary to reflect the carry from the lower digit, in order to calculate the value of the first digit or more, in addition to the calculation by each conversion table RM, It is necessary to perform addition processing 1 (551) shown. Furthermore, as a result of performing addition processing 1 (551), additional carry may occur, so addition processing 2 (552) shown in FIG. 10 is performed to calculate the value of the second and subsequent digits. There is a need. In addition processing 1 (551) and addition processing 2 (551), as shown in FIG. 10, the inverse conversion to remove the conversion applied to the input including the input dependent value subtraction and the input dependent value addition is used as the input value conversion.
  • FIG. 8 summarizes the above.
  • the lower 4 bits of the RM 521 output are the 0th digit output value of the conversion multiplication process 520.
  • the upper 4 bits of the output of RM 523 are output to addition processing 1 not shown.
  • the lower 4 bits of the output of addition processing 1 (541) are the output of the first digit of the corresponding conversion multiplication processing 520. It becomes a value, and the upper 4 bits of the output of addition process 1 (541) are output to addition process 2 (543).
  • the lower 4 bits of the output of addition processing 1 (542) are output to addition processing 2 (543), and the upper 4 bits of the output of addition processing 1 (542) are output to addition processing 2 (not shown) .
  • a conversion multiplication processing 851 is obtained. Similar to FIG. 8, in FIG. 9, the process of each digit is divided and converted so that the value after each addition process is output. This takes advantage of the fact that a large number of multiplications is the sum of a small number of multiplications.
  • the lower 4 bits of the output of the RM 861 are the 0-th output value of the conversion multiplication processing 851.
  • the lower 4 bits of the output of addition processing 1 (871) become the output value of the first digit of the conversion multiplication processing 851, and the upper 4 bits of the output of addition processing 1 (871) are addition processing 2 (873 Output to).
  • the lower 4 bits of the output of addition processing 1 (872) are output to addition processing 2 (873), and the upper 4 bits of the output of addition processing 1 (872) are output to addition processing 2 (not shown). .
  • the input is 202 4-bit integers
  • the tape size for the 100th digit is 2 ⁇ X (the size of the table output size) bytes.
  • one table size is 2 2 Q 48 X (the size of the output byte of the table) bytes, so tape noise can be reduced.
  • the power conversion residue processing shown for the conversion multiplication processing can be divided as shown in FIG. 11 by the same substitution and expansion processing.
  • ⁇ in Figure 11 Denotes the power in transform multiplication residue processing RT ; in ⁇ ; index i is omitted for simplicity.
  • the number of digits of the input Z of the conversion remainder processing is 2 Xb ⁇ one digit.
  • the reason is as follows.
  • the input Z of transform residue processing is the result of transform multiplication processing.
  • an operation of the output result of the previous stage table and the target data X is performed.
  • the output result of the previous stage table is mod n in the previous stage table, it must have a number of digits less than b-1 and the target data X must have a value less than or equal to n in RSA encryption.
  • Multiplication between b-l digits takes 2 Xb-2 digit operation results, and a carry of one digit may occur. Also add up to 2 Xb-maximum input after conversion processing. It is one digit.
  • the remainder operation is performed by adding the outputs of these tables using an addition table.
  • FIG. 11 a process indicating Z X2 4i mod n for i ⁇ b is expressed as RD. Note that In FIG. 11, the force of adding "+" between each divided processing RD ; this addition is divided into each digit in the same way as the addition used in the division of post-conversion multiplication processing. In addition processing after division, processing to add input value conversion and output value conversion is shown.
  • the processing when the processing is divided, if the 0th digit (least significant digit) or the 1st digit, the number of inputs (the number of 4-bit integers) is small, The table size is not too big. However, as the digit increases, the size of the table increases.
  • the processing is further divided for each digit.
  • Figure 12 shows a further division of the second digit process.
  • the input of R M 602 is Z, Z, Z, X, X and X.
  • the process 601 has four inputs of Z, Z, X, and X, and the process 621 of Z and X
  • processing 621 is a pattern in which the addition result of the index value is equal to the number of digits.
  • the volume itself is the same as in the case of 4 inputs.
  • the input values in 4 inputs include input values that are identical to each other, so they can be combined into 2 inputs.
  • the other columns are also divided into tables in the same manner as this. For example, the table in column 5 is split into a table with the following inputs:
  • RM (5, 0): Z, Z, X, X
  • RM (5, 1): Z, Z, X, X
  • index ( ⁇ , ⁇ ) attached to RM indicates the digit number of the first X
  • the second ⁇ indicates the minimum value of the index of the input.
  • one tape size becomes 2 16 ⁇ (the output byte size of the table) bytes, and the table can be reduced. Note that the same division is possible also for 2 multiplication. The division method is omitted since it is almost the same as multiplication.
  • FIG. 13 shows the sharing of the RM divided table 657 and the sharing of the RS divided table 658.
  • RS is processing indicating 2 multiplication.
  • tapee Nore 661 and Tape nore 662 are tables whose index is 2 ⁇ i, i (i ⁇ 0). Tables whose index is 2 xi, i (i ⁇ 0) can be made common, and it becomes possible to use one and the same table instead of a plurality of tables.
  • table 663 and table 664 respectively perform the same processing for the input.
  • Tape Nore 663 and Tape Nore 664 have the index i, 0 (i ⁇ 0). Commonality is possible for these tables.
  • table 665 and table 656 each have the same processing for the input! These tables can also be shared!
  • each table can be classified into the following four cases depending on the combination of indexes.
  • a table whose index is i, 0 (i ⁇ 0) and a table having other indexes differ only in whether or not g (X) is added to the output. Also, for a table with index 0,0 and a table with index 2 X i, i (i) 0), g (X.) (if index is 0, 0, g (X The only difference is whether or not) is added. That is,
  • the second table of Ndettas is different from the other ones, and g (X) or g (X) is output.
  • Tables 681 and 682 are tables of index power 2 xi, i (i ⁇ 0). Tape index with index 2 X i, i (i ⁇ 0) is It can be made common, and it becomes possible to use one and the same table instead of a plurality of tables.
  • the table 683 and the table 684 respectively perform the same processing for the input.
  • Tape Nore 683 and Tape Nore 684 have the index i, 0 (i ⁇ 0). Commonality is possible for these tables.
  • the table 685 and the table 686 respectively perform the same processing for the input.
  • each table can be classified into the above four cases depending on the combination of indexes as described above.
  • the obfuscation device 100 executes obfuscation by performing commonality when input value conversion, output value conversion, processing division, and divided processing are performed.
  • multiplication arrangement information arrangement information of the multiplication residue and the second multiplication residue of FIG. 4
  • multiplication arrangement information arrangement information of the multiplication residue and the second multiplication residue of FIG. 4
  • division processing arrangement information information indicating this processing and the arrangement of tables
  • the obfuscation device 100 generates multiplication arrangement information, and then generates division processing arrangement information. After that, determine the input value conversion and output value conversion to be used in the division processing arrangement information, and generate a table based on it.
  • the table is generated, for example, by calculating and associating values calculated in the post-conversion process when the input value is input to the input value.
  • multi-dimensional array can be considered.
  • read instruction order information indicating the order of the table read instruction is generated based on the division processing arrangement information. Thereafter, by combining the generated read instruction order information with the generated table, the obfuscated ⁇ program is completed.
  • the obfuscated deaf program generated by obfuscated deaf device 100 may include the above-mentioned read instruction order information and commands and data other than the table.
  • the division processing arrangement information may be provided to the obfuscation device 100 in advance.
  • RT is a multiplication process for the division of RT, which is the conversion in the first digit of the secret key d
  • Figure 14 shows the configuration of the multiplication process 1002 divided for RT
  • FIG. 1 A first figure.
  • ⁇ , ⁇ , ⁇ and ⁇ are values obtained by dividing ⁇ and X into 3 bits each.
  • the multiplication processing is divided into each digit based on the above-mentioned method, and the multiplication processing 1002 is, as shown in FIG. 14, RM 1121, RM 1122, RM 1123, color calculation processing RA 1124, R
  • RA 1131 is included.
  • RM 1121 is the calculation of the 0-th digit of RT, and after dividing with Z and X as inputs,
  • RM 1122 is the first digit calculation of RT, and Z, Z, X and X are input.
  • RM 1123 is the second digit calculation of RT, and Z 1, X 1
  • Each output of RM, RM, RM is subjected to addition processing RA, RA,..., RA
  • the result obtained by adding 0 1 2 1 2 5 is the converted value of the multiplication result of Z and X.
  • A,..., RA are input to each of them similarly to addition processing 1 and addition processing 2 shown in FIG. Value conversion and output value conversion included!
  • 0 1 2 1 2 3 is a plurality of outputs (for RM, since there are 3 digits of output, there is also a middle part, 3
  • the output value is in the range of “0” to “56”, and the output value is
  • the upper 3 bits of are input to RA 1124 and the lower 3 bits are the output of multiplication process 1002.
  • RM 1121 also have their respective “[0, 7]”
  • the multiplication processing 1002 outputs, as final output values, the 3-bit output values 1142a, 1142b, 1142c, 1142d, and 1142e described at the bottom of FIG. This f column is input, multiplication processing 1002 is input, 6-bit ⁇ and X are input, and a 15-bit value is output.
  • RM 1121, RM 1122, RM 112 which constitute multiplication processing 1002 of FIG.
  • RA 1124 includes the input value conversion j8- ⁇ immediately after the upper input value
  • the input value conversion ⁇ 4124a is included, and the output value of the input value conversion ⁇ 4124b and the output value of the input value conversion 8124 4a are added.
  • the output value include the output value conversion ⁇ 1124 e and add 11
  • the RM 1121 performs multiplication 1121 a on the input value on the upper side and the input value on the lower side.
  • FIG. 16 is a diagram showing a configuration of multiplication processing 1004 divided for RT (2 ⁇ i ⁇ k ⁇ 1). Also in this example, the bit size of n is 6 bits, and 6-bit data is divided into 2 digits. Each digit consists of 3 bits.
  • the multiplication process is divided at each digit, as in the multiplication process for RT.
  • RM 1181 is multiplication processing after division with ⁇ ⁇ and X as inputs
  • RM 1182 is multiplication processing after division with ⁇ ⁇ and X as inputs
  • 0 0 0 1 is the post-division multiplication processing with ⁇ , ⁇ , ⁇ , ⁇ as inputs, and RM 1183 is Z, X
  • the calculated result 3 ⁇ 4 is the converted value of the multiplication result of X.
  • RM RM
  • RM RM
  • RM RM
  • RM RM
  • RM RM
  • M, RM, RA, RA, ⁇ ⁇ ⁇ , RA is an upper portion including a range of negative values, positive
  • the range of values for the upper part and the lower part of the output is the value before output value conversion, and after output value conversion, the value does not necessarily fall within this range. For example, above the output of RM
  • the order part is [1, 7] before output value conversion, but after output value conversion, it will be [0, 8] etc. for easy handling.
  • 6-bit Z and X are input in the multiplication process, and a 16-bit value (the most significant digit includes sign information) is output!
  • FIG. 18 is a diagram showing the configuration of multiplication processing 1009 divided for RT.
  • multiplication processing 1009 includes RM 1331, RM 1332 and RM 1333 as shown in FIG.
  • RM 1331 is multiplication processing after division with Z and X as inputs
  • RM 1332 is multiplication processing after division with Z and X as inputs
  • 0 0 0 1 is the post-division multiplication processing with Z, Z, X, X as inputs, and RM 1333 is Z, X
  • RM 1331, RM 1332 and RM 133 which constitute the multiplication processing 1009 of FIG.
  • FIG. 15 An example of the table corresponding to RM 1122 shown in FIG. 15 for RT is shown in FIG.
  • FIG 41 shows the details of RM 1122, shown in Figure 15, for RT.
  • RM is 4 pieces
  • the input value group (inl, in2, in3, in4) consisting of the input values inl, in2, in3 and in4 of 1 1 1 is subjected to conversion using the table 1421 shown in FIG.
  • Output value group (out1, out2, out3) composed of the output values outl, out2 and out3.
  • the table 1421 includes a plurality of input value groups (inl, in2, in3, in4), and a plurality of output value groups (outl, out2, each corresponding to the plurality of input value groups). It consists of out3) and.
  • the table 1421 includes only a plurality of input value groups (i nl, in2, in3, in4) and a plurality of output value groups (outl, out2, out3) as described above. Being done Be careful, because
  • FIGS. 42 (a), 42 (b) and 42 (c) respectively show the RMs shown in FIG. 15 for RT.
  • FIG. 24 shows details of RM 1182 shown in FIG. 17 for RT (2 ⁇ i ⁇ k ⁇ l).
  • i 1 1 performs conversion using an input value group (inl, in2, in3, in4) composed of four input values inl, in2, in3 and in4 using the table 1360 shown in FIG. 3 output values out
  • the table 1360 shows a plurality of input value groups (inl, in2, in3, in4), and a plurality of output value groups (out1, out2) respectively corresponding to the plurality of input value groups. , Out3) and consists of.
  • the intermediate values in the middle of the calculation also include the described force.
  • the table 1360 includes a plurality of input value groups ( It should be noted that it consists only of i nl, in2, in3, in4) and multiple output value groups (outl, out2, out3).
  • FIG. 26 (a), FIG. 26 (b), FIG. 26 (c) and FIG. 26 (d) respectively show the RT in FIG.
  • FIG. 19 An example of a table corresponding to RM 1332 shown in FIG. 19 for RT is shown in FIG.
  • FIG. 27 shows the details of RM 1332 shown in FIG. 19 for RT.
  • RM uses the table 1390 shown in FIG. 28 for the input value group (inl, in2, in3, in4) consisting of four k 1 1 input values inl, in2, in3 and in4. It outputs an output value group (outl, out2, out3) composed of three output values outl, out2 and out3.
  • the table 1390 includes a plurality of input value groups (inl, in2, in3, in4), and a plurality of output value groups (outl, out2, each corresponding to the plurality of input value groups). It consists of out3) and.
  • Table 1390 shows only the input values (inl, in2, in3, in4) and the output values (outl, out2, out3) from the intermediate values. Be careful because they are configured.
  • FIGS. 29 (a), 29 (b), 29 (c) and 29 (d) are respectively shown in FIG. 19 for RT.
  • FIG. 15 An example of a table corresponding to RA 1124 shown in FIG. 15 for RT is shown in FIG.
  • FIG. 30 shows the details of RA 1124 shown in FIG. 15 for RT.
  • Two RAs are shown in FIG. 30 for RT.
  • a conversion using table 1410 shown in FIG. 31 is performed on an input value group (inl, in2) composed of 1 1 1 input values inl and in2 to obtain two output values outl and out2. Output the set of output values (outl, out2).
  • the table 1410 includes a plurality of input value groups (inl, in2) and a plurality of output value groups (outl, out2) respectively corresponding to the plurality of input value groups.
  • the table 1410 in order to facilitate understanding of the calculation process, in addition to a plurality of input value groups (inl, in 2) and a plurality of output value groups (outl, out2), intermediate values during calculation are about Also, as described above, as described above, the table 1410 is composed of only a plurality of input value groups (inl, in2) and a plurality of output value groups (outl, out2).
  • FIGS. 32 (a), 32 (b) and 29 (c) respectively show the RA shown in FIG. 15 for RT.
  • the divided remainder processing 1005 is, as shown in FIGS. 20-23, remainder calculation RD 1201, RD 1
  • RA, RA, RA, ⁇ ⁇ ⁇ is a digit-wise addition or addition to reflect a carry
  • remainder processing 1005 is modulo integer n:
  • RA 1202 respectively receive three 3-bit input values Z, Z, Z
  • Remainder RD 1201 adds the upper 3 bits and the lower 3 bits of the operation result, respectively.
  • Addition RA 1203 is the top 1 bit of the operation result.
  • the lower three bits are output to the additions RA 1205 and RA 1204, respectively.
  • a 1202 adds the upper 1 bit and the lower 3 bits of the operation result to each other, RA 12
  • Addition RA 1204 is the upper 1 bit of the operation result
  • Remainder RD 1206 accepts one 3-bit input value Z input, and the operation result
  • the upper 3 bits and the lower 3 bits of are output to additions RA 1208 and RA 1207, respectively
  • Addition RA 1208 adds the upper 1 bit and the lower 3 bits of the operation result, respectively.
  • RA 1209 adds the upper 1 bit and the lower 3 bits of the operation result to each other, RA 1
  • the RA 1210 adds 1 bit of the operation result.
  • Remainder RD 1212 accepts one 4-bit input value Z input and the operation result
  • the upper 3 bits and the lower 3 bits of are output to addition RA 1214 and RA 1213 respectively
  • Addition RA 1214 adds the upper 1 bit and the lower 3 bits of the operation result, respectively.
  • Addition RA 1213 is the top 1 of the result of the operation.
  • the RA 1215 adds the upper 1 bit and the lower 3 bits of the operation result to each other, RA 1 Output to 217 and RA 1220.
  • Addition RA 1217 adds 1 bit of the operation result to
  • Addition RA 1216 multiplies two bits of the operation result.
  • the operation shown in FIG. 23 performs the remainder processing.
  • the calculation result of the operation shown in Fig. 23 may also have three digits, in which case further residue processing is required.
  • Addition RA 1220 adds the upper 1 bit and the lower 3 bits of the operation result respectively.
  • One bit is added to RA 1221 and the lower 3 bits of the operation result are output as the final output.
  • Addition RA 1221 outputs the upper one bit of the operation result to calculation RA 1222 and
  • Addition RA 1222 is one bit of the operation result
  • n is a 6-bit value and is small. Therefore, when the multiplication process is divided up to each digit, if the bit size is large, The processing may be further divided as in “division of processing (part 2)”.
  • FIG. 33 is a diagram showing the configuration of the obfuscation device 100. As shown in FIG.
  • the obfuscation device 100 generates the multiplication arrangement information indicating the order of multiplication processing and 2 multiplication processing from the secret key d, and an input unit 101 for receiving the input of the secret key d.
  • Information generation unit 102, and processing divided from multiplication processing and 2 multiplication processing The division processing arrangement information generation unit 103 that generates division processing arrangement information that is arrangement information of one or more input value conversions and one or more output value conversions to be added to the input value conversion and output value conversion.
  • the conversion generation unit 104 generates a function to be shown, the table generation unit 105 generates a table using division processing arrangement information, input value conversion and output value conversion, multiplication arrangement information and division processing arrangement information.
  • the read information arrangement unit 106 generates the read instruction sequence information indicating the arrangement of the instruction to read the table
  • the program generation unit 107 generates the obfuscated program using the table and the read instruction sequence information, and the obfuscated program.
  • a medium recording unit 108 for recording on the body.
  • the input unit 101 receives the secret key d as an input.
  • the multiplication arrangement information generation unit 102 generates multiplication arrangement information indicating the order of processing of multiplication remainder processing and 2 multiplication remainder processing from the secret key d. This corresponds to the process shown in step S401 of FIG.
  • multiplication arrangement information 421 is information indicating an order such as ⁇ 2 multiplication residue, multiplication residue, 2 multiplication residue, 2 multiplication residue, multiplication residue ⁇ .
  • Division processing arrangement information generation section 103 performs processing obtained by dividing multiplication remainder processing and 2 multiplication remainder processing according to an arrangement method given in advance, and one or more input value conversions to be added thereto and one or more The division processing arrangement information which is the arrangement information of the output value conversion of is generated.
  • the information generated here is only the placement information for each process or conversion, and no function corresponding to the process or conversion is generated.
  • the conversion generation unit 104 generates a function for the arranged input value conversion and output value conversion with reference to the division processing arrangement information.
  • the method of generating functions for input value conversion and output value conversion is as described above in “2.3 Obfuscation performed by obfuscation device 100”.
  • the table generation unit 105 generates a table using the division processing arrangement information, the input value conversion, and the output value conversion.
  • the table generation method is as described above in “2.3 Obfuscation performed by the obfuscation device 100”.
  • the read information arrangement unit 106 generates read instruction order information in which the instructions for reading the table are arranged in order using the multiplication arrangement information and the division processing arrangement information. Specifically, using the division processing arrangement information, it is possible to use each of in converted post multiplication residue processing and in post converted 2 multiplication residue processing.
  • a table read instruction group is generated by arranging table read instructions corresponding to the process in order, and table read instruction groups corresponding to those in converted post multiplication remainder processing and post conversion 2 multiplication remainder processing are multiplied arrangement information Place the table read command by placing using.
  • the program generation unit 107 generates an obfuscated program in which the read instruction order information and the table are combined.
  • the medium recording unit 108 records the obfuscation program on the medium 200.
  • FIG. 34 shows the configuration of the cryptographic processing apparatus 300. As shown in FIG. 34
  • the cryptographic processing device 300 has an input unit 301 for inputting encrypted data or message data, an output unit 302 for outputting decryption data or signature data, and a data memory 303.
  • a program memory 304, a CPU 305, and a medium reading unit 306 for reading an obfuscation program from the medium 200 are provided.
  • the input unit 301 receives, as inputs, encrypted data at the time of decryption processing described later, and message data at the time of signature generation processing.
  • the output unit 302 outputs decryption data at the time of decryption processing described later and signature data at the time of signature generation processing.
  • the data memory 303 stores input decryption data and message data, and intermediate value data when executing the obfuscation program.
  • the program memory 304 stores obfuscated and unread programs.
  • the CPU 305 executes an instruction described in the obfuscated program.
  • the medium reading unit 306 reads the obfuscation program from the medium 200 and stores the obfuscation program in the program memory 304.
  • the operation of the obfuscation system 1 generates an obfuscation program in the obfuscation device 100 and records the obfuscation processing on the medium 200, and the operation of the encryption processing device 300 on the medium 200.
  • the input unit 101 of the obfuscation device 100 receives the secret key d (step S1101), and the multiplication arrangement information generation unit 102 generates multiplication arrangement information (step S1102), and the division processing arrangement information generation unit 103
  • the division processing arrangement information is generated (step S 1103), the conversion generation unit 104 generates functions for input value conversion and output value conversion (step S 1104), and the table generation unit 105 generates a table (step S 1103).
  • the read information arrangement unit 106 generates the read instruction order information (step S1106)
  • the program generation unit generates the obfuscation program (step S1107)
  • the medium recording unit of the obfuscation apparatus 100 108 records the obfuscation program on the medium 200 (step S1108).
  • the input unit 301 of the cryptographic processing apparatus 300 receives the encrypted data as input and stores it as the target data X in the data memory (step S1201), and the medium reading unit 306 performs the obfuscation program for the medium 200 as well.
  • the data is read and stored in the program memory 304 (step S 1202).
  • the CPU 305 uses the data memory 303 in accordance with the obfuscation program stored in the program memory 304 and calculates the power value of the target data X: Td mod n
  • the data is stored in the data memory 303 (step S1203), and the output unit 302 outputs the value V (the power value of the target data) stored in the data memory 303 as decoded data (step S1204).
  • V the power value of the target data
  • the input unit 301 of the cryptographic processing device 300 receives the message data as an input, and stores it as the target data X in the data memory (step S1301).
  • the obfuscated reading program is read from 0 and stored in the program memory 304 (step SI 302).
  • the CPU 305 uses the data memory 303 in accordance with the obfuscation program stored in the program memory 304 to power the target data X Value: Td mod n is calculated and stored in the data memory 303 (step S 1303).
  • the output unit 302 outputs the value (power value of the target data) stored in the data memory 303 as signature data ( Step S 1304).
  • the operation of the signature generation process ends.
  • the table generation unit 105 of the obfuscation device 100 includes: RM 1121, RM 1122, RM 1123, RA 1124, RA 1125, RA 1126, RA 11
  • the table generation unit 105 initially stores only these connection relationships, and the RM 1121, the RM 1122, the RM 1123, the RA 1124, the RA 1125, the RA 1126, and the RA.
  • the table generation unit 105 stores in advance 40 different multiplication pattern tables.
  • These multiplication pattern tables are tables of 2 inputs and 2 outputs which convert 2 input values into 2 output values, each input value is 3 bits in length, and each output value is 3 It is a bit length.
  • Steps shown in FIG. 38 in steps S1401 to S1404! Show RM 1121, RM 1122 and RM 1123 [Hot! / Feel, each of the above 40 types
  • One multiplication pattern table is selected at random from the multiplication pattern table (step S 1402), and these RMs 1121, RM 1122, and RM 1123 [this selected multiplication note is selected.
  • a run table is allocated (step S1403).
  • the multiplication pattern table selected once is selected so that the same multiplication pattern table is not selected for different RMs. Do not select in the next selection, as in the case of exclusion from selection.
  • table generation unit 105 repeats the following for each path from the input value strength at the top of multiplication process 1002 to the final output value.
  • an example of the path leading to the input value strength at the head of the multiplication processing 1002 and the final output value is also the input value 1141a power, the output value 1142 through the multiplication 1211a of the RM 1121, the conversion 1121b.
  • a path leading to a and an example of another path is the input value 1141 b power, etc., the power of RM 1121
  • the path is a path from the 3-bit input value to the 3-bit output value via one RM and at least one RA.
  • the table generation unit 105 stores in advance the position on the path where the conversion should be arranged.
  • the position where the conversion is to be placed is, in FIG.
  • the table generation unit 105 sequentially selects, one by one, the position at which the conversion is arranged from the top of each path.
  • step S1406 If the next to the selected position is the final output value (YES in step S1406), the table generation unit 105 selects one conversion and places the selected conversion in the position (step S1 409), End the processing on this route.
  • step S1406 the table The generation unit 105 selects one conversion and places the selected conversion at the corresponding position.
  • step S1407 when a conversion is selected before, a conversion different from the previously selected conversion is selected.
  • step S1408 the inverse transformation of the transformation placed in step S1407 is placed (step S1408), and then the process returns to step S1406 to repeat the processing.
  • the attacker analyzes the output, and the input power is S dummy. It is possible to prevent an attack that distinguishes multiplication by multiplication from multiplication by 2
  • the input value conversion and the output value conversion as described above are arranged by dividing the processing of each digit into a 4-input 1-output and 2-input 1-output table both for multiplication and 2 multiplication. Easy to do, take a configuration like that. [0176] In this way, with respect to processing in which multiplication and 2-multiplication processing are divided into each digit, the same number of arguments are input in both multiplication and 2-multiplication, and each input affects the output. Since it is possible to generate such a table, it can not be distinguished from the way of division of the table whether it is multiplication by force or 2 multiplication. That is, it is possible to prevent an attack that analyzes the table and distinguishes whether it is multiplication processing or 2 multiplication processing. Therefore, the processing of multiplication and 2 multiplication can be distinguished by the attacker, and the present invention is effective.
  • the table size required for one multiplication processing or 2 multiplication processing is 2 2048 X (table output Neute size) bytes.
  • (256 X 256) Z2 X 2 16 X (table output byte size) 2 31 X ( The size can be reduced to the size of the canopies of the table.
  • Table size power required for one multiplication process or 2 multiplication process 2 X 2 16 X (table output byte size) + 2 X 2 8 X (table output byte size) 131, 584 X (table output It can be reduced to the byte size).
  • table size can be reduced by dividing and sharing tables.
  • the present invention can be implemented on a computer. It is possible to generate a source code obfuscated program of a new RSA cipher.
  • the brute force attack of a bijective map is an attack in which all possible bijective map noliers also hit the correct bijective map.
  • a table is generated for each bijective mapping, and comparison with the table actually included in the program determines whether it is a correct bijective mapping. In the case of a correct bijective map, all the values in the table match.
  • each table contains the bijective mapping of g and ⁇ described above, and for both tables, the corresponding positive, mapping of each table The attack on the table is not successful! The attack on the table is not successful! ⁇
  • 16! 2 44
  • the target processing of table conversion is multiplication residue processing and 2 multiplication residue processing in RSA encryption, and the power of unifying these inputs is not limited to this.
  • the processing of elliptic curve addition (input of the coordinates of two points) and elliptic curve doubling (input of the coordinates of one point) of the elliptic curve cryptosystem may be a target of table.
  • the distinction between the elliptic curve addition and the elliptic curve double addition becomes a force of fraud analysis, so it can not be distinguished as in the present invention. By doing this, it is effective to prevent attacks.
  • the present invention includes a processing that includes processings that differ in the number of inputs that are not related to only processing related to encryption and that if each processing is differentiated, it will become a means of fraud analysis S Needless to say, it is applicable and effective for any program.
  • a set of one input value is the other input, such as a combination of a first process whose input value is X, Y and a second process whose input value is Y, ⁇ . Even if the set of values is not completely included, obfuscation can be performed.
  • a process dependent on the input value ⁇ ⁇ ⁇ ⁇ (corresponding to the input-dependent addition and subtraction in the second embodiment) is added to the first process, and then the table is displayed, and the second process is started. Can be tabulated after adding processing depending on the input value X.
  • decryption processing of RSA encryption method or signature generation processing of RSA signature method is executed using an obfuscated decryption program! Anything that contains an exponentiation process with as the power value may be used.
  • the signature scheme of the RSA-PSS signature scheme may be used
  • the decryption process of the RSA-OAEP encryption scheme may be used
  • the decryption procedure of the RS ⁇ scheme may be used.
  • decryption processing of ElGamal encryption method may be used.
  • a cryptographic processing apparatus stores the obfuscated program which has read the medium power as well as the medium power into the program memory. This is divided into several times and stored in the program memory while reading. It may be executed by the CPU each time.
  • the input message is the target data, and the power of the target data is calculated using the power message m.
  • X Hash (m). Let's calculate it.
  • Hash represents a hash function
  • Hash (m) represents a hash value of message m.
  • the hash function to use is, for example, SHA—1, SHA—224, SHA—256, SHA— 384, SHA— 512, MD5, WHIRLPOOL RIP RIPEMD 128, RIPEMD 160
  • the obfuscation program may be recorded on a medium and distributed, and may be transmitted using a communication channel.
  • the input value conversion includes the input dependent subtraction
  • the output value conversion includes the input dependent subtraction.
  • the present invention is not limited to this.
  • the input dependent subtraction and the input dependent addition arrangement may be reversed.
  • a combination of multiplication and division may be used instead of subtraction and addition. That is, as long as conversion dependent on the target data X is performed, any combination of conversions may be used. However, if you want to reduce the size of the table by dividing the table in the manner described above, it is desirable to combine addition and subtraction U ,.
  • Embodiment 2 after addition of input-dependent addition and input-dependent subtraction to both multiplication processing and 2-multiplication processing, the power used to perform table selection is limited to this. It is not a thing. That is, in the present invention, if conversion (input-dependent addition) depending on the target data X is included in at least 2 multiplication processing, even if the relationship between the input and output values of each table is analyzed, the multiplication table and the 2 multiplication table It may be difficult to distinguish them.
  • the method applying the conventional method of converting the processing into a random table includes multiplication and multiplication and multiplication. There is a problem that the attacker can analyze it using this because the number of inputs is different. More specifically, there is a problem that it is possible to distinguish whether the table performs multiplication or 2 multiplication from the number of inputs to each table.
  • the same number of arguments are input to the multiplication and 2-multiplication processing.
  • the present invention provides a source code obfuscation system, apparatus and method for preventing attacks due to different numbers of inputs of multiplication and 2 multiplication.
  • the present invention takes, as an input, a first process of calculating first process output information of one or more powers from the first process input information of one or more numbers.
  • a obfuscated device for outputting one table, and first conversion means for converting first conversion input information of one or more numbers into first conversion output information of one or more numbers;
  • first table generation means for generating the first table indicating the correspondence between the first table input information having one or more powers and the first table output information having one or more powers;
  • the first table input information includes the number included in the first processing input information or the first conversion input information, and the number power included in one or more number of additional input information, the first table
  • the output information is the first processing output information or the first conversion output information.
  • the obfuscation apparatus further includes second conversion means for converting second conversion input information having one or more powers into second conversion output information having one or more powers.
  • the first table input information includes the number included in the first conversion input information and the number included in the additional input information, and the first process input information is the conversion output information
  • the second conversion input information includes at least one number, and the first table output information includes the second conversion output information. It may be
  • the conversion by the first conversion means may be a conversion based on the first table input information.
  • the obfuscation apparatus calculates second processing output information including one or more numbers from second processing input information including one or more numbers in addition to the first processing.
  • Processing The information processing apparatus may further include additional input information determination means which uses, as the additional input information, a number not included in the first process input information among the second process input information.
  • the second process is performed by multiplying the product of the first number and the second number from the second process input information including the first number and the second number.
  • the second process output information is calculated, and the first process is a process of calculating the first number of squares from the first process input information of the first number. Even if it is a process that calculates the process output information of.
  • the obfuscation device may be a third process input information including one or more, or at least one second intermediate value information, in addition to the first process and the second process.
  • an obfuscation apparatus for outputting the first table and the second table by using as input a third process for calculating third process output information having one or more numbers, and one or more numbers.
  • a third conversion means for converting the third conversion input information into the third conversion output information with one or more numbers, the second table input information with one or more numbers, and one or more numbers A second table generating unit for generating the second table indicating correspondence of the second table output information, and a third conversion input information including one or more number powers; And third conversion means for converting into the conversion output information of Information includes at least one of the first table output information, the third transformation input information includes at least one of the first table output information, and the second table output information includes the first table output information.
  • the three process output information may be included.
  • the obfuscator according to the fourth process input information that is one or more of several powers is one or more in number.
  • the fourth process of calculating the fourth process output information as an input is an input, and the second table input information includes: a number included in at least one of the first table output information; and a second additional input
  • the second additional input information determining means may include information, and the number of the fourth process input information not included in the third process input information as the second additional input information. May be
  • the obfuscation device may further perform conversion by the first conversion means and the third conversion means in the third process among the numbers included in the first process input information. On The conversion may be based on the number included in the force information.
  • the obfuscation apparatus includes fourth conversion means for converting fourth conversion input information which is one or more powers into fourth conversion output information which is one or more powers, Conversion input information includes at least one number of the third process output information, and the second table output information includes the third process output information instead of the fourth process output information May be included.
  • the obfuscation device receives, as an input, a fifth process of calculating fifth process output information of one or more numbers from the fifth process input information of one or more numbers.
  • the above-mentioned fifth processing calculates the processing output information of one number from the processing input information consisting of four numbers.
  • One or more of four inputs and one output processing, and two number powers of processing input information one There are processing division means for dividing processing output information consisting of numbers into 1 or more 2-input 1-output processing, and at least one of the 4-input 1-output processing and the 2-input 1-output processing is the first processing
  • at least one of the four-input one-output processing and the two-input one-output processing may be used as the third processing.
  • a first process of calculating first process output information of one or more numbers from one or more first process input information of several powers is used as an input.
  • An obfuscation method for outputting a table comprising: a first conversion step for converting first conversion input information of one or more numbers into first conversion output information of one or more numbers; A first table generation step of generating the first table indicating correspondence between the first table input information which is also number power and the first table output information which is also number power or more, and the first table
  • the input information includes the number included in the first processing input information or the first conversion input information, and the number power included in the additional input information including one or more number powers, and the first table output information includes Including the first processing output information or the first conversion output information Chiyoi Te.
  • the obfuscation method further includes a second conversion step of converting the second conversion input information having one or more powers into second conversion output information having one or more powers.
  • the first table input information includes the number included in the first conversion input information and the number included in the additional color input information, and the first processing input information includes the conversion output information.
  • the second conversion input information includes at least one number of the first processing output information, and the first table output information includes the second conversion output information. It may be included.
  • the conversion by the first conversion step is a conversion based on the first table input information.
  • a second process output information including one or more numbers is calculated from second process input information including one or more numbers. It is also possible to have an additional input information determination step in which processing is used as the input and the number of the second processing input information not included in the first processing input information is used as the additional input information.
  • the second processing includes the product of the first number and the second number from the second processing input information including the first number and the second number.
  • the second process output information is calculated, and the first process is a process of calculating the first number of squares from the first process input information of the first number. Even if it is a process that calculates the process output information of.
  • the obfuscation method may be a third process input information including one or more, or at least one second intermediate value information in addition to the first process and the second process. And an obfuscation method for outputting the first table and the second table by using a third process of calculating third process output information of one or more numerical powers as one or more numbers.
  • the table input information includes at least one of the first table output information, the third conversion input information includes at least one of the first table output information, and the second table output information is The third process output information may be included.
  • the obfuscation method includes one or more numbers from the fourth process input information including one or more number powers in addition to the first process, the second process, and the third process.
  • Fourth place The fourth process of calculating the physical output information is an input, and the second table input information includes the number included in at least one of the first table output information and the second additional input information.
  • a second additional input information determination step may be performed in which a number not included in the third processing input information among the fourth processing input information is used as the second additional input information.
  • the conversion by the first conversion step and the third conversion step may be performed by using the first conversion input data among the numbers included in the first process input information.
  • the conversion may be based on the number included in the processing input information of 3).
  • the obfuscation method includes: a fourth conversion step of converting fourth conversion input information which is also one or more powers into fourth conversion output information which is one or more powers;
  • the conversion input information includes at least one number of the third process output information, and the second table output information includes the fourth process output information instead of including the third process output information. May be included.
  • the obfuscation method takes, as an input, a fifth process of calculating fifth process output information of one or more numbers from the fifth process input information of one or more numbers.
  • the above-mentioned fifth processing calculates the processing output information of one number from the processing input information consisting of four numbers.
  • One or more of four inputs and one output processing, and two number powers of processing input information one
  • the process division step of dividing into 1 or more 2-input 1-output processing to calculate processing output information consisting of a number, and at least one of the 4-input 1-output processing and the 2-input 1-output processing is the first processing.
  • the third process may be at least one of the four-input one-output process and the two-input one-output process.
  • the present invention is an information processing system including the obfuscation device, a program, and an information processing device that executes the program, wherein the program uses the first table. And a process of calculating the first table output information from the first table input information.
  • the present invention is a program in an information processing system including the obfuscation device, a program, and an information processing device that executes the program, the first table using the first table.
  • First table output information from input information Includes processing to calculate information.
  • the first process may be part of the decryption process!,.
  • the first process may be part of a signature generation process.
  • the present invention is a recording medium recording the program.
  • the present invention is an information processing apparatus in an information processing system including the obfuscation apparatus, a program, and an information processing apparatus that executes the program, wherein the program uses the first table. And calculating the first table output information from the first tape notch input information.
  • the present invention relates to the first process in which the first process output information including one or more numbers is calculated from the first process input information including one or more numbers.
  • First conversion means for converting the first conversion input information, which is an integrated circuit of the obfuscation device for outputting a table, which is one or more powers, into the first conversion output information, which is one or more powers
  • first table generation means for generating the first table showing correspondence between first table input information having one or more numbers and first table output information having one or more numbers.
  • the first table input information is the number included in the first processing input information or the first conversion input information, and the number power included in the one or more number input powers of the additional input information.
  • the output information includes the first processing output information or the first conversion output information. .
  • the present invention is an integrated circuit of an information processing apparatus that performs information processing including the first processing, and a table holding unit that holds the first table, and the first table input unit. And output value calculation means for receiving the information and outputting the first table output information.
  • the obfuscator outputs a program instead of the first table, and the obfuscator further includes the first table and one or more program instruction powers.
  • the program instruction generation unit may generate the program, and the program instruction group may include processing for receiving the first table input information and outputting the corresponding first table output information.
  • the present invention also provides a process using a first input value group, which is a set of one or more input values. Obfuscation and obfuscation of a program including a first process to be performed and a second process to perform a process using a second input value group that is a set including more input values than the first process.
  • An obfuscated reading device for generating a computerized program, a second table in which the second input value group is associated with the second processing result, and an input unit for receiving the program;
  • Table generation means for generating a first table in which an input value group and an additional input value group are associated with a processing result of the first processing after conversion; and the first processing in the program, The first input value group is replaced with processing for taking out the processing result from the first table, and the second processing is performed using the second input value group.
  • the process 1 is a process in which a process using the additional input value group is added to the first process.
  • Each of the above devices is specifically a computer system comprising a microprocessor, a ROM, a RAM, a hard disk unit, a display unit, a keyboard, a mouse and the like.
  • a computer program is stored in the RAM or the hard disk unit.
  • Each device achieves its function by operating according to the microprocessor program.
  • the computer program is configured by combining a plurality of instruction codes indicating instructions for the computer in order to achieve a predetermined function.
  • the system LSI is a super-multifunctional LSI manufactured by integrating a plurality of components on one chip, and more specifically, is a computer system including a microprocessor, ROM, RAM and the like. is there. A computer program is stored in the RAM. Microprocessor Power The system LSI achieves its functions by operating according to the computer program. [0214] In addition, each part of the constituent elements constituting each of the above-described devices may be individually provided in one chip, or may be provided in one chip so as to include part or all.
  • the system LSI is sometimes referred to as an IC, an LSI, a super LSI, or an ultra LSI depending on the degree of force integration.
  • the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible.
  • FPGA field programmable gate array
  • reconfigurable 'processor that can reconfigure connection and setting of circuit cells in the LSI.
  • a part or all of the constituent elements of each device described above may be configured as a removable IC card or a single module power of each device.
  • the IC card or the module is a computer system including a microprocessor, a ROM, a RAM, and the like.
  • the IC card or the module may include the above-described super-multifunctional LSI.
  • the IC card or the module achieves its functions by the microprocessor operating according to the computer program. This IC card or this module may be tamper resistant!
  • the present invention may be methods shown above.
  • the present invention may be a computer program that realizes these methods by a computer, or may be a digital signal that also has the computer program power.
  • the present invention relates to a computer readable recording medium that can read the computer program or the digital signal, such as a flexible disk, a hard disk, a CD-ROM, a MO, a DVD, a DVD, a ROM, a DVD, a RAM, and a BD. It may be recorded on a Blu-ray Disc), a semiconductor memory or the like. Also, the digital signal may be recorded on these recording media.
  • a computer readable recording medium such as a flexible disk, a hard disk, a CD-ROM, a MO, a DVD, a DVD, a ROM, a DVD, a RAM, and a BD. It may be recorded on a Blu-ray Disc), a semiconductor memory or the like. Also, the digital signal may be recorded on these recording media.
  • the present invention relates to the computer program or the digital signal, a communication line, a wireless or wired communication line, a network represented by the Internet, a network It may be transmitted via data broadcasting or the like.
  • the present invention is a computer system comprising a microprocessor and a memory, wherein the memory stores the computer program, and the microprocessor operates according to the computer program. It is also good.
  • the present invention may be a combination of the above-described embodiment and modification.
  • Each apparatus constituting the present invention treats the information as a secret so as not to be known to a third party by encrypting and decrypting the information, applies a digital signature to the information, and performs a signature verification. It can be used managerially, continuously and repeatedly in any industry where information needs to be handled safely and securely, such as preventing information tampering and spoofing by others.
  • each of the devices constituting the present invention can be manufactured and sold in the electric appliance manufacturing industry on a commercial basis and continuously and repeatedly.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Storage Device Security (AREA)

Abstract

 プログラム解析の困難性をさらに強化する難読化装置を提供する。難読化装置は、乗算及び2乗算の処理に対して、同じ個数の引数を入力とするテーブルを生成し、さらに、それらの引数に出力が依存するようにテーブルの出力値を設定する。より具体的には、2乗算の処理に対して、乗算でのみ必要な引数を使った追加処理を付け加えた上でテーブル化することにより、引数の数を乗算と揃える。さらに、この場合、出力が全ての引数に依存するため、実際には処理されないダミーの引数を追加する場合と異なり、追加した引数があるか否かが分からないようになる。

Description

明 細 書
プログラム難読化システム、プログラム難読ィ匕装置及びプログラム難読ィ匕 方法
技術分野
[0001] 本発明は、情報セキュリティ技術としてのコンピュータプログラムの難読ィ匕技術に関 する。
背景技術
[0002] 近年、情報通信技術の普及に伴 、、情報セキュリティ技術の重要性が一段と増して きている。このような情報セキュリティ技術の一つとして、暗号技術が、コンピュータプ ログラムである暗号用ソフトウェアとして具現ィ匕され、秘密の通信、プライバシーの保 護、通信相手の確認等のために用いられる。
情報処理装置や通信装置などのコンピュータシステムに暗号用ソフトウェアを実装 する場合、秘密鍵や暗号アルゴリズムに何らの加工を施すことなくこれらをそのまま実 装するなら、不正な利用者によりプログラム実行時にこれらを解析 (プログラム解析と 呼ぶ)されたとき、簡単に秘密鍵が漏洩してしまう。そのため、プログラム解析を困難 にする耐タンパ一ソフト技術が要望されている。耐タンパ一ソフト技術の一例として、 特許文献 1にお ヽて、暗号ィ匕などの処理をランダム変換を含めてテーブルィ匕すること で、プログラムを難読ィ匕する方法が記載されて 、る。
[0003] 特許文献 1に記載されている従来の難読化方法の処理を図 39に示す。
従来のこの難読ィ匕方法では、共通鍵暗号の暗号用プログラムや復号用プログラム などの難読ィ匕前の通常プログラム 9000に対して、難読化の処理 (ステップ S 9001〜 S9002)を施して、難読ィ匕プログラム 9002を生成し、出力する。この難読化方法の 詳細について、以下に説明する。
[0004] 従来の難読化方法では、最初に、通常プログラム 9000を構成する複数のプロダラ ム命令を、共通鍵暗号における鍵 key〜key を用いる処理 l〜n (nは自然数)に分
1 n
けて、処理 l〜nを含む処理分割プログラム 9001を生成する(ステップ S9001)。 次に、処理 1の直後に、出力値変換 π と出力値逆変換 π 1とを挿入し、処理 2の 直後に、出力値変換 π と出力値逆変換 π 1とを挿入し、処理 3の直後に、出力値
2 2
変換 π と出力値逆変換 π 1とを挿入し、…、処理 iの直後に、出力値変換 π と出
3 2 i 力値逆変換 π 1とを挿入し、 · · ·、処理 n—lの直後に、出力値変換 π と出力値逆
i n-1
変換 π 1とを挿入する。ここで、 π 1は、変換 π の逆変換を示す。 (1= 1, 2、 3、 · · n-1 i i
•、n - 1)
次に、処理 1及び出力値変換 π をテーブルィ匕してテーブル RTを生成し、出力値
1 1
逆変換 π 1、処理 2及び出力値変換 π をテーブルィ匕してテーブル RTを生成し、
1 2 2
出力値逆変換 π 1、処理 3及び出力値変換 π をテーブルィ匕してテーブル RTを生
2 3 3 成し、…、 出力値逆変換 π 1、処理 i+ 1及び出力値変換 π をテーブルィ匕してテ
+1
一ブル RT を生成し、 · · ·、最後に、出力値逆変換 π 1及び処理 ηをテーブルィ匕
i+1 n-1
してテーブル RT を生成する。こうして、テーブル RT、 RT、 · · ·
n 1 2 、 RTを含む難読
n
化プログラム 9002が生成される(ステップ S9002)。
[0005] このとき、鍵 key〜key がそれぞれ予め与えられた定数であれば、それをも含め てテーブルィ匕可能である。
特許文献 1に記載の技術では、各テーブル RT
1、…、 RT は、各処理 1
n-1 、 · · ·、!! の出力値を出力値変換 π
1、 · · ·、 π により変換する。このように各テーブルへの
n-1
入力値や各テーブル力もの出力値は変換された値となっているため、各テーブルの 入力値及び出力値を用いても、各テーブル中で行われている演算を解析しに《なり
、プログラム解析は困難となる。また、テーブル RTにおいて施される出力値変換 π は、テーブル RTに続くテーブル RT にお 、て施される出力値変換 π 1により逆変
i i+1 ί
換されるのでプログラムの実行結果は難読ィ匕前の通常プログラムと同じものとなる。
[0006] 図 40は、従来の難読ィ匕方法で生成されるテーブルの一例を示している。この図に 示すように、集合 9011に含まれる各入力値 inについて、処理 1により、中間値 a を
1 計算し (ステップ S 9003)、それぞれの中間値 a に対し、ランダムな全単射変換であ
1
る出力値変換 π を設定し、出力値変換 π による変換後の値 π (a )を計算し (ス
1 1 1 1
テツプ S9004)、入力値 inと変換後の値 π (a )を対応づけるテーブル RT 9014を
1 1 1 作成する(ステップ S 9005)。
[0007] このように、特許文献 1に記載されて 、る従来の難読ィ匕方法は、プログラムを難読 化するという一定の目的を達成しているが、さらに、プログラム解析の困難性を強化 する難読化技術が要望されて ヽる。
特許文献 1:国際公開第 WO02Z46890号パンフレット
非特許文献 1 :岡本龍明、山本博資、「現代暗号」、産業図書 (1997年)
非特干文献 2 : H.Cohen, A Course in Computational Algebraic Number Tneory ,G f
M 138,Springer-Verlag,1996,p9
発明の開示
発明が解決しょうとする課題
[0008] 本発明は、上記要望に対応するため、プログラム解析の困難性がさらに強化された プログラム難読システム、プログラム難読ィ匕装置、プログラム難読化方法、プログラム 難読ィ匕プログラム、プログラム難読ィ匕プログラムを記憶して 、る記録媒体を提供する ことを目的とする。
課題を解決するための手段
[0009] 上記目的を達成するために、本発明は、鍵情報を用いて対象情報を安全又は確実 に扱うセキュリティ演算を含む情報セキュリティプログラムを難読ィ匕するプログラム難 読化装置であって、前記セキュリティ演算と等価となるように、複数入力が必要な第 1 基本演算と、前記複数入力の一部のみ必要とする第 2基本演算とを含む複数の基本 演算が鍵情報により定まる順序で配置されている前記情報セキュリティプログラムを 取得する取得手段と、前記情報セキュリティプログラムに含まれる各第 2基本演算に ついて、当該第 2基本演算の前後に、当該第 2基本演算において必要とされない入 力に依存する入力依存変換とその逆変換である入力依存逆変換を配置する変換手 段と、各第 2基本演算について、直前に配置された前記入力依存変換、当該第 2基 本演算及び直後に配置された前記入力依存逆変換からなる一組の演算と等価の演 算結果を得るテーブルを生成し、当該テーブルを参照する参照命令を生成するテー ブル生成手段と、生成された前記テーブル及び前記参照命令を含む難読化プログ ラムを出力する出力手段とを備えることを特徴とする。
発明の効果 [0010] この構成によると、複数入力が必要な第 1基本演算及び前記複数入力の一部のみ 必要とする第 2基本演算のうち、第 2基本演算について、当該第 2基本演算の前後に 、当該第 2基本演算において必要とされない入力に依存する入力依存変換とその逆 変換である入力依存逆変換を配置して、第 1基本演算及び第 2基本演算の入力の数 の差を少なくし、入力数の違いによる攻撃に対抗して、プログラム解析の困難性をよ り高めることがでさる。
[0011] ここで、前記変換手段は、さらに、前記情報セキュリティプログラムに含まれる各第 1 基本演算について、当該第 1基本演算の前後のいずれか、又は両方に、当該第 1基 本演算において必要な入力に依存する入力依存変換とその逆変換である入力依存 逆変換を配置するとしてもよ 、。
この構成〖こよると、第 1基本演算についても、当該第 1基本演算の前後のいずれか 、又は両方に、当該第 2基本演算において必要とされない入力に依存する入力依存 変換とその逆変換である入力依存逆変換を配置するので、プログラム解析の困難性 をより高めることができる。
[0012] ここで、前記変換手段において、前記入力依存変換は減算であり、前記入力依存 逆変換は加算であるとしてもょ 、。
この構成によると、入力値に依存する減算と加算とを配置するので、演算結果は、 配置しな!ヽ場合と等価となる。
ここで、前記変換手段は、さらに、前記情報セキュリティプログラムの先頭に配置さ れた基本演算を除くその他の基本演算のそれぞれにつ!、て、当該基本演算の直前 に、当該基本演算の直前の基本演算の演算結果に第 1の変換を施す第 1変換演算 と、前記第 1変換演算の演算結果に、第 1の変換の逆変換である第 2の変換を施す 第 2変換演算とを配置し、前記テーブル生成手段は、さらに、前記情報セキュリティプ ログラムの先頭に配置された基本演算とその直後に配置された第 1変換演算とからな る一組の演算と等価の演算結果を得るテーブルを生成し、当該テーブルを参照する 参照命令を生成し、中間に配置された各基本演算について、直前に配置された前記 減算、当該基本演算及び直後に配置された前記加算に加えて、第 2変換演算及び 第 1変換演算からなる一組の演算と等価の演算結果を得る前記テーブルを生成し、 当該テーブルを参照する前記参照命令を生成し、さらに、前記情報セキュリティプロ グラムの末尾に配置された基本演算とその直前に配置された第 2変換演算とからなる 一組の演算と等価の演算結果を得るテーブルを生成し、当該テーブルを参照する参 照命令を生成し、前記出力手段は、生成された前記テーブル及び前記参照命令を 含む前記難読ィ匕プログラムを出力するとしてもよい。
[0013] この構成によると、基本演算の前後に第 1変換演算と、その逆変換である第 2変換 演算が配置されるので、プログラム解析の困難性をより高めることができる。なお、第 1変換演算と、その逆変換である第 2変換演算が配置されるので、演算結果は、配置 しない場合と等価である。
ここで、前記変換手段は、前記基本演算、前記減算、前記加算、前記第 1変換演 算及び前記第 2変換演算を、桁毎に分解して、複数の桁演算を生成し、生成した前 記桁演算を配置し、前記テーブル生成手段は、前記情報セキュリティプログラムの先 頭に配置された基本演算とその直後に配置された第 1変換演算とからなる一組の演 算と等価の演算結果が得られるように、生成した前記桁演算と等価の演算結果が得 られる桁演算テーブルを生成し、当該桁演算テーブルを参照する桁演算参照命令 を生成し、中間に配置された各基本演算について、直前に配置された前記減算、当 該基本演算及び直後に配置された前記加算、第 2変換演算及び第 1変換演算から なる一組の演算と等価の演算結果が得られるように、生成した前記桁演算と等価の 演算結果が得られる桁演算テーブルを生成し、当該桁演算テーブルを参照する桁 演算参照命令を生成し、前記情報セキュリティプログラムの末尾に配置された基本演 算とその直前に配置された第 2変換演算とからなる一組の演算と等価の演算結果が 得られるように、生成した前記桁演算と等価の演算結果が得られる桁演算テーブル を生成し、当該桁演算テーブルを参照する桁演算参照命令を生成し、前記出力手 段は、生成された前記桁演算テーブル及び前記桁演算参照命令を含む前記難読化 プログラムを出力するとしてもよい。
[0014] この構成〖こよると、各演算を桁毎に分解するので、生成されるテーブルの総量をよ り少なくすることができる。
ここで、前記テーブル生成手段は、桁演算テーブルの生成に際して、所定数個の 共通化されたテーブルから、 1個のテーブルを選択するとしてもよ ヽ。
この構成〖こよると、前記テーブル生成手段は、所定数個の共通化されたテーブル から選択するので、保持するテーブルの総量をより少なくすることができる。
[0015] ここで、前記セキュリティ演算は、法 nの元で、鍵情報である秘密鍵 dを用いる対象 情報 Cに対するべき乗剰余演算 Cn mod nであり、鍵情報により定まる順序で配置さ れた入力数の異なる前記複数の基本演算は、べき乗剰余演算 Cn mod nと等価 になるように、バイナリ法により、前記基本演算として、乗算剰余演算と 2乗剰余演算 と力 秘密鍵 dの各ビット値に基づいて、配置されたものであり、前記変換手段は、中 間に配置された乗算剰余演算又は 2乗剰余演算の直前及び直後に、当該乗算剰余 演算又は 2乗剰余演算への 1個の入力値に依存する減算及び加算を配置し、前記 テーブル生成手段は、中間に配置された各乗算剰余演算又は 2乗剰余演算につい て、直前に配置された前記減算、当該乗算剰余演算又は 2乗剰余演算及び直後に 配置された前記加算力 なる一組の演算と等価の演算結果を得るテーブルを生成 するとしてちょい。
[0016] この構成〖こよると、前記セキュリティ演算は、法 nの元で、鍵情報である秘密鍵 dを用 いる対象情報 Cに対するべき乗剰余演算 Cn mod nであるので、安全性がある程度 確立された RSA暗号技術を用いることができる。
ここで、前記セキュリティ演算は、法 nの元で、鍵情報である秘密鍵 dを用いる対象 情報 Cに対するべき乗剰余演算 Cn mod nであり、鍵情報により定まる順序で配置さ れた入力数の異なる前記複数の基本演算は、べき乗剰余演算 Cn mod nと等価 になるように、バイナリ法により、前記基本演算として、乗算剰余演算と 2乗剰余演算 と力 秘密鍵 dの各ビット値に基づいて、配置されたものであり、前記変換手段は、中 間に配置された各乗算剰余演算を分解して、乗算演算及び剰余演算を配置し、配 置された乗算演算の直前及び直後に、当該乗算演算への 1個の入力値に依存する 減算及び加算を配置し、中間に配置された各 2乗算剰余演算を分解して、 2乗算演 算及び剰余演算を配置し、配置された 2乗算演算の直前及び直後に、当該 2乗算演 算への 1個の入力値に依存する減算及び加算を配置し、前記テーブル生成手段は 、中間に配置された各乗算演算又は各 2乗演算について、直前に配置された前記減 算、当該乗算演算又は 2乗演算及び直後に配置された前記加算からなる一 ffi^の演 算と等価の演算結果を得るテーブルを生成するとしてもよ!/、。
[0017] この構成によると、べき乗剰余演算 Cn mod nにおける乗算剰余演算及び 2乗算剰 余演算がそれぞれ分解されて、乗算演算及び剰余演算、並びに 2乗算演算及び剰 余演算が配置され、乗算演算の直前及び直後に、前記減算及び加算が配置され、 2 乗算演算の直前及び直後に、前記減算及び加算が配置されるので、プログラム解析 の困難性をより高めることができる。なお、入力値に依存する減算と加算とを配置する ので、演算結果は、配置しない場合と等価である。
図面の簡単な説明
[0018] [図 1]実施の形態 1における通常プログラム 5001から難読ィ匕プログラム 5002への変 換を示す図である。
[図 2]実施の形態 1における乗算の難読ィ匕及び 2乗算の難読ィ匕を示す図である。
[図 3]実施の形態 2における難読ィ匕システム 1の構成を示すブロック図である。
[図 4]難読ィ匕システム 1による第 1の難読ィ匕の方法の考え方を示す図である。
[図 5]変換乗算剰余処理の構成を示す図である。図 5 (a)は、 i= lの場合を示し、図 5
(b)は、 2≤i≤k— 1の場合を示し、図 5 (c)は、 i=kの場合を示している。
[図 6]図 6 (a)は、 2≤i≤k—lの場合の入力値変換及び出力値変換が挿入された変 換乗算剰余処理の構成を示し、図 6 (b)は、 2≤i≤k— 1の場合の分割後の乗算剰 余処理の構成を示す。
[図 7]図 7 (a)は、 i=kの場合の入力値変換が挿入された変換乗算剰余処理の構成 を示し、図 7 (b)は、 i=kの場合の分割後の乗算剰余処理の構成を示す。
[図 8]2≤i≤k— 1の場合の桁毎に分割された変換乗算処理の構成を示す。図 8 (a) は、分割前の変換乗算処理を示し、図 8 (b)は、分割後の変換乗算処理を示す。
[図 9]i=kの場合の桁毎に分割された変換乗算処理の構成を示す。
[図 10]桁毎に分割される場合における各加算処理の構成を示す。
[図 11]分割された変換剰余処理の構成を示す。
[図 12]各桁に対してさらに分割された場合の乗算処理の構成を示す。
[図 13]共通化されるテーブルのパターンを示す。 [図 14]RT について分割された乗算処理 1002の構成を示す図である。
1
[図 15]RT について分割された乗算処理 1002の構成を示す図である。図面上にお
1
いて、入力値変換及び出力値変換を明らかにしている。
[図 16]RT (2≤i≤k- l)について分割された乗算処理 1004の構成を示す図であ る。
[図 17]RT (2≤i≤k- l)について分割された乗算処理 1004の構成を示す図であ る。図面上において、入力値変換及び出力値変換を明らかにしている。
[図 18]RT について分割された乗算処理 1009の構成を示す図である。
k
[図 19]RTについて分割された乗算処理 1009の構成を示す図である。図面上にお k
いて、入力値変換及び出力値変換を明らかにしている。
[図 20]分割された剰余処理 1005の構成を示す。図 21へ続く。
[図 21]分割された剰余処理 1005の構成を示す。図 22へ続く。
[図 22]分割された剰余処理 1005の構成を示す。図 23へ続く。
[図 23]分割された剰余処理 1005の構成を示す。図 22から続く。
[図 24]RT (2≤i≤k—l)について図 17に示す RM の詳細を示す。
i 1
[図 25]RT (2≤i≤k—l)について図 17に示す RM のテーブルの具体例を示す。
i 1
[図 26]図 26 (a)、図 26 (b)、図 26 (c)及び図 26 (d)は、それぞれ、 RT. (2≤i≤k— 1 ) について図 17に示す RM における変換 j8、変換 φ— 1、変換 g及び変換 γ の具体
1 3 例としてのテーブルを示す。
[図 27]RT について図 19に示す RM の詳細を示す。
k 1
[図 28]RT について図 19に示す RM のテーブルの具体例を示す。
k 1
[図 29]図 29 (a)、図 29 (b)、図 29 (c)及び図 29 (d)は、それぞれ、 RT について図 1 k
9に示す RM における変換 |8、変換 φ— 1、変換 g及び変換 γ の具体例としてのテー
1 3
ブルを示す。
[図 30]RT について図 15に示す RA の詳細を示す。
1 1
[図 31]RT について図 15に示す RA のテーブルの具体例を示す。
1 1
[図 32]図 32 (a)、図 32 (b)及び図 32 (c)は、それぞれ、 RT について図 15に示す R
1
A における変換 j8、変換 γ 及び変換 j8 _1の具体例としてのテーブルを示す。 圆 33]難読ィ匕装置 100の構成を示す図である。
[図 34]暗号処理装置 300の構成を示す図である。
[図 35]難読ィ匕装置 100による難読ィ匕処理時の動作を示すフローチャートである。
[図 36]暗号処理装置 300による復号ィ匕処理の動作を示すフローチャートである。
[図 37]暗号処理装置 300による署名生成処理の動作を示すフローチャートである。
[図 38]難読ィ匕装置 100によるテーブルィ匕の動作を示すフローチャートである。
圆 39]従来の難読化方法の処理の手順を示す図である。
[図 40]従来の難読ィ匕方法のテーブルィ匕の一例を示す図である。
[図 41]RT について図 15に示す RM の詳細を示す。
1 1
[図 42]図 42 (a)、図 42 (b)及び図 42 (c)は、それぞれ、 RT について図 15に示す R
1
M における変換 j8、変換 g及び変換 γ の具体例としてのテーブルを示す。
1 3
[図 43]RT について図 15に示す RM のテーブルの具体例を示す。
1 1
符号の説明
1 難読化システム
100 難読化装置
101 入力部
102 乗算配置情報生成部
103 分割処理配置情報生成部
104 変換生成部
105 テーブル生成部
106 読出情報配置部
107 プログラム生成部
108 媒体記録部
200 媒体
300 暗号処理装置
301 入力部
302 出力部
303 データメモリ 304 プログラムメモリ
305 CPU
306 媒体読込部
発明を実施するための最良の形態
[0020] 1.実施の形態 1
本発明に係る 1の実施の形態としての難読ィ匕方法にっ 、て説明する。
ここでは、難読ィ匕の対象となるプログラムとして、共通鍵暗号ではなぐ公開鍵暗号 の復号化プログラムを使う場合について説明し、具体的には、公開鍵暗号の例として RSA暗号の復号ィ匕プログラムを難読ィ匕する難読ィ匕方法について、説明する。なお、 RSA暗号については、非特許文献 1の 110〜113ページに記載されているので、詳 細の説明を省略する。
[0021] RSA暗号の復号ィ匕では、正整数である秘密鍵 dを用いて、暗号文 Cの復号文であ る Mを計算する。
M = C"d mod n
このような演算をセキュリティ演算と呼ぶこともある。
ここで、 nは、素数 pと素数 qの積であり、本明細書において、「Χ"Υ」は、 Xの Υ乗を 示し、「X mod Y」は、 Xを Yで割ったときの余りを示している。
[0022] C'd mod nの計算は乗算と 2乗算の繰返しによって実現でき、 RSA暗号をコンビ ユータシステムなどに実装する場合に、この性質を利用することが多い。このとき、乗 算と 2乗算が適用される順番は、秘密鍵の値に依存するので、これを解析することで 、攻撃者が秘密鍵を知ることができる。
RSA暗号の復号ィ匕プログラムである難読ィ匕前の通常プログラム 5001は、図 1に示 すように、 2乗算 S5011、乗算 S5012、 · · ·、乗算 S5013を含んで!/、る。このとき、乗 算と 2乗算が適用される順番は、秘密鍵 dの値に依存する。ここで、秘密鍵 dは、 nビッ ト長であり、一例として、秘密鍵 dは、「01 · · · 1」である。
[0023] X =C X C mod n
1
X =X X C mod n X =X X C mod n
n n-1
こうして、復号文 M=X ( = C"d mod n)が得られる。
[0024] ここで、説明の便宜のために、
X =C X C mod n
1
X =X X C mod n
2 1
X =X X C mod n
n n-1
をそれぞれ、演算 1 (S5011)、演算 2 (S5012)、 · · ·、演算 n (S5013)と呼ぶことと する。
[0025] この難読ィ匕方法は、演算 KS5011)の直後に、出力値変換 π S5031と出力値逆
1
変換 π i sSOSSとを挿人し、演算 2 (S5012)の直後に、出力値変換 π S5033と
1 2
出力値逆変換 π 1とを挿入し、演算 3の直後に、出力値変換 π と出力値逆変換 π
2 3 3
1とを挿入し、 · · ·、演算 iの直後に、出力値変換 π と出力値逆変換 π 1とを挿入し、 …、演算 (η— 1)の直後に、出力値変換 π と出力値逆変換 π — 5034とを揷
n-1 n~l
入する。ここで、 π 1は、変換 π の逆変換を示す。 (1= 1, 2、 3、 · · ·、 η— 1) 次に、この難読化方法は、演算 XI (S5011)及び出力値変換 π S5031をテープ
1
ノレイ匕してテープノレ RT 5021を生成し、出力値逆変換 π — 1 S5032、演算 X2 (S501
1 1
2)及び出力値変換 π S5033をテーブル化してテーブル RT 5022を生成し、出力
2 2
値逆変換 π 演算 Χ3及び出力値変換 π をテーブルィ匕してテーブル RTを生成
2 3 3 し、 · · ·、 出力値逆変換 π 1、演算 Xi+ 1及び出力値変換 π をテーブルィ匕してテ
+1
一ブル RT を生成し、 · · ·、最後に、出力値逆変換 π — 1 S 5034及び演算 X
i+l n-1
n (S5013)をテーブル化してテーブル RT 5023を生成する。こうして、テーブル RT 5021、 RT 5022、 · · ·、: RT 5023を含む難読ィ匕プ Pグラム 5002力 S生成される(ス
1 2 n
テツプ S5001)。
[0026] このように、この難読化方法では、最初と最後の演算を除く途中の演算の前後に、 出力値変換及び出力値逆変換をセットで挿入する。次に、最初の演算と出力値変換 をテーブルィ匕する。次に、途中の各演算について、出力値逆変換と当該演算と出力 値逆変換をテーブルィ匕する。さらに、最後の演算について、出力値逆変換と当該演 算とをテーブルィ匕する。これにより、演算途中の中間値が変換されるので、演算内容 を隠すことができる。
[0027] し力しながら、乗算と 2乗算との繰り返しによってべき乗演算をして RSA暗号を実現 する場合、乗算と 2乗算とでは、使用される入力値が異なる。すなわち、図 2 (a)に示 すように、乗算では、第 1の入力値 inlに第 2の入力値 in2をかける演算を行うのに対 し、図 2 (b)に示すように、 2乗算では、第 1の入力値 inlのみを用いて、第 1の入力値 inlの 2乗算を行う。
[0028] このため、乗算のテーブルの出力は inlおよび in2の両方に依存し、 2乗算のテー ブルの出力は inlのみに依存している。
この性質を利用すると、攻撃者は、テーブルの入出力に着目することで、各テープ ルで乗算と 2乗算のどちらが行われているのかを区別することができる。すなわち、 2 乗算のテーブルには入力値 in2が不要であるので、入力値 in2が入力されていない テーブルは 2乗算のテーブルであり、入力値 in2が入力されているテーブルが乗算の テーブルであると推測することができる。また、仮に、 2乗算のテーブルを (実際の処 理に使用しな 、が)入力値 in2を入力するように構成したとしても、 2乗算のテーブル の出力値は入力値 in2に依存しないので、この性質力もテーブルが 2乗算を行ってい るの力乗算を行っているのかを推測される可能性がある。
[0029] このため、乗算と 2乗算の順序を推測される可能性があり、その結果、秘密鍵の値 が知られてしまう可能性がある。
2.実施の形態 2
次に示す実施の形態 2は、実施の形態 1による問題点を解決し、乗算と 2乗算の入 力数が異なることによる攻撃を防ぐことを目的とする。
[0030] 本発明に力かる実施の形態 2としての難読ィ匕システム 1につ 、て説明する。
2. 1 難読ィ匕システム 1の概要
実施の形態 2における難読ィ匕システム 1の構成を図 3に示す。難読ィ匕システム 1は、 秘密鍵 dを入力値として受け付け難読ィ匕プログラムを生成し、生成した難読化プログ ラムを出力する難読ィ匕装置 100と、出力された難読ィ匕プログラムを記録する媒体 200 と、媒体 200から難読ィ匕プログラムを読み出し、読み出した難読ィ匕プログラムを実行 し、暗号文から復号文を生成し、又はメッセージから署名データを生成する暗号処理 装置 300とから構成される。
[0031] 難読ィ匕システム 1において、難読ィ匕装置 100は、秘密鍵 dと、 RSA暗号の復号化や 署名生成で使用する対象データ Xとに対し、 X"d mod nを計算する難読化プログ ラムを生成し、生成した難読化プログラムを媒体 200に記録する。暗号処理装置 300 は、媒体 200に記録された難読ィ匕プログラムを読み出し、暗号処理装置 300が備え る CPUが読み出した難読ィ匕プログラムに従って動作することにより、暗号文から復号 文を生成し、又はメッセージ力も署名データを生成する。
[0032] 2. 2 RSA暗号方法及び RSA署名方法
ここでは、 RSA暗号方法及び RSA署名方法について説明する。 RSA暗号方法や RSA署名方法を用いることにより、情報を安全又は確実に扱うことができる。
(l)RSA暗号方法
(a)鍵の生成
RSA暗号方法では、次に示すようにして、公開鍵及び秘密鍵を計算する。
[0033] (i)ランダムに大き ヽ素数 p, qを選択し、その積 n = p X qを計算する。 p, qの大きさ は、例えば、 512ビットであり、 nの大きさは、例えば、 1024ビットである。
(ii) (p— 1)及び (q— 1)の最小公倍数 L = LCM (p— 1, q— 1)を計算する。
[0034] (iii) Lと互いに素 (Lとの最大公約数が 1)で Lより小さ 、自然数 eをランダムに選ぶ。
l≤e≤L—l、 GCD (e, L) = l
ここで、 GCD (e, L)は、 eと Lの最大公約数を示している。
(iv) e X d= 1 mod Lを満たす dを計算する。 GCD (e, L) = 1の場合、このような d は必ず存在することが数学的に知られている。このようにして、得られた整数 e及び整 数 nが公開鍵である。また、整数 dが秘密鍵である。
[0035] (b)暗号文の生成
公開鍵である整数 e及び整数 nを用いて、平文 mに以下の暗号演算を施して暗号 文 cを計算する。ただし、平文 mは整数 nよりも小さいものとする。
c=m e mod n
(c)復号文の生成 秘密鍵である整数 dを用いて、暗号文 cに復号演算を施して復号文 m'を計算する。
[0036] m' =c"d mod n
なお、
m =c a mod n
= (m e ) d mod n
=m" (e X d mod L) mod n
=m 1 mod n
=m mod n
であり、 m<nであるので、 m mod n=mであることから、復号文 m'は、平文 mと一 致する。
[0037] なお、 RSA暗号方法については、非特許文献 1の 110〜113ページに詳しく説明 されている。
(2)RSA署名方法
(a)鍵の生成
鍵の生成方法については、 RSA暗号方法と同様である。
[0038] (b)署名生成
メッセージデータ Dに対して、以下のように署名データ Sを計算する。
最初に、ハッシュ関数 Hashを用いて、メッセージデータ Dのハッシュ値 h=Hash ( D)を計算する。
次に、秘密鍵である整数 dを用いて、ノ、ッシュ値 hを d乗して、署名データ Sを計算す る。
[0039] S=h"d mod n
すなわち、ノ、ッシュ値 hを平文として、 RSA暗号によって暗号ィ匕した値が署名デー タ Sである。
(c)署名検証
署名データ Sがメッセージデータ Dの正し 、署名であるかは、以下のように検証され る。
[0040] メッセージデータ Dと署名データ Sとを受信し、 Hash (D)を計算し、 S'e mod n( 署名データ Sを RSA暗号によって復号した値に相当する)を計算する。 次に、 Hash (D)と S'e mod nとが等しいか否かを確認する。等しい場合は、署名 データ Sが正しい署名であるとして、受理する。等しくない場合は、署名データ Sが正 しくない署名であるとして、拒否する。
[0041] なお、 RSA署名については、非特許文献 1の 175〜176ページに詳しく説明され ている。
2. 3 難読ィ匕装置 100で実行する難読ィ匕について
(1)バイナリ法によるべき乗演算
難読化装置 100による難読化の対象となる難読化前の通常プログラムは、対象デ ータ Xに対し、べき乗値 X"d mod nを計算する命令を含む。このようなべき乗剰余 算を、セキュリティ演算と呼ぶこともある。
[0042] この通常プログラムは、このべき乗演算として、バイナリ法によるべき乗演算を用い る。ここで、バイナリ法によるべき乗演算とは、 X"d mod nのような式(一般にべき剰 余と言われる)の値を、乗算と 2乗算の繰り返しにより計算する方法である。バイナリ法 の詳細につ ヽては、非特許文献 2に記載されて 、る。
(2)難読ィ匕装置 100による難読ィ匕処理の方法 (第 1の難読ィ匕の方法) 難読化装置 100による難読化処理の方法 (第 1の難読化の方法)について、図 4を 用いて、説明する。図 4には、難読ィ匕処理の考え方を記している。
[0043] この難読化処理の方法 (第 1の難読化の方法)では、図 4に示すように、難読化前の 通常プログラム 400を、中間プログラム 420に変換し (ステップ S401)、さらに、難読 化プログラム 440に変換する(ステップ S402)。
ここで、通常プログラム 400、中間プログラム 420及び難読化プログラム 440の演算 結果は、それぞれ同じである。このような性質を等価と呼ぶこともある。
[0044] (通常プログラム 400の内容)
図 4に示す難読ィ匕前の通常プログラム 400は、バイナリ法によるべき乗剰余演算を 行う命令ブロック 401を含み、命令ブロック 401は、命令 411、 412及び 413を含む。 このような通常プログラム 400を情報セキュリティプログラムと呼ぶこともある。
[0045] 通常プログラム 400において、変数 Xには、べき乗剰余演算の対象データである値 が格納され、変数 lenには、秘密鍵 dの総ビット長が格納され、変数 Yには、演算途中 の結果値が格納される。また、変数 iは、秘密鍵 dのうち、着目しているビット位置を示 している。ここで、秘密鍵 dのビットは最下位ビットを 0ビット目とし、下位から順に数え るちのとする。
[0046] 命令 411では、変数 Xの値が変数 Yに代入される。
命令 412では、変数 lenに、秘密鍵 dの総ビット長が格納される。
命令 413では、変数 iに、最初に (len— 1)の値を格納し、変数 「1」ずつ減らし ながら、変数 i≥0を満たす間、次に示す命令 414及び命令 415を繰り返す。
[0047] 命令 414では、法 nにおいて変数 Yの 2乗算を行いその結果を変数 Yに格納する。
命令 415では、秘密鍵 dにおいて変数 iの値が示すビットを見て、そのビットの値が「 1」の場合には、さらに、法 nにおいて変数 Yと変数 Xの乗算を行いその結果を変数 Y に格納する。
こうして、命令ブロック 401による演算が完了すると、変数 Yには、法 nにおいて変数 Xを d乗して得られる値が格納される。
[0048] Y=X"d mod n
このように、ノイナリ法によるべき乗においては、秘密鍵 dの各ビットを見て、当該ビ ットの値が「0」の場合には 2乗算のみを行い、「1」の場合には 2乗算及び乗算を行う 。そのため、もしも、 2乗算のみが行われている力 又は 2乗算及び乗算が行われて いるかが分力るなら、秘密鍵 dを復元することができる。従って、難読化処理では、秘 密鍵 dの各ビットに対応する処理において、 2乗算及び乗算のどちらが行われている のか区別が付かな 、ようにする必要がある。
[0049] (通常プログラム 400から中間プログラム 420への変換)
図 4に示すステップ S401における通常プログラム 400から中間プログラム 420への 変換について説明する。
難読ィ匕装置 100による難読ィ匕処理の方法では、中間プログラム 420内において、 最初に、変数 Xの値を変数 Yに代入する初期ィ匕命令 422「Y=X;」を生成する。
[0050] 次に、通常プログラム 400内の命令ブロック 401から、秘密鍵 dの値による分岐命令 である if文及びループ命令である for文を取り除き、中間プログラム 420内において、 秘密鍵 dの最下位ビットから最上位ビットに向けて、ビット毎に、当該ビットの値が「0」 であるなら、 2乗算剰余命令「Y=YXY mod n;」を生成する。当該ビットの値が「1 」であるなら、 2乗算剰余命令「Y=YXY mod n;」及び乗算剰余命令「Y=YXX mod n;」 生成する。
[0051] こうして、初期化命令 422と、 1個以上の 2乗算剰余命令と、 1個以上の 2乗算剰余 命令及び乗算剰余命令力もなる組命令とから構成される乗算配置情報 421が生成さ れる。ここで、 2乗算剰余命令及び乗算剰余命令を基本剰余演算又は単に基本演算 と呼ぶこともある。また、 2乗算剰余命令及び乗算剰余命令をそれぞれ、第 2基本演 算及び第 1基本演算と呼ぶこともある。ここで、第 1基本演算である乗算剰余命令は、 複数入力を必要とし、第 2基本演算である 2乗算剰余命令は、前記複数入力の一部 のみを必要とする。
[0052] 乗算配置情報 421内において、初期ィ匕命令 422は、先頭に配置され、続いて、 1 個以上の 2乗算剰余命令と、 1個以上の 2乗算剰余命令及び乗算剰余命令の組命 令とが、秘密鍵 dの値に応じて配置される。 乗算配置情報 421内におけるこれら命 令の配置の順序は、初期化命令 422、 2乗算剰余命令及び乗算剰余命令の実行順 序を規定している。
一例として、図 4の中間プログラム 420は、秘密鍵 dが「101 · · ·01」である場合の様 子を示す。乗算配置情報 421は、初期化命令 422、組命令 423、 2乗算剰余命令 42 4、組命令 425、 · · ·、 2乗算剰余命令 426及び組命令 427から構成され、この順序 で配置されている。
[0053] ここで、乗算剰余は乗算をした後、剰余(mod)演算を行う演算、 2乗算剰余は 2乗 算をした後、剰余演算を行う演算を示す。
(中間プログラム 420から難読ィ匕プログラム 440への変換)
図 4に示すステップ S402における中間プログラム 420から難読化プログラム 440へ の変換について説明する。
[0054] 難読ィ匕装置 100による難読ィ匕処理の方法では、中間プログラム 420内の乗算配置 情報 421に含まれる全ての 2乗算剰余命令及び全ての乗算剰余命令を、中間値 Yを 変換した変数 Z及び対象データ Xを入力とし、変数 Zを出力とする 2入力 1出力の処 理テーブル (RT 、 · · ·、 RT )を参照する命令に変換する。ここで、 RTは、 i番目の
1 k i
2乗算剰余命令又は乗算剰余命令をテーブルィ匕したものである。
[0055] なお、初期ィ匕命令 422は、変数 Xの値を変数 Zに代入する初期ィ匕命令 442に変換 される。
こうして、一例として図 4に示すように、初期化命令 442、テーブル参照命令 443、 4
44、 445、 446、 447、 · · ·、 448及び 449を含む命令ブロック 441力生成される。命 令ブロック 441には、前記命令がこの順序で配置される。
[0056] これらの命令をこの順序に従って実行することにより、べき乗剰余演算が行われて べき乗値が算出される。
(3)難読ィ匕装置 100による難読ィ匕処理の方法 (第 2の難読ィ匕の方法)
難読化装置 100による難読化処理の方法 (第 2の難読化の方法)について説明す る。
(i)演算命令の展開
この難読化処理の方法 (第 2の難読化の方法)では、図 4に示すように、難読化前の 通常プログラム 400を、中間プログラム 420に変換する(ステップ S401)。ここまでは 、第 1の難読ィ匕の方法と同一である。
[0057] ここで、中間プログラム 420の乗算配置情報 421内の 2乗算剰余命令及び乗算剰 余命令を演算命令と呼び、乗算配置情報 421内には、 k個の演算命令が配置されて いるものとする。つまり、乗算配置情報 421内の 2乗算剰余命令の数と、乗算配置情 報 421内の乗算剰余命令の数の合計は、 k個である。
(ii)出力値変換及び入力値変換の挿入
次に、この難読化処理の方法 (第 2の難読化の方法)では、中間プログラム 420の 乗算配置情報 421内の全ての演算命令のうち、最後に配置された演算命令を除い て、最初と途中に配置された i番目の演算命令 (i= l、 2、 3、 " '、1^ 1)にっぃて、 当該演算命令の直後に、出力値変換 Π及び入力値変換 を、この順序で挿入す る。
[0058] ここで、出力値変換 Πは、前段の演算命令の出力である中間値 Ζと対象データ Xと を用いる変換である。また、入力値変換 Π 1は、対応する出力値変換 Πの出力であ る中間値 zと対象データ Xとを用いる変換である。さらに、入力値変換 は、出力値 変換 πの逆変換と同じ変換である。
このように、演算命令の後に、変換とその逆変換を挿入することにより、変換の影響 を相殺することができ、これらの変換及び逆変換を挿入しない場合と同一の演算結 果が得られる。
[0059] i= lの場合、 2≤i≤k— 1の場合、及び i=kの場合のそれぞれについて、出力値 変換 Π及び入力値変換 Π—1の挿入の一例を、図 5 (a)、(b)及び (c)に示す。
図 5 (a)に示すように、 i= 1の場合、 1番目の演算命令 461の直後に出力値変換 Π
1
462が挿入されている。
また、図 5 (b)に示すように、 2≤i≤k— 1の場合、 i番目の演算命令 472の直後に出 力値変換 Π 473が挿入されている。また、潘目の演算命令 472の直前に入力値変 換 Π 1471が挿入されている。
i-l
[0060] さらに、図 5 (c)に示すように、 i=kの場合、 k番目の演算命令 482の直前に入力値 変換 Π 1481が挿入されている。
k-l
(iii)テープノレィ匕
さらに、この難読化処理の方法 (第 2の難読化の方法)では、図 5 (a)に示すように、 i = 1の場合、 1番目の演算命令 461及び出力値変換 Π 462をまとめて、 1個のテー
1
ブル RT 460とし、テーブル RT 460を参照する命令を生成する。
1 1
[0061] また、図 5 (b)に示すように、 2≤i≤k—lの場合、 入力値変換 Π _14
i-l
71、演算命令 472及び出力値変換 Π 473をまとめて、 1個のテーブル RT 470とし 、テーブル RT 470を参照する命令を生成する。
さらに、図 5 (c)に示すように、 i=kの場合、入力値変換 Π 1481及び演算命令 48
k-l
2をまとめて、 1個のテーブル RT 480とし、 RT 480を参照する命令を生成する。
k k
[0062] (4)難読ィ匕装置 100による難読ィ匕処理の方法 (第 3の難読ィ匕の方法)
難読化装置 100による難読化処理の方法 (第 3の難読化の方法)について説明す る。
(i)演算命令の展開
この難読化処理の方法 (第 3の難読化の方法)では、第 1の難読化の方法及び第 2 の難読ィ匕の方法と同様に、図 4のステップ S401に示すように、難読化前の通常プロ グラム 400を、中間プログラム 420に変換する。
[0063] (ii)出力値変換及び入力値変換の挿入
次に、この難読化処理の方法 (第 3の難読化の方法)では、第 2の難読化の方法と 同様にして、中間プログラム 420の乗算配置情報 421内に出力値変換及び入力値 変換の挿入を行う。ここまでは、第 2方法と同じである。
第 3の難読ィ匕の方法では、さらに、次のようにする。
[0064] i= lの場合、出力値変換 Π を変換 π とし、出力値変換 Π として 変換 π を
1 1 1 1 挿入する。
また、 i = kの場合、入力値変換 Π 1を変換 π 1と、入力値変換 Π 1として
k-1 k-1 k-1 変換 π 1を挿入する。
k-1
さらに、2≤^1^—1の場合、図6 (&)に示すょぅに、入カ値変換 Π _1471^
i-1
変換 π 1471a及び入力依存値減算 471bとし、入力値変換 Π 1471として、変換 i-1 i-1 π 1471a及び入力依存値減算 471bを挿入する。また、出力値変換 Π 473を、入 i-1 i 力依存値加算 473a及び変換 π 473bとし、出力値変換 Π 473として、入力依存値 加算 473a及び変換 π 473bを挿入する。
[0065] ここで、変換 π 1は、変換 π の逆変換であり、変換 π 1及び変換 π は、それぞれ
、Ζと同じビットサイズをもつ数から同じビットサイズの数への全単射変換である。 また、入力依存値減算は、対象データ Xに変換 fを施した f (X)を減算する演算であ り、入力依存値加算は、対象データ Xに変換 fを施した f (X)を加算する演算である。 ここで、入力依存値加算は、入力依存値減算の逆変換である。
[0066] なお、図 6 (a)では、乗算について示している力 2乗算においても同様に入力値変 換及び出力値変換を配置する。
(iii)テープノレィ匕
さらに、この難読化処理の方法 (第 3の難読化の方法)では、第 2の難読化の方法と 同様に、上記のように変換を配置した後に、 RTをテーブル化し、各テーブルを参照 する命令を配置する。
[0067] テーブルィ匕することにより、一連の計算過程を、テーブル力も値を引く処理に変換 できるので、外部からは何らかのテーブルを用いて 、ることしか分力もな 、ようにする ことができる。これにより、計算過程を追っていくことによる不正解析を防止することが できる。
(第 3の難読化の方法のまとめ)
以上説明したように、第 3方法では、乗算剰余処理及び 2乗算剰余処理を、入力依 存加算や入力依存減算を含む入力値変換及び出力値変換を配置した変換後乗算 剰余処理及び変換後 2乗算剰余処理に変換してテーブル化することにより、乗算と 2 乗算に対応するテーブルの入力が両方とも、中間値 Zと対象データ Xを用いることと なる。この結果、各テーブルの出力は、中間値 Zと対象データ Xとに依存して変化す ることとなる。
[0068] これにより、テーブルの入力を監視したとしても、それぞれのテーブルで乗算と 2乗 算のいずれの処理が行われているのかを追跡することが困難になる。また、上記の 変換で得られるテーブル RTでは、どちらのテーブルの出力も中間値 Zと対象データ Xとの両方に依存するようになる。これにより、テーブルの出力を監視したとしても、そ れぞれのテーブルで乗算と 2乗算の 、ずれの処理が行われて 、るのかを解析するこ とを困難にすることができる。
[0069] (5)難読化装置 100による難読化処理の方法 (第 4の難読化の方法 処理の分割
(その 1) )
上記にお!、て、変換後乗算剰余処理及び変換後 2乗算剰余処理をテーブル化す るとしたが、中間値 Z及び対象データ Xを、例えば、 1024ビットの整数とすると、一つ のテーブルサイズが 22Q48 X (テーブルの出カノくイトサイズ)バイトとなり、非常に大きく 実装が困難になる。
[0070] そこで、本実施の形態の第 4の難読化の方法では、変換後乗算剰余処理及び変換 後 2乗算剰余処理を小さな値 (例えば、 4ビットや 8ビットの整数)を入力とする処理( 分割処理と呼ぶ)に分割した上でテーブルィ匕する。
難読化装置 100による難読化処理の方法 (第 4の難読化の方法)について説明す る。
難読化処理の方法 (第 4の難読化の方法)では、第 3の難読化の方法と同様に、演 算命令の展開を行う。ここまでは、第 3の難読ィ匕の方法と同じである。
[0071] 第 4の難読ィ匕の方法では、さらに、次のようにする。
各演算命令を分割する。つまり、乗算剰余演算を、乗算及び剰余演算に分割し、 2 乗算剰余演算を、 2乗算及び剰余演算に分割する。
i= lの場合、最初の乗算又は 2乗算の直後に変換 π を挿入する。
1
また、 2≤i≤k— 1の場合、乗算剰余演算を分割する場合を例として説明する。図 6 (b)に示すように、乗算剰余演算を分割して、乗算 512と剰余演算 515とが得られて いるものとする。次に、乗算 512の直前に、入力値変換 Π 1511を挿入する。ここ
i-1
で、入力値変換 Π ^11は、 変換 π —1511a及び入力依存値減算 511b
i-1 i-1
力も構成されている。また、乗算 512の直後に、出力値変換 A513を挿入する。ここ で、出力値変換 A513は、入力依存値加算 513a及び変換《513bから構成されて いる。また、剰余演算 515の直前に、変換 ο 1 514を挿入し、剰余演算 515の直後に 、変換 π ; 516を挿入する。ここで、変換 α— 1は、変換 αの逆変換である。
[0072] さらに、 i=kの場合、最後の乗算又は 2乗算の直前に入力値変換 Π 1を挿入す
k-1
る。乗算剰余演算を分割する場合を例として説明すると、図 7 (b)に示すように、最後 の乗算 813の直前に、入力値変換 Π _1812を挿入する。ここで、入力値変換 Π — 1
k-1 k-1
812は、変換 π — i 2a及び入力依存値減算 812bから構成される。最後の剰余演
k-1
算 821は、単独で、つまり、変換などが挿入されることなぐ存在する。
[0073] なお、 2乗算剰余演算を分割する場合も同様である。
以上説明したように、第 4の難読化の方法によると、乗算処理側の変換 a 513bが 剰余演算処理側の変換 α_1514により相殺されるので、分割処理全体でみると変換 前と同じ処理が行われることが分かる。
以下、入力値変換 Π 1511、乗算 512及び出力値変換 A513を含めた処理を変
i-1
換乗算処理と呼び、変換 α— ^14、剰余演算 515及び変換 π 516を含めた処理を 変換剰余処理と呼ぶ。
[0074] 第 4の難読化の方法では、さらに、変換乗算処理及び変換剰余処理をそれぞれ、 中間値 Ζと対象データ Xの桁ごとの処理に分割する。
例えば、 Ζ及び Xを 4ビットごとの桁に分割する。 ここで、 Z = Z +Z X24 +Z Χ28 +···とし、
0 1 2
X=X +X X24 +X Χ28 +···とすると、
0 1 2
Zは、最下位桁から、それぞれ 4ビット毎の Z 、 Z 、 Z 、…に分割され、 Xは、最下
0 1 2
位桁から、それぞれ 4ビット毎の X 、X 、X ···に分割される。
0 1 2
[0075] また、ここで、変換 π 、変換 α及び変換 fは、それぞれ、桁ごとの変換を合わせると 分割前の変換に戻せるような変換であるとする。
すなわち、変換 π は、 4ビットの数力も 4ビットの数へ変換する全単射変換 φ を用 いて、
π (Χ) = φ (X ) + (X ) Χ24 + (X ) Χ28 +…と表せるような変換とす i i 0 i 1 i 2
る。
[0076] 同様に、変換 f(X) =g(X ) +g(X ) X24 +g(X ) Χ28 +···と表せ、
0 1 2
a (X) = j3 (X ) + j3 (X ) X24 + J3 (X ) X 28 + · ··と表せるものとする。また、
0 1 2
それぞれの逆変換にっ 、ても同様に表せるものとする。
これらの変換の具体例としては、所定の値とのビット毎の論理積や論理和、排他的 論理和などの論理演算による変換等が挙げられる。ただし、安全性を高めるために は、これらの変換は、論理積や論理和、排他的論理和などの論理演算などとするより も、ランダムな置換である方が望ましい。
[0077] 続いて、分割処理の例を、図 8を用いて説明する。図 8は、 2≤i≤k— 1の場合にお ける変換乗算処理の分割の様子を示したものであり、図 8 (a)は、分割前の変換乗算 処理を示し、図 8(b)は、分割後の変換乗算処理を示している。
図 8 (a)に示す変換乗算処理 501を分割すると、図 8 (b)に示す変換乗算処理 520 が得られる。図 8では、各桁の処理を分割し、それぞれの加算処理後の値を出力とす るよう変換している。これは、大きな数の乗算が、小さな数の乗算結果の和であること を利用している。
[0078] ここで、各桁の変換テーブル RM 、 ' . '、RM は以下のようにして求められる。
0 k
まず、分割前の変換乗算処理の全体を式で表すと、図 6(b)に示すように、 α (((π — ^Ζ)— f(X)) XX) +f(X))となる。
i-1
ここで、 X、 Z、さらに各変換について、上述した分割後の式を代入して展開し、 24、 2s · · ·がかけられている値や式ごとにまとめる。
[0079] これにより、 0桁目の変換に相当する式は、式 531になり、 24でまとめられる式が 1 桁目の変換に相当する式 532になり、 28でまとめられる式が 2桁目の変換に相当す る式 533になる。こうして、 4ビット毎にまとめ、 4ビットを 1桁としている。以下、同様に して最上位桁までの各桁の変換に相当する式が求められる。これらの式では、簡略 のためにインデックス iを省略して!/、る。
[0080] それぞれの桁の式を元に、その式中で用いられる中間値 Z及び対象データ Xをそ れぞれ分割した Z 、Ζ 、Ζ · ' ·、Χ 、Χ 、Χ · · ·等を入力とし、それぞれの桁の式
0 1 2 0 1 2
に相当する変換を行うテーブルが RM 521、 RM 522、 RM 523、 · · ·となる。
0 1 2
ここで、それぞれの桁については、下位桁からの桁上がりを反映する必要があるの で、 1桁目以上の桁の値を算出するには、各変換テーブル RMによる演算に加え、 図 10に示す加算処理 1 (551)を行う必要がある。さらに、加算処理 1 (551)を行った 結果、更なる桁上がりが発生する可能性があるので、 2桁目以降の値を算出するため には図 10に示す加算処理 2 (552)を行う必要がある。なお、加算処理 1 (551)及び 加算処理 2 (551)では、図 10のように入力依存値減算や入力依存値加算を含め、 入力に施されている変換を取り除く逆変換を入力値変換として追加し、さらに、出力 値変換にも次の段の RT (厳密には、 RTを変換して得られる RM)において相殺され るような出力値変換を追加する必要がある。なお、本実施の形態では、加算処理も同 様にテーブルィ匕することにより、加算処理に対する解析も困難にしている。
[0081] 以上のことをまとめたのが図 8である。ここで、それぞれの桁の RM 521、 RM 522
0 1 及び RM 523【こネ目当する式 531、 532及び 533を示して!/ヽる。
2
RM 521の出力の下位 4ビットは、当該変換乗算処理 520の 0桁めの出力値となり
0
、RM 521の上位 4ビットは、加算処理 1 (541)へ出力される。 RM 522の出力の下
0 1 位 4ビットは、加算処理 1 (541)へ出力され、 RM 522の出力の上位 4ビットは、加算
1
処理 1 (542)へ出力される。 RM 523の出力の下位 4ビットは、加算処理 1 (542)へ
2
出力され、 RM 523の出力の上位 4ビットは、図示していない加算処理 1へ出力
2
される。
[0082] 加算処理 1 (541)の出力の下位 4ビットは、当該変換乗算処理 520の 1桁めの出力 値となり、加算処理 1 (541)の出力の上位 4ビットは、加算処理 2 (543)へ出力される 。加算処理 1 (542)の出力の下位 4ビットは、加算処理 2 (543)へ出力され、加算処 理 1 (542)の出力の上位 4ビットは、図示していない加算処理 2へ出力される。
[0083] さらに、分割処理の例を、図 9を用いて説明する。図 9は、 i=kの場合における変換 乗算処理の分割の様子を示したものであり、変換乗算処理 841を分割すると、変換 乗算処理 851が得られる。図 8と同様に、図 9では、各桁の処理を分割し、それぞれ の加算処理後の値を出力とするよう変換している。これは、大きな数の乗算が、小さ な数の乗算結果の和であることを利用して 、る。
[0084] RM 861の出力の下位 4ビットは、当該変換乗算処理 851の 0桁めの出力値となり
0
、RM 861の上位 4ビットは、加算処理 1 (871)へ出力される。 RM 862の出力の下
0 1 位 4ビットは、加算処理 1 (871)へ出力され、 RM 862の出力の上位 4ビットは、加算
1
処理 1 (872)へ出力される。 RM 863の出力の下位 4ビットは、加算処理 1 (872)へ
2
出力され、 RM 863の出力の上位 4ビットは、図示していない加算処理 1へ出力
2
される。
[0085] 加算処理 1 (871)の出力の下位 4ビットは、当該変換乗算処理 851の 1桁めの出力 値となり、加算処理 1 (871)の出力の上位 4ビットは、加算処理 2 (873)へ出力される 。加算処理 1 (872)の出力の下位 4ビットは、加算処理 2 (873)へ出力され、加算処 理 1 (872)の出力の上位 4ビットは、図示していない加算処理 2へ出力される。
[0086] 以上説明したように、処理を各桁に分割することで、入力のビットサイズの和(上記 例では、 1024+ 1024 = 2048ビット)が小さくなるため、テーブル化したときのテー ブルサイズを削減できる。
例えば、 100桁目、すなわち、 RM では、入力が 4ビットの整数 202個分であり、
100
入力のビットサイズの和が 202 X 4 = 808ビットとなる。そのため、 100桁目のテープ ルサイズは、 2匪 X (テーブルの出カノくイトサイズ)バイトとなる。分割前では一つのテ 一ブルサイズが 22Q48 X (テーブルの出力バイトサイズ)バイトであるため、テープノレサ ィズが削減できている。
[0087] 上記では、変換乗算処理について示した力 変換剰余処理についても、同様の代 入及び展開の処理により、図 11のように分割することができる。なお、図 11の中の π は、変換乗算剰余処理 RT;内の π;を示している力 簡単のため、インデックス iを省 略している。
以下、図 11を用いて分割処理について、説明する。
[0088] 変換剰余処理を示す式における入力 Zに、
Z +Z X24 +Z Χ28 +···+Ζ X24(b— D + Z X24b+---+Z X 2·— ϋを代
0 1 2 b-1 b 2b-l 入する。ここで、 bは整数 nのビットサイズを 4で割ったものであり、本実施の形態にお ける整数 nの桁数を表す。 nのビットサイズを 1024としたときは、 b = 256となる。
[0089] なお、上記の式では、変換剰余処理の入力 Zの桁数を 2 Xb— 1桁としている力 こ れは以下の理由による。変換剰余処理の入力 Zは、変換乗算処理の結果である。こ の変換乗算処理では、前段のテーブルの出力結果と対象データ Xとの演算が行わ れる。ここで、前段のテーブルの出力結果は前段のテーブルにおいて mod nがかけ られているために b—1桁以下の桁数を持ち、また、対象データ Xは RSA暗号では n 以下の値である必要があるので、こちらも b— 1桁以下の桁数を持つ。 b—l桁同士の 乗算は、 2 Xb— 2桁の演算結果を取り、さらに 1桁の桁上がりが発生することがあるの で、それも加えて変換後剰余処理の入力は最大 2 Xb- 1桁となる。
[0090] ここで、
mod n
= ((Z +Z X24 +... +Z X24(b_1))
0 1 b-1
+ (Z X24b mod n)
b
+ (Z X24(b+1)) mod n)
b+l
+ · · ·
+ (Z X24(2W) mod n)) mod n
2b-l
となることを利用して、
Z X24b mod nの演算を示す処理、
b
Z X 24(b+1) mod nの演算を示す処理、
b+l
•••、Z X 24(2b_1) mod nを示す処理に分割し、それぞれをテーブル化して、これ
2b+l
らのテーブルの出力を、加算テーブルを用いて、加算することで、剰余演算を行う。
[0091] 図 11では、 i≥bに対する Z X24i mod nを示す処理を RDと表現している。なお、 図 11において、分割された各処理 RD;の間に加算" + "を入れている力 この加算 は、変換後乗算処理の分割の際に使用した加算と同じように、それぞれの桁に分割 し、分割した後の加算処理には、それぞれ入力値変換及び出力値変換を追加するよ うな処理を示す。
[0092] (6)難読化装置 100による難読化処理の方法 (第 5の難読化の方法 処理の分割
(その 2) )
第 4の難読ィ匕の方法で説明したように、処理を分割した場合、 0桁目(最下位の桁) や 1桁目であれば、入力(4ビットの整数の個数)が少ないため、テーブルサイズはあ まり大きくない。しかし、桁が増えるほど、テーブルサイズが大きくなつてしまう。
[0093] 例えば、 100桁目では、入力が 4ビットの整数 202個分であり、入力のビットサイズ の和力 202 X 4 = 808ビットとなる。そのため、 100桁目のテーブルサイズは、 2匪 X ( テーブルの出力バイトサイズ)バイトとなり、非常に大き!/、。
そこで、第 5の難読ィ匕の方法では、各桁に対しても、処理をさらに分割する。図 12 には、 2桁目の処理のさらなる分割を示している。 2桁目の分割前の処理 601では、 R M 602の入力を Z 、 Z 、 Z 、 X 、 X及び X としている力 さらなる分割後の処理
2 0 1 2 0 1 2
611では、処理 601を Z 、 Z 、 X及び X の 4入力とする処理 621と、 Z 及び X の 2
0 2 0 2 1 1 入力とする処理 622とに分割する。
[0094] 他の桁の処理に対しても、同様に 4入力のテーブルと 2入力のテーブルに分割する ここで、処理 621は、インデックスの値の加算結果が桁数と同じものになるパターン である Zの各桁 (例えば、 2桁目を分割する場合、 0 + 2 = 2であるので、 Z , Z となる
0 2
)と、これと同じインデックスを持つ Xの各桁 (X , X )とを 4個の入力とするテーブル
0 2
である。
[0095] さらに、桁数が偶数である場合には、処理 622は、桁数の半分のインデックスを持 つ Zの桁 (桁数が 2であるとき、 Z 。 1 + 1 = 2であるから。)と、これと同じインデックス
1
を持つ Xの桁 (X )とを 2個の入力とするテーブルである。このような桁は、変換の内
1
容自体は 4入力の場合と同様になるのである力 4入力中の入力値に互いに同一に なる入力値が含まれるため、 2入力にまとめることができる。 他の桁に対しても、これと同様の方法でテーブル分割する。例えば、 5桁目のテ ブルは、以下の入力を持つテーブルに分割する。
RM (5, 0) :Z , Z , X , X
― 0 5 0 5
RM (5, 1) :Z , Z , X , X
― 1 4 1 4
RM (5, 2) :Z , Z , X , X
― 2 3 2 3
また、 8桁目のテーブルは、以下の入力を持つテーブルに分割する。
RM— (8, 0) : z z
0 8 X 0 X ί
RM— (8, 1) : z z
1 7 X 1 X
RM— (8, 2) : z z
2 6 X 2 X
RM— (8, 3) : z z
3 5 X 3 X
RM (8, 4) : z X
なお、 RMに付されたインデックス (Χ、 Υ)は、はじめのもの Xが何桁目であるかを示 し、二つ目のもの Υが入力のインデックスの最小値を示している。
[0098] 上記のように、処理を分割し、分割した処理をテーブル化することで、一つのテープ ルサイズが、 216 Χ (テーブルの出力バイトサイズ)バイトとなり、テーブル削減できる。 なお、 2乗算においても同様の分割が可能である。分割の仕方は乗算とほぼ同様 なので省略する。
(7)分割したテーブルの共通化
上記のようにテーブルを分割すると、図 13に示すように、テーブルの処理に共通点 があり、この共通点を用いて、複数のテーブルの共通化ができる。図 13においては、 RMの分割テーブルの共通化 657と RSの分割テーブルの共通化 658について示し ている。ここで、 RSは、 2乗算を示す処理である。
[0099] 図 13に示す RMの分割テーブルの共通化 657において、枠で囲んだ二つのテー ブル、例えば、テーブル 661及びテーブル 662は、それぞれ、入力に対し、同じ処理 をしている。テープノレ 661及びテープノレ 662は、インデックスが、 2 X i, i (i≠0)のテ 一ブルである。インデックスが、 2 X i, i (i≠0)のテーブルは、共通化することができ、 複数のテーブルに代えて、同一の 1個のテーブルを使用することが可能となる。
[0100] また、テーブル 663及びテーブル 664は、それぞれ、入力に対し、同じ処理をして いる。テープノレ 663及びテープノレ 664は、インデックスが、 i, 0 (i≠0)のテープノレで ある。これらのテーブルにつ 、ても共通化が可能である。
さらに、テーブル 665及びテーブル 656は、それぞれ、入力に対し、同じ処理をし て!、る。これらのテーブルにつ!/、ても共通化が可能である。
[0101] このように、各テーブルは、インデックスの組合せに依存して、次の 4個のケースに 分類できる。
(ケース a)インデックスが 0, 0のテーブル
(ケース b)インデックス力 2 X i, i (i≠0)のテーブル
(ケース c)インデックスが、 i, 0 (i≠0)
(ケース d)その他のインデックスを持つテーブル
ここで、インデックスが、 i, 0 (i≠0)のテーブルと、その他のインデックスを持つテー ブルとは、出力に g (X )が加算される力否かのみが異なる。また、インデックスが 0, 0 のテーブルと、インデックスが 2 X i, i (i≠0)のテーブルとは、これと同様に g (X. ) (ィ ンデッタスが 0, 0の場合は g (X ) )が加算されるか否かのみが異なる。すなわち、ィ
0
ンデッタスの二つ目が 0のテーブルは、他のものと異なり、 g (X )もしくは g (X )が出
i 0 力に加算されている。
[0102] このように、ケース a、ケース b、ケース c及びケース dのそれぞれに属する複数のテ 一ブルについては、テーブルの入力値が異なるだけで、入力値と出力値との対応関 係は、同じである。従って、各ケースに属する複数のテーブルをそれぞれ用いること なぐケース毎にテーブルを共通化し、 1個の共通化したテーブルを用いるようにする ことができる。
[0103] こうして、分割された乗算処理において、多数のテーブルを用いることに代えて、 4 個のテーブルのみを使用することが可能となる。入力される X及び Zのイツデッタスに 応じて、 4個のテーブル力 適切なテーブルを 1個選択すればょ 、。
また、図 13に示す RSの分割テーブルの共通化 658においても、上記と同様に、枠 で囲んだ二つのテーブル、例えば、テーブル 681及びテーブル 682は、それぞれ、 入力に対し、同じ処理をしている。テーブル 681及びテーブル 682は、インデックス 力 2 X i, i (i≠0)のテーブルである。インデックスが、 2 X i, i (i≠0)のテープノレは、 共通化することができ、複数のテーブルに代えて、同一の 1個のテーブルを使用する ことが可能となる。
[0104] また、テーブル 683及びテーブル 684は、それぞれ、入力に対し、同じ処理をして いる。テープノレ 683及びテープノレ 684は、インデックスが、 i, 0 (i≠0)のテープノレで ある。これらのテーブルにつ 、ても共通化が可能である。
さらに、テーブル 685及びテーブル 686は、それぞれ、入力に対し、同じ処理をし ている。
[0105] 図 13に示す RSの分割テーブルの共通化 658においても、上記と同様に、各テー ブルは、インデックスの組合せに依存して、上記の 4個のケースに分類できる。
こうして、分割された 2乗算処理においても、多数のテーブルを用いることに代えて 、 4個のテーブルのみを使用することが可能となる。
(8)難読ィ匕装置 100による難読ィ匕の実行
以上で示したように、入力値変換や出力値変換、処理の分割、分割した処理をテ ーブルイ匕したときの共通化を施すことにより、難読ィ匕装置 100は、難読化を実行する
[0106] 以下では、図 4の乗算剰余と 2乗算剰余の配置情報を乗算配置情報と呼ぶ。また、 図 5〜13において説明した入力値変換や出力値変換、処理の分割の結果、得られ る処理やテーブルの配置が定まる。この処理やテーブルの配置を示す情報を、以下 では、分割処理配置情報と呼ぶ。
難読ィ匕装置 100は、まず、乗算配置情報を生成し、次に分割処理配置情報を生成 する。その後、分割処理配置情報で使用する入力値変換や出力値変換を決定し、そ れに基づ 、てテーブルを生成する。
[0107] テーブルは、例えば、入力値に、その入力値が入力された場合に変換後の処理で 算出される値をそれぞれ計算し、対応付けることにより生成される。具体的な実現方 法としては多次元の配列などが考えられる。さらに、分割処理配置情報に基づいて、 テーブルの読出命令の順序を示す読出命令順序情報を生成する。その後、生成し た読出命令順序情報と生成したテーブルとを合わせることで、難読ィ匕プログラムが完 成する。 [0108] なお、難読ィ匕装置 100により生成される難読ィ匕プログラムは、上記読出命令順序情 報とテーブル以外の命令やデータを含んでもよい。また、予め、分割処理配置情報 は難読ィ匕装置 100に予め与えられるとしてもよ 、。
(9)乗算処理の分割の具体例
乗算処理の分割の具体例について図 14〜図 19を用いて説明する。
[0109] (a)RT の分割
1
秘密鍵 dの 1桁目にあたる変換である RT の分割について、 RT が乗算処理であ
1 1
る場合を例に説明する。図 14は、 RT について分割された乗算処理 1002の構成を
1
示す図である。
この RT は、秘密鍵 dの 1桁目にあたる変換であるので、入力値依存減算や変換 π
1
1は含まれない。この例では、 ηのビットサイズを 6ビットとし、この 6ビットのデータを 2 桁に分割している。ここで、各桁は、 3ビットからなる。また、中間値 Ζ, Xはそれぞれ、 Ζ = Ζ +Ζ Χ 23 ,
0 1
Χ=Χ +Χ Χ 23となる。
0 1
[0110] すなわち、 Ζ 、Ζ 、Χ 、Χ はそれぞれ、 Ζ, Xを 3ビットずつに分割した値である。
0 1 0 1
このとき、乗算処理が上述の方法に基づいて、各桁に分割され、乗算処理 1002は、 図 14に示すように、 RM 1121、 RM 1122、 RM 1123、カロ算処理 RA 1124、 R
0 1 2 1
A 1125、 RA 1126、 RA 1127、 RA 1128、 RA 1129、 RA 1130及び
2 3 1 2 2 4
RA 1131を含む。
5
[0111] ここで、 RM 1121は、 RT の 0桁目の計算であり、 Z , X を入力とする分割後の
0 1 0 0
乗算処理であり、 RM 1122は、 RT の 1桁目の計算であり、 Z , Z , X , X を入
1 1 0 1 0 1 力とする分割後の乗算処理であり、 RM 1123は、 RT の 2桁目計算であり、 Z , X
2 2 1 1 を入力とする分割後の乗算処理である。
RM , RM , RM のそれぞれ出力を加算処理 RA , RA , . . . , RA によって
0 1 2 1 2 5 加算して得られる結果が、 Zと Xの乗算結果の変換後の値である。
[0112] 本実施の形態では、上述したように RM , RM , RM , RA , RA , . . . ,
0 1 2 1 2
RAもそれぞれテーブルィ匕することで解析が困難になるようにする。なお、 RA , R
5 1
A , . . . , RA は、図 10に示す加算処理 1や加算処理 2と同様、それぞれに入力 値変換及び出力値変換が含まれて!/ヽる。
ここで、 RM 1121, RM 1122及び RM 1123を示すボックス内部に" [0, 56],,
0 1 2
、 " [0, 105] "及び" [0, 105] "の記述がある力 これらは、これらの処理における出 力値の、これらの処理内の出力値変換前の値力 それぞれ、「0」から「56」の範囲、「 0」から「105」の範囲及び「0」から「49」の範囲の値であることを示す。
[0113] また、 RM 1121, RM 1122, RM 1123, RA 1124, RA 1125, RA 1126
0 1 2 1 2 3 は、複数個の出力(RM については、 3桁の出力であるため、中位部分も存在し、 3
1
個の出力を有し、その他については、 2個の出力を有する)を有する。ここで、 RM 1
1
122以外については、図面に向かって左側の出力が出力値変換前の出力の上位部 分を示し、右側の出力が出力値変換前の出力の下位部分を示す。 RM 1122につ
1
いては、 3桁の出力であるため、中位部分も存在する。
[0114] 例えば、 RM 1121については、出力値が「0」から「56」の範囲であり、その出力値
0
の上位 3ビットは、 RA 1124に入力され、下位 3ビットは乗算処理 1002の出力とさ
1
れている。 RM 1121の上位部分及び下位部分の" [0, 7] "についても、それぞれの
0
出力値変換前の値が 0から 7の範囲の値であることを示す。また、乗算処理 1002は、 最終出力値として、図 14の最下部に記載されている各 3ビットの出力値 1142a、 114 2b、 1142c, 1142d及び 1142eを出力する。この f列で ίま、乗算処理 1002ίま、 6ビッ トの Ζ及び Xを入力し、 15ビットの値を出力している。
[0115] 図 15では、図 14の乗算処理 1002を構成する RM 1121, RM 1122, RM 112
0 1 2
3, RA 1124, RA 1125, · · · , RA 1131のそれぞれ【こつ!/ヽて、図面上【こお!/ヽて
1 2 5
、入力値変換及び出力値変換を明らかにしている。
例えば、 RA 1124は、上位側の入力値の直後に入力値変換 j8— ^を含み、
1
下位側の入力値の直後に入力値変換 β 4124aを含み、入力値変換 β 4124bの 出力値と入力値変換 ι8— 4124aの出力値とを加算する加算 1124cを含み、加算 11 24cの上位側の出力値の直後に 出力値変換 γ 1124eを含み、加算 11
1
24cの下位側の出力値の直後に出力値変換 |8 1124dを含む。
[0116] また、 RM 1121は、上位側の入力値及び下位側の入力値に対する乗算 1121a
0
を含み、乗算 1121aの上位側の出力値の直後に、出力値変換 |8 1121cを含み、乗 算 1121aの下位側の出力値の直後に、出力値変換 |8 1121bを含む。
(b)RT (2≤i≤k— 1)の分割
続いて、 RT (2≤i≤k- l)について分割された乗算処理の構成について説明す る。これらの変換には、前段の出力値変換等の逆変換が含まれているので、 RT と
1 は内容が多少異なっている。図 16は、 RT (2≤i≤k— 1)について分割された乗算 処理 1004の構成を示す図である。この例においても、 nのビットサイズを 6ビットとし、 6ビットのデータを 2桁に分割している。各桁は、 3ビットからなる。
[0117] このとき、乗算処理が各桁において分割され、 RT に対する乗算処理のときと同様
1
【こ、乗算処理 1004ίま、図 16【こ示すよう【こ、 RM 1181、 RM 1182、 RM 11
0 1 2
83、カロ算処理 RA 1184、 RA 1185, RA 1186、 RA 1187、 RA 1188、 RA
6 7 8 1 7 2
1189、 RA 1190及び RA 1191を含む。
9 10
ここで、 RM 1181は、 Ζ , X を入力とする分割後の乗算処理であり、 RM 1182
0 0 0 1 は、 Ζ , Ζ , Χ ,Χ を入力とする分割後の乗算処理であり、 RM 1183は、 Z , X
0 1 0 1 2 1 1 を入力とする分割後の乗算処理である。
[0118] さらに、 RM , RM , RM の出力を加算処理 RA , RA , . . . , RA によってカロ
0 1 2 1 2 10 算した結果力 ¾と Xの乗算結果の変換後の値である。ここで、 RM , RM , RM , R
0 1 2
A , RA , · · · , RA をテーブル化する。
1 2 10
ここで、 RM , RM , RM に "[ー7, 56] "などの記述がある力 これはこの処理の
0 1 2
出力が— 7から 56の範囲の値であることを示す。ここで、 RT に対する乗算処理と異
1
なり、負の値が範囲に含まれることに注意する。負の出力は、前段の入力値依存カロ 算を相殺するための、入力依存値減算が行われるために発生する。ここで、 RM , R
0
M , RM , RA , RA , · · ·, RA は、負の値の範囲として含む上位部分と、正の
1 2 1 2 10
値を範囲とする下位部分の 2個の出力を有する。図面に向力つて左側の出力が出力 値変換前の出力の上位部分を示し、右側の出力が出力値変換前の出力の下位部 分となる(RM は、 0〜105までの 106種類の値を取り、 2進数標記では 7ビット必要
1
となるため、 1桁を 3ビットとした場合には 3桁となり、正の値を範囲とする中位部分も 存在する)。
[0119] 例えば、 RM については、出力 outに対し、 下位部分 = out mod 8,
上位部分 = (out- (下位部分)) Z8である。
また、 RM— 1については、出力 outに対し、
下位部分 = out mod 8,
中位部分 = (out—(下位部分)) Z8 mod 8,
上位部分 = (out—下位部分—中位部分 X 8) Z64である。
[0120] なお、出力の上位部分や下位部分などに対する値の範囲は、出力値変換前の値 であり、出力値変換後はこの範囲の値となるとは限らない。例えば、 RM の出力の上
0
位部分は、出力値変換前は [ 1, 7]であるが、出力値変換後は、扱いやすいように [0, 8]などとする。この例では、乗算処理において、 6ビットの Z及び Xを入力し、 16 ビットの値 (最上位桁は符号の情報を含む)を出力して!/ヽる。
[0121] 図 17では、図 16に示す RM 1181, RM 1182, RM 1183, · · · , RA 1187,
0 1 2 1
RA 1189, · · · , RA 1191について、それぞれに含まれる入力値変換及び出力値
2 10
変換を明らかにしている。例えば、 RA 1184
6 は、上位側の入力値の直後に入力値 変換 j8— lSAbを、上位側の入力値の直後に γ _11184a^出力値の上位部分の
5
直前に 出力値変換 0 1184d
7 を、出力値の下位部分の直後に出力値変換 β 1184cを含むことを示している。
[0122] なお、各入力値変換と出力値変換は、図中で直接繋がっている箇所同士で打ち消 しあう変換であれば、どのような変換でも構わな 、。
(c)RT の分割
k
次に、 RT について分割された乗算処理の構成について説明する。
k
図 18は、 RT について分割された乗算処理 1009の構成を示す図である。
k
[0123] 乗算処通 1009は、図 18に示すように、 RM 1331、 RM 1332、 RM 1333、カロ
0 1 2 算処理 RA 1334、 RA 1335、 RA 1336、 RA 1337、 RA 1338、 RA 1339、
17 7 8 14 7 15
RA 1340及び RA 1341を含む。
9 18
ここで、 RM 1331は、 Z , X を入力とする分割後の乗算処理であり、 RM 1332
0 0 0 1 は、 Z , Z , X ,X を入力とする分割後の乗算処理であり、 RM 1333は、 Z , X
0 1 0 1 2 1 1 を入力とする分割後の乗算処理である。 [0124] さらに、 RM , RM , RM の出力を加算処理 RA , RA , . . . ,によって加算し
0 1 2 17 7
た結果力 ¾と Xの乗算結果の変換後の値である。
図 19では、図 18の乗算処理 1009を構成する RM 1331、 RM 1332、 RM 133
0 1 2
3、RA 1334、 RA 1335、 RA 1336、 RA 1337、 RA 1338、 RA 1339、 RA
17 7 8 14 7 15 9
1340及び RA 1341のそれぞれについて、図面上において、入力値変換及
18
び出力値変換を明らかにしている。
[0125] なお、図 19に示す RM 1331、 RA 1334、 RA 1337、 RA 1339及び RA 13
0 17 14 15 18
41〖こは、それぞれ、変換 Eが含まれている。ここで、変換 Eは、何もしないことを示す。
(d)RT についての RM に対応するテープノレの具体例
1 1
RT についての図 15に示す RM 1122に対応するテーブルの具体例を図 41〜
1 1
図 43に示している。
[0126] 図 41は、 RT について図 15に示す RM 1122の詳細を示す。 RM は、 4個
1 1 1 の入力値 inl、 in2、 in3及び in4から構成される入力値群(inl、 in2、 in3、 in4)に対 して、図 43に示すテーブル 1421を用いた変換を施して、 3個の出力値 outl、 out2 及び out3から構成される出力値群(out 1、 out2、 out3)を出力する。
[0127] ここで、 inl =Z 、 in2=Z 、in3=X及び in4=X とすると、 RT は、
0 1 0 1 1
val = Z XX +Z XX
0 1 1 0
g (X ) XX - g (X ) XX +g (X )を算出し、
0 1 1 0 1
outl = γ [val - (val mod 8) (((va卜 (val mod 8)))mod8) X 8))/64]、
3
out2= β [((val - (val mod 8》8)mod8]、
out3= j8 [val mod 8] を算出する。
[0128] テーブル 1421は、図 43に示すように、複数の入力値群(inl、 in2、 in3、 in4)と、 前記複数の入力値群にそれぞれ対応する複数の出力値群 (outl、 out2、 out3)と から構成されている。
なお、図 43では、演算過程の理解を容易にするために、複数の入力値群 (inl、 in 2、 in3、 in4)及び複数の出力値群(outl、 out2、 out3)以外に、演算途中の中間 値についても、記載している力 上述した通り、テーブル 1421は、複数の入力値群 (i nl、 in2、 in3、 in4)及び複数の出力値群(outl、 out2、 out3)のみから構成されて いるので、注意を要する。
[0129] 図 42 (a)、図 42 (b)及び図 42 (c)は、それぞれ、 RT について図 15に示す RM
1 1 における変換 j8、変換 g及び変換 γ の具体例としてのテーブル 1422、 1423、 142
3
4を示す。
(e)RT (2≤i≤k— 1)についての RM に対応するテーブルの具体例
i 1
RT (2≤i≤k—l)についての図 17に示す RM 1182に対応するテーブルの具体 i 1
例を図 24〜図 26に示している。
[0130] 図 24は、 RT (2≤i≤k—l)について図 17に示す RM 1182の詳細を示す。 RM
i 1 1 は、 4個の入力値 inl、 in2、 in3及び in4から構成される入力値群(inl、 in2、 in3、 i n4)に対して、図 25に示すテーブル 1360を用いた変換を施して、 3個の出力値 out
1、 out2及び out3から構成される出力値群(outl、 out2、 out3)を出力する。
[0131] ここで、 inl =Z 、 in2=Z 、in3=X及び in4=X とすると、 RT (2≤i≤k— 1)
0 1 0 1 i
は、
val= _1 (Ζ ) X (X ) + _1 (Ζ ) X (X )
0 1 1 0
g (X ) XX - g (X ) XX +g (X )を算出し、
0 1 1 0 1
outl = Ύ [val - (val mod 8) (((va卜 (val mod 8))/8)mod8) X 8))/64]、
3
out2= β [((val - (val mod 8》/8)mod8]、
out3= j8 [val mod 8] を算出する。
[0132] テーブル 1360は、図 25に示すように、複数の入力値群(inl、 in2、 in3、 in4)と、 前記複数の入力値群にそれぞれ対応する複数の出力値群 (out 1、 out2、 out3)と から構成されている。
なお、図 25では、演算過程の理解を容易にするために、複数の入力値群 (inl、 in
2、 in3、 in4)及び複数の出力値群(out 1、 out2、 out3)以外に、演算途中の中間 値についても、記載している力 上述した通り、テーブル 1360は、複数の入力値群 (i nl、 in2、 in3、 in4)及び複数の出力値群(outl、 out2、 out3)のみから構成されて いるので、注意を要する。
[0133] 図 26 (a)、図 26 (b)、図 26 (c)及び図 26 (d)は、それぞれ、 RT について図 17に
1
示す RM における変換 |8、変換 φ— 1、変換 g及び変換 γ の具体例としてのテープ ルを示す。
なお、図 25において、 outlの出力値変換前の値は、—2から 2の範囲の 5種類で あるが、 γ を施すことにより、 0から 7の範囲の値 (8種類)に変換している。こうするこ
3
とで、攻撃者が変換後の値それぞれの発生確率を調べて、変換前の値を推測するこ とを困難にしている。例えば、最も発生確率が高い値力 変換前の 0であると推測す ることでテーブルの処理の内容を解析する攻撃を防ぐ。なお、このとき、 1に対応す る γ (— 1)力 SOと 1の 2値となっている力 全体の RM のテーブルの出力 outlの値
3 1
が可能な限り一様となるように、 γ を設定する。すなわち、出力 outlの値は 0から
3
7で分布する力 このそれぞれの値が同じ発生確率となるように γ を設定する。図 2
3
6では、 γ への入力として 1, 0, 1の発生確率が高いため、これをそれぞれ 2値へ
3
変換している。また、後述する図 31の outlにおける γ も同様に多値へ変換するよう
1
にしている。
[0134] (f)RT についての RM に対応するテーブルの具体例
k 1
RT についての図 19に示す RM 1332に対応するテーブルの具体例を図 27〜 k 1
図 29に示している。
図 27は、 RT について図 19に示す RM 1332の詳細を示す。 RM は、 4個 k 1 1 の入力値 inl、 in2、 in3及び in4から構成される入力値群(inl、 in2、 in3、 in4)に対 して、図 28に示すテーブル 1390を用いた変換を施して、 3個の出力値 outl、 out2 及び out3から構成される出力値群(outl、 out2、 out3)を出力する。
[0135] ここで、 inl =Z 、 in2=Z 、in3=X及び in4=X とすると、 RT は、
0 1 0 1 k
val= _1 (Ζ ) X (X ) + _1 (Ζ ) X (X )
0 1 1 0
-g (X ) χχ - g (X ) XX
0 1 1 0を算出し、
outl = Ύ [val - (val mod 8) (((va卜 (val mod 8)))mod8) X 8))/64]、
3
out2= β [((val - (val mod 8)))mod8]、
out3= j8 [val mod 8] を算出する。
[0136] テーブル 1390は、図 28に示すように、複数の入力値群(inl、 in2、 in3、 in4)と、 前記複数の入力値群にそれぞれ対応する複数の出力値群 (outl、 out2、 out3)と から構成されている。 なお、図 28では、演算過程の理解を容易にするために、複数の入力値群 (inl、 in 2、 in3、 in4)及び複数の出力値群(out 1、 out2、 out3)以外に、演算途中の中間 値についても、記載している力 上述した通り、テーブル 1390は、複数の入力値群 (i nl、 in2、 in3、 in4)及び複数の出力値群(outl、 out2、 out3)のみから構成されて いるので、注意を要する。
[0137] 図 29 (a)、図 29 (b)、図 29 (c)及び図 29 (d)は、それぞれ、 RT について図 19に k
示す RM における変換 |8、変換 φ— 1、変換 g及び変換 γ の具体例としてのテープ
1 3
ル 1391、 1392、 1393、 1394を示す。
(g)RT についての RA に対応するテーブルの具体例
1 1
RT についての図 15に示す RA 1124に対応するテーブルの具体例を図 30〜図
1 1
32【こ示して!/ヽる。
[0138] 図 30は、 RT について図 15に示す RA 1124の詳細を示す。 RA は、 2個
1 1 1 の入力値 inl及び in2から構成される入力値群 (inl、 in2)に対して、図 31に示すテ 一ブル 1410を用いた変換を施して、 2個の出力値 outl及び out2から構成される出 力値群 (outl、 out2)を出力する。
RT は、
1
outl = γ [( β _1(inl)+ β _1(in2)-out2)/8],
out2= β [ β _1(inl)+ β _1(in2) mod8]を算出する。
[0139] テーブル 1410は、図 31に示すように、複数の入力値群(inl、 in2)と、前記複数の 入力値群にそれぞれ対応する複数の出力値群 (outl、 out2)とから構成されている なお、図 31では、演算過程の理解を容易にするために、複数の入力値群 (inl、 in 2)及び複数の出力値群 (outl、 out2)以外に、演算途中の中間値についても、記 載している力 上述した通り、テーブル 1410は、複数の入力値群 (inl、 in2)及び複 数の出力値群 (outl、 out2)のみ構成されているので、注意を要する。
[0140] 図 32 (a)、図 32 (b)及び図 29 (c)は、それぞれ、 RT について図 15に示す RA に
1 1 おける変換 j8、変換 τ 及び変換 j8 _1の具体例としてのテーブル 1411、 1412、 141
1
3を示す。 (10)剰余処理の分割の具体例
剰余処理の分割の具体例について図 20〜23を用いて説明する。
[0141] 分割された剰余処理 1005は、図 20〜23に示すように、剰余算 RD 1201、 RD 1
0 1
206、 RD 1212、 RD 1218、カロ算 RA 1202、 RA 1203、 RA 1204、 RA 120
2 3 1 1 2 12
5、 RA 1207、 RA 1208、 RA 1209、 RA 1210、 RA 1211、 RA 1213、 RA
1 1 2 12 4 1 1
1214、 RA 1215、 RA 1216、 RA 1217、 RA 1219、 RA 1220、 RA 1221
2 13 4 1 1 2 及び RA 1222から構成されている。
4
[0142] ここで、乗 [J余算 RD 1201、 RD 1206、 RD 1212、 RD 1218は、乗 [J余算を行う
0 1 2 3
ためのテーブルである。これらのテーブルは、演算対象である対象値と、対象値に対 する剰余値とを対応付けて構成する組を複数個記憶しており、ある対象値が入力とし て指定されると、その対象値に対応する剰余値が当該テーブルカゝら引かれて出力さ れる。なお、剰余算 RD 1201、 RD 1206、 RD 1212、 RD 1218は、上記
0 1 2 3
の剰余算の前後において、変換を施す。
[0143] また、 RA 、 RA 、 RA 、 · · ·は、桁ごとの加算や桁上がりを反映するための加算
1 2 12
を行う加算処理のテーブルである。これらのテーブルも、演算対象である 2個の対象 値と、前記 2個の対象値の加算値とを対応付けて構成する組を複数個記憶しており、 ある 2個の対象値が入力として指定されると、その対象値に対応する加算値が当該テ 一ブルから引かれて出力される。なお、 RA 、 RA 、 RA 、 · · · «、上記の加算の前
1 2 12
後において、変換を施す。
[0144] この例では、剰余処理 1005は、整数 nを法としたときの、
Z = Z +Z X 23 +Z X 26 +Z X 29 +Z X 212の剰余を計算している。
0 1 2 3 4
(a)剰余処理 1005のうち、図 20に示す演算では、
(Z +Z X 23 ) + (Z X 26 mod n)を計算している。
0 1 2
すなわち、図 20に示す演算では、剰余処理 1005の剰余算 RD 1201、加算 RA
0 1
1203、 RA 1202、は、それぞれ、 3個の 3ビットの入力値 Z 、 Z 、 Z の入力を受け
1 2 1 0
付ける。
[0145] 剰余算 RD 1201は、その演算結果の上位 3ビット及び下位 3ビットをそれぞれ、加
0
算 RA 1203、 RA 1202へ出力する。加算 RA 1203は、その演算結果の上位 1ビ ット及び下位 3ビットをそれぞれ、加算 RA 1205及び RA 1204へ出力する。加算 R
12 2
A 1202は、その演算結果の上位 1ビット及び下位 3ビットをそれぞれ、加算 RA 12
1 2
04及び RA 1207へ出力する。加算 RA 1204は、その演算結果の上位 1ビット及
1 2
び下位 3ビットをそれぞれ、加算 RA 1205及び RA 1208へ出力する。カロ算 RA 1
12 1 12
205は、その演算結果の 1ビットを、加算 RA 1211へ出力する。
4
[0146] (b)剰余処理 1005のうち、図 21に示す演算では、 1個の入力値 Z が入力され、入
3
力値 Z 及び図 20における 3個の最終の演算結果を用いて、(Z X 29 mod n)を
3 3
加算している。
剰余算 RD 1206は、 1個の 3ビットの入力値 Z の入力を受け付け、その演算結果
1 3
の上位 3ビット及び下位 3ビットをそれぞれ、加算 RA 1208、 RA 1207へ出力する
1 1
[0147] 加算 RA 1208は、その演算結果の上位 1ビット及び下位 3ビットをそれぞれ、加算
1
RA 1210及び RA 1209へ出力する。カロ算 RA 1207は、その演算結果の上位 1
12 2 1
ビット及び下位 3ビットをそれぞれ、加算 RA 1209及び RA 1213へ出力する。加算
2 1
RA 1209は、その演算結果の上位 1ビット及び下位 3ビットをそれぞれ、加算 RA 1
2 12
210及び RA 1214へ出力する。加算 RA 1210は、その演算結果の 1ビットを、
1 12
加算 RA 1211へ出力する。加算 RA 1211は、その演算結果の 1ビットを、カロ
4 4
算 RA 1216へ出力する。
13
[0148] (c)さらに、剰余処理 1005のうち、図 22に示す演算では、 1個の入力値 Z が入力
4 され、入力値 Z 及び図 21における 3個の最終の演算結果を用いて、(Z X 212 mo
4 4 d n)をカ卩算している。
剰余算 RD 1212は、 1個の 4ビットの入力値 Z の入力を受け付け、その演算結果
2 4
の上位 3ビット及び下位 3ビットをそれぞれ、加算 RA 1214、 RA 1213へ出力する
1 1
[0149] 加算 RA 1214は、その演算結果の上位 1ビット及び下位 3ビットをそれぞれ、加算
1
RA 1217及び RA 1215へ出力する。加算 RA 1213は、その演算結果の上位 1
4 2 1
ビット及び下位 3ビットをそれぞれ、加算 RA 1215及び RA 1219へ出力する。加算
2 1
RA 1215は、その演算結果の上位 1ビット及び下位 3ビットをそれぞれ、加算 RA 1 217及び RA 1220へ出力する。加算 RA 1217は、その演算結果の 1ビットを、
1 4
加算 RA 1216へ出力する。加算 RA 1216は、その演算結果の 2ビットを、剰
13 13
余算 RD 1218へ出力する。
3
[0150] (d)剰余処理 1005のうち、図 22における最終の計算結果は、 3桁となるため、次に
、さらなる剰余処理が必要になる。
剰余処理 1005のうち、図 23に示す演算は、その剰余処理を行う。図 23に示す演 算の計算結果も 3桁となる場合があり、その場合には、さらなる剰余処理が必要となり
、図 23と同様の処理を繰り返す。その結果、 2桁の値となれば、剰余演算結果 (の出 力値変換後)の値とする。
[0151] 剰余処理 1005のうち、図 23に示す演算では、剰余算 RD 1218は、その演算結
3
果の上位 3ビット及び下位 3ビットをそれぞれ、加算 RA 1220、 RA 1219へ出力す
1 1
る。加算 RA 1220は、その演算結果の上位 1ビット及び下位 3ビットをそれぞれ、加
1
算 RA 1222及び RA 1221へ出力する。加算 RA 1219は、その演算結果の上位
4 2 1
1ビットを加算 RA 1221へ出力し、その演算結果の下位 3ビットを最終出力とする。
2
加算 RA 1221は、その演算結果の上位 1ビットをカ卩算 RA 1222へ出力し、その演
2 4
算結果の下位 3ビットを最終出力とする。加算 RA 1222は、その演算結果の 1ビット
4
を最終出力とする。
[0152] (e)なお、上記数値例では、 nが 6ビットの値であり、小さ 、ため、乗算処理を各桁ま での分割としている力 ビットサイズが大きくなつた場合は、各桁の処理を「処理の分 割(その 2)」のようにさらに分割してもよい。
2. 4 難読化システム 1の構成及び動作
ここでは、難読ィヒシステム 1を構成する難読化装置 100及び暗号処理装置 300の 構成及び動作について説明する。
[0153] (1)難読化装置 100の構成
図 33は、難読化装置 100の構成を示す図である。
難読ィ匕装置 100は、図 33に示すように、秘密鍵 dの入力を受け付ける入力部 101と 、秘密鍵 dから乗算処理及び 2乗算処理の処理の順番を示す乗算配置情報を生成 する乗算配置情報生成部 102と、乗算処理及び 2乗算処理を分割した処理と、それ に対して追加する 1つ以上の入力値変換と 1つ以上の出力値変換の配置情報である 分割処理配置情報を生成する分割処理配置情報生成部 103と、入力値変換及び出 力値変換を示す関数を生成する変換生成部 104と、分割処理配置情報、入力値変 換及び出力値変換を用いて、テーブルを生成するテーブル生成部 105と、乗算配置 情報と分割処理配置情報を用いて、テーブルを読み出す命令の配置を示す読出命 令順序情報を生成する読出情報配置部 106と、テーブルと読出命令順序情報を用 いて、難読化プログラムを生成するプログラム生成部 107と、難読化プログラムを媒 体に記録する媒体記録部 108とを備える。
[0154] 入力部 101は、秘密鍵 dを入力として受け付ける。
乗算配置情報生成部 102は、秘密鍵 dから乗算剰余処理及び 2乗算剰余処理の 処理の順番を示す乗算配置情報を生成する。これは、図 4のステップ S401に示す処 理に対応する。図 4の場合、乗算配置情報 421は、 {2乗算剰余、乗算剰余、 2乗算 剰余、 2乗算剰余、乗算剰余 }のような順番を示す情報となる。
[0155] 分割処理配置情報生成部 103は、予め与えられた配置方法に従い、乗算剰余処 理と 2乗算剰余処理を分割した処理とそれに対して追加する 1つ以上の入力値変換 と 1つ以上の出力値変換の配置情報である、分割処理配置情報を生成する。なお、 ここで生成する情報は、各処理や変換の配置情報のみであり、処理や変換に対応す る関数は生成しない。
変換生成部 104は、分割処理配置情報を参照して、配置した入力値変換と出力値 変換に対する関数を生成する。入力値変換及び出力値変換に対する関数の生成方 法については、先の「2. 3 難読ィ匕装置 100で実行する難読ィ匕について」で述べたと おりである。
[0156] テーブル生成部 105は、分割処理配置情報、入力値変換及び出力値変換を用い て、テーブルを生成する。テーブルの生成方法については、先の「2. 3 難読化装置 100で実行する難読化にっ 、て」で述べたとおりである。
読出情報配置部 106は、乗算配置情報と分割処理配置情報を用いて、テーブルを 読み出す命令を順番に配置した読出命令順序情報を生成する。具体的には、分割 処理配置情報を用いて、変換後乗算剰余処理内及び変換後 2乗算剰余処理内の各 処理に対応するテーブル読出命令を順番に配置することでテーブル読出命令群を 生成し、それらの変換後乗算剰余処理内及び変換後 2乗算剰余処理内に対応する テーブル読出命令群を、乗算配置情報を用いて配置することで、テーブル読出命令 を配置する。
[0157] プログラム生成部 107は、上記読出命令順序情報とテーブルを合わせた難読ィ匕プ ログラムを生成する。
媒体記録部 108は、難読化プログラムを媒体 200に記録する。
(2)暗号処理装置 300の構成
図 34は暗号処理装置 300の構成を示す図である。
[0158] 暗号処理装置 300は、図 34に示すように、暗号化データまたはメッセージデータを 入力する入力部 301と、復号ィ匕データまたは署名データを出力する出力部 302と、 データメモリ 303と、プログラムメモリ 304と、 CPU305と、媒体 200から難読化プログ ラムを読込む媒体読込部 306とを備える。
入力部 301は、後述する復号化処理時に暗号化データ、署名生成処理時にメッセ ージデータを入力として受け付ける。
[0159] 出力部 302は、後述する復号化処理時に復号化データ、署名生成処理時に署名 データを出力する。
データメモリ 303は、入力である復号ィ匕データやメッセージデータ、難読化プロダラ ムを実行する際の中間値データを記憶する。
プログラムメモリ 304は、難読ィ匕プログラムを記憶する。
[0160] CPU305は、難読ィ匕プログラムに記述されている命令を実行する。
媒体読込部 306は、媒体 200から難読化プログラムを読込み、プログラムメモリ 304 に格納する。
(3) 難読ィ匕システム 1の動作
難読ィ匕システム 1の動作は、難読ィ匕装置 100において難読ィ匕プログラムを生成し、 媒体 200に記録する「難読化処理時」の動作と、暗号処理装置 300にお 、て媒体 20 0に記録されて ヽる難読化プログラムを実行して復号化処理を行う「復号化処理時」と 署名生成処理を行う「署名生成処理時」の動作カゝらなる。 [0161] 以下において、それぞれの動作について説明する。
(a)難読化装置 100による難読化処理時の動作
難読ィ匕装置 100による難読ィ匕処理時の動作について、図 35に示すフローチャート を用いて説明する。
難読ィ匕装置 100の入力部 101は、秘密鍵 dを受け付け (ステップ S1101)、乗算配 置情報生成部 102は、乗算配置情報を生成し (ステップ S1102)、分割処理配置情 報生成部 103は、分割処理配置情報を生成し (ステップ S 1103)、変換生成部 104 は、入力値変換と出力値変換に対する関数を生成し (ステップ S1104)、テーブル生 成部 105は、テーブルを生成し (ステップ S1105)、読出情報配置部 106は、読出命 令順序情報を生成し (ステップ S 1106)、プログラム生成部は、難読化プログラムを生 成し (ステップ S1107)、難読ィ匕装置 100の媒体記録部 108は、難読化プログラムを 媒体 200に記録する (ステップ S1108)。こうして、難読化処理が終了する。
[0162] (b)暗号処理装置 300による復号化処理の動作
暗号処理装置 300による復号化処理の動作について、図 36に示すフローチャート を用いて説明する。
暗号処理装置 300の入力部 301は、入力である暗号ィ匕データを受け付け、対象デ ータ Xとしてデータメモリに格納し (ステップ S1201)、媒体読込部 306は、媒体 200 力も難読ィ匕プログラムを読み込み、プログラムメモリ 304に格納し (ステップ S 1202)、 CPU305は、プログラムメモリ 304に格納されている難読化プログラムにしたがって、 データメモリ 303を使用し、対象データ Xのべき乗値: Td mod nを計算し、データメ モリ 303に格納し (ステップ S1203)、出力部 302は、データメモリ 303に格納されて V、る値 (対象データのべき乗値)を復号ィ匕データとして出力する (ステップ S 1204)。 こうして、復号化処理の動作が終了する。
[0163] (c)暗号処理装置 300による署名生成処理の動作
暗号処理装置 300による署名生成処理の動作につ!、て、図 37に示すフローチヤ ートを用いて説明する。
暗号処理装置 300の入力部 301は、入力であるメッセージデータを受け付け、対象 データ Xとしてデータメモリに格納し (ステップ S1301)、媒体読込部 306は、媒体 20 0から難読ィ匕プログラムを読み込み、プログラムメモリ 304に格納し (ステップ SI 302) 、 CPU305は、プログラムメモリ 304に格納されている難読化プログラムにしたがって 、データメモリ 303を使用し、対象データ Xのべき乗値: Td mod nを計算し、データ メモリ 303に格納し (ステップ S 1303)、出力部 302は、データメモリ 303に格納され て 、る値 (対象データのべき乗値)を署名データとして出力する (ステップ S 1304)。 こうして、署名生成処理の動作が終了する。
[0164] (d)難読ィ匕装置 100によるテーブルィ匕の動作
難読ィ匕装置 100によるテーブルィ匕の動作について、図 38に示すフローチャートを 用いて説明する。なお、ここでは、図 15に示す乗算処理 1002のテーブル化を一例 として説明している力 他のテーブルィ匕の例についても同様に実現できるので、その 説明は省略する。
[0165] 難読化装置 100のテーブル生成部 105は、図 15に示すテーブルの配置のうち、 R M 1121、 RM 1122、 RM 1123、 RA 1124、 RA 1125、 RA 1126、 RA 11
0 1 2 1 2 3 1
27、 RA 1128、 RA 1129、 RA 1130及び RA 1131の接続関係のみを予め記
2 2 4 5
憶している。ここで、この接続関係は、上述したようにして、設計者が作成し、データ 化したものである。
[0166] テーブル生成部 105は、当初は、これらの接続関係のみを記憶しているのであって 、RM 1121、 RM 1122、 RM 1123、 RA 1124、 RA 1125、 RA 1126、 RA
0 1 2 1 2 3 1
1127、 RA 1128、 RA 1129、 RA 1130及び RA 1131の内容【こつ!ヽて ίま、記
2 2 4 5
憶されていない。
難読ィ匕装置 100によるテーブルィ匕の手順においては、上記の接続関係に従って、 RM 1121、 RM 1122、 RM 1123、 RA 1124、 RA 1125、 RA 1126、 RA
0 1 2 1 2 3 1
1127、 RA 1128、 RA 1129、 RA 1130及び RA 1131の内容を決定していく。
2 2 4 5
[0167] また、テーブル生成部 105は、予め、 40種類の異なる乗算パターンテーブルを記 憶している。これらの乗算パターンテーブルは、ここでは、 2個の入力値を 2個の出力 値に変換する 2入力 2出力のテーブルであり、各入力値は、 3ビット長であり、各出力 値も、 3ビット長である。
テープノレ生成咅 105ίま、図 38に示すステップ S1401〜S1404にお!/ヽて、図 15に 示す RM 1121、 RM 1122及び RM 1123【こつ!/ヽて、それぞれ、上記の 40種類
0 1 2
の乗算パターンテーブルから 1個の乗算パターンテーブルをランダムに選択し (ステ ップ S 1402)、これらの RM 1121、 RM 1122及び RM 1123【こ選択した乗算ノ タ
0 1 2
ーンテーブルを割り当てる(ステップ S1403)。ここで、上記の 40種類の乗算パター ンテーブルから 1個の乗算パターンテーブルをランダムに選択する際に、異なる RM について同じ乗算パターンテーブルが選択されないようにするため、一度選択した乗 算パターンテーブルを次の選択では選択しな 、ように、選択対象から除外する。
[0168] 次に、テーブル生成部 105は、図 38に示すステップ S1405〜S1410において、 乗算処理 1002の先頭の入力値力も最終の出力値へ至る各経路について、以下を 繰り返す。
ここで、乗算処理 1002の先頭の入力値力も最終の出力値へ至る経路の一例は、 入力値 1141a力も、 RM 1121の乗算 1121a、変換 1121bを介して、出力値 1142
0
aへ至る経路であり、また、別の経路の一例は、入力値 1141b力ら、 RM 1121の乗
0 算 1121a、変換 1121c、 RA 1124の変換 1124a、カロ算 1124c、変換 1124d
1
を介して、出力値 1142bへ至る経路である。
[0169] このように、前記経路とは、 3ビットの入力値を開始点として、 1個の RM及び少なくと も 1個の RAを介して、 3ビットの出力値へ至る経路である。
各経路上には、変換を配置するべき位置が予め特定されている。テーブル生成部 105は、各経路上における変換を配置するべき位置を予め記憶している。変換を配 置するべき位置とは、図 15において、例えば、 RM 1121において、変換 1121b及
0
び変換 1121cが配置されている位置であり、また、 RA 1124において、変換 1
1
124a,変換 1124b、変換 1124d及び変換 1124eが配置されている位置である。
[0170] テーブル生成部 105は、各経路の先頭から、順に変換が配置される位置を 1個ず つ選択していく。
選択した位置の次が、最終出力値であるなら (ステップ S 1406で YES)、テーブル 生成部 105は、 1個の変換を選択し、選択した変換を当該位置に配置し (ステップ S1 409)、この経路における処理を終了する。
[0171] 選択した位置の次が、最終出力値でないなら (ステップ S 1406で NO)、テーブル 生成部 105は、 1個の変換を選択し、選択した変換を当該位置に配置する。ここで、 同一経路において、前に変換を選択した場合には、前に選択した変換とは別の変換 を選択する(ステップ S1407)。次に、次の位置において、ステップ S1407において 配置した変換の逆変換を配置し (ステップ S1408)、次に、ステップ S1406へ戻って 処理を繰り返す。
[0172] 2. 5 実施の形態 2の効果
実施の形態 2では、乗算及び 2乗算の処理を分割した処理に対して、同じ個数の引 数を入力とするテーブルを生成し、さらに、それらの引数に出力が依存するようにテ 一ブルの出力値を設定することで、乗算と 2乗算の処理を入力数の違いによる攻撃 者の攻撃を防ぐことが可能となる。これを以下で詳しく説明する。
[0173] 乗算は 2入力 1出力であり、 2乗算は 1入力 1出力の演算であるため、これの違いに より攻撃者に攻撃される可能性がある。これに対し、実施の形態 2では、上記でも述 ベたように通常の RSA暗号等の処理では、乗算処理の入力に含まれるが、 2乗算処 理の入力に含まれなかった入力を含む入力値変換及び出力値変換を、乗算処理及 び 2乗算処理の前後に配置し、これらを含むようなテーブルを生成して 、る。
[0174] これにより、乗算処理に対応するテーブルと、 2乗算処理に対応するテーブルとに おいて、入力数の違いがなくなるので、攻撃者が入力を解析し、乗算と 2乗算を区別 する攻撃を防ぐことが可能となる。
さらに、入力値変換または出力値変換により、 2乗算処理に元々含まれない入力の 値を各テーブルの出力に反映することができるため、攻撃者が出力を解析し、入力 力 Sダミーであると気づくことによる乗算と 2乗算を区別する攻撃を防ぐことが可能となる
[0175] 実施の形態 2では、上述したように、乗算及び 2乗算におけるそれぞれの入力値及 び出力値は非常に大きい数(1024ビット程度)であるため、乗算及び 2乗算の処理を 各桁の処理に分割して 、る。
この場合においても、乗算についても 2乗算についても、各桁の処理を 4入力 1出 力と 2入力 1出力のテーブルとに分割することで、上記のような入力値変換及び出力 値変換を配置しやす 、ような構成を取って ヽる。 [0176] このようにすることで、乗算及び 2乗算の処理を各桁に分割した処理に対して、乗算 及び 2乗算のどちらでも同じ個数の引数を入力とし、それぞれの入力が出力に影響 するようなテーブルを生成することができるので、テーブルの分割の仕方から乗算で ある力 2乗算であるかを区別することができない。すなわち、そのテーブルを解析し乗 算処理であるか 2乗算処理であるかを区別する攻撃を防ぐことが可能となる。したが つて、乗算と 2乗算の処理を攻撃者により区別しに《なり、本発明は有効である。
[0177] また、乗算処理や 2乗算処理を各桁の処理のテーブルに分割することで、一つの 乗算処理または 2乗算処理で必要とするテーブルサイズが、 22048 X (テーブルの出力 ノイトサイズ)バイト程度であったもの力 各桁の処理を 4入力 1出力と 2入力 1出力の テーブルに分割することで、(256 X 256) Z2 X 216 X (テーブルの出力バイトサイズ) = 231 X (テーブルの出カノくイトサイズ)程度に削減できる。
[0178] さら〖こ、同一の変換を示すテーブルを共通化することで、分割後のテーブルとして、 4入力 1出力のテーブルが 2個、 2入力 1出力のテーブルが 2個となり、その結果、一 つの乗算処理または 2乗算処理で必要とするテーブルサイズ力 2 X 216 X (テーブル の出力バイトサイズ) + 2 X 28 X (テーブルの出力バイトサイズ) = 131, 584 X (テー ブルの出力バイトサイズ)程度に削減できる。このように、テーブルの分割 ·共通化を することで、テーブルサイズの削減が可能となる。
[0179] 以上のように、乗算と 2乗算の処理を入力数の違いによる攻撃者の攻撃を防ぐこと が可能となり、また、使用するテーブルサイズが削減できるため、本発明により計算機 上で実装可能な RSA暗号のソースコード難読ィヒされたプログラムを生成可能である
2. 6 安全性についての検討
実施の形態 2にっき、全単射写像の総当り攻撃に対する安全性について検討する 。ここで、全単射写像の総当り攻撃とは、すべての取り得る全単射写像のノ リエーショ ンカも正しい全単射写像を当てる攻撃である。具体的には、全単射写像それぞれに 対してテーブルを生成し、実際にプログラムに含まれるテーブルと比較することで、正 しい全単射写像であるかを判定する。正しい全単射写像の場合は、テーブルの値が すべて一致する。 [0180] (1)乗算テーブル又は 2乗算テーブルが攻撃される場合
乗算テーブル又は 2乗算テーブルが攻撃される場合には、各テーブルには、上述 の g、 φの全単射写像が含まれており、両方のテーブルに対して、各テーブルに相応 する正 、写像を用いる攻撃が行われな 、と、テーブルに対する攻撃は成功しな!ヽ 実施の形態 2において上述したように、各桁を 4ビットで分割する場合、 g、 φそれぞ れの全単射写像のノ リエーシヨンは 16! = 244通りあるため、総当りを行うためには、 16! = 244の計算量が必要である。攻撃者は、 g、 φの全単射写像の両方を当てる必 要があるため、攻撃に要する計算量は、(244) 2 = 288となる。
[0181] (2)加算テーブルが攻撃される場合
加算テーブルが攻撃される場合には、加算テーブルには、少なくとも、 2種類 φが 含まれているので、攻撃に要する計算量は、 (244) 2 = 288である。
次に、実施の形態 2にっき、桁毎の分割前のテーブルが乗算テーブルか 2乗算テ 一ブルであるかの総当り攻撃に対する安全性について、検討すると、乗算テーブル 及び 2乗算テーブルは、 80種類存在し、それぞれが乗算テーブルか 2乗算テーブル である可能性があるため、総当り攻撃の計算量は、 28Qとなる。
[0182] 攻撃に対する安全性を向上させるためには、各桁を 4ビットで分割するとともに、 2 種類の関数に依存して、テーブルを生成することが有効である。
3.その他の変形例
上記に説明した各実施の形態は、本発明の実施の一例であり、本発明はこの実施 の形態に何ら限定されるものではなぐその主旨を逸脱しない範囲において種々なる 態様で実施し得るものである。例えば、以下のような場合も本発明に含まれる。
[0183] (1)実施の形態 2では、テーブル化の対象処理を RSA暗号における乗算剰余処理 及び 2乗算剰余処理とし、これらの入力を統一した力 これに限らない。
入力する数が異なる処理をテーブルィ匕するとしてもよい。例えば、楕円曲線暗号の 楕円加算(2つの点の座標を入力)と楕円 2倍算(1つの点の座標を入力)の処理をテ ーブルイ匕対象としてもよい。なお、楕円曲線暗号の場合でも、楕円加算と楕円 2倍加 算が区別されると不正解析の手が力りとなるため、本発明のように区別がつかないよ うにすることで攻撃を防ぐ手法は有効である。
[0184] なお、本発明が、暗号ィ匕に関連する処理のみではなぐ入力数が異なる処理を含 み、それぞれの処理を区別されると不正解析の手力 Sかりとなつてしまうようなプロダラ ムであれば、どのようなプログラムについても適用可能であり、かつ有効であることは 言うまでもない。
また、実施の形態 2では、入力値が対象データ Xのみである 2乗算の処理と、入力 値が対象データ Xおよび中間値 Yである乗算の処理とについて、入力値の数をそろ える変換を行ったが、これに限られるものではない。本発明の手法を適用すれば、入 力値が X、 Yである第 1の処理と入力値が Y、 Ζである第 2の処理との組など、一方の 入力値の集合が他方の入力値の集合を完全に包含していない場合であっても、難 読ィ匕を行うことができる。この場合には、第 1の処理については入力値 Ζに依存する 処理 (実施の形態 2における入力依存加算や減算に相当)を加えた上でテーブルィ匕 し、第 2の処理につ ヽては入力値 Xに依存する処理を加えた上でテーブル化すれば よい。
[0185] (2)実施の形態 2では、難読ィ匕プログラムを使用して、 RSA暗号方式の復号化処 理ゃ RSA署名方式の署名生成時処理を実行して!/ヽるが、秘密鍵をべき値としたべき 乗演算処理を含むものであれば何でもよい。例えば、 RSA— PSS署名方式の署名 方式であってもよいし、 RSA—OAEP暗号方式の復号化処理であってもよいし、 RS Α— ΚΕΜ方式の復号化処理であってもよい。また、 ElGamal暗号方式の復号化処 理であってもよい。
[0186] (3)暗号処理装置にお!、て、媒体力も読み込んだ難読ィ匕プログラムをプログラムメ モリに格納するとしている力 これを何回かに分けて、読込みながら、プログラムメモリ に格納し、その度に CPUにて実行するとしてもよい。
(4)署名生成時の処理において、入力であるメッセージを対象データとして、対象 データのべき乗値を計算している力 メッセージ mを用いて X=Hash (m)とし、対象 データ Xのべき乗値を計算するとしてもよ 、。
[0187] ここで、 Hashはハッシュ関数を示し、 Hash (m)はメッセージ mのハッシュ値を示す
。使用するハッシュ関数は、例えば、 SHA— 1、 SHA— 224、 SHA— 256、 SHA— 384、 SHA— 512、 MD5、 WHIRLPOOLゝ RIPEMD128、 RIPEMD160である
(5)実施の形態 2において、難読ィ匕プログラムは媒体に記録して配布するとしてい る力 これを通信路を用いて送信するとしてもよい。
[0188] (6)実施の形態 2において、入力値変換に入力依存減算、出力値変換に入力依存 減算を含ませていたが、これに限られるものではない。例えば、入力依存減算と入力 依存加算配置を逆にしてもよい。また、減算や加算に限られるものではなぐ乗算と 除算の組等としてもよい。すなわち、対象データ Xに依存する変換が行われるのであ れば、どのような変換の組でも構わない。ただし、上述したやり方でテーブルの分割 によりテーブルサイズを抑える場合には、加算と減算の組とすることが望ま U、。
[0189] また、各乗算剰余演算及び各 2乗算剰余演算の直前及び直後に、当該演算への 1 個の入力値に依存する減算及び加算を配置するとしてもよい。
また、各乗算剰余演算及び各 2乗算剰余演算をそれぞれ分解して、乗算演算及び 剰余演算、 2乗算演算及び剰余演算が生成された場合に、各乗算演算及び各 2乗 算演算の直前及び直後に、当該演算への 1個の入力値に依存する減算及び加算を 酉己置するとしてもよ 、。
[0190] (7)実施の形態 2においては乗算の処理にも 2乗算の処理にも入力依存加算およ び入力依存減算を追加した上で、テーブルィ匕を行っていた力 これに限られるもので はない。すなわち、本発明では、少なくとも 2乗算の処理について対象データ Xに依 存する変換 (入力依存加算)が含まれれば、各テーブルの入出力値の関係を解析し ても乗算のテーブルと 2乗算のテーブルとを区別することが難しくなるので、そのよう にしてもよい。
[0191] (8)従来技術にお!、て、 RSA暗号をバイナリ法を用いて復号ィ匕する場合、処理をラ ンダムなテーブルに変換する従来方法を応用した方法では、乗算と 2乗算とで入力 数が異なるため、これを利用して攻撃者が解析可能となるという課題がある。より具体 的には、各テーブルへの入力数から、そのテーブルが乗算を行うか 2乗算を行うのか を区別することができるという問題点がある。
[0192] 本発明では、乗算及び 2乗算の処理に対して、同じ個数の引数を入力とするテー ブルを生成し、さらに、それらの引数に出力が依存するようにテーブルの出力値を設 定する。より具体的には、 2乗算の処理に対して、乗算でのみ必要な引数を使った追 加処理を付けカ卩えた上でテーブルィ匕することにより、引数の数を乗算と揃える。さらに 、この場合、出力が全ての引数に依存するため、実際には処理されないダミーの引 数を追加する場合と異なり、追加した引数がある力否かが分力もな 、ようになる。
[0193] (9)本発明は、乗算と 2乗算の入力数を異なることによる攻撃を防ぐソースコード難 読化システム、装置および方法を提供する。
上記に説明したように、本発明は、 1つ以上の数からなる第一の処理入力情報から 、 1以上の数力 なる第一の処理出力情報を算出する第一の処理を入力とし、第一 のテーブルを出力する難読ィ匕装置であって、 1以上の数からなる第一の変換入力情 報を、 1以上の数力 なる第一の変換出力情報に変換する第一の変換手段と、 1以 上の数力もなる第一のテーブル入力情報と 1以上の数力もなる第一のテーブル出力 情報の対応を示す前記第一のテーブルを生成する第一のテーブル生成手段とを有 し、前記第一のテーブル入力情報は、前記第一の処理入力情報または第一の変換 入力情報に含まれる数と、 1以上の数力 なる追加入力情報に含まれる数力 なり、 前記第一のテーブル出力情報は、前記第一の処理出力情報または第一の変換出 力情報を含む。
[0194] ここで、前記難読化装置は、さらに、 1以上の数力もなる第二の変換入力情報を、 1 以上の数力 なる第二の変換出力情報に変換する第二の変換手段を有し、前記第 一のテーブル入力情報は、前記第一の変換入力情報に含まれる数と、前記追加入 力情報に含まれる数からなり、前記第一の処理入力情報は、前記変換出力情報の 少なくとも 1つの数を含み、前記第二の変換入力情報は、前記第一の処理出力情報 の少なくとも 1つの数を含み、前記第一のテーブル出力情報は、前記第二の変換出 力情報を含むとしてもよい。
[0195] ここで、前記第一の変換手段による変換は、前記第一のテーブル入力情報に基づ く変換であるとしてもよい。
ここで、前記難読化装置は、前記第一の処理に加え、 1以上の数からなる第二の処 理入力情報から、 1以上の数からなる第二の処理出力情報を算出する第二の処理を 入力とし、前記第二の処理入力情報のうち、前記第一の処理入力情報に含まれない 数を前記追加入力情報とする追加入力情報決定手段を有するとしてもよい。
[0196] ここで、前記第二の処理は、第一の数と第二の数からなる前記第二の処理入力情 報から、前記第一の数と前記第二の数の積からなる前記第二の処理出力情報を算 出する処理であり、前記第一の処理は、前記第一の数からなる前記第一の処理入力 情報から、前記第一の数の 2乗からなる前記第一の処理出力情報を算出する処理で あるとしてもよ 、。
ここで、前記難読化装置は、前記第一の処理と前記第二の処理に加え、 1以上の 数、または、少なくとも 1つの第二の中間値情報の数を含む第三の処理入力情報か ら、 1以上の数力 なる第三の処理出力情報を算出する第三の処理を入力とし、前記 第一のテーブルおよび第二のテーブルを出力する難読化装置であって、 1以上の数 力 なる第三の変換入力情報を、 1以上の数力もなる第三の変換出力情報に変換す る第三の変換手段と、 1以上の数からなる第二のテーブル入力情報と 1以上の数から なる第二のテーブル出力情報の対応を示す前記第二のテーブルを生成する第二の テーブル生成手段と、 1以上の数力 なる第三の変換入力情報を、 1以上の数からな る第三の変換出力情報に変換する第三の変換手段とを有し、前記第二のテーブル 入力情報は、少なくとも 1つの前記第一のテーブル出力情報を含み、前記第三の変 換入力情報は、少なくとも 1つの前記第一のテーブル出力情報を含み、前記第二の テーブル出力情報は、前記第三の処理出力情報を含むとしてもよい。
[0197] ここで、前記難読化装置は、前記第一の処理、前記第二の処理、前記第三の処理 に加え、 1以上の数力 なる第四の処理入力情報から、 1以上の数力 なる第四の処 理出力情報を算出する第四の処理を入力とし、前記第二のテーブル入力情報は、 少なくとも 1つの前記第一のテーブル出力情報に含まれる数と、第二の追加入力情 報を含み、前記第四の処理入力情報のうち、前記第三の処理入力情報に含まれな い数を前記第二の追加入力情報とする第二の追加入力情報決定手段を有するとし てもよい。
[0198] ここで、前記難読化装置はさらに、前記第一の変換手段および前記第三の変換手 段による変換は、前記第一の処理入力情報に含まれる数のうち、前記第三の処理入 力情報に含まれる数に基づく変換であるとしてもよい。
ここで、前記難読化装置は、 1以上の数力もなる第四の変換入力情報を、 1以上の 数力 なる第四の変換出力情報に変換する第四の変換手段を有し、前記第四の変 換入力情報は、前記第三の処理出力情報の少なくとも 1つの数を含み、前記第二の テーブル出力情報は、前記第三の処理出力情報を含む替わりに、前記第四の処理 出力情報を含むとしてもよい。
[0199] ここで、前記難読化装置は、 1つ以上の数からなる第五の処理入力情報から、 1以 上の数力 なる第五の処理出力情報を算出する第五の処理を入力とし、前記第五の 処理を 4つの数からなる処理入力情報から、 1つの数力 なる処理出力情報を算出 する 1以上の 4入力 1出力処理と、 2つの数力 なる処理入力情報から、 1つの数から なる処理出力情報を算出する 1以上 2入力 1出力処理に分割する処理分割手段を有 し、前記 4入力 1出力処理と前記 2入力 1出力処理の少なくとも 1つを前記第一の処 理とし、前記 4入力 1出力処理と前記 2入力 1出力処理の少なくとも 1つを前記第三の 処理としてもよい。
[0200] また、本発明は、 1つ以上の数力 なる第一の処理入力情報から、 1以上の数から なる第一の処理出力情報を算出する第一の処理を入力とし、第一のテーブルを出力 する難読化方法であって、 1以上の数力 なる第一の変換入力情報を、 1以上の数 力 なる第一の変換出力情報に変換する第一の変換ステップと、 1以上の数力もなる 第一のテーブル入力情報と 1以上の数力もなる第一のテーブル出力情報の対応を 示す前記第一のテーブルを生成する第一のテーブル生成ステップとを有し、前記第 一のテーブル入力情報は、前記第一の処理入力情報または第一の変換入力情報に 含まれる数と、 1以上の数力 なる追加入力情報に含まれる数力 なり、前記第一の テーブル出力情報は、前記第一の処理出力情報または第一の変換出力情報を含む としてちよい。
[0201] ここで、前記難読化方法は、さらに、 1以上の数力もなる第二の変換入力情報を、 1 以上の数力 なる第二の変換出力情報に変換する第二の変換ステップを有し、前記 第一のテーブル入力情報は、前記第一の変換入力情報に含まれる数と、前記追カロ 入力情報に含まれる数からなり、前記第一の処理入力情報は、前記変換出力情報 の少なくとも 1つの数を含み、前記第二の変換入力情報は、前記第一の処理出力情 報の少なくとも 1つの数を含み、前記第一のテーブル出力情報は、前記第二の変換 出力情報を含むとしてもよい。
[0202] ここで、前記第一の変換ステップによる変換は、前記第一のテーブル入力情報に 基づく変換であるとしてもょ 、。
ここで、前記難読化方法は、前記第一の処理に加え、 1以上の数からなる第二の処 理入力情報から、 1以上の数からなる第二の処理出力情報を算出する第二の処理を 入力とし、前記第二の処理入力情報のうち、前記第一の処理入力情報に含まれない 数を前記追加入力情報とする追加入力情報決定ステップを有するとしてもよい。
[0203] ここで、前記第二の処理は、第一の数と第二の数からなる前記第二の処理入力情 報から、前記第一の数と前記第二の数の積からなる前記第二の処理出力情報を算 出する処理であり、前記第一の処理は、前記第一の数からなる前記第一の処理入力 情報から、前記第一の数の 2乗からなる前記第一の処理出力情報を算出する処理で あるとしてもよ 、。
ここで、前記難読化方法は、前記第一の処理と前記第二の処理に加え、 1以上の 数、または、少なくとも 1つの第二の中間値情報の数を含む第三の処理入力情報か ら、 1以上の数力 なる第三の処理出力情報を算出する第三の処理を入力とし、前記 第一のテーブルおよび第二のテーブルを出力する難読化方法であって、 1以上の数 力 なる第三の変換入力情報を、 1以上の数力もなる第三の変換出力情報に変換す る第三の変換ステップと、 1以上の数からなる第二のテーブル入力情報と 1以上の数 力 なる第二のテーブル出力情報の対応を示す前記第二のテーブルを生成する第 二のテーブル生成ステップと、 1以上の数力もなる第三の変換入力情報を、 1以上の 数力 なる第三の変換出力情報に変換する第三の変換ステップとを有し、前記第二 のテーブル入力情報は、少なくとも 1つの前記第一のテーブル出力情報を含み、前 記第三の変換入力情報は、少なくとも 1つの前記第一のテーブル出力情報を含み、 前記第二のテーブル出力情報は、前記第三の処理出力情報を含むとしてもよい。
[0204] ここで、前記難読化方法は、前記第一の処理、前記第二の処理、前記第三の処理 に加え、 1以上の数力 なる第四の処理入力情報から、 1以上の数力 なる第四の処 理出力情報を算出する第四の処理を入力とし、前記第二のテーブル入力情報は、 少なくとも 1つの前記第一のテーブル出力情報に含まれる数と、第二の追加入力情 報を含み、前記第四の処理入力情報のうち、前記第三の処理入力情報に含まれな い数を前記第二の追加入力情報とする第二の追加入力情報決定ステップを有すると してちよい。
[0205] ここで、前記難読化方法にお!、て、前記第一の変換ステップおよび前記第三の変 換ステップによる変換は、前記第一の処理入力情報に含まれる数のうち、前記第三 の処理入力情報に含まれる数に基づく変換であるとしてもよい。
ここで、前記難読化方法は、 1以上の数力もなる第四の変換入力情報を、 1以上の 数力 なる第四の変換出力情報に変換する第四の変換ステップを有し、前記第四の 変換入力情報は、前記第三の処理出力情報の少なくとも 1つの数を含み、前記第二 のテーブル出力情報は、前記第三の処理出力情報を含む替わりに、前記第四の処 理出力情報を含むとしてもよい。
[0206] ここで、前記難読化方法は、 1つ以上の数からなる第五の処理入力情報から、 1以 上の数力 なる第五の処理出力情報を算出する第五の処理を入力とし、前記第五の 処理を 4つの数からなる処理入力情報から、 1つの数力 なる処理出力情報を算出 する 1以上の 4入力 1出力処理と、 2つの数力 なる処理入力情報から、 1つの数から なる処理出力情報を算出する 1以上 2入力 1出力処理に分割する処理分割ステップ を有し、前記 4入力 1出力処理と前記 2入力 1出力処理の少なくとも 1つを前記第一の 処理とし、前記 4入力 1出力処理と前記 2入力 1出力処理の少なくとも 1つを前記第三 の処理としてもよい。
[0207] また、本発明は、前記難読化装置と、プログラムと、前記プログラムを実行する情報 処理装置から構成される情報処理システムであって、前記プログラムは、前記第一の テーブルを用いて、前記第一のテーブル入力情報から前記第一のテーブル出力情 報を算出する処理を含む。
また、本発明は、前記難読化装置と、プログラムと、前記プログラムを実行する情報 処理装置力 構成される情報処理システムにおけるプログラムであって、前記第一の テーブルを用いて、前記第一のテーブル入力情報から前記第一のテーブル出力情 報を算出する処理を含む。
[0208] ここで、前記第一の処理は、復号処理の一部であるとしてもよ!、。
ここで、前記第一の処理は、署名生成処理の一部であるとしてもよい。 また、本発明は、前記プログラムを録した記録媒体である。
また、本発明は、前記難読化装置と、プログラムと、前記プログラムを実行する情報 処理装置力 構成される情報処理システムにおける情報処理装置であって、前記プ ログラムは、前記第一のテーブルを用いて、前記第一のテープノレ入力情報から前記 第一のテーブル出力情報を算出する処理を含む。
[0209] また、本発明は、 1つ以上の数力 なる第一の処理入力情報から、 1以上の数から なる第一の処理出力情報を算出する第一の処理を入力とし、第一のテーブルを出力 する難読ィ匕装置の集積回路であって、 1以上の数力もなる第一の変換入力情報を、 1以上の数力 なる第一の変換出力情報に変換する第一の変換手段と、 1以上の数 力もなる第一のテーブル入力情報と 1以上の数力もなる第一のテーブル出力情報の 対応を示す前記第一のテーブルを生成する第一のテーブル生成手段とを有し、前 記第一のテーブル入力情報は、前記第一の処理入力情報または第一の変換入力 情報に含まれる数と、 1以上の数力 なる追加入力情報に含まれる数力 なり、前記 第一のテーブル出力情報は、前記第一の処理出力情報または第一の変換出力情 報を含む。
[0210] また、本発明は、前記第一の処理を含む情報処理を行う情報処理装置の集積回路 であって、前記第一のテーブルを保持するテーブル保持手段と、前記第一のテープ ル入力情報を入力とし、前記第一のテーブル出力情報を出力する出力値算出手段 とを有する。
また、前記難読化装置は、前記第一のテーブルの代わりに、プログラムを出力し、 前記難読化装置は、さらに、前記第一のテーブルと、 1以上のプログラム命令力 な るプログラム命令群力 なる前記プログラムを生成するプログラム生成手段を有し、前 記プログラム命令群は、前記第一のテーブル入力情報を入力とし、対応する前記第 一のテーブル出力情報を出力する処理を含むとしてもよい。
[0211] また、本発明は、 1つ以上の入力値の集合である第 1の入力値群を用いた処理を 行う第 1の処理と、前記第 1の処理よりも多くの入力値が含まれる集合である第 2の入 力値群を用いた処理を行う第 2の処理とを含むプログラムを難読化して難読化プログ ラムを生成する難読ィ匕装置であって、前記プログラムを受け付ける入力手段と、前記 第 2の入力値群と前記第 2の処理結果とを対応付けた第 2テーブルと、前記第 1の入 力値群および追加入力値群と変換後の第 1の処理の処理結果とを対応付けた第 1テ 一ブルとを生成するテーブル生成手段と、前記プログラムにおける前記第 1の処理を 、前記第 1の入力値群を用いて前記第 1テーブルから前記処理結果を取り出す処理 に置き換え、かつ、前記第 2の処理を、前記第 2の入力値群を用いて前記第 2テープ ルカ 前記処理結果を取り出す処理に置き換えて前記難読ィヒプログラムを生成する プログラム生成手段とを備え、前記追加入力値群は、前記第 2の入力値群のうち前 記第 1の入力値群に含まれない入力値の集合であり、前記変換後の第 1の処理は、 前記第 1の処理に前記追加入力値群を用いる処理を追加した処理である。
[0212] これらの構成によると、乗算と 2乗算の入力数が異なることによる攻撃を防ぐことがで き、その価値は大きい。
(10)上記の各装置は、具体的には、マイクロプロセッサ、 ROM、 RAM、ハードデ イスクユニット、ディスプレイユニット、キーボード、マウスなどから構成されるコンピュー タシステムである。前記 RAMまたはハードディスクユニットには、コンピュータプロダラ ムが記憶されている。前記マイクロプロセッサ力 前記コンピュータプログラムにしたが つて動作することにより、各装置は、その機能を達成する。ここでコンピュータプロダラ ムは、所定の機能を達成するために、コンピュータに対する指令を示す命令コードが 複数個組み合わされて構成されたものである。
[0213] (11)上記の各装置を構成する構成要素の一部または全部は、 1個のシステム LSI
(Large Scale Integration:大規模集積回路)から構成されているとしてもよい。 システム LSIは、複数の構成部を 1個のチップ上に集積して製造された超多機能 LSI であり、具体的には、マイクロプロセッサ、 ROM、 RAMなどを含んで構成されるコン ピュータシステムである。前記 RAMには、コンピュータプログラムが記憶されている。 前記マイクロプロセッサ力 前記コンピュータプログラムにしたがって動作することによ り、システム LSIは、その機能を達成する。 [0214] また、上記の各装置を構成する構成要素の各部は、個別に 1チップィ匕されていても 良!、し、一部又は全てを含むように 1チップィ匕されてもょ 、。
また、ここでは、システム LSIとした力 集積度の違いにより、 IC、 LSI,スーパー LS I、ウルトラ LSIと呼称されることもある。また、集積回路化の手法は LSIに限るもので はなぐ専用回路又は汎用プロセッサで実現してもよい。 LSI製造後に、プログラムす ることが可能な FPGA (Field Programmable Gate Array)や、 LSI内部の回路 セルの接続や設定を再構成可能なリコンフィギユラブル'プロセッサーを利用しても良 い。
[0215] さらには、半導体技術の進歩又は派生する別技術により LSIに置き換わる集積回 路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積ィ匕を行って もよい。バイオ技術の適応等が可能性としてありえる。
(12)上記の各装置を構成する構成要素の一部または全部は、各装置に脱着可能 な ICカードまたは単体のモジュール力も構成されて 、るとしてもよ 、。前記 ICカード または前記モジュールは、マイクロプロセッサ、 ROM, RAMなどから構成されるコン ピュータシステムである。前記 ICカードまたは前記モジュールは、上記の超多機能 L SIを含むとしてもよい。マイクロプロセッサが、コンピュータプログラムにしたがって動 作することにより、前記 ICカードまたは前記モジュールは、その機能を達成する。この ICカードまたはこのモジュールは、耐タンパ性を有するとしてもよ!/、。
[0216] (13)本発明は、上記に示す方法であるとしてもよい。また、これらの方法をコンビュ ータにより実現するコンピュータプログラムであるとしてもよいし、前記コンピュータプ ログラム力もなるデジタル信号であるとしてもよい。
(14)また、本発明は、前記コンピュータプログラムまたは前記デジタル信号をコン ピュータ読み取り可能な記録媒体、例えば、フレキシブルディスク、ハードディスク、 C D—ROMゝ MO、 DVDゝ DVD— ROMゝ DVD— RAMゝ BD (Blu—ray Disc)、半 導体メモリなどに記録したものとしてもよい。また、これらの記録媒体に記録されてい る前記デジタル信号であるとしてもよ 、。
[0217] (15)また、本発明は、前記コンピュータプログラムまたは前記デジタル信号を、電 気通信回線、無線または有線通信回線、インターネットを代表とするネットワーク、デ ータ放送等を経由して伝送するものとしてもよい。
(16)また、本発明は、マイクロプロセッサとメモリを備えたコンピュータシステムであ つて、前記メモリは、上記コンピュータプログラムを記憶しており、前記マイクロプロセ ッサは、前記コンピュータプログラムにしたがって動作するとしてもよい。
[0218] (17)また、前記プログラムまたは前記デジタル信号を前記記録媒体に記録して移 送することにより、または前記プログラムまたは前記デジタル信号を前記ネットワーク 等を経由して移送すること〖こより、独立した他のコンピュータシステムにより実施すると してちよい。
(18)本発明は、上記の実施の形態及び変形例の組合せであってもよい。 産業上の利用可能性
[0219] これらの構成によると、乗算と 2乗算の入力数が異なることによる攻撃を防ぐことがで きる。
本発明を構成する各装置は、情報を暗号ィ匕して復号ィ匕することにより第三者に知ら れないように情報を秘密に扱い、情報にデジタル署名を施し、署名検証を施すことに より情報の改ざんや他人によるなりすましなどを防止するなど、情報を安全にまた確 実に扱う必要があるあらゆる産業において、経営的に、継続的及び反復的に使用す ることができる。また、本発明を構成する各装置は、電器機器製造産業において、経 営的に、また継続的及び反復的に、製造し、販売することができる。

Claims

請求の範囲
[1] 鍵情報を用いて対象情報を安全又は確実に扱うセキュリティ演算を含む情報セキ ユリティプログラムを難読ィ匕するプログラム難読ィ匕装置であって、
前記セキュリティ演算と等価となるように、複数入力が必要な第 1基本演算と、前記 複数入力の一部のみ必要とする第 2基本演算とを含む複数の基本演算が鍵情報に より定まる順序で配置されている前記情報セキュリティプログラムを取得する取得手 段と、
前記情報セキュリティプログラムに含まれる各第 2基本演算について、当該第 2基本 演算の前後に、当該第 2基本演算にお 、て必要とされな 、入力に依存する入力依 存変換とその逆変換である入力依存逆変換を配置する変換手段と、
各第 2基本演算について、直前に配置された前記入力依存変換、当該第 2基本演 算及び直後に配置された前記入力依存逆変換からなる一組の演算と等価の演算結 果を得るテーブルを生成し、当該テーブルを参照する参照命令を生成するテーブル 生成手段と、
生成された前記テーブル及び前記参照命令を含む難読ィヒプログラムを出力する出 力手段と
を備えることを特徴とするプログラム難読ィ匕装置。
[2] 前記変換手段は、さらに、前記情報セキュリティプログラムに含まれる各第 1基本演 算について、当該第 1基本演算の前後のいずれか、又は両方に、当該第 1基本演算 にお!/、て必要な入力に依存する入力依存変換とその逆変換である入力依存逆変換 を配置する
ことを特徴とする請求項 1に記載のプログラム難読化装置。
[3] 前記変換手段において、前記入力依存変換は減算であり、前記入力依存逆変換 は加算である
ことを特徴とする請求項 2に記載のプログラム難読化装置。
[4] 前記変換手段は、さらに、前記情報セキュリティプログラムの先頭に配置された基 本演算を除くその他の基本演算のそれぞれについて、当該基本演算の直前に、当 該基本演算の直前の基本演算の演算結果に第 1の変換を施す第 1変換演算と、前 記第 1変換演算の演算結果に、第 1の変換の逆変換である第 2の変換を施す第 2変 換演算とを配置し、
前記テーブル生成手段は、
さらに、前記情報セキュリティプログラムの先頭に配置された基本演算とその直後に 配置された第 1変換演算とからなる一組の演算と等価の演算結果を得るテーブルを 生成し、当該テーブルを参照する参照命令を生成し、
中間に配置された各基本演算について、直前に配置された前記減算、当該基本 演算及び直後に配置された前記加算に加えて、第 2変換演算及び第 1変換演算から なる一組の演算と等価の演算結果を得る前記テーブルを生成し、当該テーブルを参 照する前記参照命令を生成し、
さらに、前記情報セキュリティプログラムの末尾に配置された基本演算とその直前に 配置された第 2変換演算とからなる一組の演算と等価の演算結果を得るテーブルを 生成し、当該テーブルを参照する参照命令を生成し、
前記出力手段は、生成された前記テーブル及び前記参照命令を含む前記難読ィ匕 プログラムを出力する
ことを特徴とする請求項 3に記載のプログラム難読化装置。
前記変換手段は、前記基本演算、前記減算、前記加算、前記第 1変換演算及び前 記第 2変換演算を、桁毎に分解して、複数の桁演算を生成し、生成した前記桁演算 を配置し、
前記テーブル生成手段は、
前記情報セキュリティプログラムの先頭に配置された基本演算とその直後に配置さ れた第 1変換演算とからなる一組の演算と等価の演算結果が得られるように、生成し た前記桁演算と等価の演算結果が得られる桁演算テーブルを生成し、当該桁演算 テーブルを参照する桁演算参照命令を生成し、
中間に配置された各基本演算について、直前に配置された前記減算、当該基本 演算及び直後に配置された前記加算、第 2変換演算及び第 1変換演算からなる一組 の演算と等価の演算結果が得られるように、生成した前記桁演算と等価の演算結果 が得られる桁演算テーブルを生成し、当該桁演算テーブルを参照する桁演算参照 命令を生成し、
前記情報セキュリティプログラムの末尾に配置された基本演算とその直前に配置さ れた第 2変換演算とからなる一組の演算と等価の演算結果が得られるように、生成し た前記桁演算と等価の演算結果が得られる桁演算テーブルを生成し、当該桁演算 テーブルを参照する桁演算参照命令を生成し、
前記出力手段は、生成された前記桁演算テーブル及び前記桁演算参照命令を含 む前記難読ィ匕プログラムを出力する
ことを特徴とする請求項 4に記載のプログラム難読ィ匕装置。
[6] 前記テーブル生成手段は、桁演算テーブルの生成に際して、所定数個の共通化さ れたテーブルから、 1個のテーブルを選択する
ことを特徴とする請求項 5に記載のプログラム難読化装置。
[7] 前記セキュリティ演算は、法 nの元で、鍵情報である秘密鍵 dを用いる対象情報 こ 対するべき乗剰余演算 Cn mod nであり、
鍵情報により定まる順序で配置された入力数の異なる前記複数の基本演算は、ベ き乗剰余演算 Cn mod nと等価になるように、バイナリ法により、前記基本演算として 、乗算剰余演算と 2乗剰余演算とが、秘密鍵 dの各ビット値に基づいて、配置されたも のであり、
前記変換手段は、中間に配置された乗算剰余演算又は 2乗剰余演算の直前及び 直後に、当該乗算剰余演算又は 2乗剰余演算への 1個の入力値に依存する減算及 び加算を配置し、
前記テーブル生成手段は、中間に配置された各乗算剰余演算又は 2乗剰余演算 について、直前に配置された前記減算、当該乗算剰余演算又は 2乗剰余演算及び 直後に配置された前記加算からなる一組の演算と等価の演算結果を得るテーブルを 生成する
ことを特徴とする請求項 3に記載のプログラム難読化装置。
[8] 前記情報セキュリティプログラムは、べき乗剰余演算 Cn mod nを用いて、前記対 象情報に、秘密通信、デジタル署名又は署名検証を施すためのコンピュータプログ ラムである ことを特徴とする請求項 7に記載のプログラム難読化装置。
[9] 前記セキュリティ演算は、法 nの元で、鍵情報である秘密鍵 dを用いる対象情報 こ 対するべき乗剰余演算 Cn mod nであり、
鍵情報により定まる順序で配置された入力数の異なる前記複数の基本演算は、ベ き乗剰余演算 Cn mod nと等価になるように、バイナリ法により、前記基本演算として 、乗算剰余演算と 2乗剰余演算とが、秘密鍵 dの各ビット値に基づいて、配置されたも のであり、
前記変換手段は、中間に配置された各乗算剰余演算を分解して、乗算演算及び 剰余演算を配置し、配置された乗算演算の直前及び直後に、当該乗算演算への 1 個の入力値に依存する減算及び加算を配置し、中間に配置された各 2乗算剰余演 算を分解して、 2乗算演算及び剰余演算を配置し、配置された 2乗算演算の直前及 び直後に、当該 2乗算演算への 1個の入力値に依存する減算及び加算を配置し、 前記テーブル生成手段は、中間に配置された各乗算演算又は各 2乗演算につい て、直前に配置された前記減算、当該乗算演算又は 2乗演算及び直後に配置され た前記加算力 なる一組の演算と等価の演算結果を得るテーブルを生成する ことを特徴とする請求項 3に記載のプログラム難読化装置。
[10] 前記取得手段、前記変換手段、前記テーブル生成手段及び前記出力手段は、集 積回路を構成する
ことを特徴とする請求項 1に記載のプログラム難読化装置。
[11] プログラム難読ィ匕装置及びプログラム実行装置力 構成される難読ィ匕システムであ つて、
鍵情報を用いて対象情報を安全又は確実に扱うセキュリティ演算を含む情報セキ ユリティプログラムを難読ィ匕する前記プログラム難読ィ匕装置は、
前記セキュリティ演算と等価となるように、複数入力が必要な第 1基本演算と、前記 複数入力の一部のみ必要とする第 2基本演算とを含む複数の基本演算が鍵情報に より定まる順序で配置されている前記情報セキュリティプログラムを取得する取得手 段と、
前記情報セキュリティプログラムに含まれる各第 2基本演算について、当該第 2基本 演算の前後に、当該第 2基本演算にお 、て必要とされな 、入力に依存する入力依 存変換とその逆変換である入力依存逆変換を配置する変換手段と、
各第 2基本演算について、直前に配置された前記入力依存変換、当該第 2基本演 算及び直後に配置された前記入力依存逆変換からなる一組の演算と等価の演算結 果を得るテーブルを生成し、当該テーブルを参照する参照命令を生成するテーブル 生成手段と、
生成された前記テーブル及び前記参照命令を含む難読ィヒプログラムを出力する出 力手段と
を備え、
前記プログラム実行装置は、
前記難読化プログラムを取得する手段と、
取得した前記難読ィ匕プログラムに含まれている参照命令に従って、当該難読化プ ログラムに含まれて 、るテーブルを参照することにより、鍵情報を用 、て対象情報を 安全又は確実に扱う
ことを特徴とするプログラム難読ィ匕システム。
鍵情報を用いて対象情報を安全又は確実に扱うセキュリティ演算を含む情報セキ ユリティプログラムを難読ィ匕するプログラム難読ィ匕装置において用いられるプログラム 難読化方法であって、
前記セキュリティ演算と等価となるように、複数入力が必要な第 1基本演算と、前記 複数入力の一部のみ必要とする第 2基本演算とを含む複数の基本演算が鍵情報に より定まる順序で配置されている前記情報セキュリティプログラムを取得する取得ステ ップと、
前記情報セキュリティプログラムに含まれる各第 2基本演算について、当該第 2基本 演算の前後に、当該第 2基本演算にお 、て必要とされな 、入力に依存する入力依 存変換とその逆変換である入力依存逆変換を配置する変換ステップと、
各第 2基本演算について、直前に配置された前記入力依存変換、当該第 2基本演 算及び直後に配置された前記入力依存逆変換からなる一組の演算と等価の演算結 果を得るテーブルを生成し、当該テーブルを参照する参照命令を生成するテーブル 生成ステップと、
生成された前記テーブル及び前記参照命令を含む難読ィヒプログラムを出力する出 力ステップと
を含むことを特徴とするプログラム難読化方法。
[13] 鍵情報を用いて対象情報を安全又は確実に扱うセキュリティ演算を含む情報セキ ユリティプログラムを難読ィ匕するプログラム難読ィ匕装置において用いられるプログラム 難読ィ匕のためのコンピュータプログラムを記録しているコンピュータ読み取り可能な 記録媒体であって、
前記コンピュータプログラムは、コンピュータに、
前記セキュリティ演算と等価となるように、複数入力が必要な第 1基本演算と、前記 複数入力の一部のみ必要とする第 2基本演算とを含む複数の基本演算が鍵情報に より定まる順序で配置されている前記情報セキュリティプログラムを取得する取得ステ ップと、
前記情報セキュリティプログラムに含まれる各第 2基本演算について、当該第 2基本 演算の前後に、当該第 2基本演算にお 、て必要とされな 、入力に依存する入力依 存変換とその逆変換である入力依存逆変換を配置する変換ステップと、
各第 2基本演算について、直前に配置された前記入力依存変換、当該第 2基本演 算及び直後に配置された前記入力依存逆変換からなる一組の演算と等価の演算結 果を得るテーブルを生成し、当該テーブルを参照する参照命令を生成するテーブル 生成ステップと、
生成された前記テーブル及び前記参照命令を含む難読ィヒプログラムを出力する出 力ステップとを実行させる
ことを特徴とする記録媒体。
[14] 鍵情報を用いて対象情報を安全又は確実に扱うセキュリティ演算を含む情報セキ ユリティプログラムを難読ィ匕するプログラム難読ィ匕装置において用いられるプログラム 難読化のためのコンピュータプログラムであって、
前記コンピュータプログラムは、コンピュータに、
前記セキュリティ演算と等価となるように、複数入力が必要な第 1基本演算と、前記 複数入力の一部のみ必要とする第 2基本演算とを含む複数の基本演算が鍵情報に より定まる順序で配置されている前記情報セキュリティプログラムを取得する取得ステ ップと、
前記情報セキュリティプログラムに含まれる各第 2基本演算について、当該第 2基本 演算の前後に、当該第 2基本演算にお 、て必要とされな 、入力に依存する入力依 存変換とその逆変換である入力依存逆変換を配置する変換ステップと、
各第 2基本演算について、直前に配置された前記入力依存変換、当該第 2基本演 算及び直後に配置された前記入力依存逆変換からなる一組の演算と等価の演算結 果を得るテーブルを生成し、当該テーブルを参照する参照命令を生成するテーブル 生成ステップと、
生成された前記テーブル及び前記参照命令を含む難読ィヒプログラムを出力する出 力ステップとを実行させる
ことを特徴とするコンピュータプログラム。
PCT/JP2007/059158 2006-04-28 2007-04-27 プログラム難読化システム、プログラム難読化装置及びプログラム難読化方法 WO2007126049A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN2007800154489A CN101432755B (zh) 2006-04-28 2007-04-27 程序难破解化系统、程序难破解化装置及程序难破解化方法
JP2008513289A JP4938766B2 (ja) 2006-04-28 2007-04-27 プログラム難読化システム、プログラム難読化装置及びプログラム難読化方法
US12/297,929 US8479018B2 (en) 2006-04-28 2007-04-27 System for making program difficult to read, device for making program difficult to read, and method for making program difficult to read

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2006125926 2006-04-28
JP2006-125926 2006-04-28

Publications (1)

Publication Number Publication Date
WO2007126049A1 true WO2007126049A1 (ja) 2007-11-08

Family

ID=38655570

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2007/059158 WO2007126049A1 (ja) 2006-04-28 2007-04-27 プログラム難読化システム、プログラム難読化装置及びプログラム難読化方法

Country Status (5)

Country Link
US (1) US8479018B2 (ja)
JP (1) JP4938766B2 (ja)
KR (1) KR20080113277A (ja)
CN (1) CN101432755B (ja)
WO (1) WO2007126049A1 (ja)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011513787A (ja) * 2008-03-05 2011-04-28 イルデト・コーポレート・ビー・ヴイ ホワイトボックス実装
JP2014109641A (ja) * 2012-11-30 2014-06-12 Kddi Corp プログラムの変換装置及びプログラム
JP2015504279A (ja) * 2012-01-09 2015-02-05 コーニンクレッカ フィリップス エヌ ヴェ 鍵駆動の難読化を用いる仮想マシンデバイス及び方法
JP2015537298A (ja) * 2012-11-07 2015-12-24 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. 演算子のないコンパイラ
JP2017533458A (ja) * 2014-09-30 2017-11-09 コーニンクレッカ フィリップス エヌ ヴェKonink 難読化された算術を実行するための電子計算装置
JP2020510879A (ja) * 2017-03-17 2020-04-09 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. 楕円曲線点乗算デバイス及び方法

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104335218B (zh) * 2012-03-30 2017-08-11 爱迪德技术有限公司 使用基函数编码来保护可访问的系统
CN104798075A (zh) * 2012-09-28 2015-07-22 惠普发展公司,有限责任合伙企业 应用随机化
BR112015014470A2 (pt) * 2012-12-21 2017-07-11 Koninklijke Philips Nv compilador configurado para compilar um programa de computador, dispositivo de computação configurado para executar um programa de computador compilado por um compilador, método para executar um programa de computador compilado por um compilador e programa de computador
FR3011354A1 (fr) * 2013-10-01 2015-04-03 Commissariat Energie Atomique Procede d'execution par un microprocesseur d'un code binaire polymorphique d'une fonction predeterminee
US10412054B2 (en) * 2014-06-24 2019-09-10 Nxp B.V. Method for introducing dependence of white-box implementation on a set of strings
JP6368051B2 (ja) 2014-12-12 2018-08-01 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. 電子生成装置
EP3238366B1 (en) 2014-12-22 2019-03-13 Koninklijke Philips N.V. Electronic calculating device
US10235506B2 (en) * 2015-05-05 2019-03-19 Nxp B.V. White-box modular exponentiation
US10372886B2 (en) * 2015-05-05 2019-08-06 Nxp B.V. Protecting the input/output of modular encoded white-box RSA/ECC
TWI580243B (zh) 2015-10-06 2017-04-21 瑞昱半導體股份有限公司 解密裝置、方法及電路
TWI575924B (zh) * 2015-10-06 2017-03-21 瑞昱半導體股份有限公司 解密裝置、方法及電路
CN106569778B (zh) * 2015-10-13 2019-06-07 华为技术有限公司 一种数据处理的方法及电子设备
US11362824B2 (en) * 2018-05-25 2022-06-14 Intertrust Technologies Corporation Content management systems and methods using proxy reencryption
US10289816B1 (en) * 2018-06-08 2019-05-14 Gsfm Llc Methods, systems, and devices for an encrypted and obfuscated algorithm in a computing environment
US11509454B2 (en) * 2019-05-22 2022-11-22 Crypto Lab Inc. Apparatus for processing modular multiply operation and methods thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002046890A2 (en) * 2000-12-08 2002-06-13 Cloakware Corporation System and method for protecting computer software from a white box attack

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19831884C2 (de) * 1998-07-17 2001-09-20 Ibm System und Verfahren zum Schutz gegen analytisches Ausspähen von geheimen Informationen
US7430670B1 (en) * 1999-07-29 2008-09-30 Intertrust Technologies Corp. Software self-defense systems and methods
CN1162783C (zh) * 2001-11-09 2004-08-18 汪文虎 一种信息安全方法
JP2005049925A (ja) * 2003-07-29 2005-02-24 Nara Institute Of Science & Technology プログラム難読化装置、プログラム難読化プログラム及びプログラム難読化方法
US7739521B2 (en) * 2003-09-18 2010-06-15 Intel Corporation Method of obscuring cryptographic computations
US7415618B2 (en) * 2003-09-25 2008-08-19 Sun Microsystems, Inc. Permutation of opcode values for application program obfuscation
US7587616B2 (en) * 2005-02-25 2009-09-08 Microsoft Corporation System and method of iterative code obfuscation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002046890A2 (en) * 2000-12-08 2002-06-13 Cloakware Corporation System and method for protecting computer software from a white box attack

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
PLASMANS M.: "White-Box Cryptography for Digital Content Protection", MASTER'S THESIS FOR DEPARTMENT OF MATHEMATICS AND COMPUTER SCIENCE, TECHNISCHE UNIVERSITEIT EINDHOVEN, May 2005 (2005-05-01), pages 28 - 41, XP003019136, Retrieved from the Internet <URL:http://www.alexandria.tue.nl/extral/afstvers1/wsk-i.plasmans2005.pdf> *
SHAND M. ET AL.: "Fast Implementations of RSA Cryptography", IEEE, 1993, pages 252 - 259, XP000419946, Retrieved from the Internet <URL:http://www.ieeexplore.ieee.org/iel2/3022/8615/00378085.pdf> *
TYMA P.: "The New Obfuscation", JAVA.NET, 22 October 2004 (2004-10-22), pages 1 - 5, XP003019135, Retrieved from the Internet <URL:http://www.today.java.net/pub/a/today/2004/10/22/obfuscation.html> *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011513787A (ja) * 2008-03-05 2011-04-28 イルデト・コーポレート・ビー・ヴイ ホワイトボックス実装
US8670559B2 (en) 2008-03-05 2014-03-11 Irdeto Corporate B.V. White-box implementation
JP2015504279A (ja) * 2012-01-09 2015-02-05 コーニンクレッカ フィリップス エヌ ヴェ 鍵駆動の難読化を用いる仮想マシンデバイス及び方法
JP2015537298A (ja) * 2012-11-07 2015-12-24 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. 演算子のないコンパイラ
JP2014109641A (ja) * 2012-11-30 2014-06-12 Kddi Corp プログラムの変換装置及びプログラム
JP2017533458A (ja) * 2014-09-30 2017-11-09 コーニンクレッカ フィリップス エヌ ヴェKonink 難読化された算術を実行するための電子計算装置
JP2020510879A (ja) * 2017-03-17 2020-04-09 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. 楕円曲線点乗算デバイス及び方法
JP7123959B2 (ja) 2017-03-17 2022-08-23 コーニンクレッカ フィリップス エヌ ヴェ 楕円曲線点乗算デバイス及び方法

Also Published As

Publication number Publication date
KR20080113277A (ko) 2008-12-29
US8479018B2 (en) 2013-07-02
JP4938766B2 (ja) 2012-05-23
CN101432755A (zh) 2009-05-13
US20090228717A1 (en) 2009-09-10
CN101432755B (zh) 2011-01-12
JPWO2007126049A1 (ja) 2009-09-10

Similar Documents

Publication Publication Date Title
WO2007126049A1 (ja) プログラム難読化システム、プログラム難読化装置及びプログラム難読化方法
Josefsson et al. Edwards-curve digital signature algorithm (EdDSA)
US6658569B1 (en) Secret key cryptographic process for protecting a computer system against attacks by physical analysis
EP3632032B1 (en) Cryptographic device and method
EP3596876B1 (en) Elliptic curve point multiplication device and method for signing a message in a white-box context
CN109661792B (zh) 计算分组密码的设备和方法
JP3583555B2 (ja) 暗号通信法
WO2007074836A1 (ja) 署名生成装置、署名生成方法及び署名生成プログラム
TW201044334A (en) Encryption device, encryption method, and computer program
Josefsson et al. RFC 8032: Edwards-curve digital signature algorithm (EdDSA)
US11502846B2 (en) Whitebox computation of keyed message authentication codes
CN107204846A (zh) 数字签名生成方法、系统、节点模块及共同随机数协商确定方法
US20200097256A1 (en) A calculation device for encoded addition
JP6502945B2 (ja) 安全なデータ変換
KR101440680B1 (ko) 중국인 나머지 정리에 기반한 준동형 암복호화 방법 및 이를 이용한 장치
JP5436373B2 (ja) 秘匿性増強処理演算装置およびこれを備えた量子暗号通信端末
JP2019504343A (ja) 計算デバイス及び方法
WO2016102445A1 (en) Electronic calculating device
KR101153880B1 (ko) 갈로아 변환을 이용한 키 생성 방법

Legal Events

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

Ref document number: 07742593

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2008513289

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 200780015448.9

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 1020087027105

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 12297929

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 07742593

Country of ref document: EP

Kind code of ref document: A1