WO2021025185A1 - Apparatus and method for encoding whitebox cryptography by using anti-inversion function - Google Patents

Apparatus and method for encoding whitebox cryptography by using anti-inversion function Download PDF

Info

Publication number
WO2021025185A1
WO2021025185A1 PCT/KR2019/009701 KR2019009701W WO2021025185A1 WO 2021025185 A1 WO2021025185 A1 WO 2021025185A1 KR 2019009701 W KR2019009701 W KR 2019009701W WO 2021025185 A1 WO2021025185 A1 WO 2021025185A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
encryption
ciphertext
encoding
inversion function
Prior art date
Application number
PCT/KR2019/009701
Other languages
French (fr)
Korean (ko)
Inventor
염용진
김예원
박호중
강주성
Original Assignee
국민대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 국민대학교산학협력단 filed Critical 국민대학교산학협력단
Publication of WO2021025185A1 publication Critical patent/WO2021025185A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • 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
    • 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/34Encoding or coding, e.g. Huffman coding or error correction

Definitions

  • the present invention relates to a white box encryption technology, and more particularly, a white box encryption using an anti-inversion function that can securely protect an encryption key from various attacks when performing an encryption function with software in a PC or mobile environment. It relates to an encoding apparatus and method.
  • WBC Whitebox cryptography
  • An embodiment of the present invention is to provide an apparatus and method for encoding a white box password using an anti-inversion function capable of safely protecting an encryption key from various attacks when performing an encryption function using software in a PC or mobile environment.
  • An embodiment of the present invention is to provide an apparatus and method for encoding a white box password using an anti-inversion function applicable to copyright protection technologies such as preventing illegal copying by providing only an encryption or decryption function to a user.
  • An embodiment of the present invention is to provide an apparatus and method for encoding a white box password using an anti-inversion function that enhances the security of external encoding so that a white box attacker cannot perform an attack that obtains a decryption function from the encryption function.
  • the apparatus for encoding a white box encryption using an anti-inversion function includes a plaintext receiving unit that receives the encoded plaintext, and encryption that generates the encrypted ciphertext as an output through a whitebox encryption process that receives the encoded plaintext.
  • the calculation unit and the encoded cipher text are divided into a plurality of cipher blocks, and an anti-inversion function is applied to any one of the plurality of cipher blocks to generate a final cipher text, and the anti-inversion
  • the function is an anti-inversion function that generates an output block from an input block and provides one-wayness to the white box encryption process by implementing the input block to be recoverable when a secret key is applied to the output block. It includes a function application unit.
  • the encryption operation unit may apply an iterative operation on a plurality of round functions implemented as a look-up table as the white box encryption process.
  • the encryption operation unit may apply a nonlinear encoding function as an internal encoding in steps before and after each of the plurality of round functions.
  • the encryption operation unit may apply an external encoding function different from the internal encoding to an output of the last round function among the plurality of round functions.
  • the anti-inversion function application unit may generate the final cipher text by connecting the output block of the anti-inversion function with the rest of the plurality of cipher blocks.
  • the apparatus for encoding a white box cipher using an anti-inversion function further includes a ciphertext decoding unit for recovering the original ciphertext related to the encoded ciphertext by applying a decoding function to the final ciphertext.
  • the ciphertext decoding unit may recover the first cipher block by applying the inverse function of the anti-inversion function to the output block of the anti-inversion function among the final ciphertext based on the secret key.
  • the ciphertext decoding unit may recover the original ciphertext by applying an inverse function of an external encoding function to the entire cipher block including the first cipher text and the remaining cipher blocks of the final cipher text.
  • the method of encoding a white box cipher using an anti-inversion function includes receiving an encoded plaintext, generating an encoded ciphertext as an output through a whitebox encryption process taking the encoded plaintext as input, and Dividing the encoded ciphertext into a plurality of cipher blocks and applying an anti-inversion function to any one of the plurality of cipher blocks to generate a final ciphertext, the anti-inversion function And when generating an output block from an input block and applying a secret key to the output block, the input block is implemented to be recoverable, thereby providing one-wayness to the white box encryption process.
  • the disclosed technology can have the following effects. However, since it does not mean that a specific embodiment should include all of the following effects or only the following effects, it should not be understood that the scope of the rights of the disclosed technology is limited thereby.
  • the apparatus and method for encoding a white box encryption using an anti-inversion function may be applicable to copyright protection technology such as preventing illegal copying by providing only an encryption or decryption function to a user.
  • the apparatus and method for encoding a white box password using an anti-inversion function can enhance the safety of external encoding so that a white box attacker cannot perform an attack that obtains a decryption function from an encryption function.
  • FIG. 1 is a diagram illustrating a white box encryption encoding system according to an embodiment of the present invention.
  • FIG. 2 is a diagram illustrating a physical configuration of the encryption encoding apparatus in FIG. 1.
  • FIG. 3 is a block diagram illustrating a functional configuration of the encryption encoding apparatus in FIG. 1.
  • FIG. 4 is a flowchart illustrating a process of encoding and decoding a white box cipher using an anti-inversion function performed in the cipher encoding apparatus of FIG. 1.
  • 5 is an exemplary diagram illustrating a general white box encryption process.
  • FIG. 6 is an exemplary diagram illustrating an anti-inversion function.
  • FIG. 7 is an exemplary diagram illustrating a white box encryption process to which anti-inversion encoding is applied.
  • FIG. 8 is an exemplary diagram illustrating an anti-inversion decoding process.
  • first and second are used to distinguish one component from other components, and the scope of rights is not limited by these terms.
  • a first component may be referred to as a second component, and similarly, a second component may be referred to as a first component.
  • the identification code (for example, a, b, c, etc.) is used for convenience of explanation, and the identification code does not describe the order of each step, and each step has a specific sequence clearly in context. Unless otherwise stated, it may occur differently from the stated order. That is, each of the steps may occur in the same order as specified, may be performed substantially simultaneously, or may be performed in the reverse order.
  • the present invention can be embodied as computer-readable codes on a computer-readable recording medium, and the computer-readable recording medium includes all types of recording devices storing data that can be read by a computer system.
  • Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices.
  • the computer-readable recording medium is distributed over a computer system connected by a network, so that the computer-readable code can be stored and executed in a distributed manner.
  • FIG. 1 is a diagram illustrating a white box encryption encoding system according to an embodiment of the present invention.
  • the white box password encoding system 100 may include a user terminal 110, a password encoding device 130, and a database 150.
  • the user terminal 110 may correspond to a computing device that provides a plain text to the cryptographic encoding device 130 and receives an encrypted text for the plain text, and may be implemented as a smartphone, a laptop computer, or a computer, but is not limited thereto, It can be implemented in various devices such as a tablet PC.
  • the user terminal 110 may be connected to the encryption encoding apparatus 130 through a network, and a plurality of user terminals 110 may be connected to the encryption encoding apparatus 130 at the same time.
  • the encryption encoding apparatus 130 may be implemented as a computer or a server corresponding to a program that receives the plain text and generates the encrypted text through a white box encryption process to which an anti-inversion function is applied.
  • the white box cipher can be a technology that hides the encryption key used for data encryption, and can be a secure implementation method even in a strong attacker environment such as memory dump or reversing.
  • the encryption encoding device 130 may be wirelessly connected to the user terminal 110 through Bluetooth, WiFi, a communication network, and the like, and may exchange data with the user terminal 110 through a network.
  • the encryption encoding apparatus 130 may store information necessary in the process of encrypting plain text by interworking with the database 150. Meanwhile, unlike FIG. 1, the encryption encoding apparatus 130 may be implemented by including the database 150 inside, and may be implemented in a form that is included in the user terminal 110 and operates. In addition, the encryption encoding apparatus 130 may be implemented including a processor, a memory, a user input/output unit, and a network input/output unit, which will be described in more detail with reference to FIG. 2.
  • the database 150 may correspond to a storage device that stores various pieces of information necessary in a white box encryption process using an anti-inversion function.
  • the database 150 may store information on plain texts collected from a plurality of user terminals 110, and may store information on a lookup table used for white box operation, but is not necessarily limited thereto, and an encryption encoding device In the process of encoding the white box encryption using the anti-inversion function 130, information collected or processed in various forms may be stored.
  • FIG. 2 is a diagram illustrating a physical configuration of the encryption encoding apparatus in FIG. 1.
  • the encryption encoding apparatus 130 may include a processor 210, a memory 230, a user input/output unit 250, and a network input/output unit 270.
  • the processor 210 may execute a procedure for receiving the plain text and processing each operation in the process of generating the cipher text through a white box encryption process using an anti-inversion function, and a memory that is read or written throughout the process. 230 may be managed, and a synchronization time between the volatile memory and the nonvolatile memory in the memory 230 may be scheduled.
  • the processor 210 may control the overall operation of the encryption encoding device 130, and is electrically connected to the memory 230, the user input/output unit 250, and the network input/output unit 270 to control data flow between them. I can.
  • the processor 210 may be implemented as a CPU (Central Processing Unit) of the encryption encoding device 130.
  • CPU Central Processing Unit
  • the memory 230 is implemented as a nonvolatile memory such as a solid state drive (SSD) or a hard disk drive (HDD), and may include an auxiliary storage device used to store all data required for the encryption encoding device 130, A main memory device implemented with volatile memory such as random access memory (RAM) may be included.
  • SSD solid state drive
  • HDD hard disk drive
  • RAM random access memory
  • the user input/output unit 250 may include an environment for receiving a user input and an environment for outputting specific information to a user.
  • the user input/output unit 250 may include an input device including an adapter such as a touch pad, a touch screen, an on-screen keyboard, or a pointing device, and an output device including an adapter such as a monitor or a touch screen.
  • the user input/output unit 250 may correspond to a computing device connected through a remote connection, and in such a case, the encryption encoding device 130 may be performed as a server.
  • the network input/output unit 270 includes an environment for connecting to an external device or system through a network, and includes, for example, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), and a VAN ( Value Added Network) may include an adapter for communication.
  • LAN local area network
  • MAN metropolitan area network
  • WAN wide area network
  • VAN Value Added Network
  • FIG. 3 is a block diagram illustrating a functional configuration of the encryption encoding apparatus in FIG. 1.
  • the encryption encoding apparatus 130 includes a plaintext receiving unit 310, an encryption calculating unit 330, an anti-inversion function applying unit 350, a ciphertext decoding unit 370, and a control unit 390. I can.
  • the plaintext receiver 310 may receive the encoded plaintext. That is, the plaintext receiving unit 310 may receive an externally encoded plaintext and provide it as an input for a white box encryption process.
  • the encoded plaintext may be obtained as a result of performing external encoding using data as an encryption target as plaintext, and may be generated by an external device through an external encoding function.
  • the plaintext receiving unit 310 may receive the encoded plaintext and divide it into a plurality of plaintext blocks.
  • Each of the plurality of plaintext blocks may be used as an input in the whitebox encryption process, and encryption operations for each plaintext block may be performed in parallel according to the operation mode of the whitebox encryption.
  • the encryption operation unit 330 may generate an encoded ciphertext as an output through a white box encryption process in which the encoded plaintext is input.
  • the white box encryption process for example, in the implementation of a general block encryption algorithm, implements the algorithm as a look-up table and hides the encryption key in it so that external attackers cannot easily infer the encryption key. May correspond to technique.
  • the white box encryption process in order to prevent the size of the lookup table from becoming too large, the lookup table is properly separated by an encryption technique, but encoding and decoding can be performed so that the intermediate value of the encryption operation is not exposed. And, this will be described in more detail in FIG. 5.
  • the encryption operation unit 330 may apply an iterative operation on a plurality of round functions implemented as a look-up table as a white box encryption process.
  • the encryption operation unit 330 may implement each round function as a table reference to implement a white box, and may perform an encryption operation in which a plurality of round functions are continuously repeated.
  • the round function may differ according to the cryptographic algorithm and may be formed of a combination of SubBytes, ShiftRows, MixColumns, and AddRoundKey functions.
  • the encryption operation unit 330 may apply a nonlinear encoding function as an internal encoding in steps before and after each of the plurality of round functions.
  • the encryption operation unit 330 may continuously perform encoding and decoding between round functions in order to prevent exposure of the intermediate value, and specifically, output of the previous round function in the previous step of each round function. After decoding is used as an input, the result of the round function is encoded in a later step of each round function, and then output can be provided to the next round function.
  • the encryption operation unit 330 may apply an external encoding function different from the internal encoding to an output of the last round function among the plurality of round functions.
  • the white box encryption process performed by the encryption operation unit 330 may consist of a plurality of round functions, and an internal encoding may be applied between each round function.
  • the first round function may be applied to the external encoding function used for encoding in order to decode the encoded plain text received by the plain text receiving unit 310, and the last round function terminates the white box encryption process and provides output.
  • an external encoding function different from the internal encoding can be applied.
  • the external encoding applied to the first round function and the external encoding applied to the last round function may be different from each other, and may be preset by the encryption encoding device 130.
  • the anti-inversion function application unit 350 divides the encoded cipher text into a plurality of cipher blocks and generates a final cipher text by applying an anti-inversion function to any one of the plurality of cipher blocks. can do.
  • the Anti-Inversion function is implemented to recover the input block only when an output block is generated from the input block and a secret key is applied to the output block, so that the white box encryption process is one-way. wayness) can be provided.
  • the anti-inversion function will be described in more detail in FIG. 6.
  • the anti-inversion function application unit 350 may generate a final cipher text by connecting the output block of the anti-inversion function with the rest of the plurality of cipher blocks. That is, the anti-inversion function application unit 350 receives the encrypted ciphertext from the encryption operation unit 330 as a result of the plurality of round functions, divides it into a plurality of cipher blocks, and divides the cipher text into a plurality of cipher blocks.
  • the anti-inversion function can be applied only to the cipher block, and the remaining cipher blocks to which the anti-inversion function is not applied among the plurality of cipher blocks can be used as it is in the final cipher text without any separate processing.
  • the ciphertext decoding unit 370 may apply a decoding function to the final ciphertext to recover the original ciphertext for the encoded ciphertext.
  • the original ciphertext may correspond to the ciphertext generated in the original encryption process, and the external encoding and the internal encoding applied in the encryption process may be obtained as a result of removing by each decoding.
  • the ciphertext decoding unit 370 may be independently implemented outside of the ciphertext encoding device 130, in this case, the ciphertext decoding unit 370 may store a preset secret key, and the encryption encoding device ( 130), a decoding operation may be performed after receiving the final encrypted text.
  • the ciphertext decoding unit 370 may recover the first cipher block by applying an inverse function of the anti-inversion function to the output block of the anti-inversion function among the final ciphertext based on the secret key. That is, the first cipher block may correspond to a cipher block to which the anti-inversion function has been applied by the anti-inversion function application unit 350.
  • the inverse function of the anti-inversion function may perform an operation of recovering an input block based on an output block, and a secret key may correspond to a prerequisite for the operation.
  • the ciphertext decoding unit 370 may recover the original ciphertext by applying an inverse function of the external encoding function to the entire cipher block including the first cipher block and the remaining cipher block of the final ciphertext.
  • the recovery process for the original ciphertext may correspond to a process of removing the external encoding by applying decoding to the externally encoded ciphertext.
  • the control unit 390 controls the overall operation of the cryptographic encoding device 130, and a control flow between the plain text receiving unit 310, the cryptographic operation unit 330, the anti-inversion function application unit 350, and the cryptogram decoding unit 370 Or you can manage the data flow.
  • FIG. 4 is a flowchart illustrating a process of encoding and decoding a white box cipher using an anti-inversion function performed in the cipher encoding apparatus of FIG. 1.
  • the encryption encoding apparatus 130 may receive an encoded plaintext through the plaintext receiving unit 310 (step S410).
  • the encryption encoding apparatus 130 may generate the encoded ciphertext as an output through a white box encryption process in which the plaintext encoded through the encryption operation unit 330 is input (step S430).
  • the encryption encoding device 130 divides the encrypted text encoded through the anti-inversion function application unit 350 into a plurality of encryption blocks and applies an anti-inversion function to any one of the plurality of encryption blocks.
  • a final ciphertext can be generated (step S450).
  • the cipher encoding apparatus 130 may apply a decoding function to the final ciphertext through the ciphertext decoding unit 370 to recover the original ciphertext related to the encoded ciphertext (step S470).
  • 5 is an exemplary diagram illustrating a general white box encryption process.
  • the white box encryption process (S530) is a process of generating an encoded ciphertext by inputting an encoded plaintext in the entire encryption process (S500) of generating a ciphertext 530 based on the plaintext 510 May correspond to.
  • the plaintext encoding process (S510) applying external encoding to the plaintext and the ciphertext encoding process (S550) applying external encoding to the encoded ciphertext may be performed independently from the whitebox encryption process (S530), and each process Can be performed in an independent device or system.
  • the white box encryption process S530 may be implemented as a plurality of round operations (Round 1, Round 2, ..., Round n), and internal encoding may be applied between each round operations.
  • F -1 may be applied as an inverse function of the outer encoding F to the input of the first round operation
  • the outer encoding G may be applied to the output of the last round operation.
  • the external encodings F and G may be different from each other.
  • FIG. 6 is an exemplary diagram illustrating an anti-inversion function.
  • an anti-inversion layer may perform an operation of generating an output block Y from an input block X.
  • the anti-inversion function can guarantee safety even if both the algorithm and the intermediate value are disclosed.
  • a private key which is private information, is essentially required, and the execution process needs to be protected through obfuscation or the like.
  • the anti-inversion function can provide a faster execution time than public key encryption such as RSA in terms of efficiency, and can generate an output block Y having a size relatively larger than the size of the input block X.
  • the anti-inversion function can provide a much faster execution time than decryption of the public key encryption when recovering the input block X using the private key K.
  • the anti-inversion function may correspond to a graph-based encoding function.
  • FIG. 7 is an exemplary diagram illustrating a white box encryption process to which anti-inversion encoding is applied.
  • the encryption encoding apparatus 130 may apply an anti-inversion function to the output of the last round in the white box encryption process.
  • the cryptographic encoding apparatus 130 may divide the output of the last round into a plurality of cryptographic blocks X1 and X2, and apply the anti-inversion function to only some of the cryptographic blocks X1.
  • the encryption encoding apparatus 130 may further include a ciphertext decoding unit 370 that applies a decoding function to the final ciphertext to recover the original ciphertext for the encoded ciphertext.
  • the ciphertext decoding unit 370 may be implemented independently from the cipher encoding apparatus 130.
  • the ciphertext decoding unit 370 performs a first step of applying the inverse function of the anti-inversion function to some blocks Y1 constituting the final ciphertext (Y1+Y2) and external encoding the encoded ciphertext (X1+X2). It may consist of a second step of applying the inverse function of the function.
  • the secret key K is required, and if there is no secret key K, recovery from the cipher block Y1 to the cipher block X1 is impossible.
  • FIG. 8 is an exemplary diagram illustrating an anti-inversion decoding process.
  • the encryption encoding apparatus 130 may apply an anti-inversion function in a white box encryption process.
  • the encrypted ciphertext may be generated as an output by applying external encoding to the ciphertext in the last round operation (S810).
  • the external encoding G applied to the ciphertext generated as a result of the last round operation may be designed in a manner in which a linear transform is applied after nonlinear transformation in units of bytes.
  • the encryption encoding apparatus 130 may perform anti-inversion encoding through the anti-inversion function application unit 350 (S830).
  • the encryption encoding apparatus 130 may perform anti-inversion decoding through the ciphertext decoding unit 370 (S850).
  • Anti-inversion decoding may correspond to the process of obtaining the original ciphertext from the outputs (Y1, Y2) of white box encryption, and more specifically, obtaining the cipher block (X1) from the cipher block (Y1) using the secret key K.
  • the first step of performing and the second step of obtaining the encrypted text by applying the inverse function of the external encoding G (G -1 ) to the encoded ciphertext (X1, X2) may be performed.
  • processor 230 memory
  • anti-inversion function application unit 370 ciphertext decoding unit

Landscapes

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

Abstract

The present invention relates to an apparatus and a method for encoding whitebox cryptography by using an anti-inversion function, the cryptography encoding apparatus comprising: a plain text reception unit for receiving an encoded plain text; a cryptography calculation unit for generating, as an output, a cryptogram encoded through a whitebox cryptography process using the encoded plain text as an input; and an anti-inversion function application unit for dividing the encoded cryptogram into a plurality of cryptography blocks, and generating a final cryptogram by applying the anti-inversion function to any one of the plurality of cryptography blocks. Therefore, the present invention can safely protect a cryptographic key from various attacks when performing a cryptographic function by using software in a PC or mobile environment.

Description

안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치 및 방법White box encryption encoding device and method using anti-inversion function
본 발명은 화이트박스 암호 인코딩 기술에 관한 것으로, 더욱 상세하게는 PC 또는 모바일 환경에서 소프트웨어로 암호 기능을 수행하는 경우 다양한 공격으로부터 안전하게 암호키를 보호할 수 있는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치 및 방법에 관한 것이다.The present invention relates to a white box encryption technology, and more particularly, a white box encryption using an anti-inversion function that can securely protect an encryption key from various attacks when performing an encryption function with software in a PC or mobile environment. It relates to an encoding apparatus and method.
2002년부터 시작된 화이트박스 암호기술(WBC, Whitebox cryptography)은 다양한 공격자로부터 암호키를 보호하면서 안전하게 암호기능을 제공하는 기술이다. 화이트박스 암호 공격자는 메모리 덤프, 알고리즘 리버싱(reversing) 등의 기술로 시스템의 모든 자원을 장악하는 능력을 가질 수 있다고 가정한다.Whitebox cryptography (WBC), which started in 2002, is a technology that provides secure cryptographic functions while protecting cryptographic keys from various attackers. It is assumed that an attacker with a whitebox password can take over all the resources of the system with techniques such as memory dumping and algorithm reversing.
일반적으로 표준암호(AES, DES 등)를 테이블 방식으로 구현하면서 암호키를 숨기는 기법이 주로 사용되는데 현재까지 설계방법이 공개된 화이트박스 암호기술은 모두 암호키가 노출되는 등 취약성이 지적되고 있다. 화이트박스 전용으로 개발된 암호의 경우 충분한 안전성(128비트 급)을 확보하기 위해서는 많은 메모리가 필요하게 되며, 객관적인 안전성을 입증하기에는 어려움이 존재한다.In general, a technique of hiding encryption keys while implementing standard ciphers (AES, DES, etc.) in a table manner is mainly used. However, all white box encryption technologies for which design methods have been disclosed so far have a vulnerability such as exposure of encryption keys. In the case of a password developed exclusively for white box, a lot of memory is required to secure sufficient security (128-bit level), and it is difficult to prove objective safety.
최근에는 모바일 금융 관련 앱(APP) 개발이 활발하며, 소프트웨어만으로 신용카드 결제를 수행하려는 수요가 증가하고 있어 안전한 암호의 실행에 필요한 화이트박스 암호기술에 대한 관심이 급증하고 있다.Recently, the development of mobile finance-related apps (APP) is active, and the demand to perform credit card payments with only software is increasing, so interest in white box encryption technology necessary for the execution of secure passwords is increasing rapidly.
[선행기술문헌][Prior technical literature]
[특허문헌][Patent Literature]
한국공개특허 제10-2010-0122107(2010.11.19)호Korean Patent Publication No. 10-2010-0122107 (2010.11.19)
본 발명의 일 실시예는 PC 또는 모바일 환경에서 소프트웨어로 암호 기능을 수행하는 경우 다양한 공격으로부터 안전하게 암호키를 보호할 수 있는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치 및 방법을 제공하고자 한다.An embodiment of the present invention is to provide an apparatus and method for encoding a white box password using an anti-inversion function capable of safely protecting an encryption key from various attacks when performing an encryption function using software in a PC or mobile environment.
본 발명의 일 실시예는 암호화 또는 복호화 기능만을 사용자에게 제공하여 불법복제 방지 등의 저작권보호 기술에 적용 가능한 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치 및 방법을 제공하고자 한다.An embodiment of the present invention is to provide an apparatus and method for encoding a white box password using an anti-inversion function applicable to copyright protection technologies such as preventing illegal copying by providing only an encryption or decryption function to a user.
본 발명의 일 실시예는 화이트박스 공격자가 암호기능으로부터 복호기능을 얻는 공격을 하지 못하도록 외부 인코딩의 안전성을 강화하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치 및 방법을 제공하고자 한다.An embodiment of the present invention is to provide an apparatus and method for encoding a white box password using an anti-inversion function that enhances the security of external encoding so that a white box attacker cannot perform an attack that obtains a decryption function from the encryption function.
실시예들 중에서, 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치는 인코딩된 평문을 수신하는 평문 수신부, 상기 인코딩된 평문을 입력으로 하는 화이트박스 암호화 과정을 통해 인코딩된 암호문을 출력으로서 생성하는 암호화 연산부 및 상기 인코딩된 암호문을 복수의 암호 블록들로 분할하고 상기 복수의 암호 블록들 중 어느 하나에 대해 안티-인버전(Anti-Inversion) 함수를 적용하여 최종 암호문을 생성하며, 상기 안티-인버전 함수는 입력 블록으로부터 출력 블록을 생성하고 상기 출력 블록에 대해 비밀키를 적용한 경우에는 상기 입력 블록을 복구 가능하도록 구현되어 상기 화이트박스 암호화 과정에 일방향성(one-wayness)을 제공하는 안티-인버전 함수 적용부를 포함한다.Among embodiments, the apparatus for encoding a white box encryption using an anti-inversion function includes a plaintext receiving unit that receives the encoded plaintext, and encryption that generates the encrypted ciphertext as an output through a whitebox encryption process that receives the encoded plaintext. The calculation unit and the encoded cipher text are divided into a plurality of cipher blocks, and an anti-inversion function is applied to any one of the plurality of cipher blocks to generate a final cipher text, and the anti-inversion The function is an anti-inversion function that generates an output block from an input block and provides one-wayness to the white box encryption process by implementing the input block to be recoverable when a secret key is applied to the output block. It includes a function application unit.
상기 암호화 연산부는 상기 화이트박스 암호화 과정으로서 룩업(look-up) 테이블로 구현된 복수의 라운드 함수들에 관한 반복 연산을 적용할 수 있다.The encryption operation unit may apply an iterative operation on a plurality of round functions implemented as a look-up table as the white box encryption process.
상기 암호화 연산부는 상기 복수의 라운드 함수들 각각의 전후 단계에서 비선형 인코딩 함수를 내부 인코딩으로서 적용할 수 있다.The encryption operation unit may apply a nonlinear encoding function as an internal encoding in steps before and after each of the plurality of round functions.
상기 암호화 연산부는 상기 복수의 라운드 함수들 중 마지막 라운드 함수의 출력에 대해 상기 내부 인코딩과 다른 외부 인코딩 함수를 적용할 수 있다.The encryption operation unit may apply an external encoding function different from the internal encoding to an output of the last round function among the plurality of round functions.
상기 안티-인버전 함수 적용부는 상기 안티-인버전(Anti-Inversion) 함수의 출력 블록을 상기 복수의 암호 블록들 중 나머지와 연결하여 상기 최종 암호문을 생성할 수 있다.The anti-inversion function application unit may generate the final cipher text by connecting the output block of the anti-inversion function with the rest of the plurality of cipher blocks.
실시예들 중에서, 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치는 상기 최종 암호문에 디코딩 함수를 적용하여 상기 인코딩된 암호문에 관한 원시 암호문으로 복구하는 암호문 디코딩부를 더 포함한다.Among embodiments, the apparatus for encoding a white box cipher using an anti-inversion function further includes a ciphertext decoding unit for recovering the original ciphertext related to the encoded ciphertext by applying a decoding function to the final ciphertext.
상기 암호문 디코딩부는 상기 최종 암호문 중 상기 안티-인버전 함수의 출력 블록에 대해 상기 비밀키를 기초로 상기 안티-인버전 함수의 역함수를 적용하여 제1 암호 블록으로 복구할 수 있다.The ciphertext decoding unit may recover the first cipher block by applying the inverse function of the anti-inversion function to the output block of the anti-inversion function among the final ciphertext based on the secret key.
상기 암호문 디코딩부는 상기 제1 암호 블록과 상기 최종 암호문의 나머지 암호 블록을 포함하는 전체 암호 블록에 대해 외부 인코딩 함수의 역함수를 적용하여 상기 원시 암호문으로 복구할 수 있다.The ciphertext decoding unit may recover the original ciphertext by applying an inverse function of an external encoding function to the entire cipher block including the first cipher text and the remaining cipher blocks of the final cipher text.
실시예들 중에서, 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 방법은 인코딩된 평문을 수신하는 단계, 상기 인코딩된 평문을 입력으로 하는 화이트박스 암호화 과정을 통해 인코딩된 암호문을 출력으로서 생성하는 단계 및 상기 인코딩된 암호문을 복수의 암호 블록들로 분할하고 상기 복수의 암호 블록들 중 어느 하나에 대해 안티-인버전(Anti-Inversion) 함수를 적용하여 최종 암호문을 생성하며, 상기 안티-인버전 함수는 입력 블록으로부터 출력 블록을 생성하고 상기 출력 블록에 대해 비밀키를 적용한 경우에는 상기 입력 블록을 복구 가능하도록 구현되어 상기 화이트박스 암호화 과정에 일방향성(one-wayness)을 제공하는 단계를 포함한다.Among the embodiments, the method of encoding a white box cipher using an anti-inversion function includes receiving an encoded plaintext, generating an encoded ciphertext as an output through a whitebox encryption process taking the encoded plaintext as input, and Dividing the encoded ciphertext into a plurality of cipher blocks and applying an anti-inversion function to any one of the plurality of cipher blocks to generate a final ciphertext, the anti-inversion function And when generating an output block from an input block and applying a secret key to the output block, the input block is implemented to be recoverable, thereby providing one-wayness to the white box encryption process.
개시된 기술은 다음의 효과를 가질 수 있다. 다만, 특정 실시예가 다음의 효과를 전부 포함하여야 한다거나 다음의 효과만을 포함하여야 한다는 의미는 아니므로, 개시된 기술의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.The disclosed technology can have the following effects. However, since it does not mean that a specific embodiment should include all of the following effects or only the following effects, it should not be understood that the scope of the rights of the disclosed technology is limited thereby.
본 발명의 일 실시예에 따른 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치 및 방법은 암호화 또는 복호화 기능만을 사용자에게 제공하여 불법복제 방지 등의 저작권보호 기술에 적용 가능할 수 있다.The apparatus and method for encoding a white box encryption using an anti-inversion function according to an embodiment of the present invention may be applicable to copyright protection technology such as preventing illegal copying by providing only an encryption or decryption function to a user.
본 발명의 일 실시예에 따른 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치 및 방법은 화이트박스 공격자가 암호기능으로부터 복호기능을 얻는 공격을 하지 못하도록 외부 인코딩의 안전성을 강화할 수 있다.The apparatus and method for encoding a white box password using an anti-inversion function according to an embodiment of the present invention can enhance the safety of external encoding so that a white box attacker cannot perform an attack that obtains a decryption function from an encryption function.
도 1은 본 발명의 일 실시예에 따른 화이트박스 암호 인코딩 시스템을 설명하는 도면이다.1 is a diagram illustrating a white box encryption encoding system according to an embodiment of the present invention.
도 2는 도 1에 있는 암호 인코딩 장치의 물리적 구성을 설명하는 도면이다.FIG. 2 is a diagram illustrating a physical configuration of the encryption encoding apparatus in FIG. 1.
도 3은 도 1에 있는 암호 인코딩 장치의 기능적 구성을 설명하는 블록도이다.3 is a block diagram illustrating a functional configuration of the encryption encoding apparatus in FIG. 1.
도 4는 도 1에 있는 암호 인코딩 장치에서 수행되는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 및 디코딩 과정을 설명하는 순서도이다.4 is a flowchart illustrating a process of encoding and decoding a white box cipher using an anti-inversion function performed in the cipher encoding apparatus of FIG. 1.
도 5는 일반적인 화이트박스 암호화 과정을 설명하는 예시도이다.5 is an exemplary diagram illustrating a general white box encryption process.
도 6은 안티-인버전 함수를 설명하는 예시도이다.6 is an exemplary diagram illustrating an anti-inversion function.
도 7은 안티-인버전 인코딩이 적용된 화이트박스 암호화 과정을 설명하는 예시도이다.7 is an exemplary diagram illustrating a white box encryption process to which anti-inversion encoding is applied.
도 8은 안티-인버전 디코딩 과정을 설명하는 예시도이다.8 is an exemplary diagram illustrating an anti-inversion decoding process.
본 발명에 관한 설명은 구조적 내지 기능적 설명을 위한 실시예에 불과하므로, 본 발명의 권리범위는 본문에 설명된 실시예에 의하여 제한되는 것으로 해석되어서는 아니 된다. 즉, 실시예는 다양한 변경이 가능하고 여러 가지 형태를 가질 수 있으므로 본 발명의 권리범위는 기술적 사상을 실현할 수 있는 균등물들을 포함하는 것으로 이해되어야 한다. 또한, 본 발명에서 제시된 목적 또는 효과는 특정 실시예가 이를 전부 포함하여야 한다거나 그러한 효과만을 포함하여야 한다는 의미는 아니므로, 본 발명의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.Since the description of the present invention is merely an embodiment for structural or functional description, the scope of the present invention should not be construed as being limited by the embodiments described in the text. That is, since the embodiments can be variously changed and have various forms, the scope of the present invention should be understood to include equivalents capable of realizing the technical idea. In addition, since the object or effect presented in the present invention does not mean that a specific embodiment should include all of them or only those effects, the scope of the present invention should not be understood as being limited thereto.
한편, 본 출원에서 서술되는 용어의 의미는 다음과 같이 이해되어야 할 것이다.Meanwhile, the meaning of terms described in the present application should be understood as follows.
"제1", "제2" 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하기 위한 것으로, 이들 용어들에 의해 권리범위가 한정되어서는 아니 된다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.Terms such as "first" and "second" are used to distinguish one component from other components, and the scope of rights is not limited by these terms. For example, a first component may be referred to as a second component, and similarly, a second component may be referred to as a first component.
어떤 구성요소가 다른 구성요소에 "연결되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결될 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다고 언급된 때에는 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 한편, 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is referred to as being "connected" to another component, it should be understood that although it may be directly connected to the other component, another component may exist in the middle. On the other hand, when it is mentioned that a certain component is "directly connected" to another component, it should be understood that no other component exists in the middle. On the other hand, other expressions describing the relationship between the constituent elements, that is, "between" and "just between" or "neighboring to" and "directly neighboring to" should be interpreted as well.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한 복수의 표현을 포함하는 것으로 이해되어야 하고, "포함하다"또는 "가지다" 등의 용어는 실시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이며, 하나 또는 그 이상의 다른 특징이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Singular expressions are to be understood as including plural expressions unless the context clearly indicates otherwise, and terms such as “comprise” or “have” refer to implemented features, numbers, steps, actions, components, parts, or It is to be understood that it is intended to designate that a combination exists and does not preclude the presence or addition of one or more other features or numbers, steps, actions, components, parts, or combinations thereof.
각 단계들에 있어 식별부호(예를 들어, a, b, c 등)는 설명의 편의를 위하여 사용되는 것으로 식별부호는 각 단계들의 순서를 설명하는 것이 아니며, 각 단계들은 문맥상 명백하게 특정 순서를 기재하지 않는 이상 명기된 순서와 다르게 일어날 수 있다. 즉, 각 단계들은 명기된 순서와 동일하게 일어날 수도 있고 실질적으로 동시에 수행될 수도 있으며 반대의 순서대로 수행될 수도 있다.In each step, the identification code (for example, a, b, c, etc.) is used for convenience of explanation, and the identification code does not describe the order of each step, and each step has a specific sequence clearly in context. Unless otherwise stated, it may occur differently from the stated order. That is, each of the steps may occur in the same order as specified, may be performed substantially simultaneously, or may be performed in the reverse order.
본 발명은 컴퓨터가 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현될 수 있고, 컴퓨터가 읽을 수 있는 기록 매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록 장치를 포함한다. 컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치 등이 있다. 또한, 컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산 방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The present invention can be embodied as computer-readable codes on a computer-readable recording medium, and the computer-readable recording medium includes all types of recording devices storing data that can be read by a computer system. . Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. Further, the computer-readable recording medium is distributed over a computer system connected by a network, so that the computer-readable code can be stored and executed in a distributed manner.
여기서 사용되는 모든 용어들은 다르게 정의되지 않는 한, 본 발명이 속하는 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한 이상적이거나 과도하게 형식적인 의미를 지니는 것으로 해석될 수 없다.All terms used herein have the same meaning as commonly understood by one of ordinary skill in the field to which the present invention belongs, unless otherwise defined. Terms defined in commonly used dictionaries should be construed as having meanings in the context of related technologies, and cannot be construed as having an ideal or excessive formal meaning unless explicitly defined in the present application.
도 1은 본 발명의 일 실시예에 따른 화이트박스 암호 인코딩 시스템을 설명하는 도면이다.1 is a diagram illustrating a white box encryption encoding system according to an embodiment of the present invention.
도 1을 참조하면, 화이트박스 암호 인코딩 시스템(100)은 사용자 단말(110), 암호 인코딩 장치(130) 및 데이터베이스(150)를 포함할 수 있다.Referring to FIG. 1, the white box password encoding system 100 may include a user terminal 110, a password encoding device 130, and a database 150.
사용자 단말(110)은 암호 인코딩 장치(130)에게 평문을 제공하고 평문에 대한 암호문을 수신하는 컴퓨팅 장치에 해당할 수 있고, 스마트폰, 노트북 또는 컴퓨터로 구현될 수 있으며, 반드시 이에 한정되지 않고, 태블릿 PC 등 다양한 디바이스로도 구현될 수 있다. 사용자 단말(110)은 암호 인코딩 장치(130)와 네트워크를 통해 연결될 수 있고, 복수의 사용자 단말(110)들은 암호 인코딩 장치(130)와 동시에 연결될 수 있다. The user terminal 110 may correspond to a computing device that provides a plain text to the cryptographic encoding device 130 and receives an encrypted text for the plain text, and may be implemented as a smartphone, a laptop computer, or a computer, but is not limited thereto, It can be implemented in various devices such as a tablet PC. The user terminal 110 may be connected to the encryption encoding apparatus 130 through a network, and a plurality of user terminals 110 may be connected to the encryption encoding apparatus 130 at the same time.
암호 인코딩 장치(130)는 평문을 수신하여 안티-인버전 함수가 적용된 화이트박스 암호화 과정을 통해 암호문을 생성하는 컴퓨터 또는 프로그램에 해당하는 서버로 구현될 수 있다. 화이트박스 암호는 데이터 암호화에 사용되는 암호키를 숨기는 기술에 해당할 수 있고, 메모리 덤프(dump)나 리버싱(reversing) 등 강력한 공격자 환경에서도 안전한 구현 방법에 해당할 수 있다. 암호 인코딩 장치(130)는 사용자 단말(110)과 블루투스, WiFi, 통신망 등을 통해 무선으로 연결될 수 있고, 네트워크를 통해 사용자 단말(110)과 데이터를 주고받을 수 있다.The encryption encoding apparatus 130 may be implemented as a computer or a server corresponding to a program that receives the plain text and generates the encrypted text through a white box encryption process to which an anti-inversion function is applied. The white box cipher can be a technology that hides the encryption key used for data encryption, and can be a secure implementation method even in a strong attacker environment such as memory dump or reversing. The encryption encoding device 130 may be wirelessly connected to the user terminal 110 through Bluetooth, WiFi, a communication network, and the like, and may exchange data with the user terminal 110 through a network.
일 실시예에서, 암호 인코딩 장치(130)는 데이터베이스(150)와 연동하여 평문의 암호화 과정에서 필요한 정보를 저장할 수 있다. 한편, 암호 인코딩 장치(130)는 도 1과 달리, 데이터베이스(150)를 내부에 포함하여 구현될 수 있고, 사용자 단말(110)의 내부에 포함되어 동작하는 형태로 구현될 수 있다. 또한, 암호 인코딩 장치(130)는 프로세서, 메모리, 사용자 입출력부 및 네트워크 입출력부를 포함하여 구현될 수 있으며, 이에 대해서는 도 2에서 보다 자세히 설명한다.In one embodiment, the encryption encoding apparatus 130 may store information necessary in the process of encrypting plain text by interworking with the database 150. Meanwhile, unlike FIG. 1, the encryption encoding apparatus 130 may be implemented by including the database 150 inside, and may be implemented in a form that is included in the user terminal 110 and operates. In addition, the encryption encoding apparatus 130 may be implemented including a processor, a memory, a user input/output unit, and a network input/output unit, which will be described in more detail with reference to FIG. 2.
데이터베이스(150)는 안티-인버전 함수를 이용한 화이트박스 암호화 과정에서 필요한 다양한 정보들을 저장하는 저장장치에 해당할 수 있다. 데이터베이스(150)는 복수의 사용자 단말(110)들로부터 수집한 평문에 관한 정보를 저장할 수 있고, 화이트박스 연산에 사용되는 룩업 테이블에 관한 정보를 저장할 수 있으며, 반드시 이에 한정되지 않고, 암호 인코딩 장치(130)가 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 과정에서 다양한 형태로 수집 또는 가공된 정보들을 저장할 수 있다.The database 150 may correspond to a storage device that stores various pieces of information necessary in a white box encryption process using an anti-inversion function. The database 150 may store information on plain texts collected from a plurality of user terminals 110, and may store information on a lookup table used for white box operation, but is not necessarily limited thereto, and an encryption encoding device In the process of encoding the white box encryption using the anti-inversion function 130, information collected or processed in various forms may be stored.
도 2는 도 1에 있는 암호 인코딩 장치의 물리적 구성을 설명하는 도면이다.FIG. 2 is a diagram illustrating a physical configuration of the encryption encoding apparatus in FIG. 1.
도 2를 참조하면, 암호 인코딩 장치(130)는 프로세서(210), 메모리(230), 사용자 입출력부(250) 및 네트워크 입출력부(270)를 포함하여 구현될 수 있다.Referring to FIG. 2, the encryption encoding apparatus 130 may include a processor 210, a memory 230, a user input/output unit 250, and a network input/output unit 270.
프로세서(210)는 평문을 수신하고 안티-인버전 함수를 이용한 화이트박스 암호화 과정을 통해 암호문을 생성하는 과정에서의 각 동작들을 처리하는 프로시저를 실행할 수 있고, 그 과정 전반에서 읽혀지거나 작성되는 메모리(230)를 관리할 수 있으며, 메모리(230)에 있는 휘발성 메모리와 비휘발성 메모리 간의 동기화 시간을 스케줄할 수 있다. 프로세서(210)는 암호 인코딩 장치(130)의 동작 전반을 제어할 수 있고, 메모리(230), 사용자 입출력부(250) 및 네트워크 입출력부(270)와 전기적으로 연결되어 이들 간의 데이터 흐름을 제어할 수 있다. 프로세서(210)는 암호 인코딩 장치(130)의 CPU(Central Processing Unit)로 구현될 수 있다.The processor 210 may execute a procedure for receiving the plain text and processing each operation in the process of generating the cipher text through a white box encryption process using an anti-inversion function, and a memory that is read or written throughout the process. 230 may be managed, and a synchronization time between the volatile memory and the nonvolatile memory in the memory 230 may be scheduled. The processor 210 may control the overall operation of the encryption encoding device 130, and is electrically connected to the memory 230, the user input/output unit 250, and the network input/output unit 270 to control data flow between them. I can. The processor 210 may be implemented as a CPU (Central Processing Unit) of the encryption encoding device 130.
메모리(230)는 SSD(Solid State Drive) 또는 HDD(Hard Disk Drive)와 같은 비휘발성 메모리로 구현되어 암호 인코딩 장치(130)에 필요한 데이터 전반을 저장하는데 사용되는 보조기억장치를 포함할 수 있고, RAM(Random Access Memory)과 같은 휘발성 메모리로 구현된 주기억장치를 포함할 수 있다.The memory 230 is implemented as a nonvolatile memory such as a solid state drive (SSD) or a hard disk drive (HDD), and may include an auxiliary storage device used to store all data required for the encryption encoding device 130, A main memory device implemented with volatile memory such as random access memory (RAM) may be included.
사용자 입출력부(250)는 사용자 입력을 수신하기 위한 환경 및 사용자에게 특정 정보를 출력하기 위한 환경을 포함할 수 있다. 예를 들어, 사용자 입출력부(250)는 터치 패드, 터치 스크린, 화상 키보드 또는 포인팅 장치와 같은 어댑터를 포함하는 입력장치 및 모니터 또는 터치스크린과 같은 어댑터를 포함하는 출력장치를 포함할 수 있다. 일 실시예에서, 사용자 입출력부(250)는 원격 접속을 통해 접속되는 컴퓨팅 장치에 해당할 수 있고, 그러한 경우, 암호 인코딩 장치(130)는 서버로서 수행될 수 있다.The user input/output unit 250 may include an environment for receiving a user input and an environment for outputting specific information to a user. For example, the user input/output unit 250 may include an input device including an adapter such as a touch pad, a touch screen, an on-screen keyboard, or a pointing device, and an output device including an adapter such as a monitor or a touch screen. In one embodiment, the user input/output unit 250 may correspond to a computing device connected through a remote connection, and in such a case, the encryption encoding device 130 may be performed as a server.
네트워크 입출력부(270)은 네트워크를 통해 외부 장치 또는 시스템과 연결하기 위한 환경을 포함하고, 예를 들어, LAN(Local Area Network), MAN(Metropolitan Area Network), WAN(Wide Area Network) 및 VAN(Value Added Network) 등의 통신을 위한 어댑터를 포함할 수 있다.The network input/output unit 270 includes an environment for connecting to an external device or system through a network, and includes, for example, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), and a VAN ( Value Added Network) may include an adapter for communication.
도 3은 도 1에 있는 암호 인코딩 장치의 기능적 구성을 설명하는 블록도이다.3 is a block diagram illustrating a functional configuration of the encryption encoding apparatus in FIG. 1.
도 3을 참조하면, 암호 인코딩 장치(130)는 평문 수신부(310), 암호화 연산부(330), 안티-인버전 함수 적용부(350), 암호문 디코딩부(370) 및 제어부(390)를 포함할 수 있다.Referring to FIG. 3, the encryption encoding apparatus 130 includes a plaintext receiving unit 310, an encryption calculating unit 330, an anti-inversion function applying unit 350, a ciphertext decoding unit 370, and a control unit 390. I can.
평문 수신부(310)는 인코딩된 평문을 수신할 수 있다. 즉, 평문 수신부(310)는 외부에서 인코딩된 평문을 수신하여 화이트박스 암호화 과정에 대한 입력으로서 제공할 수 있다. 여기에서, 인코딩된 평문은 암호화 대상으로서의 데이터를 평문으로 하여 외부 인코딩을 수행한 결과로서 획득될 수 있고, 외부 장치에서 외부 인코딩 함수를 통해 생성될 수 있다.The plaintext receiver 310 may receive the encoded plaintext. That is, the plaintext receiving unit 310 may receive an externally encoded plaintext and provide it as an input for a white box encryption process. Here, the encoded plaintext may be obtained as a result of performing external encoding using data as an encryption target as plaintext, and may be generated by an external device through an external encoding function.
일 실시예에서, 평문 수신부(310)는 인코딩된 평문을 수신하여 복수의 평문 블록들로 분할할 수 있다. 복수의 평문 블록들 각각은 화이트박스 암호화 과정에서 입력으로 사용될 수 있고, 화이트박스 암호의 운영모드에 따라 각 평문 블록에 대한 암호화 연산은 병렬적으로 수행될 수 있다.In an embodiment, the plaintext receiving unit 310 may receive the encoded plaintext and divide it into a plurality of plaintext blocks. Each of the plurality of plaintext blocks may be used as an input in the whitebox encryption process, and encryption operations for each plaintext block may be performed in parallel according to the operation mode of the whitebox encryption.
암호화 연산부(330)는 인코딩된 평문을 입력으로 하는 화이트박스 암호화 과정을 통해 인코딩된 암호문을 출력으로서 생성할 수 있다. 화이트박스 암호화 과정은, 예를 들어, 일반적인 블록 암호 알고리즘의 구현에 있어 알고리즘을 룩업(look-up) 테이블로 구현하고 그 안에 암호키를 숨겨둠으로써 외부 공격자가 암호키를 쉽게 유추할 수 없도록 하는 기법에 해당할 수 있다. 특히, 화이트박스 암호화 과정은 룩업 테이블의 크기가 지나치게 커지는 것을 방지하기 위하여 룩업 테이블을 암호화적인 기법으로 적절히 분리하되 암호화 연산의 중간값이 노출되지 않도록 인코딩(encoding)과 디코딩(decoding)을 수행할 수 있으며, 이에 대해서는 도 5에서 보다 자세히 설명한다.The encryption operation unit 330 may generate an encoded ciphertext as an output through a white box encryption process in which the encoded plaintext is input. The white box encryption process, for example, in the implementation of a general block encryption algorithm, implements the algorithm as a look-up table and hides the encryption key in it so that external attackers cannot easily infer the encryption key. May correspond to technique. In particular, in the white box encryption process, in order to prevent the size of the lookup table from becoming too large, the lookup table is properly separated by an encryption technique, but encoding and decoding can be performed so that the intermediate value of the encryption operation is not exposed. And, this will be described in more detail in FIG. 5.
일 실시예에서, 암호화 연산부(330)는 화이트박스 암호화 과정으로서 룩업(look-up) 테이블로 구현된 복수의 라운드 함수들에 관한 반복 연산을 적용할 수 있다. 암호화 연산부(330)는 화이트박스 구현을 위해 라운드 함수 각각을 테이블 참조로 구현할 수 있고 복수의 라운드 함수들이 연속적으로 반복되는 암호화 연산을 수행할 수 있다. 라운드 함수는 암호 알고리즘에 따라 상이할 수 있고 SubBytes, ShiftRows, MixColumns 및 AddRoundKey 함수의 조합으로 이루어질 수 있다.In an embodiment, the encryption operation unit 330 may apply an iterative operation on a plurality of round functions implemented as a look-up table as a white box encryption process. The encryption operation unit 330 may implement each round function as a table reference to implement a white box, and may perform an encryption operation in which a plurality of round functions are continuously repeated. The round function may differ according to the cryptographic algorithm and may be formed of a combination of SubBytes, ShiftRows, MixColumns, and AddRoundKey functions.
일 실시예에서, 암호화 연산부(330)는 복수의 라운드 함수들 각각의 전후 단계에서 비선형 인코딩 함수를 내부 인코딩으로서 적용할 수 있다. 암호화 연산부(330)는 중간값이 노출되는 것을 방지하기 위하여 라운드 함수 사이에 인코딩(encoding)과 디코딩(decoding)을 연속적으로 수행할 수 있으며, 구체적으로 각 라운드 함수의 전 단계에서 이전 라운드 함수의 출력을 디코딩한 후 입력으로 사용하고 각 라운드 함수의 후 단계에서 해당 라운드 함수의 결과를 인코딩한 후 출력하여 다음 라운드 함수에 제공할 수 있다.In an embodiment, the encryption operation unit 330 may apply a nonlinear encoding function as an internal encoding in steps before and after each of the plurality of round functions. The encryption operation unit 330 may continuously perform encoding and decoding between round functions in order to prevent exposure of the intermediate value, and specifically, output of the previous round function in the previous step of each round function. After decoding is used as an input, the result of the round function is encoded in a later step of each round function, and then output can be provided to the next round function.
일 실시예에서, 암호화 연산부(330)는 복수의 라운드 함수들 중 마지막 라운드 함수의 출력에 대해 내부 인코딩과 다른 외부 인코딩 함수를 적용할 수 있다. 암호화 연산부(330)에 의해 수행되는 화이트박스 암호화 과정은 복수의 라운드 함수들로 구성될 수 있고, 각 라운드 함수 사이에는 내부 인코딩이 적용될 수 있다.In an embodiment, the encryption operation unit 330 may apply an external encoding function different from the internal encoding to an output of the last round function among the plurality of round functions. The white box encryption process performed by the encryption operation unit 330 may consist of a plurality of round functions, and an internal encoding may be applied between each round function.
다만, 첫 번째 라운드 함수는 평문 수신부(310)에 의해 수신된 인코딩된 평문을 디코딩하기 위하여 인코딩에 사용된 외부 인코딩 함수가 적용될 수 있고, 마지막 라운드 함수는 화이트박스 암호화 과정을 종료하고 출력을 제공하기 위하여 내부 인코딩과 다른 외부 인코딩 함수를 적용할 수 있다. 이 경우, 첫 번째 라운드 함수에 적용된 외부 인코딩과 마지막 라운드 함수에 적용된 외부 인코딩은 서로 상이할 수 있고, 암호 인코딩 장치(130)에 의해 사전에 설정될 수 있다.However, the first round function may be applied to the external encoding function used for encoding in order to decode the encoded plain text received by the plain text receiving unit 310, and the last round function terminates the white box encryption process and provides output. For this purpose, an external encoding function different from the internal encoding can be applied. In this case, the external encoding applied to the first round function and the external encoding applied to the last round function may be different from each other, and may be preset by the encryption encoding device 130.
안티-인버전 함수 적용부(350)는 인코딩된 암호문을 복수의 암호 블록들로 분할하고 복수의 암호 블록들 중 어느 하나에 대해 안티-인버전(Anti-Inversion) 함수를 적용하여 최종 암호문을 생성할 수 있다. 여기에서, 안티-인버전(Anti-Inversion) 함수는 입력 블록으로부터 출력 블록을 생성하고 출력 블록에 대해 비밀키를 적용한 경우에만 입력 블록을 복구 가능하도록 구현되어 화이트박스 암호화 과정에 일방향성(one-wayness)을 제공할 수 있다. 안티-인버전 함수에 관해서는 도 6에서 보다 자세히 설명한다.The anti-inversion function application unit 350 divides the encoded cipher text into a plurality of cipher blocks and generates a final cipher text by applying an anti-inversion function to any one of the plurality of cipher blocks. can do. Here, the Anti-Inversion function is implemented to recover the input block only when an output block is generated from the input block and a secret key is applied to the output block, so that the white box encryption process is one-way. wayness) can be provided. The anti-inversion function will be described in more detail in FIG. 6.
일 실시예에서, 안티-인버전 함수 적용부(350)는 안티-인버전(Anti-Inversion) 함수의 출력 블록을 복수의 암호 블록들 중 나머지와 연결하여 최종 암호문을 생성할 수 있다. 즉, 안티-인버전 함수 적용부(350)는 암호화 연산부(330)로부터 복수의 라운드 함수들에 대한 결과로서 인코딩된 암호문을 수신하여 복수의 암호 블록들로 분할하고 복수의 암호 블록들 중 일부에 대해서만 안티-인버전 함수를 적용할 수 있고, 복수의 암호 블록들 중 안티-인버전 함수가 적용되지 않는 나머지 암호 블록들에 대해서는 별도의 처리없이 그대로 최종 암호문에 사용할 수 있다.In an embodiment, the anti-inversion function application unit 350 may generate a final cipher text by connecting the output block of the anti-inversion function with the rest of the plurality of cipher blocks. That is, the anti-inversion function application unit 350 receives the encrypted ciphertext from the encryption operation unit 330 as a result of the plurality of round functions, divides it into a plurality of cipher blocks, and divides the cipher text into a plurality of cipher blocks. The anti-inversion function can be applied only to the cipher block, and the remaining cipher blocks to which the anti-inversion function is not applied among the plurality of cipher blocks can be used as it is in the final cipher text without any separate processing.
암호문 디코딩부(370)는 최종 암호문에 디코딩 함수를 적용하여 인코딩된 암호문에 관한 원시 암호문으로 복구할 수 있다. 원시 암호문은 원래의 암호화 과정에서 생성되는 암호문에 해당할 수 있고, 암호화 과정에서 적용되는 외부 인코딩과 내부 인코딩이 각 디코딩에 의해 제거된 결과로서 획득될 수 있다. 다른 실시예에서, 암호문 디코딩부(370)는 암호 인코딩 장치(130)의 외부에 독립적으로 구현될 수 있고, 이 경우 암호문 디코딩부(370)는 사전에 설정된 비밀키를 보관할 수 있으며 암호 인코딩 장치(130)로부터 최종 암호문을 수신한 후 디코딩 동작을 수행할 수 있다.The ciphertext decoding unit 370 may apply a decoding function to the final ciphertext to recover the original ciphertext for the encoded ciphertext. The original ciphertext may correspond to the ciphertext generated in the original encryption process, and the external encoding and the internal encoding applied in the encryption process may be obtained as a result of removing by each decoding. In another embodiment, the ciphertext decoding unit 370 may be independently implemented outside of the ciphertext encoding device 130, in this case, the ciphertext decoding unit 370 may store a preset secret key, and the encryption encoding device ( 130), a decoding operation may be performed after receiving the final encrypted text.
일 실시예에서, 암호문 디코딩부(370)는 최종 암호문 중 안티-인버전 함수의 출력 블록에 대해 비밀키를 기초로 안티-인버전 함수의 역함수를 적용하여 제1 암호 블록으로 복구할 수 있다. 즉, 제1 암호 블록은 안티-인버전 함수 적용부(350)에 의해 안티-인버전 함수가 적용되었던 암호 블록에 해당할 수 있다. 안티-인버전 함수의 역함수는 출력 블록을 기초로 입력 블록을 복구하는 동작을 수행할 수 있고 비밀키가 동작을 위한 필수 조건에 해당할 수 있다. In an embodiment, the ciphertext decoding unit 370 may recover the first cipher block by applying an inverse function of the anti-inversion function to the output block of the anti-inversion function among the final ciphertext based on the secret key. That is, the first cipher block may correspond to a cipher block to which the anti-inversion function has been applied by the anti-inversion function application unit 350. The inverse function of the anti-inversion function may perform an operation of recovering an input block based on an output block, and a secret key may correspond to a prerequisite for the operation.
일 실시예에서, 암호문 디코딩부(370)는 제1 암호 블록과 최종 암호문의 나머지 암호 블록을 포함하는 전체 암호 블록에 대해 외부 인코딩 함수의 역함수를 적용하여 원시 암호문으로 복구할 수 있다. 결과적으로, 제1 암호 블록이 복구된 후부터 원시 암호문에 대한 복구 과정은 외부 인코딩된 암호문에 대해 디코딩을 적용하여 외부 인코딩을 제거하는 과정에 해당할 수 있다.In one embodiment, the ciphertext decoding unit 370 may recover the original ciphertext by applying an inverse function of the external encoding function to the entire cipher block including the first cipher block and the remaining cipher block of the final ciphertext. As a result, after the first encryption block is recovered, the recovery process for the original ciphertext may correspond to a process of removing the external encoding by applying decoding to the externally encoded ciphertext.
제어부(390)는 암호 인코딩 장치(130)의 전체적인 동작을 제어하고, 평문 수신부(310), 암호화 연산부(330), 안티-인버전 함수 적용부(350) 및 암호문 디코딩부(370) 간의 제어 흐름 또는 데이터 흐름을 관리할 수 있다.The control unit 390 controls the overall operation of the cryptographic encoding device 130, and a control flow between the plain text receiving unit 310, the cryptographic operation unit 330, the anti-inversion function application unit 350, and the cryptogram decoding unit 370 Or you can manage the data flow.
도 4는 도 1에 있는 암호 인코딩 장치에서 수행되는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 및 디코딩 과정을 설명하는 순서도이다.4 is a flowchart illustrating a process of encoding and decoding a white box cipher using an anti-inversion function performed in the cipher encoding apparatus of FIG. 1.
도 4를 참조하면, 암호 인코딩 장치(130)는 평문 수신부(310)를 통해 인코딩된 평문을 수신할 수 있다(단계 S410). 암호 인코딩 장치(130)는 암호화 연산부(330)를 통해 인코딩된 평문을 입력으로 하는 화이트박스 암호화 과정을 통해 인코딩된 암호문을 출력으로서 생성할 수 있다(단계 S430).Referring to FIG. 4, the encryption encoding apparatus 130 may receive an encoded plaintext through the plaintext receiving unit 310 (step S410). The encryption encoding apparatus 130 may generate the encoded ciphertext as an output through a white box encryption process in which the plaintext encoded through the encryption operation unit 330 is input (step S430).
또한, 암호 인코딩 장치(130)는 안티-인버전 함수 적용부(350)를 통해 인코딩된 암호문을 복수의 암호 블록들로 분할하고 복수의 암호 블록들 중 어느 하나에 대해 안티-인버전 함수를 적용하여 최종 암호문을 생성할 수 있다(단계 S450). 암호 인코딩 장치(130)는 암호문 디코딩부(370)를 통해 최종 암호문에 디코딩 함수를 적용하여 인코딩된 암호문에 관한 원시 암호문으로 복구할 수 있다(단계 S470).In addition, the encryption encoding device 130 divides the encrypted text encoded through the anti-inversion function application unit 350 into a plurality of encryption blocks and applies an anti-inversion function to any one of the plurality of encryption blocks. Thus, a final ciphertext can be generated (step S450). The cipher encoding apparatus 130 may apply a decoding function to the final ciphertext through the ciphertext decoding unit 370 to recover the original ciphertext related to the encoded ciphertext (step S470).
도 5는 일반적인 화이트박스 암호화 과정을 설명하는 예시도이다.5 is an exemplary diagram illustrating a general white box encryption process.
도 5를 참조하면, 화이트박스 암호화 과정(S530)은 평문(510)을 기초로 암호문(530)을 생성하는 전체 암호화 과정(S500)에 있어서 인코딩된 평문을 입력으로 하여 인코딩된 암호문을 생성하는 과정에 해당할 수 있다. 평문에 대한 외부 인코딩을 적용하는 평문 인코딩 과정(S510)과 인코딩된 암호문에 대한 외부 인코딩을 적용하는 암호문 인코딩 과정(S550)은 화이트박스 암호화 과정(S530)과 독립적으로 수행될 수 있고, 각각의 과정은 독립적인 장치 또는 시스템에서 수행될 수 있다.5, the white box encryption process (S530) is a process of generating an encoded ciphertext by inputting an encoded plaintext in the entire encryption process (S500) of generating a ciphertext 530 based on the plaintext 510 May correspond to. The plaintext encoding process (S510) applying external encoding to the plaintext and the ciphertext encoding process (S550) applying external encoding to the encoded ciphertext may be performed independently from the whitebox encryption process (S530), and each process Can be performed in an independent device or system.
특히, 화이트박스 암호화 과정(S530)은 복수의 라운드 연산들(라운드 1, 라운드 2, ..., 라운드 n)로 구현될 수 있고, 각 라운드 연산들 사이에 내부 인코딩이 적용될 수 있다. 다만, 첫 번째 라운드 연산의 입력에 대해서는 외부 인코딩 F의 역함수로서 F-1이 적용될 수 있고, 마지막 라운드 연산의 출력에 대해서는 외부 인코딩 G가 적용될 수 있다. 경우에 따라서 외부 인코딩 F와 G는 서로 상이할 수 있다.In particular, the white box encryption process S530 may be implemented as a plurality of round operations (Round 1, Round 2, ..., Round n), and internal encoding may be applied between each round operations. However, F -1 may be applied as an inverse function of the outer encoding F to the input of the first round operation, and the outer encoding G may be applied to the output of the last round operation. In some cases, the external encodings F and G may be different from each other.
도 6은 안티-인버전 함수를 설명하는 예시도이다.6 is an exemplary diagram illustrating an anti-inversion function.
도 6을 참조하면, 안티-인버전 함수(Anti-Inversion Layer)는 입력 블록 X로부터 출력 블록 Y를 생성하는 동작을 수행할 수 있다. 특히, 안티-인버전 함수는 알고리즘과 중간값이 모두 공개되더라도 안전성을 보장할 수 있다. 다만, 출력 블록 Y로부터 입력 블록 X를 복구하는 과정에는 비공개 정보인 비밀키가 필수적으로 요구되고, 그 수행 과정은 난독화 등을 통해 보호될 필요가 있다.Referring to FIG. 6, an anti-inversion layer may perform an operation of generating an output block Y from an input block X. In particular, the anti-inversion function can guarantee safety even if both the algorithm and the intermediate value are disclosed. However, in the process of recovering the input block X from the output block Y, a private key, which is private information, is essentially required, and the execution process needs to be protected through obfuscation or the like.
안티-인버전 함수는 효율성 측면에서 RSA 등의 공개키 암호보다 빠른 수행 시간을 제공할 수 있고, 입력 블록 X의 크기에 비해 상대적으로 큰 크기를 갖는 출력 블록 Y를 생성할 수 있다. 또한, 안티-인버전 함수는 비밀키 K를 이용하여 입력 블록 X를 복구함에 있어 공개키 암호의 복호화보다 매우 빠른 수행 시간을 제공할 수 있다. 예를 들어, 안티-인버전 함수는 그래프 기반의 인코딩 함수에 해당할 수 있다.The anti-inversion function can provide a faster execution time than public key encryption such as RSA in terms of efficiency, and can generate an output block Y having a size relatively larger than the size of the input block X. In addition, the anti-inversion function can provide a much faster execution time than decryption of the public key encryption when recovering the input block X using the private key K. For example, the anti-inversion function may correspond to a graph-based encoding function.
도 7은 안티-인버전 인코딩이 적용된 화이트박스 암호화 과정을 설명하는 예시도이다.7 is an exemplary diagram illustrating a white box encryption process to which anti-inversion encoding is applied.
도 7을 참조하면, 암호 인코딩 장치(130)는 화이트박스 암호화 과정에서 마지막 라운드의 출력에 대해 안티-인버전 함수를 적용할 수 있다. 특히, 암호 인코딩 장치(130)는 마지막 라운드의 출력을 복수의 암호 블록들(X1, X2)로 분할할 수 있고, 그 중 일부(X1)에 대해서만 안티-인버전 함수를 적용할 수 있다. 결과적으로, 암호 인코딩 장치(130)는 안티-인버전 함수의 출력(Y1)과 안티-인버전 함수가 적용되지 않은 나머지 암호 블록(X2)으로 구성된 최종 암호문(Y1+Y2, 단 Y2=X2)을 출력으로 제공할 수 있다.Referring to FIG. 7, the encryption encoding apparatus 130 may apply an anti-inversion function to the output of the last round in the white box encryption process. In particular, the cryptographic encoding apparatus 130 may divide the output of the last round into a plurality of cryptographic blocks X1 and X2, and apply the anti-inversion function to only some of the cryptographic blocks X1. As a result, the encryption encoding device 130 is the output of the anti-inversion function (Y1) and the final cipher text (Y1 + Y2, Y2 = X2) consisting of the remaining encryption block (X2) to which the anti-inversion function is not applied. Can be provided as output.
일 실시예에서, 암호 인코딩 장치(130)는 최종 암호문에 디코딩 함수를 적용하여 인코딩된 암호문에 관한 원시 암호문으로 복구하는 암호문 디코딩부(370)를 더 포함하여 구현될 수 있다. 이 경우, 암호문 디코딩부(370)는 암호 인코딩 장치(130)와 독립적으로 구현될 수 있다. 암호문 디코딩부(370)는 최종 암호문(Y1+Y2)을 구성하는 일부 블록(Y1)에 대해 안티-인버전 함수의 역함수를 적용하는 제1 단계와 인코딩된 암호문(X1+X2)에 대해 외부 인코딩 함수의 역함수를 적용하는 제2 단계로 구성될 수 있다. 특히, 제1 단계의 경우 비밀키 K가 필요하며 비밀키 K가 없는 경우 암호 블록 Y1으로부터 암호 블록 X1으로의 복구는 불가능하다.In one embodiment, the encryption encoding apparatus 130 may further include a ciphertext decoding unit 370 that applies a decoding function to the final ciphertext to recover the original ciphertext for the encoded ciphertext. In this case, the ciphertext decoding unit 370 may be implemented independently from the cipher encoding apparatus 130. The ciphertext decoding unit 370 performs a first step of applying the inverse function of the anti-inversion function to some blocks Y1 constituting the final ciphertext (Y1+Y2) and external encoding the encoded ciphertext (X1+X2). It may consist of a second step of applying the inverse function of the function. In particular, in the case of the first step, the secret key K is required, and if there is no secret key K, recovery from the cipher block Y1 to the cipher block X1 is impossible.
도 8은 안티-인버전 디코딩 과정을 설명하는 예시도이다.8 is an exemplary diagram illustrating an anti-inversion decoding process.
도 8을 참조하면, 암호 인코딩 장치(130)는 화이트박스 암호화 과정에서 안티-인버전 함수를 적용할 수 있다. 화이트박스 암호화 과정은 마지막 라운드 연산에서 암호문에 외부 인코딩을 적용하여 인코딩된 암호문을 출력으로 생성할 수 있다(S810). 이 때, 마지막 라운드 연산의 결과로 생성된 암호문에 적용되는 외부 인코딩 G는 바이트(byte) 단위의 비선형 변환 후 선형 함수(Linear transform)를 적용하는 방식으로 설계될 수 있다.Referring to FIG. 8, the encryption encoding apparatus 130 may apply an anti-inversion function in a white box encryption process. In the white box encryption process, the encrypted ciphertext may be generated as an output by applying external encoding to the ciphertext in the last round operation (S810). In this case, the external encoding G applied to the ciphertext generated as a result of the last round operation may be designed in a manner in which a linear transform is applied after nonlinear transformation in units of bytes.
일 실시예에서, 암호 인코딩 장치(130)는 안티-인버전 함수 적용부(350)를 통해 안티-인버전 인코딩을 수행할 수 있다(S830). 안티-인버전 인코딩은 인코딩된 암호문을 두개의 암호 블록 (X1, X2)으로 분할하고, 하나의 암호 블록 (X1)에 대해 안티-인버전 함수를 적용한 후 최종 암호문 (Y1, Y2)를 생성하는 과정에 해당할 수 있으며, (Y1, Y2) = (AF(X1), X2) 과 같이 표현될 수 있다. 따라서, 암호 인코딩 장치(130)는 최종 암호문 (Y1, Y2)를 화이트박스 암호화의 출력으로 제공할 수 있다.In an embodiment, the encryption encoding apparatus 130 may perform anti-inversion encoding through the anti-inversion function application unit 350 (S830). Anti-inversion encoding divides the encoded ciphertext into two cipher blocks (X1, X2), applies the anti-inversion function to one cipher block (X1), and generates the final ciphertext (Y1, Y2). It may correspond to a process, and can be expressed as (Y1, Y2) = (AF(X1), X2). Accordingly, the encryption encoding apparatus 130 may provide the final encrypted text (Y1, Y2) as an output of white box encryption.
일 실시예에서, 암호 인코딩 장치(130)는 암호문 디코딩부(370)를 통해 안티-인버전 디코딩을 수행할 수 있다(S850). 안티-인버전 디코딩은 화이트박스 암호화의 출력 (Y1, Y2)로부터 원시 암호문을 얻는 과정에 해당할 수 있고, 보다 구체적으로 비밀키 K를 사용하여 암호 블록 (Y1)으로부터 암호 블록 (X1)을 획득하는 제1 단계와 인코딩된 암호문 (X1, X2)에 대해 외부 인코딩 G의 역함수(G-1)를 적용하여 암호문을 획득하는 제2 단계로 동작할 수 있다. 특히, 제1 단계는 X1 = AF_inv(Y1, K) 과 같이 표현될 수 있고, 안티-인버전 디코딩은 난독화된 영역이나 안전한 외부에서 실행될 수 있다.In an embodiment, the encryption encoding apparatus 130 may perform anti-inversion decoding through the ciphertext decoding unit 370 (S850). Anti-inversion decoding may correspond to the process of obtaining the original ciphertext from the outputs (Y1, Y2) of white box encryption, and more specifically, obtaining the cipher block (X1) from the cipher block (Y1) using the secret key K. The first step of performing and the second step of obtaining the encrypted text by applying the inverse function of the external encoding G (G -1 ) to the encoded ciphertext (X1, X2) may be performed. In particular, the first step can be expressed as X1 = AF_inv(Y1, K), and the anti-inversion decoding can be performed in an obfuscated area or a safe outside.
상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although the above has been described with reference to preferred embodiments of the present invention, those skilled in the art will variously modify and change the present invention within the scope not departing from the spirit and scope of the present invention described in the following claims. You will understand that you can do it.
본 발명을 지원한 국가연구개발사업National R&D project that supported the present invention
과제고유번호: 1425133005Assignment identification number: 1425133005
부처명: 중소벤처기업부Department Name: Small and Medium Venture Business Department
연구관리전문기관: 중소기업기술정보진흥원Research and management professional institution: Small and Medium Business Technology Information Promotion Agency
연구사업명: 산학연CollaboR&D사업Research Project Name: Industry-Academic Research Collabo R&D Project
연구과제명: 기기 보안 크리덴셜 관리 강화를 위한 M3 MCU급 IoT 기기용 WBC 암호기술 기반의 보안 크리덴셜 관리 기술 개발Research Project Title: Development of security credential management technology based on WBC encryption technology for M3 MCU class IoT devices to strengthen device security credential management
기여율: 1/1Contribution Rate: 1/1
주관기관: (주)드림시큐리티Organizer: Dream Security Co., Ltd.
연구기간: 2019.06.17~2020.02.16Research Period: 2019.06.17~2020.02.16
[부호의 설명][Explanation of code]
100: 화이트박스 암호 인코딩 시스템100: Whitebox encryption encoding system
110: 사용자 단말 130: 암호 인코딩 장치110: user terminal 130: encryption encoding device
150: 데이터베이스150: database
210: 프로세서 230: 메모리210: processor 230: memory
250: 사용자 입출력부 270: 네트워크 입출력부250: user input/output unit 270: network input/output unit
310: 평문 수신부 330: 암호화 연산부310: plain text receiving unit 330: encryption operation unit
350: 안티-인버전 함수 적용부 370: 암호문 디코딩부350: anti-inversion function application unit 370: ciphertext decoding unit
390: 제어부390: control unit
510: 평문 530: 암호문510: plain text 530: cipher text

Claims (9)

  1. 인코딩된 평문을 수신하는 평문 수신부;A plaintext receiver for receiving the encoded plaintext;
    상기 인코딩된 평문을 입력으로 하는 화이트박스 암호화 과정을 통해 인코딩된 암호문을 출력으로서 생성하는 암호화 연산부; 및An encryption operation unit that generates an encoded ciphertext as an output through a white box encryption process using the encoded plaintext as an input; And
    상기 인코딩된 암호문을 복수의 암호 블록들로 분할하고 상기 복수의 암호 블록들 중 어느 하나에 대해 안티-인버전(Anti-Inversion) 함수를 적용하여 최종 암호문을 생성하며, 상기 안티-인버전 함수는 입력 블록으로부터 출력 블록을 생성하고 상기 출력 블록에 대해 비밀키를 적용한 경우에는 상기 입력 블록을 복구 가능하도록 구현되어 상기 화이트박스 암호화 과정에 일방향성(one-wayness)을 제공하는 안티-인버전 함수 적용부를 포함하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치.Dividing the encoded ciphertext into a plurality of cipher blocks and applying an anti-inversion function to any one of the plurality of cipher blocks to generate a final ciphertext, the anti-inversion function When an output block is generated from an input block and a secret key is applied to the output block, an anti-inversion function is applied that is implemented to recover the input block and provides one-wayness to the white box encryption process. White box encryption encoding device using an anti-inversion function including part.
  2. 제1항에 있어서, 상기 암호화 연산부는The method of claim 1, wherein the encryption operation unit
    상기 화이트박스 암호화 과정으로서 룩업(look-up) 테이블로 구현된 복수의 라운드 함수들에 관한 반복 연산을 적용하는 것을 특징으로 하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치.A white box encryption apparatus using an anti-inversion function, characterized in that an iterative operation on a plurality of round functions implemented as a look-up table is applied as the white box encryption process.
  3. 제2항에 있어서, 상기 암호화 연산부는The method of claim 2, wherein the encryption operation unit
    상기 복수의 라운드 함수들 각각의 전후 단계에서 비선형 인코딩 함수를 내부 인코딩으로서 적용하는 것을 특징으로 하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치.A white box encryption apparatus using an anti-inversion function, characterized in that applying a nonlinear encoding function as an internal encoding in a step before and after each of the plurality of round functions.
  4. 제3항에 있어서, 상기 암호화 연산부는The method of claim 3, wherein the encryption operation unit
    상기 복수의 라운드 함수들 중 마지막 라운드 함수의 출력에 대해 상기 내부 인코딩과 다른 외부 인코딩 함수를 적용하는 것을 특징으로 하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치.An apparatus for encoding white box encryption using an anti-inversion function, characterized in that an external encoding function different from the internal encoding is applied to an output of the last round function among the plurality of round functions.
  5. 제1항에 있어서, 상기 안티-인버전 함수 적용부는The method of claim 1, wherein the anti-inversion function application unit
    상기 안티-인버전(Anti-Inversion) 함수의 출력 블록을 상기 복수의 암호 블록들 중 나머지와 연결하여 상기 최종 암호문을 생성하는 것을 특징으로 하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치.A white box encryption apparatus using an anti-inversion function, characterized in that the output block of the anti-inversion function is connected with the rest of the plurality of encryption blocks to generate the final cipher text.
  6. 제1항에 있어서,The method of claim 1,
    상기 최종 암호문에 디코딩 함수를 적용하여 상기 인코딩된 암호문에 관한 원시 암호문으로 복구하는 암호문 디코딩부를 더 포함하는 것을 특징으로 하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치.And a ciphertext decoding unit that applies a decoding function to the final ciphertext and recovers the original ciphertext for the encoded ciphertext.
  7. 제6항에 있어서, 상기 암호문 디코딩부는The method of claim 6, wherein the ciphertext decoding unit
    상기 최종 암호문 중 상기 안티-인버전 함수의 출력 블록에 대해 상기 비밀키를 기초로 상기 안티-인버전 함수의 역함수를 적용하여 제1 암호 블록으로 복구하는 것을 특징으로 하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치.Using an anti-inversion function, characterized in that the inverse function of the anti-inversion function is applied to the output block of the anti-inversion function in the final ciphertext, and is restored to the first cipher block. Whitebox cryptographic encoding device.
  8. 제7항에 있어서, 상기 암호문 디코딩부는The method of claim 7, wherein the ciphertext decoding unit
    상기 제1 암호 블록과 상기 최종 암호문의 나머지 암호 블록을 포함하는 전체 암호 블록에 대해 외부 인코딩 함수의 역함수를 적용하여 상기 원시 암호문으로 복구하는 것을 특징으로 하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 장치.White box encryption encoding using an anti-inversion function, characterized in that the entire cipher block including the first cipher block and the remaining cipher blocks of the final ciphertext is restored to the original ciphertext by applying an inverse function of an external encoding function Device.
  9. 화이트박스 암호 인코딩 장치에서 수행되는 방법에 있어서,In the method performed in a white box encryption encoding device,
    인코딩된 평문을 수신하는 단계;Receiving the encoded plaintext;
    상기 인코딩된 평문을 입력으로 하는 화이트박스 암호화 과정을 통해 인코딩된 암호문을 출력으로서 생성하는 단계; 및Generating an encoded ciphertext as an output through a white box encryption process using the encoded plaintext as an input; And
    상기 인코딩된 암호문을 복수의 암호 블록들로 분할하고 상기 복수의 암호 블록들 중 어느 하나에 대해 안티-인버전(Anti-Inversion) 함수를 적용하여 최종 암호문을 생성하며, 상기 안티-인버전 함수는 입력 블록으로부터 출력 블록을 생성하고 상기 출력 블록에 대해 비밀키를 적용한 경우에는 상기 입력 블록을 복구 가능하도록 구현되어 상기 화이트박스 암호화 과정에 일방향성(one-wayness)을 제공하는 단계를 포함하는 안티-인버전 함수를 이용한 화이트박스 암호 인코딩 방법.Dividing the encoded ciphertext into a plurality of cipher blocks and applying an anti-inversion function to any one of the plurality of cipher blocks to generate a final ciphertext, the anti-inversion function When an output block is generated from an input block and a secret key is applied to the output block, the input block is implemented to be recoverable to provide one-wayness to the white box encryption process. Whitebox encryption method using inversion function.
PCT/KR2019/009701 2019-08-02 2019-08-05 Apparatus and method for encoding whitebox cryptography by using anti-inversion function WO2021025185A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020190094187A KR102319699B1 (en) 2019-08-02 2019-08-02 White box cryptographic encoding device and method using anti-inversion function
KR10-2019-0094187 2019-08-02

Publications (1)

Publication Number Publication Date
WO2021025185A1 true WO2021025185A1 (en) 2021-02-11

Family

ID=74503925

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/009701 WO2021025185A1 (en) 2019-08-02 2019-08-05 Apparatus and method for encoding whitebox cryptography by using anti-inversion function

Country Status (2)

Country Link
KR (1) KR102319699B1 (en)
WO (1) WO2021025185A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102546567B1 (en) * 2021-07-30 2023-06-23 주식회사 엔에스에이치씨 White-box encryption apparatus of lightweight block cipher pipo

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130016836A1 (en) * 2011-07-14 2013-01-17 Apple Inc. Cryptographic process execution protecting an input value against attacks
KR20180007459A (en) * 2016-07-13 2018-01-23 삼성에스디에스 주식회사 Method and apparatus for white box cryptography
KR20190020988A (en) * 2017-08-22 2019-03-05 국민대학교산학협력단 Computer-executable lightweight white-box cryptographic method and apparatus thereof
KR20190028066A (en) * 2017-09-08 2019-03-18 국민대학교산학협력단 A method of generating random number based on block cipher with whitebox encryption and apparatus thereof
WO2019105571A1 (en) * 2017-12-01 2019-06-06 Huawei Technologies Co., Ltd. Secure provisioning of data to client device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5599728B2 (en) 2008-03-05 2014-10-01 イルデト・コーポレート・ビー・ヴイ White box implementation
US11153068B2 (en) * 2016-05-23 2021-10-19 Sony Corporation Encryption device, encryption method, decryption device and decryption method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130016836A1 (en) * 2011-07-14 2013-01-17 Apple Inc. Cryptographic process execution protecting an input value against attacks
KR20180007459A (en) * 2016-07-13 2018-01-23 삼성에스디에스 주식회사 Method and apparatus for white box cryptography
KR20190020988A (en) * 2017-08-22 2019-03-05 국민대학교산학협력단 Computer-executable lightweight white-box cryptographic method and apparatus thereof
KR20190028066A (en) * 2017-09-08 2019-03-18 국민대학교산학협력단 A method of generating random number based on block cipher with whitebox encryption and apparatus thereof
WO2019105571A1 (en) * 2017-12-01 2019-06-06 Huawei Technologies Co., Ltd. Secure provisioning of data to client device

Also Published As

Publication number Publication date
KR102319699B1 (en) 2021-11-02
KR20210015403A (en) 2021-02-10

Similar Documents

Publication Publication Date Title
WO2014119936A1 (en) Method of and apparatus for processing software using hash function to secure software, and computer-readable medium storing executable instructions for performing the method
US9143317B2 (en) Protecting against white box attacks using column rotation
US9774443B2 (en) Computing key-schedules of the AES for use in white boxes
AU2011292312B2 (en) Apparatus and method for block cipher process for insecure environments
CN110235409A (en) Use the protected RSA signature of homomorphic cryptography or the method for decryption
JP6877889B2 (en) Cryptographic device, encryption method, decryption device, and decryption method
US8681975B2 (en) Encryption method and apparatus using composition of ciphers
WO2016039556A1 (en) Apparatus and method for data encryption
US9819486B2 (en) S-box in cryptographic implementation
JP7078631B2 (en) Cryptographic device, encryption method, decryption device, and decryption method
KR20120089396A (en) Encryption apparatus and encryption method thereof
EP2922235B1 (en) Security module for secure function execution on untrusted platform
US8699702B2 (en) Securing cryptographic process keys using internal structures
US20090257583A1 (en) Cipher feedback with variable block chaining
WO2020111403A1 (en) Stream cipher-based image security method using zero-watermarking, server, and computer readable recording medium
WO2021025185A1 (en) Apparatus and method for encoding whitebox cryptography by using anti-inversion function
WO2023191216A1 (en) Data encryption and decryption system and method
WO2015160190A1 (en) Device and method for generating virtual keyboard for user authentication
KR20180065183A (en) Embedded module for secure CCTV camera image encryption
WO2019103360A1 (en) Data management method and system based on proxy re-encryption in iot lightweight terminal environment
Gaur et al. AES image encryption (Advanced encryption standard)
WO2019050343A1 (en) Method and apparatus for generating random number on basis of block cipher to which white-box cryptography is applied
Sunday et al. An Efficient Data Protection for Cloud Storage Through Encryption
KR20020071274A (en) Universal Serial Bus(USB) security secondary storage device using Crypto Chip and Flash memory based on PC
JPH11122237A (en) Ciphering device and data protection device

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: 19940910

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19940910

Country of ref document: EP

Kind code of ref document: A1