Machine learning based cryptanalysis

Machine learning-based program synthesis automates the decryption of public-key cryptographic algorithms, addressing inefficiencies in manual decryption methods by generating algorithms that exploit algorithmic weaknesses to decrypt encoded messages or private keys.

JP2024533214AActive Publication Date: 2024-09-12ORACLE INT CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024514386
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-09-23
Filing Date
2022-09-21
Publication Date
2024-09-12
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

Traditional decryption of public-key cryptographic algorithms is manually performed by skilled mathematicians and computer scientists, which is inefficient and lacks automation.

Method used

Implementing machine learning-based program synthesis to automatically decrypt or partially decrypt encoded messages or private keys by training a program synthesizer with input-output pairs and using syntax-guided program synthesis to generate and validate decryption formulas.

Benefits of technology

Automates the decryption process, enabling efficient and systematic decryption of public-key cryptographic algorithms like RSA and Diffie-Hellman, even when oracles are unavailable, by generating algorithms that exploit mathematical weaknesses in the algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024533214000001
    Figure 2024533214000001
Patent Text Reader

Abstract

Embodiments decrypt or partially decrypt an encoded message or private key that was encoded by a public key cryptography algorithm. Embodiments encode the public key cryptography algorithm using a program synthesizer language and build a grammar for the program synthesizer. Embodiments train the program synthesizer with training data having input-output pairs and run the trained program synthesizer to generate mathematical expressions. Embodiments validate the generated mathematical expressions and then perform the decryption using the trained and validated program synthesizer.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] One embodiment relates generally to cryptanalysis, and more particularly to the use of machine learning based cryptanalysis. [Background technology]

[0002] Cryptanalysis is the study of analyzing information systems to investigate hidden aspects of the system. Cryptanalysis is used to defeat cryptographic security systems and gain access to the contents of encrypted messages, even when the encryption key is unknown.

[0003] Traditionally, cryptanalysis of public key cryptography algorithms is often performed manually by researchers with esoteric skills in mathematics and computer science. Cryptanalysts review the mathematical structure of cryptographic algorithms to identify weaknesses in the design. Cryptanalysts manually construct mathematical formulas that help them uncover secret data (e.g., keys, messages) from public data parameters that are part of the cryptosystem, thereby decrypting the encoded message. Summary of the Invention

[0004] Embodiments decrypt or partially decrypt an encoded message or private key that was encoded by a public key cryptography algorithm. Embodiments encode the public key cryptography algorithm using a program synthesizer language and build a grammar for the program synthesizer. Embodiments train the program synthesizer with training data having input-output pairs and run the trained program synthesizer to generate mathematical expressions. Embodiments validate the generated mathematical expressions and then perform the decryption using the trained and validated program synthesizer. [Brief description of the drawings]

[0005] Further embodiments, details, advantages and modifications will become apparent from the following detailed description of the embodiments, which is to be read in conjunction with the accompanying drawings. [Figure 1]2 illustrates a general encryption algorithm according to an embodiment. [Diagram 2] FIG. 2 is a block diagram of a computer server / system according to one embodiment of the present invention that can be used to implement any of the functionality disclosed herein. [Diagram 3] 3 is a flow diagram of the functionality of the decryption module of FIG. 2 for performing decryption, according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0006] One embodiment trains a program synthesizer on input-output pairs of the encrypted communication to decrypt or partially decrypt the encoded message or secret key, and uses the trained program synthesizer to further decrypt the encrypted communication.

[0007] Embodiments implement a computer-aided decryption process for public key cryptography algorithms, such as RSA, Rabin, and Diffie-Hellman key exchange. Embodiments integrate automated program synthesis with public key cryptography to perform the decryption. Embodiments transform the public key decryption problem into a program synthesis problem to automate the decryption task.

[0008] In general, automated program synthesis generates programs that meet a high-level formal specification, which may range from a complete formal behavioral specification to input-output examples (as in test cases) or a combination of partial specifications and input-output examples. Embodiments use a syntax-guided program synthesis ("SyGuS") approach by guiding the search space of possible programs to reason about using a given grammar consisting of primitive components that are typical elements of public key cryptography algorithms (e.g., modular addition, exponentiation, etc.).

[0009] Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, it will be apparent to one skilled in the art that the present disclosure may be practiced without these specific details. Additionally, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the embodiments. Wherever possible, like reference numerals will be used to refer to like elements.

[0010] 1 shows a general encryption algorithm 110 according to an embodiment. The encryption algorithm 110 includes a receiver 103 that receives a message from a sender 101 to be encrypted. The encryption algorithm 110 further includes an "oracle" 104 that receives a message from an attacker 102.

[0011] Generally, in public key cryptography, some encryption algorithms contain hard-core bits, or "oracles", of the secret message, meaning that if a cryptanalyst has access to an algorithm that predicts those hard-core bits, he or she can recover the entire encrypted message by repeatedly applying the exact same algorithm to different inputs. The concept of an "oracle attack" is that by choosing plaintext or ciphertext inputs to the encryptor or decryptor, respectively, and analyzing the output related to the selected input, it is often possible to deduce valuable information about the algorithm or a secret item of information, such as one of the keys used in the algorithm.

[0012] Such vulnerabilities in cryptosystems are called "oracles" because, like a visit to the ancient Greek oracle at Delphi, every input or question receives an output or answer, and it is up to the observer to decide whether the answer makes sense. A cryptographic oracle attack is successful when the oracle's output in response to multiple inputs reveals a hidden truth. Cipher constructions and / or implementations often have such oracles in conjunction with timing information, message padding issues, error handling, or other information leaks. Specifically, an oracle 104 can answer a particular question, such as "what is the least significant bit of an encrypted message?" In general, however, developing an algorithm that uses oracles 104 intelligently to decrypt the entire message is a difficult cryptanalysis task.

[0013] In contrast, embodiments apply program synthesis for the decryption task: they synthesize an algorithm that systematically uses oracles 104 to decrypt the entire secret.

[0014] 2 is a block diagram of a computer server / system 10 according to one embodiment of the present invention that may be used to implement any of the functionality disclosed herein. Although shown as a single system, the functionality of system 10 may be implemented as a distributed system. Also, the functionality disclosed herein may be performed on separate servers or devices that may be coupled together via a network. Also, one or more components of system 10 may not be included.

[0015] The system 10 includes a bus 12 or other communication mechanism for communicating information, and a processor 22 coupled to the bus 12 for processing information. The processor 22 may be any type of general-purpose or special-purpose processor. The system 10 further includes a memory 14 for storing information and instructions executed by the processor 22. The memory 14 may be comprised of any combination of random access memory ("RAM"), read-only memory ("ROM"), static storage, such as a magnetic or optical disk, or any other type of computer-readable medium. The system 10 further includes a communication device 20, such as a network interface card, to provide access to a network. Thus, a user may interface with the system 10 directly, remotely over a network, or in some other manner.

[0016] Computer-readable media may be any available media that can be accessed by the processor 22 and includes both volatile and nonvolatile media, removable and non-removable media, and communication media. Communication media may include computer-readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and includes any information delivery media.

[0017] The processor 22 is further coupled via the bus 12 to a display 24, such as a liquid crystal display ("LCD"), A keyboard 26 and a cursor control device 28, such as a computer mouse, are further coupled to the bus 12 to allow a user to interface with the system 10.

[0018] In one embodiment, memory 14 stores software modules that provide functionality when executed by processor 22. The modules include an operating system 15 that provides the operating system functionality of system 10. The modules further include a decryption module 16 that performs decryption to decrypt or partially decrypt an encoded message or secret key, and all other functionality disclosed herein. System 10 can be part of a larger system. Thus, system 10 can include one or more additional functional modules 18 to include further functionality that can utilize the encryption / decryption functionality. A file storage device or database 17 is coupled to bus 12 to provide centralized storage for modules 16 and 18, including decrypted keys, constraints, and program synthesis grammars. In one embodiment, database 17 is a relational database management system ("RDBMS") that can manage stored data using structured query language ("SQL").

[0019] In one embodiment, especially when there are many distributed files on a single device, database 17 is implemented as an in-memory database ("IMDB"). An IMDB is a database management system that relies primarily on main memory for computer data storage. This is in contrast to database management systems that employ disk storage mechanisms. Main memory databases are faster than disk-optimized databases because disk access is slower than memory access, and the internal optimization algorithms are simpler and execute fewer CPU instructions. Accessing data in memory eliminates seek times when querying data, providing faster and more predictable performance than disk.

[0020] In one embodiment, database 17, when implemented as an IMDB, is implemented based on a distributed data grid. A distributed data grid is a system in which a collection of computer servers work together in one or more clusters to manage information and related operations, such as computations, in a distributed or clustered environment. Distributed data grids can be used to manage application objects and data shared among servers. Distributed data grids provide low response times, high throughput, predictable scalability, continuous availability, and information reliability. In a particular example, a distributed data grid, such as Oracle's "Oracle Coherence" data grid, stores information in-memory to achieve higher performance and uses redundancy to keep copies of that information synchronized across multiple servers to ensure continued availability of data and system resilience in the event of a server failure.

[0021] In one embodiment, system 10 is a computing / data processing system that includes an application or collection of distributed applications for an enterprise organization, and may also implement logistics, manufacturing, and inventory management functions. Application and computing system 10 may be configured to operate with or implemented as a cloud-based networking system, a software-as-a-service ("SaaS") architecture, or other type of computing solution.

[0022] As disclosed, embodiments use machine learning to construct mathematical expressions based on public data associated with cryptographic algorithms. For example, in the case of the Diffie-Hellman algorithm, embodiments use a machine learning machine in the form of a program synthesizer to uncover the least significant bits ("LSBs") of a private key from a corresponding public key. Similarly, one embodiment uses a machine learning machine to construct a mathematical expression that reveals a portion of a private key given access to an LSB oracle for the RSA algorithm.

[0023] In general, embodiments train a machine learning algorithm on input-output pairs and have the machine learning machine (i.e., program synthesizer) automatically perform cryptanalysis to decrypt or partially decrypt an encoded message or secret key.

[0024] Figure 3 is a flow diagram of the functionality of decryption module 16 of Figure 2 for performing decryption, according to one embodiment. In one embodiment, the functionality of the flow diagram of Figure 3 is implemented by software stored in a memory or other computer readable or tangible medium and executed by a processor. In other embodiments, the functionality may be performed by hardware (e.g., through the use of an application specific integrated circuit ("ASIC"), a programmable gate array ("PGA"), a field programmable gate array ("FPGA"), etc.), or by some combination of hardware and software.

[0025] At 302, an embodiment encodes the public key encryption algorithm using a language supported by a program synthesizer. One embodiment uses syntax-guided program synthesis, although other encoding techniques may be used, such as enumerative search, constraint solving, stochastic search, and deductive-based programming, by way of example. An embodiment that uses syntax-guided synthesis allows the cryptanalyst to define a grammar that constrains the search space.

[0026] At 304, an embodiment constructs a grammar for the program synthesizer. The building blocks of the grammar are primitives such as modular addition, multiplication, inverse, and any oracles if available. In general, these primitives are often used in the context of public key cryptography. The grammar can be iteratively evolved by adding more primitives as needed.

[0027] At 306, embodiments train a program synthesizer with input-output pairs (i.e., training data). For example, if the goal is to build a formula that uses the first least significant bit ("LSB") to predict the second LSB, embodiments train the synthesizer with a set of examples. For example, in the DH protocol example disclosed below, the training data refers to pairs consisting of the public key and the LSB of the private key. This is the training set.

[0028] At 308, embodiments run a synthesizer to generate a formula and validate the learned formula to check whether the formula is general to all input-output pairs, not just valid for the trained examples. Traditional proof techniques or theorem provers may be used to validate the learned formula. In embodiments, program composition is used to validate the learned formula by varying parameter values ​​of the underlying cryptographic algorithm. If the formula is learned for a particular training set, embodiments change the training set to verify whether the formula is generalizable, and retrain the machine learning model based on the output accordingly. For example, in a DH protocol, embodiments may change the group generator and verify whether the learned formula is valid. Mathematical axioms may be used to prove whether the machine-learned formula is correct for all possible scenarios.

[0029] If the learned formula is not validated at 308, then at 310, embodiments use the data (i.e., input-output pairs) from 308 to extend the trained input-output pairs and restart the function at 308 to retrain the program synthesizer. Otherwise, decryption is complete.

[0030] As a result of the functionality of FIG. 3, embodiments can either decrypt the entire message (or key) or learn partial information about them (i.e., partial decryption) using a trained and validated program synthesizer. As described below, in the DH example, embodiments learn partial information about the private key, while in the RSA example, embodiments learn the entire message using an oracle that leaks only the LSBs of the encrypted message. The generated mathematical formula takes only public data (e.g., public key, ciphertext) and returns the private information. In general, the public and private data are mathematically related, so embodiments use machine learning to learn the underlying relationship.

[0031] Automatic program synthesis example An embodiment uses program synthesis to automate cryptanalysis. One embodiment implements CVC4 as the program synthesizer. CVC4 is an efficient open-source automated theorem prover for satisfiability modulo theories ("SMT") problems. It can be used to prove the validity (or, dually, the satisfiability) of linear formulas in a large number of embedded logic theories and their combinations. In other embodiments, alternative program synthesizers may be used.

[0032] In one example of automatic program synthesis, assume that it is desired to synthesize a program that finds the second largest number among three distinct numbers. In an embodiment, the program synthesizer language is also SMT, so the SMT language syntax is used to specify functions and types. The syntax is described below.

[0033] The bool2Int function converts a boolean value b to an int. It returns 1 if b is true, 0 otherwise. In SMT, "it" stands for if-then-else: (define-fun bool2Int ((b Bool)) Int (ite (= b true) 1 0) )

[0034] The max and min functions return the maximum and minimum of two numbers x and y, respectively: (define-fun max((x Int)(y Int)) Int (-x(*(-xy)(bool2Int( <x y))))) (define-fun min((x Int)(y Int)) Int (-x(*(-xy)(bool2Int( <y x)))))

[0035] To compose using SyGus, we need to specify a grammar that contains the allowed list of variables (e.g., x, y, z) and components (e.g., max, min): min): (synth-fun second_max((x Int) (y Int) (z Int)) Int ((Start Int( xyz (max Start Start) (min Start Start) )) ) )

[0036] The specification is given using a set of input-output pairs. For example, the statement (constraint(=(second_max 1, 2, 3) 2)) means that the second_max function should return 2 when called with arguments (1, 2, 3). The second_max code is composed using the components mentioned in the grammar (e.g. max, min). The composed function (in this example) is not optimal in terms of the number of comparisons, but it shows how algorithms can be composed from components. (constraint(=(second_max 1 2 3) 2)) (constraint(=(second_max 3 2 1) 2)) (constraint(=(second_max 1 3 2) 2)) (constraint(=(second_max 3 1 2) 2)) (constraint(=(second_max 2 3 1) 2)) (constraint(=(second_max 2 1 3) 2))

[0037] The check-synth command asks the SyGus synthesis tool to synthesize a function that satisfies the above constraints: (check-synth)

[0038] After executing the following SyGus command using the CVC4 utility, the synthesized code will be printed by it. . / cvc4-2020-05-29-x86_64-linux-opt --lang=sygus1 max_second.sygus (define-fun second_max((x Int) (y Int) (z Int)) Int (min(max xy) (max z (min xy))))

[0039] As shown, syntax-guided program synthesis attempts to derive a program using components mentioned in a given grammar to match a given specification.

[0040] RSA cryptanalysis using program synthesis examples. Rivest-Shamir-Adleman ("RSA") is a public-key cryptosystem widely used for secure data transmission. With RSA, a sender encrypts a message with the receiver's public key. Only the receiver can decrypt the message with the corresponding private key.

[0041] In RSA, the key generation phase is as follows: Let b represent the key size in bits. Two random secret primes p and q are generated, and a public key n is formed by multiplying p and q together, so n=pq, where p and q are both private primes, each roughly of size b / 2 bits. Then e and d are chosen such that e*d=1(mod phi(n)), where phi(n)=(p-1)(q-1).

[0042] In practice, the public e is a fixed constant. If it is not possible to choose a matching private d, new primes p and q are chosen until a suitable d is found. The public key is<n,e> and the private key is<n,e,d,p,q> RSA is considered difficult to break because it is difficult to efficiently find (1) p and q given n, or (2) phi(n) given n.

[0043] In RSA, the encryption function is: Let x be a message, also called plaintext. In RSA, the message must be encoded as an integer in [0,n). The sender obtains the receiver's public key<n,e> encrypts the message x by calling the encryption function enc, defined below: enc(x)=x e (mod n)=y Let y be the ciphertext corresponding to the plaintext x. The encryption function enc is deterministic, so to avoid attacks, randomness is added to the plaintext before enc is applied. There is no known efficient algorithm that can exchange the e-th root in a compound modulo arithmetic context, so it is widely believed to be hard to find x given y.

[0044] In RSA, the decryption function is as follows: the recipient decrypts the incoming ciphertext y using their private key exponent d to recover the plaintext x: dec(y)=y d (mod n)=x The last equation is due to number theory results from Euler and Fermat.

[0045] The embodiment then applies the program synthesizer to RSA as follows:<n,e> Assume there exists an oracle lsbOra(y,e,n) that takes and returns the least significant bit (LSB) of the plaintext x. Embodiments use program synthesis to automatically use this lsbOra to decrypt the entire message bit by bit.

[0046] An embodiment utilizes a program synthesizer to exploit a grammar that enumerates an allowed list of primitives that may be called to learn an expression that matches an input-output pair (i.e., a training data set). The list of primitives consists of basic mathematical functions used in public key cryptography. For example, functions such as mod, power, inverse, etc. are often part of the catalog that the synthesizer is allowed to use. If an oracle function exists, an embodiment also includes it as part of the allowed list of primitives. This capability is exploited for RSA cryptanalysis.

[0047] The RSA encryption function "enc" and decryption function "dec" are formalized below (corresponding to 302 in Figure 3 when encoding the encryption and decryption functions in the SMT language). "pow" is the exponential function: (define-fun enc((x Int) (e Int) (n Int)) Int (mod(pow(mod xn) e) n) ) (define-fun dec((y Int) (d Int) (n Int)) Int (mod(pow(mod yn) d) n) )

[0048] The embodiment then uses the SMT language to specify an oracle (corresponding to 302 and partially to 304 in FIG. 3, since the oracle is part of the grammar). The least significant bit oracle lsbOra is given below. Note that the oracle knows the private key (3 in the example below). However, the combiner is simply using lsbOra as a black box. In other words, the combiner is not given the private key value. lsbOra is allowed to call the RSA decryption function: (define-fun lsbOra((y Int) (n Int)) Int (lsb(dec(mod yn) 3 n)) )

[0049] The embodiment then defines a grammar (corresponding to 304 in FIG. 3). The grammar is given as follows: (synth-fun half_pred((y Int) (e Int) (n Int)) Int ((Start Int( yen 1 2 (modAdd Start Start n) (modMul Start Start n) (lsbOra Start n) (enc Start Start n) )) ) ) This grammar allows the program synthesizer to use commonly occurring modulo operations, oracles (lsbOra), and cryptographic functions. The synthesizer is also trained on a set of examples that specify the behavior to be synthesized (corresponding to 306 in Figure 3).

[0050] In one example, RSA is applied to a small composite number n=15. Therefore, p=5, q=3, and phi(n)=8. Also, e*d=1(mod phi(n)), so e=3, d=3.

[0051] The RSA encryption table is given below, and for all possible plaintexts x, the corresponding ciphertext is calculated. [Table 1]

[0052] The following example defines input-output pairs for the ring of integers Z15.

[0053] The embodiment then interprets the input-output specification (constraint(=(half_pred 1 3 15)0)). half_pred means predicting whether the unknown plaintext x is < n / 2. The cryptanalyst does not know the plaintext x but knows the corresponding ciphertext y. Because it is clearly sent, and thus y is public. In (half_pred 1 3 15), y is 1, e is 3, and n is 15. (constraint(=(half_pred 1 3 15) 0)) means that the value of x is < n / 2 and is represented by 0. On the other hand, (constraint(=(half_pred 9 3 15) 1)) means that the value of x is > n / 2 and is represented by 1. The cryptographer can easily construct such a specification using the example. (constraint(=(half_pred 1 3 15) 0)) (constraint(=(half_pred 8 3 15) 0)) (constraint(=(half_pred 12 3 15) 0)) (constraint(=(half_pred 4 3 15) 0)) (constraint(=(half_pred 5 3 15) 0)) (constraint(=(half_pred 6 3 15) 0)) (constraint(=(half_pred 13 3 15) 0)) (constraint(=(half_pred 2 3 15) 1)) (constraint(=(half_pred 9 3 15) 1)) (constraint(=(half_pred 10 3 15) 1)) (constraint(=(half_pred 11 3 15) 1)) (constraint(=(half_pred 3 3 15) 1)) (constraint(=(half_pred 7 3 15) 1)) (constraint(=(half_pred 14 3 15) 1))

[0054] The embodiment then has the synthesizer generate / suggest an attack algorithm by executing the following command (corresponding to 308 in FIG. 3): As shown below, in this example, the synthesizer automatically inferred an attack algorithm using the input-output example and the grammar. This illustrates the use of program synthesis for cryptanalysis of public key cryptography. $ . / cvc4-2020-05-29-x86_64-linux-opt --lang=sygus1 rsa_half.sygus (define-fun half_pred((y Int) (e Int) (n Int)) Int (lsbOra(modMul y (enc 2 en) n) n))

[0055] The synthesized function took as input the ciphertext y and the public parameters e and n, and inferred an algorithm that could predict the most significant bit of the secret message. The program synthesizer successfully inferred the function by using the LSB oracle lsbOra, modulo multiplication modMul, and the public encryption function enc.

[0056] The above example shows that the combined function predicts the most significant bit from this LSB oracle for all possible e and n, not just the configuration of the training examples. By repeatedly applying half_pred, a cryptanalyst can easily learn all the bits of the secret message x.

[0057] DH cryptanalysis using program synthesis examples. The above examples using RSA cryptanalysis leveraged an oracle. However, embodiments are also applicable to cryptanalysis even when it is assumed that no such oracle exists. In particular, there may be mathematical weaknesses within the algorithm that can be exposed using program synthesis. For example, using a generic program synthesis algorithm, embodiments can predict the LSBs of the public key from the private key in a basic version of the Diffie-Hellman ("DH") key exchange algorithm. Using the specification of the DH key exchange algorithm and example input-output pairs, in embodiments, a program synthesizer can generate an algorithm that successfully and automatically predicts the LSBs of the private key.

[0058] Referring to DH, for two parties to communicate securely, they must agree on a common key k that can be used for encryption and decryption. The DH key exchange algorithm solves this fundamental key agreement problem in that both parties can arrive at the common key k using a public channel without any prior arrangement (e.g., a courier service).

[0059] The DH algorithm is defined using a one-way function formalized as follows: Let p be a prime number, and Z * Let p = {1, 2, 3, …, p-1}. One of the fundamental results in number theory is that Z * p contains a special element called a generator g. For example, p=11;Z * Let p = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Z *In 11, 2 is a generator because Z * Every element of 11 is 2 mod p for some integer i. i This is because it can be expressed as: Z * Since p contains a generator, Z * p is a cyclic group. The DH key exchange algorithm is, for example, Z * It is defined in cyclic groups such as p.

[0060] An example of a DH key exchange algorithm is as follows: Let Alice and Bob be two parties that wish to agree on a common key k. "Alice" and "Bob" can be thought of as two computer applications connected by a computer network. The goal of DH is to establish a shared secret key that can be used by them to encrypt and decrypt messages. Both parties must publicly agree on p and g. In an embodiment, p and g may be defined by the National Institute of Standards and Technology ("NIST") or by other sources. The following steps describe the DH key exchange algorithm: Step 1: Alice randomly chooses a private key x, an integer in (1,p). Similarly, Bob randomly chooses a private key y, an integer in (1,p). Step 2: Alice finds that A=g x Send (mod p) to Bob. Step 3: Bob checks if B=g y Send (mod p) to Alice. Step 4: Alice is B x Calculate and Bob gets A y Calculate B x =A y =g xy Therefore, both have the same key k=g xy has.

[0061] The security of the DH key exchange algorithm is based on (1) the public value g x , g y Given g xyor (2) it is difficult to find a public value g x (or g y ), it is difficult to find x (or y) given x (or y), and this problem is called the discrete logarithm problem.

[0062] An embodiment performs decryption of a DH function using program composition as follows: Let g be a generator and let function dh:Z * p → Z * p = dh(x) = g x Define (mod p)=h. This function dh is widely considered to be one-way, which means that it is computationally hard to find x given dh(x). However, this definition does not mean that partial information about the input x cannot be inferred from dh(x). To that end, embodiments apply program synthesis to show how to derive partial information about a secret x from dh(x). For example, the following example shows how program synthesis can infer the least significant bits ("LSBs") of a secret input x from dh(x).

[0063] An embodiment formalizes the above DH functions using SMT language syntax. (define-fun dh((g Int) (x Int) (p Int)) Int (mod(pow g(mod x (-p 1))) p) )

[0064] The embodiment then constructs the grammar as follows: (synth-fun lsb_pred((g Int) (p Int) (h Int)) Int ((Start Int ( gph (Constant Start) (div Start Start) (dh Start Start p) )) ) ) The above grammar contains components such as the integer division (div) operator, the dh function, and allows the use of constant integers.

[0065] The embodiment then trains the program synthesizer on the input-output pairs. An example of an input-output is Z * p, where p=11 and g=2 are Z * This is the generator of p. (declare-const p Int) (assert(= p 11)) (declare-const g Int) (assert(= g 2))

[0066] The embodiment declares the following constraint in terms of dh(x) for all integers x in

[0110] : [Table 2] (constraint(=(lsb_pred gp 2) (lsb 1))) (constraint(=(lsb_pred gp 4) (lsb 2))) (constraint(=(lsb_pred gp 8) (lsb 3))) (constraint(=(lsb_pred gp 5) (lsb 4))) (constraint(=(lsb_pred gp 10)(lsb 5))) (constraint(=(lsb_pred gp 9) (lsb 6))) (constraint(=(lsb_pred gp 7) (lsb 7))) (constraint(=(lsb_pred gp 3) (lsb 8))) (constraint(=(lsb_pred gp 6) (lsb 9))) (constraint(=(lsb_pred gp 1) (lsb 10)))

[0067] The compositor using the cvc4 tool is run as follows: $cvc4-2020-05-29-x86_64-linux-opt --lang=sygus1 dh_lsb.sygus This will give you the following output: (define-fun lsb_pred((g Int) (p Int) (h Int)) Int(dh p (dh h (div p 2) p) p)) h=g x Let g, p, h be the least significant bit (LSB) of x. Then, lsb_pred(g, p, h) shown above can predict the least significant bit (LSB) of x. This example shows that program synthesis can analyze the one-way function of the DH key exchange algorithm and perform the cryptanalysis task automatically. Note that the inferred function lsb_pred is true not only for the training examples, but also for all possible p and g.

[0068] The embodiments can further be used to evaluate how difficult it is to break a cryptosystem given an oracle. For example, in contrast to RSA, it is believed that the LSB oracle of the DH algorithm cannot be used to efficiently recover all other bits of the private key. By having the program synthesizer explore the space of different possible paths to query the LSB oracle, the cryptanalyst can gain new insights, for example, whether the oracle is high-risk or whether there is no obvious path to apply the oracle.

[0069] As disclosed, embodiments relate to computer-assisted processes for the cryptanalysis of public key cryptography algorithms, such as RSA, for example. Embodiments automatically analyze such algorithms and automatically generate attacks.

[0070] As disclosed, in public key cryptography, there are generally hard core bits of a secret message, which means that if a cryptanalyst has access to an algorithm that predicts those hard core bits, he or she can recover the entire message by repeatedly applying the exact same algorithm to different inputs. As an example, there are oracles that can answer the specific question: what are the least significant bits of an encrypted message? In general, finding an algorithm that cleverly uses such an oracle to decrypt the entire message is a non-trivial cryptanalysis task. To that end, embodiments apply program synthesis for the cryptanalysis task. Embodiments synthesize an algorithm that systematically uses oracles to decrypt the entire secret.

[0071] The features, structures, or characteristics of the present disclosure described throughout this specification may be combined in any suitable manner in one or more embodiments. For example, the use of "one embodiment," "some embodiments," "one particular embodiment," "particular embodiment," or other similar terms throughout this specification refers to the fact that a particular feature, structure, or characteristic described in connection with that embodiment may be included in at least one embodiment of the present disclosure. Thus, the appearances of "one embodiment," "some embodiments," "one particular embodiment," "particular embodiment," or other similar terms throughout this specification do not necessarily all refer to the same group of embodiments, and the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0072] Those skilled in the art will readily appreciate that the above-described embodiments may be implemented with steps in a different order and / or with elements in a different configuration than that disclosed. Thus, while this disclosure discusses embodiments as generally described, those skilled in the art will recognize that certain modifications, variations, and alternative configurations will become apparent while remaining within the spirit and scope of this disclosure. Accordingly, reference should be made to the appended claims to determine the metes and bounds of this disclosure.

Claims

1. 1. A method for decrypting or partially decrypting an encoded message or a private key encoded by a public key cryptography algorithm, comprising: encoding said public key encryption algorithm using a program synthesizer language; constructing a grammar for said program synthesizer; training said program synthesizer with training data having input-output pairs; Executing the trained program synthesizer to generate a mathematical formula; Verify the validity of the generated formula; performing decryption using said trained and validated program synthesizer; How to have that.

2. if the correctness of the generated formula is not confirmed, iteratively execute the trained program synthesizer to generate the formula; The method of claim 1 further comprising:

3. The method of claim 1 , wherein the program synthesizer comprises a Satisfiability Modulo Theory (SMT) solver.

4. The method of claim 1 , wherein encoding the public key cryptography algorithm comprises using syntax-guided program synthesis.

5. The method of claim 1 , wherein the public key cryptographic algorithm has an oracle, and encoding the public key cryptographic algorithm specifies the oracle.

6. 2. The method of claim 1, wherein the public key cryptography algorithm comprises a Rivest-Shamir-Adleman (RSA) algorithm with a least significant bit oracle, the method further comprising: decrypting an entire RSA-encrypted message using the trained and validated program synthesizer and the oracle.

7. 2. The method of claim 1, wherein the public key cryptography algorithm comprises a Diffie-Hellman (DH) algorithm, the method further comprising: determining least significant bits of a private key from a DH public key using the trained and validated program synthesizer.

8. A computer readable medium having stored thereon instructions which, when executed by one or more processors, cause the processors to decrypt or partially decrypt an encoded message or a private key encoded by a public key cryptography algorithm, the decryption comprising: encoding said public key encryption algorithm using a program synthesizer language; constructing a grammar for said program synthesizer; training said program synthesizer with training data having input-output pairs; Executing the trained program synthesizer to generate a mathematical formula; Verify the validity of the generated formula; performing decryption using said trained and validated program synthesizer; 23. A computer readable medium comprising:

9. The decryption further comprises: if the correctness of the generated formula is not confirmed, iteratively execute the trained program synthesizer to generate the formula; The computer readable medium of claim 8 , further comprising:

10. 9. The computer-readable medium of claim 8, wherein the program synthesizer comprises a Satisfiability Modulo Theory (SMT) solver.

11. 10. The computer-readable medium of claim 8, wherein encoding the public key cryptography algorithm comprises using syntax-guided program synthesis.

12. 9. The computer-readable medium of claim 8, wherein the public key cryptographic algorithm has an oracle, and encoding the public key cryptographic algorithm specifies the oracle.

13. 9. The computer-readable medium of claim 8, wherein the public key cryptography algorithm comprises a Rivest-Shamir-Adleman (RSA) algorithm with a least significant bit oracle, and the decryption further comprises decrypting an entire RSA-encrypted message using the trained and validated program synthesizer and the oracle.

14. 9. The computer-readable medium of claim 8, wherein the public key cryptography algorithm comprises a Diffie-Hellman (DH) algorithm, and the decryption further comprises determining least significant bits of a private key from a DH public key using the trained and validated program synthesizer.

15. 1. A decryption system having one or more processors, comprising: The one or more processors: receiving an encoded message or a private key encoded by a public key cryptography algorithm; encoding said public key encryption algorithm using a program synthesizer language; constructing a grammar for said program synthesizer; training said program synthesizer with training data having input-output pairs; Executing the trained program synthesizer to generate a mathematical formula; Verify the validity of the generated formula; performing decryption using said trained and validated program synthesizer; It has been adapted to system.

16. if the correctness of the generated formula is not confirmed, iteratively execute the trained program synthesizer to generate the formula; The system of claim 15 further comprising:

17. 16. The system of claim 15, wherein the program synthesizer comprises a Satisfiability Modulo Theory (SMT) solver.

18. 16. The system of claim 15, wherein encoding the public key cryptography algorithm comprises using syntax-guided program synthesis.

19. 16. The system of claim 15, wherein the public key cryptography algorithm comprises a Rivest-Shamir-Adleman (RSA) algorithm with a least significant bit oracle, and further comprising decrypting an entire RSA encrypted message using the trained and validated program synthesizer and the oracle.

20. 16. The system of claim 15, wherein the public key cryptography algorithm comprises a Diffie-Hellman (DH) algorithm, and further comprising determining least significant bits of a private key from a DH public key using the trained and validated program synthesizer.

Citation Information

Patent Citations

  • Information processor, encryption algorithm evaluation method, and program

    JP2010039274A