The present invention relates broadly to cryptographic methods and devices. In some embodiments, it pertains to symmetric cryptographic methods and machines. Cryptographic devices and methods are generally used to encrypt and decrypt information transmitted through communication and transmission systems. For example, the cryptographic methods may be used to encrypt a phone call; in some embodiments, the phone call may be transmitted using voice over IP (internet protocol) using a mobile phone. These methods also may be used to encrypt passive data stored on a computer or another physical device such as a tape drive. Typically, the information is encrypted by a sending agent, sometimes called Bob, using his unique key(s), and the encrypted information, called ciphertext, is transmitted to a receiving agent, sometimes called Alice. The receiving agent Alice uses her unique key(s) to apply a decryption device or method to the ciphertext. The output of this decryption device or method is the same information that the sending agent gathered before encrypting and sending it. Eve is the name of the agent who is attempting to decrypt the ciphertext. One of Alice and Bob's primary objectives is to assure that Eve cannot decrypt the ciphertext transmitted between them.
The subject matter discussed in this background section should not be assumed to be prior art merely as a result of its mention in the background section. Similarly, a problem mentioned in the background section or associated with the subject matter of the background section should not be assumed to have been previously recognized in the prior art. The subject matter in the “Summary and some Advantages of Invention” section represents different approaches, which in and of themselves may also be inventions, and various problems, which may have been first recognized by the inventor.
Reference [1] provides a practical and theoretical description of cryptography and cryptographic methods. References [2, 3, 4] also provide a description of current cryptographic methods that are publicly available. Public-key cryptography is typically used for key management and a myriad of protocols. Symmetric private-key cryptography is useful for encrypting data and securing private voice and written communications.
In symmetric cryptography, Alice encrypts her plaintext and Bob decrypts the ciphertext received from Alice using the same private key. The key is called private to indicate that Alice and Bob do not want Eve to capture the key. For example, a block cipher algorithm :{0, 1}m×{0, 1}k→ {0, 1}m uses an k-bit key K as a parameter and encrypts an m-bit block of plaintext denoted as (, K). The block cipher's key space {0, 1}k has size 2k. The block cipher's message space {0, 1}m has size 2m. The decryption algorithm : {0, 1}m×{0, 1}k→{0, 1}m has the inverse property that ((x, K), K)=x for every plaintext x∈{0, 1}m and every key K∈{0, 1}k.
Standard AES is a block cipher with block size 16 bytes (128 bits) that is a symmetric cryptographic algorithm [5, 6]. Standard AES is commonly used in industry, endorsed by NIST, and used by the United States Department of Defense. Standard AES is the most widely used block cipher today. For example, standard AES-128—that uses 128-bit static keys—is currently used by the FileVault application on Apple computers. FileVault encrypts the hard drive inside the Apple Computer.
In recent years, various attacks on the standard AES cipher (prior art) have demonstrated weaknesses in this cipher. In some cases, practical oracle padded attacks [7] have been able to capture the plaintext from ciphertext that has been encrypted by standard AES. At least part of the weakness is slow diffusion in the key scheduling [10, 11, 12]. Standard AES's weaknesses are further exacerbated by a static substitution box, and due to its static key standard AES maps two identical blocks of plaintext to two identical blocks of ciphertext. In particular, a feasible attack on standard AES-256 has been demonstrated with only one fewer round—13 rounds instead of 14—in the key schedule [13]. Overall, in recent years, additional publicly available (non-classified) attacks on the standard AES cipher have been discovered [14, 15, 16, 17], which suggest that standard AES is not as strong a cipher as previously believed by the cryptographic community.
Furthermore, the prior art [1, 2, 6, 18] does not disclose the notion of a key generator sequence nor of deriving a new key based on the updating of a key generator. The use of key generators in this invention eliminates the dependence of the cryptographic security on a single, static cryptography key. Typically, the cryptographic methods in the prior art use a static key K throughout the entire execution of the encryption algorithm. The use of a static key in the prior art is further implied by some attacks—cited in the previous paragraph—that attempt to capture or reconstruct the static key. In the prior art, if the static key is captured, the cryptographic security is fatally compromised. In contrast, in the embodiments described in this invention, if one of the dynamic keys is captured by Eve, then Eve still cannot find the prior dynamic keys used by Alice and Bob, nor can Eve find or capture the future dynamic keys used by Alice and Bob.
As an example of the static key assumption in the prior art, some oracle padded attacks [7] rely upon the fact that Eve has some information about the last block. This helps Eve work backwards to find the static key. In this invention, the use of one-way functions to create dynamic keys helps hinder Eve from obtaining even the key used for that one block of plaintext because this would require a pre-image attack on a one-way function with no direct information about the digest and an intractable searching over a huge sequence of unpredictable keys. In the prior art, Eve only has to search for one static key used to encrypt each block of plaintext.
The invention(s) described here is a process for encrypting and decrypting information, used in communication, transmission and data storage systems. The first stage or method is called the H process. One of the purposes of the H process is to use a one-way function to partially encrypt the plaintext and help uniformly distribute the statistics of the ciphertext delivered to stage 2. The H process uses a key generator updating method that utilizes one-way functions.
The term “key generator” is used in this specification to mean a value or collection of values to which one or more operations are performed to generate another value or set of values from which a key is derived or may be derived. A “key generator sequence” is a sequence of key generators. In an embodiment, a “key generator sequence” may be mathematically represented as a function Γ: → {0, 1}n where is the natural numbers and {0, 1}n is the set of all bit-strings of length n. For example, the bit-string 10101 is an element of {0, 1}5. For example, the set of all bit-strings of length 3 is {0, 1}3={000, 001, 010, 011, 100, 101, 110, 111}. Sometimes in the specification the kth key generator of the key generator sequence Γ will be denoted as Γ(k).
In some embodiments, an actual derivation of the key is optional. For example, part of the kth key generator could be used as the kth key. In this specification, whenever a key and key generator are mentioned, in one embodiment there is a separate key and key generator, where the key is derived from the key generator; in another embodiment, there is no separate key that is actually derived, and part of the current key generator may be used as a key. In this specification, the word “key” and the term “cryptographic key” are used interchangeably to mean the same thing. A key is a collection of one or more values, that specifies how a particular encryption function will encrypt a message. For example, a key may be a sequence of 1's are 0's that are bitwise exclusive-or'ed with the bits that comprise a message to form the encrypted message. Other examples of using keys as a part of encryption methods are given elsewhere in this specification.
In some embodiments, the H process may be implemented with a block cipher where the key generator Γ is updated after one or more blocks of plaintext have been encrypted by the block cipher. In some embodiments, this block cipher may be enhanced AES-256 or enhanced AES-128 or enhanced DES. In this specification, when the term “enhanced” AES or “enhanced” DES is used, this means that enhanced AES and enhanced DES no longer use a static key during the encyption and decryption. Further, in other contexts, enhanced AES or enhanced DES means that a dynamic key is used that is derived from a key generator. These enhancements—using key generator sequences and dynamic keys—of the open standards AES and DES are further described in sections 6.9, 6.10 and 6.11. In this specification, “standard” AES [5, 6] or “standard” DES [8, 9] will be used to describe the prior art of AES and DES, respectively, where a static key is used for every encrypted block or decrypted block.
In an alternative embodiment, a new stream cipher method is described in section 6.17, titled PROCESS H AS A STATE GENERATOR; this method also uses key generator updating and one-way functions to implement the H process as a stream cipher.
The second stage or method is called the P process. The P process uses a dynamically perturbed permutation to diffuse the partially encrypted plaintext information, created by the H process, across the whole NADO block of information, which may be larger than the block size of the block cipher.
The third stage or method is called the S process. The S process uses a dynamically updated (perturbed) permutation that acts as a nonlinear substitution box [18]. This substitution box is perturbed after one or more bytes have been encrypted so it is a dynamic substitution box, not static.
Any of the embodiments of the P process may be used with any of the embodiments of the H processes. Any of the embodiments of the P process may be used with any of the embodiments of the S processes. Any of the embodiments of the H process may be used with any of the embodiments of the S processes.
The invention introduces the notion of a key generator sequence, key generator updating and dynamic keys. This enables each key used by each process to be unpredictably updated after the processes have together encrypted one or more blocks of plaintext. Furthermore, throughout this specification the key generator may be significantly larger than the key used by each of the three processes. The key generator updating creates favorable, cryptographic properties and strengthens cryptographic ciphers that already exist and have been tested.
Each process depends on a distinct dynamically updated key generator so that the key generator of any given process is updated (perturbed) independently of the other two processes. In other words, these three different dynamically perturbed (updated) key generators are independent of each other; from an alternative perspective, these three processes are three distinct dynamical systems [19] that work together to execute a symmetric cryptography. If m denotes a block of the plaintext, then the complete encryption of one block of plaintext m can be expressed as c=S(P(H(m, Γ(nH)), KP(nP)), KS(nS)), where KS(nS) is the nS update of the original key generator KS(0) for the S process; where KP(nP) is the nP update of the original key generator KP(0) for the P process; and Γ(nH) is the nH update of the original key generator Γ(0) for the H process. nH, nP and nS are natural numbers. For these embodiments, the decryption of ciphertext c, can be expressed as H−1(P−1(S−1(c, KS(nS)), KP(nP)), Γ(nH))=m.
In an embodiment, the jth key generator Γ(j) is n bits in length. Γ(j) is updated to Γ(j+1) by applying a one-way hash function to q bits of Γ(j), where q<n and the message digest is concatenated to the remaining n-q bits of Γ(j). Overall, n-q of the bits of Γ(j) remain unchanged and the other q bits change, due to the one-way hash function. In an embodiment, a dynamic key is derived from Γ(j) and used by a block cipher to encrypt plaintext. In an embodiment, this encryption may act as a standalone symmetric cryptography. In an alternative embodiment, this dynamic key encryption acts as the H process and is integrated with a P process and an S process.
In another embodiment, each key generator KH, KP and KS can be represented as a circular array. This enables the key generator updating method to exclusive-or a rotation of this circular array with a one-way hash of part of the circular array. In other embodiments, the keys may be updated in another manner, such as by applying a particular function to the key generator. This method of key generator updating exploits the avalanche effect of the one-way hash functions and causes each initial key generator KH(0), KP(0), and KS(0) to iterate over a huge orbit.
In more detail, each key generator can be represented as a finite sequence of symbols: for example, each key generator could be represented by J bits. In this context, the birthday effect can be used as one statistical test of the unpredictability of the key generator sequence if the probability of a repetition (i.e., collision) of any given key generator in the sequence is of the same order as predicted by the birthday effect.
Suppose m=2J is the total number of possible key generators. Then the n that satisfies equation
indicates the size of a sequence of key generators that has about a 50 percent chance of having a collision, assuming a uniform probability distribution. For a finite sequence of key generators in which the beginning of the key generator sequence is shorter than n have less than a 50 percent chance of having a collision.
is a reasonable approximation for
In this approximation, solving
gives approximately the sample size at which there is a 50 percent chance of a collision. Solving for n, the number n is approximately √{square root over (2m ln 2)}, where ln x denotes the natural logarithm of the real number x. In this specification, at least some of the usefulness due to the avalanche effect may be measured as the largest number of key generators in a sequence that is not likely to have a repetition. In an embodiment, a good avalanche effect occurs when on-average sequences of key generators having less than or equal to 0.9√{square root over (2m ln 2)} are not likely to have a collision. In another embodiment if the number of key generators in the sequence is given by √{square root over (2m ln 2)}, then the sequence has a 55 percent or less chance of having a collision.
Furthermore, in general, the period of the orbit of KH is substantially larger than the number of possible keys and is usually on the order of
where |KH| is the length of key generator KH. For example, if |KH|=1024 bits, and key generator KH(n) is used to derive a new 256-bit enhanced AES key for the nth block of 16 bytes of plaintext, then the expected length of the period of this orbit is substantially greater than 2256 even though for process H, the derivation of a 256-bit key from each key generator is an orbit on {0,1}256.
In particular, a 50 percent chance of a collision in the key generator sequence KH (0), KH (1) . . . is expected for a sequence of length n=√{square root over (21025 ln 2)}=2512√{square root over (2 ln 2)}>10154. When this key generator updating method is applied—using one or more one-way function with a good avalanche effect—where enhanced AES-256 is the block cipher used in the H process, this substantially increases the computational complexity that must be overcome in order to break process H, compared to the standard AES cipher.
The motivation for the new notion of a key generator and its design can also be understood from a differential cryptanalysis point of view [21]. In the enhanced AES-256 cipher, each distinct 256-bit key K creates a different encryption boolean function E(K, ⋅) where E: {0, 1}256×{0, 1}128→ {0, 1}128. In other words, the key K acts as a parameter where each E(K, ⋅) is some function ƒ: {0, 1}128→ {0, 1}128 with ƒ=(ƒ1, . . . , ƒ128) and each ƒk: {0,1}128→ {0,1}. As discussed in [22], each ƒk has a degree ≤128. From this perspective, the sequence of dynamic keys creates a high, dimensional orbit over the function space {ƒ|ƒ: {0, 1}128→ {0, 1}128}, which greatly increases the effective degree. Overall, dynamic keys derived from key generator updating and based on one-way functions with a good avalanche effect, produce a powerful cryptographic method that can enhance the cryptographic strength of primitives—such as block cipher AES-256—that have already been analyzed for many years.
Further, in some embodiments, the completeness property and avalanche effect of good one-way function(s) enables consecutive key generators KH(n) and KH(n+1) to have a Hamming distance that is about ½|KH(n)|, which means KH(n)⊕KH(n+1) is about half ones and half zeroes and their order is unpredictable. This property hinders key related attacks. These favorable cryptographic, properties also hold for the orbit of the S key generator KS(0), KS(1), KS(2), . . . , KS(n) . . . and the orbit of the P key generator KP(0), KP(1), KP(2), . . . , KP(n) . . . .
In some embodiments, the S process may be performed after the H process. In these embodiments, the encryption of one block of plaintext m is expressed as c=P(S(H(m, KH(nH)), KS(nS)), KP(nP)) Similarly, KS(nS) is the nS update of the original key generator KS(0) for the S process; where KP(nP) is the nP update of the original key generator KP(0) key for the P process; and KH(nH) is the nH update of the original key generator KH(0) for the H process. For these embodiments, the decryption of ciphertext c can be expressed as P−1(H−1(S−1(c, KS(nS)), KH(nH)), KP(nP))=m.
Typically, one-way hash functions are used to authenticate information. The information that is being authenticated is sometimes called a message in the cryptographic literature that discusses one-way hash functions. In the prior art, one-way hash functions have not been used directly in encryption and decryption because one-way hash functions are not 1 to 1. (See section 6.12, titled PERMUTATIONS, for a definition of 1 to 1.) In the prior art, typically a one-way function is applied directly to the plaintext during encryption or a one-way function is applied directly to the ciphertext during decryption. For this method in which the prior art applies the one-way function directly to the plaintext or ciphertext, if the one-way function used by the prior art were not 1 to 1, then two or more different plaintexts could be mapped by this one-way function to the same ciphertext. In the publication FIPS 180-4, Secure Hash Standard, written by the National Institute of Standards (NIST), the abstract [23] states:
This standard specifies hash algorithms that can be used to generate digests of messages. The digests are used to detect whether messages have been changed since the digests were generated.
This specification describes a novel use of one-way functions to unpredictably update key generators and also perturb the H, P and S processes used in the cryptography. Each of the three processes may use one-way functions. The avalanche property of the one-way functions helps strengthen NADO cryptography against differential cryptanalysis attacks and other kinds of attacks.
NADO may be implemented efficiently in hardware or software. In some embodiments, process H is a block cipher. In other embodiments, as described in section 6.17, process H is a state generator that acts as a stream cipher, by generating an unpredictable sequence of states with the help of one-way hash functions and key generator updating that also uses one-way functions. Process P generates an unpredictable, sequence of permutations that diffuses the encrypted information, created by the H process, across a block that is usually greater than 16 bytes; Process S generates a sequence of substitution boxes, each created by a permutation that is dynamically updated after one or more bytes of encryption.
Another enhancement is the difficulty of breaking this encryption method as function of its execution speed. The executable code that implements a NADO embodiment requires a small amount of computer memory, less than 20K of RAM for even relatively large key generators KH, KP, and KS and less than 5K in other embodiments. An embodiment can execute on a Reduced Instruction Set Computer (RISC) 150 MHZ chip [24]; this embodiment protects the privacy of a real-time mobile phone conversation. For this embodiment, the key generator KH for the H process has size at least 512 bits; the key generator KP for the P process has size at least 256 bits; and the key generator KS for the S process has size at least 256 bits. Further, in this real-time mobile phone embodiment, each of these key generators are independent of the other two and are updated using the one-way hash function SHA-512 [25] or another one-way hash function such as Keccak, Blake, Skein or GrØstl. Some NADO embodiments are fast enough to enable applications such as real-time encryption of wireless transmissions, real-time embedded systems, secure communications between satellites and the secure routing and transmission of Internet traffic.
In the following figures, although they may depict various examples of the invention, the invention is not limited to the examples depicted in the figures.
Although various embodiments of the invention may have been motivated by various deficiencies with the prior art, which may be discussed or alluded to in one or more places in the specification, the embodiments of the invention do not necessarily address any of these deficiencies. In other words, different embodiments of the invention may address different deficiencies that may be discussed in the specification. Some embodiments may only partially address some deficiencies or just one deficiency that may be discussed in the specification, and some embodiments may not address any of these deficiencies.
Section 6.1, describes information systems that utilize the cryptographic process. Section 6.2 describes the avalanche effect and one-way functions. Section 6.3 describes methods for encrypting with a block cipher that uses dynamic keys, derived from key generators and key generating updating with one-way hash functions. Section 6.6 explains how the use of dynamic keys stops a generic block cipher attack. Sections 6.4, 6.5, 6.8, 6.9, 6.11, 6.12, 6.13, 6.14, 6.15, 6.16, and 6.17 describe novel algorithms, concepts, hardware, infrastructure, machines, mathematics, methods, techniques and systems that contribute to some embodiments of the cryptographic process. Section 6.7 describes a cryptographic process, integrating the H, P and S processes. Section 6.18 describes some key generator distribution methods. Section 6.19 describes a key generator exchange, based on abelian groups, that securely creates and distributes key generators between Alice and Bob. Section 6.20 describes an elliptic curve key generator exchange that uses non-determinism to create the private key generators.
6.1 Information System
Information system 100 may be used for transmitting encrypted plaintext. Plaintext 104 refers to information that has not been encrypted yet that is intended to be delivered to another location, software unit, machine, person, or other entity. Although plaintext has the word “text” in it, the meaning of plaintext in this specification is broader and refers to any kind of information that has not been encrypted. For example, plaintext could be voice data that has not yet been encrypted. In an embodiment, plaintext may be unencrypted information being transmitted wirelessly between satellites. Plaintext may be represented in analog form in some embodiments and may be represented in digital form. In an embodiment, the sound waves transmitted from a speaker's mouth into a mobile phone microphone are plaintext. The representation of this plaintext information before reaching the microphone is in analog form. Subsequently, the plaintext information may be digitally sampled so it is represented digitally after being received by the mobile phone microphone. In general, plaintext herein refers to any kind of information that has not been encrypted.
In this specification, the term location may refer to geographic locations and/or storage locations. A particular storage location may be a collection of contiguous and/or noncontiguous locations on one or more machine readable media. Two different storage locations may refer to two different sets of locations on one or more machine-readable media in which the locations of one set may be intermingled with the locations of the other set. In this specification, the term “machine-readable medium” is used to refer to any medium capable of carrying information that is readable by a machine. One example of a machine-readable medium is a computer-readable medium. Another example of a machine-readable medium is paper having holes that are detected that trigger different mechanical, electrical, and/or logic responses. The term machine-readable medium also includes media that carry information while the information is in transit from one location to another, such as copper wire and/or optical fiber and/or the atmosphere and/or outer space. It may be desirable to keep the contents of plaintext 104 secret. Consequently, it may be desirable to encrypt plaintext 104, so that the transmitted information is expected to be unintelligible to an unintended recipient should the unintended recipient attempt to read and/or decipher the encrypted plaintext transmitted. Plaintext 104 may be a collection of multiple, unencrypted information blocks, an entire plaintext, a segment of plaintext (information), or any other portion of a plaintext.
Encryption process 106 may be a series of steps that are performed on plaintext 104. In this specification, the term “process” refers to a series of one or more operations. In one embodiment, the term “process” refers to one or more instructions for encrypting machine 102 to execute the series of operations that may be stored on a machine-readable medium. Alternatively, the process may be carried out by and therefore refer to hardware (e.g., logic circuits) or may be a combination of instructions stored on a machine-readable medium and hardware that cause the operations to be executed by sending machine 102 or receiving machine 112. Plaintext 104 may be an input for encryption process 106. The steps that are included in encryption process 106 may include one or more mathematical operations and/or one or more other operations. In an embodiment, “process” may also include operations or effects that are best described as non-deterministic. In an embodiment, “process” may include some operations that can be executed by a digital computer program and some physical effects that are non-deterministic.
Herein the term “process” refers to and expresses a broader notion than “algorithm”. The formal notion of “algorithm” was presented in Turing's paper [27] and refers to a finite machine that executes a finite number of instructions with finite memory. “Algorithm” is a deterministic process in the following sense: if the finite machine is completely known and the input to the machine is known, then the future behavior of the machine can be determined. However, there is quantum random number generator (QRNG) hardware [28, 29] and other embodiments that measure quantum effects from photons (or other physically non-deterministic proceses), whose physical process is non-deterministic. The recognition of non-determinism observed by quantum random number generators and other quantum embodiments is based on experimental evidence and years of statistical testing. Furthermore, the quantum theory—derived from the Kochen-Specker theorem and its extensions [30, 31, 32]—implies that the outcome of a quantum measurement cannot be known in advance and cannot be generated by a Turing machine (digital computer program). As a consequence, a physically non-deterministic process cannot be generated by an algorithm: namely, a sequence of operations executed by a digital computer program.
Some examples of physically non-deterministic processes are as follows. In some embodiments that utilize non-determinism, a semitransparent mirror may be used where photons that hit the mirror may take two or more paths in space. In one embodiment, if the photon is reflected then it takes on one bit value b∈{0, 1}; if the photon is transmitted, then takes on the other bit value 1−b. In another embodiment, the spin of an electron may be sampled to generate the next non-deterministic bit. In still another embodiment, a protein, composed of amino acids, spanning a cell membrane or artificial membrane, that has two or more conformations can be used to detect non-determinism: the protein conformation sampled may be used to generate a non-deterministic value in {0, . . . n−1} where the protein has n distinct conformations. In an alternative embodiment, one or more rhodopsin proteins could be used to detect the arrival times of photons and the differences of arrival times could generate non-deterministic bits. In some embodiments, a Geiger counter may be used to sample non-determinism. In some embodiments, a non-deterministic value is based on the roundoff error in the least significant bit of a computation due to the limitations of the hardware. Lastly, any one of the one-way functions of this specification may be based on a random event such as a quantum event (non-deterministic) generated by the quantum random number generator of
In
Sending machine 102 may be an information machine that handles information at or is associated with a first location, software unit, machine, person, sender, or other entity. Sending machine 102 may be a computer, a phone, a mobile phone, a telegraph, a satellite, or another type of electronic device, a mechanical device, or other kind of machine that sends information. Sending machine 102 may include one or more processors and/or may include specialized circuitry for handling information. Sending machine 102 may receive plaintext 104 from another source (e.g., a transducer such as a microphone), may produce all or part of plaintext 104, may implement encryption process 106, and/or may transmit the output to another entity. In another embodiment, sending machine 102 receives plaintext 104 from another source, while encryption process 106 and the delivery of the output of encryption process 106 are implemented manually. In another embodiment, sending machine 102 implements encryption process 106, having plaintext 104 entered, via a keyboard (for example) or via a mobile phone microphone, into sending machine 102. In another embodiment, sending machine 102 receives output from encryption process 106 and sends the output to another entity. In an embodiment, sending machine 102 may generate new key generators 107 for other information machines.
Sending machine 102 may implement any of the encryption methods described in this specification. Encryption process 106 may include any of the encryption methods described in this specification (e.g., encryption process 106 may implement any of the embodiments of the H, P, and S processes). Encrypted plaintext 109 includes at least some plaintext 104 that is encrypted by encryption process 106.
Transmission path 110 is the path taken by encrypted plaintext 109 to reach the destination to which encrypted plaintext 109 was sent. Transmission path 110 may include one or more networks. For example, transmission path 110 may be the Internet; for example, transmission path 110 may be wireless using voice over Internet protocol. Transmission path 110 may include any combination of any of a direct connection, hand delivery, vocal delivery, one or more Local Area Networks (LANs), one or more Wide Area Networks (WANs), one or more phone networks, including paths under the ground via fiber optics cables and/or one or more wireless networks, and/or wireless inside and/or outside the earth's atmosphere.
Receiving machine 112 may be an information machine that handles information at the destination of an encrypted plaintext 109. Receiving machine 112 may be a computer, a phone, a telegraph, a router, a satellite, or another type of electronic device, a mechanical device, or other kind of machine that receives information. Receiving machine 112 may include one or more processors and/or specialized circuitry configured for handling information, such as encrypted plaintext 109. Receiving machine 112 may receive encrypted plaintext 109 from another source and/or reconstitute (e.g., decrypt) all or part of encrypted plaintext 109. Receiving machine 112 may implement any of the encryption methods described in this specification and is capable of decrypting any message encrypted by sending machine 102 and encryption process 106.
In one embodiment, receiving machine 112 only receives encrypted plaintext 109 from transmission path 110, while encryption process 106 is implemented manually and/or by another information machine. In another embodiment, receiving machine 112 implements decryption process 116 that reproduces all or part of plaintext 104, referred to as decrypted plaintext 114. In another embodiment, receiving machine 112 receives encrypted plaintext 109 from transmission path 110, and reconstitutes all or part of decrypted plaintext 114 using decryption process 116.
Decryption process 116 may store any of the processes of decrypting information described in this specification. Decryption process 116 may include any of the decryption methods described in this specification (e.g., decryption process 116 may implement any of the methods for decrypting any of the embodiments of the H, P and S processes).
Receiving machine 112 may be identical to sending machine 102. In the embodiment in which the receiving machine and the sending machine are the same, both receiving and sending machine each include plaintext 104 (unencrypted information), encryption process 106, key generators 107 (which may include a one-way hash), encrypted plaintext (encrypted information) 109, decryption processes 116, decrypted plaintext 114 and key generators 117 (which may include a one-way hash), and are both capable of implementing any of the encryption processes, decryption processes, and methods of exchanging key generators described in this specification.
For example, receiving machine 112 may receive plaintext 104 from another source, produce all or part of plaintext 104, and/or implement encryption process 106. Similar to sending machine 102, receiving machine 112 may create key generators 117. Receiving machine 112 may transmit the output of decryption process 116, via transmission path 110 to another entity and/or receive encrypted plaintext 109 (via transmission path 110) from another entity. Receiving machine 112 may present encrypted plaintext 109 for use as input to decryption process 116.
6.2 The Avalanche Effect and One-Way Functions
One-way function 107 in
More details are provided on computationally intractable. In an embodiment, there is an amount of time T that encrypted information must stay secret. If encrypted information has no economic value or strategic value after time T, then computationally intractable means that the number of computational steps required by all the world's computing power will take more time to compute than time T. Let C(t) denote all the world's computing power at the time t in years.
Consider an online bank transaction that encrypts the transaction details of that transaction. Then in most embodiments, the number of computational steps that can be computed by all the world's computers for the next 30 years is in many embodiments likely to be computationally intractable as that particular bank account is likely to no longer exist in 30 years or have a very different authentication interface.
To make the numbers more concrete, the 2013 Chinese supercomputer that broke the world's computational speed record computes about 33,000 trillion calculations per second [33]. If T=1 one year and we can assume that there are at most 1 billion of these supercomputers. (This can be inferred from economic considerations, based on a far too low 1 million dollar price for each supercomputer. Then these 1 billion supercomputers would cost 1,000 trillion dollars.). Thus, C(2014)×1 year is less than 109×33×1015×3600×24×365=1.04×1033 computational steps. To get some perspective in terms of cryptography, the Bernstein 25519 elliptic curve cryptography has conjectured complexity of 2128 computational steps. Also, 2128>1038 so in terms of this measure of computational intractability, the Bernstein 25519 elliptic curve cryptography has computational intractability of least 1038.
As just discussed, in some embodiments and applications, computationally intractable may be measured in terms of how much the encrypted information is worth in economic value and what is the current cost of the computing power needed to decrypt that encrypted information. In other embodiments, economic computational intractability may be useless. For example, suppose a family wishes to keep their child's whereabouts unknown to violent kidnappers. Suppose T=100 years because it is about twice their expected lifetimes. Then 100 years×C(2064) is a better measure of computationally intractible for this application. In other words, for critical applications that are beyond an economic value, one should strive for a good estimate of the world's computing power.
One-way functions that exhibit completeness and a good avalanche effect or the strict avalanche criterion [34] are preferable embodiments: these properties are favorable for the key generator updating.
The definition of completeness and a good avalanche effect are quoted directly from [34]:
A hash function, also denoted as Φ, is a function that accepts as its input argument an arbitrarily long string of bits (or bytes) and produces a fixed-size output of information. The information in the output is typically called a message digest or digital fingerprint. In other words, a hash function maps a variable length m of input information to a fixed-sized output, Φ(m), which is the message digest or information digest. Typical output sizes range from 160 to 512 bits, but can also be larger. An ideal hash function is a function Φ, whose output is uniformly distributed in the following way: Suppose the output size of Φ is n bits. If the message m is chosen randomly, then for each of the 2n possible outputs z, the probability that Φ(m)=z is 2−n. In an embodiment, the hash functions that are used are one-way.
A good one-way hash function is also collision resistant. A collision occurs when two distinct information elements are mapped by the one-way hash function Φ to the same digest. Collision resistant means it is computationally intractable for an adversary to find collisions: more precisely, it is computationally intractable to find two distinct information elements m1, m2 where m1≠m2 and such that Φ(m1)=Φ(m2).
A number of one-way hash functions may be used. SHA-512 is a one-way hash function, designed by the NSA and standardized by NIST [25]. The message digest size of SHA-512 is 512 bits. Other alternative hash functions are of the type that conform with the standard SHA-384, which produces a message digest size of 384 bits and SHA-512. SHA-1 has a message digest size of 160 bits. An embodiment of a one-way hash function is Keccak [35]. An embodiment of a one-way hash function is BLAKE [36]. An embodiment of a one-way hash function is GrØstl [37]. An embodiment of a one-way hash function is JH [38]. Another embodiment of a one-way hash function is Skein [39].
In other embodiments, other types of one-way functions may be used instead of a one-way hash function. For example, an elliptic curve over a finite field may be used as a one-way function. For these alternative one-way functions, completeness and a good avalanche effect are favorable properties for these functions to exhibit. The strict avalanche criterion is also a favorable property for these alternative one-way functions to have.
In an embodiment, one-way function 126 in
6.3 Encrypting with Dynamic Keys
The creation and use of dynamic keys depends upon Alice and Bob agreeing upon the next key generator element Γ(i+1) from the previous key generator Γ(i) and this is how the key generator sequence Γ(0), Γ(1), . . . , Γ(i), Γ(i+1), . . . is created. An uncountable number of key generator sequences are Turing incomputable; herein our embodiments describe Turing computable key generator sequences because computability helps simplify the coordination of key generator updating between Alice and Bob.
Our one-way preimage functions have a novel use over the typical application of message authentication, performed by one-way hash functions in the prior art. In cryptographic method 1, Φ is a one-way preimage function with digest size q. The key generator sequence Γ: →{0, 1}n satisfies q<n. The symbol Γi,j is the jth bit of the ith key generator Γ(i). The first step uses a signed, key generator exchange [40, 41, 42, 43] where in some embodiments Alice and Bob's private secrets are created from a non-deterministic generator 172, as shown in
Method 1 is designed to generate a high dimensional orbit on the first q bits Γi,0 Γi,1 . . . Γi,q-1, induced by the avalanche properties [34] of function Φ; to keep the remaining n-q bits invariant for all i; and to assure that no information from the last n-q bits contributes to the orbit of the first q bits.
In a typical use case, the adversary Eve never has access to any bits of Alice's key generator Γ(i). This is analogous to Eve not having access to any bits of Alice's static key, used in the prior art's implementations of symmetric cryptography.
In another embodiment, a one-way function Φ may be applied to the last q bits and the remaining n-q bits are kept invariant for all i. This embodiment is shown in
In some embodiments, different one-way functions may be applied at distinct steps of the key generator updating. For example, SHA-512 may be used to compute the first key generator Γ(1) from key generator Γ(0); SHA-384 may be used to compute the second key generator Γ(2) from key generator Γ(1); Keccak may be used to compute the third key generator Γ(3) from key generator Γ(2); and so on. In these embodiments, there are key generator update instructions 162 (
Method 2 derives a dynamic key Ki for block cipher from the ith key generator Γ(i) of the key generator sequence as shown in
In some embodiments, Ψ is a different one-way function than Φ. For example, in some embodiments, Ψ may be implemented with Keccak and Φ may be implemented with SHA-512. In some embodiments, Ψ may be used to derive the first dynamic key and a different one-way function Ψ′ may be used to derive the second dynamic key, and so on.
The expression (, K) represents block cipher encrypting plaintext block with key K, and (, K) represents block cipher decrypting ciphertext with key K. The key size |K| of the block cipher is k bits and satisfies k≤r. Define the projection map πk: {0, 1}r→{0, 1}k where πk(x1 x2 . . . xr)=(x1 x2 . . . xk).
In other parts of the specification, process H will be referred to—in some embodiments—as being implemented with a block cipher that uses dynamic keys, derived from key generator updating. In this regard, cryptographic methods 1, 2, 3, 4, 5 can implement process H.
An implementation of Standard Serpent is a 16-byte block cipher with a 256-bit key [44]. An example of key generating and dynamic key derivation for enhanced Serpent is described below. “Photons are keys” is 16-byte block of plaintext that is concatenated together 4 times to create a 64-byte of plaintext.
In the description that follows, each byte (8 bits) is expressed as a number between 0 and 255 inclusive. The 16-byte block of plaintext “Photons are keys” is
80 104 111 116 111 110 115 32 97 114 101 32 107 101 121 115
Key generator Γ(1) is 768 bits (96 bytes) and shown below.
112 132 168 213 84 252 132 50 143 235 140 71 123 248 243 160 240 248 237 200 113 43 65 95 208 97 175 125 184 234 154 227 130 187 104 4 131 204 239 92 44 187 34 166 71 146 186 241 108 149 70 166 66 35 108 195 13 235 58 218 85 229 180 66 109 55 178 123 110 135 57 238 177 21 29 225 222 84 215 155 21 179 210 201 122 202 210 208 51 104 213 58 247 238 139 116
The first 256-bit key K1 derived from key generator Γ(1) is
32 23 248 49 234 86 223 193 83 37 87 247 191 22 112 130 34 177 54 67 56 186 154 188 149 130 23 146 220 118 192 55
After encrypting the first 16-byte plaintext block “Photons are keys” with enhanced Serpent and dynamic key K1, the ciphertext is 33 175 244 28 210 147 63 101 221 74 197 89 195 30 31 228.
Key generator Γ(2) is 768 bits (96 bytes) and shown below.
219 14 199 128 227 62 241 230 111 13 179 127 82 52 211 235 216 220 52 233 191 255 121 103 165 109 90 168 10 36 23 172 246 97 184 183 134 6 195 84 171 123 50 184 60 112 217 7 249 224 23 186 238 174 199 235 214 22 152 211 212 186 202 240 109 55 178 123 110 135 57 238 177 21 29 225 222 84 215 155 21 179 210 201 122 202 210 208 51 104 213 58 247 238 139 116
The second 256-bit key K2 derived from key generator Γ(2) is
86 35 129 230 137 79 46 48 202 130 242 209 127 25 84 159 185 250 154 249 12 245 176 61 12 242 200 226 63 90 62 44
After encrypting the second 16-byte block of plaintext “Photons are keys” with enhanced Serpent and key K2, the ciphertext is 79 101 31 159 181 228 83 121 166 170 215 94 99 67 100 139.
Key generator Γ(3) is 768 bits (96 bytes) and shown below.
106 83 207 235 94 38 238 182 252 52 145 130 208 170 9 222 90 70 48 182 140 87 211 89 241 135 27 217 27 4 83 65 122 137 153 188 253 116 162 45 70 34 57 162 77 45 116 126 190 163 194 142 206 195 184 102 154 112 164 53 38 215 50 187 109 55 178 123 110 135 57 238 177 21 29 225 222 84 215 155 21 179 210 201 122 202 210 208 51 104 213 58 247 238 139 116
The third 256-bit key K3 derived from key generator Γ(3) is
137 141 95 102 34 68 172 9 169 183 22 154 200 144 84 232 251 87 33 62 155 72 214 82 81 119 46 198 52 253 120 133
After encrypting the third 16-byte block of plaintext “Photons are keys” with enhanced Serpent and key K3, the ciphertext is 138 83 40 138 141 153 198 180 164 108 233 135 99 130 205 34.
Key generator Γ(4) is 768 bits (96 bytes) and shown below.
22 228 65 144 60 200 76 27 17 148 227 251 74 182 41 167 6 215 249 33 9 219 36 170 139 106 189 109 42 190 115 21 220 162 232 214 66 167 48 226 230 77 73 198 147 180 29 41 103 238 224 24 103 225 181 252 103 103 194 164 76 132 242 207 109 55 178 123 110 135 57 238 177 21 29 225 222 84 215 155 21 179 210 201 122 202 210 208 51 104 213 58 247 238 139 116
The fourth 256-bit key K4 derived from key generator Γ(4) is
184 244 102 78 50 249 102 189 46 27 147 31 37 96 37 36 50 13 62 209 109 30 126 93 248 239 161 157 195 223 108 48
After encrypting the fourth 16-byte block of plaintext “Photons are keys” with enhanced Serpent and key K4, the ciphertext is 248 255 208 238 140 14 26 6 121 1 52 78 22 48 168 112.
In some embodiments, the key generator update of Γ occurs after every other encryption of a block: the update occurs after blocks B2, B4, B6 . . . but not after the blocks B1, B3, B5 . . . . In other embodiments, the key generator update occurs only after blocks B1, B3, B5 . . . but not after the blocks B2, B4, B6 . . . . In some embodiments, the key generator update of Γ occurs after only the fourth blocks B4, B8, B12 . . . of encryption. In other embodiments, the key generator update is executed in an aperiodic manner; for example, the key generator update occurs only after blocks B2, B3, B5, B7, B11, B13, B19, and so on.
The use of key generator updating in methods 2 and 3 should not be confused with the existing block cipher modes of operation such as CBC or CTR. First, each of these modes still relies on a static key. Even CTR—where Ki=EA(nonce∥i, K) and the ith block of ciphertext is Ci=Mi⊕K—relies on the static key K. Second, key generator updating uses values of n for the key generator that can be substantially greater than the block and static key size. That is, usually n>>|i| and n>>K, where >> means “much greater than”. In some embodiments, n=1024, while the key size k=128 and the block size |i|=128; this is an example of where n>>k. As explained in section 6.5, the periodicity of the orbit of dynamic keys produced by a key generator can be substantially greater than 2k.
Each of these modes puts an upper bound on the amount of entropy increase, based on the block size or key size. In the case of ECB, no entropy increase occurs. In the case of CBC, the entropy increase is bounded above by the size of the message space. In the case of CTR, the nonce concatenated with the counter i is bounded above by the size of the message space and the resulting key orbit is bounded above by the size of the key space. Since n can be substantially greater than the key or block size, a greater entropy increase can occur with key generator updating.
Furthermore, nothing precludes combining key generator updating with the CBC mode or the CTR mode. In alternative embodiments, a cryptographic mode such as cipher block chaining (CBC) can be added to cryptographic methods 2 and 3. Methods 4 and 5 show key generator updating combined with the CBC mode.
In methods 4 and 5, the symbol −1 represents the initialization vector established between Alice and Bob during the key generator exchange.
In other embodiments, other cryptographic modes such as CTR or OFB may be used.
In an embodiment, method 1 executes in sending machine 102 and also receiving machine 112, as shown in
In some embodiments, as shown in
6.4 Concrete Complexity and One-Way Preimage Functions
Based on Turing machines, this section introduces concrete complexity and then defines a one-way preimage hash function. The first goal of our new definitions is to avoid the difficulty that asymptotic definitions of complexity cannot model one-way hash functions used in practice. A second longer term goal is to further develop an appropriate framework to characterize one-wayness, by applying powerful tools from dynamical systems to the Turing machine.
As a brief review, a Turing machine is a triple (, Σ, η) where is a finite set of states that does not contain a unique halting state h. When machine execution begins, the machine is in an initial state s∈. Σ is a finite alphabet whose symbols are read from and written to a tape : →Σ. The alphabet symbol in the kth tape square is (k). −1 and +1 represent advancing the tape head to the left or right tape square, respectively. η is a program function, where η: ×Σ→∪{h}×Σ×{−1, +1}.
For each q in and α in Σ, the instruction η(q, α)=(r, β, x) specifies how the machine executes one computational step. When in state q and reading alphabet symbol α on the tape: the machine jumps to state r. On the tape, the machine replaces alphabet symbol α with symbol β. If x=−1 or x=+1, then the machine moves its tape head one square to the left or right, respectively, and subsequently reads the symbol in this new square. If r=h, the machine reaches the halting state and stops executing.
Definition 1. Concrete Complexity
For machine input u∈Σ*, let |u| be the length of u. Let g: → be a function of |u|. Machine =(, Σ, η) has concrete, complexity (g, σ, , |u|) if the following three conditions hold: (1) On input u, machine takes at least g(|u|) computational steps to halt. (2) 's alphabet satisfies |Σ|≤σ. (3) 's states satisfy ||≤.
Remark 1.
Parameters α and impose limits on the size of the Turing machine program η in order to eliminate precomputations (table lookups). Precomputations are assumed to be encoded into η and/or the input u.
Remark 2.
Observe that prior complexity definitions depend on the meaning of algorithm. For any given algorithm, there can be an infinite number of Turing machines that implement the algorithm, where each of these machines have Shannon's State×Symbol complexity [45] such that |∥Σ|>σ. The distinction between a machine's implementation of an algorithm and an abstract algorithm can lead to deep subtleties [46, 47, 48]. In [49], a blackbox is constructed with a self-modifying, parallel machine that utilizes quantum randomness; this incomputable method raises more questions about the differences between an algorithm and the “machine” that executes it. Also, see [50].
Remark 3.
From a practical perspective, side channel attacks typically exploit the particular machine implementation of an algorithm. (For example, see [51].) This further supports our position that a complexity definition should be based on the machine, not the algorithm.
Informally, h: {0, 1}<N→{0, 1}q is an (N, σ, , r) one-way, preimage function if A and B hold:
Let σ, , r∈. Let N∈∪{ω0}. A function h: {0, 1}<N→{0, 1}q is called an (N, σ, , r) one-way, preimage function with digest size q if the following two conditions hold:
The following remarks help further explain definition 2.
Remark 4.
ω0 is the first countably infinite ordinal. When N=ω0, this implies the domain of h is {0, 1}* and in this case definition 2 is asymptotic.
Remark 5.
The adversary's machine receives h(x) as input and the auxiliary input 1n which is the binary length of x. The purpose of the auxiliary input 1n is to eliminate the possibility that a function is speciously considered one-way because machine does not have enough time to print its output. For example, the function h(x)=y, where y=log n of the least significant bits of x with |x|=n. No machine can find a point of h−1(y) in time polynomial in |h(x)|; however, there is a machine which finds a point of h−1(y) in time polynomial in |x|.
Remark 6.
For our purposes only n≥q is needed in algorithms 1 and 2. There is some k<q such that the adversary can brute force compute h(x) for every x∈{0, 1}j whenever j≤k. The number k depends on the adversary's computational resources.
Remark 7.
The one-way notion is probabilistic. The definition does not state that it is impossible for the adversary's machine to find a point in the inverse image h−1(h(x)); it says that has a probability
of finding a point in the inverse image, where the machine takes at least nr computational steps to find it. Here g(|u|)=(|u|−q)r, where u=h(x) 1n. To “succeed”, the adversary's machine only has to find some point in h−1(h(x)). is not required to find the x that machine used. Furthermore, the probability distribution is uniform over the input x and the possible coin tosses of the adversary's machine .
Remark 8.
The intuitive reason for the upper bound
on the probability stems from the birthday paradox: given a randomly selected digest y, it should be computationally more difficult for Eve to find a preimage point x∈h−1(y)∩{0, 1}n, than for Eve to randomly select preimage points x1, x2, . . . , xm, compute h(x1), h(x2), . . . , h(xm) and search for a collision in {h(x1), h(x2), . . . , h(xm)}.
Let Φ512: {0, 1}<2
6.5 Some Analysis of Cryptographic Methods 1, 2, 3, 4 and 5
Let ƒ: X→X be a function on some topological space X. The orbit of the point p∈X is (p, ƒ)={p, ƒ(p), ƒ∘ƒ(p), . . . ƒn(p), . . . }. In general, the orbit may be an infinite set. In cryptographic methods 1, 2, 3, 4 and 5, the space X={0, 1}m for some m∈, so our key orbits and key generator orbits are finite. Point p∈X is a periodic point if there exists j∈ such that ƒj(p)=p. Point x∈X is eventually periodic if there exists k∈ such that ƒk(x)=p and p is a periodic point.
Suppose ƒ: {0, 1}m→{0, 1}m is a function. The pigeonhole principle implies that every point x∈{0, 1}m is eventually periodic with period at most 2m. Each function ƒ: {0, 1}m→{0, 1}m induces an equivalence relation on the set {0, 1}m as follows. If x and y are eventually periodic in the same orbit with respect to ƒ, then x and y are called eventually periodic equivalent, expressed as
Let [x] denote the equivalence class
The key generator orbit (Γ, Φ, 1)={πq ∘Γ(i)∈{0, 1}q: Γ(i) is computed by Method 1}. The dimension of the key generator orbit is the number of points in (Γ, Φ, 1). Also, 2 and 4 denote cryptographic methods 2 and 4, respectively.
Definition 3. Let ϕ: {0, 1}<N→{0, 1}q be a function with digest size q. (No assumption is made about ϕ's one-wayness.) ϕ has a periodic point p∈{0, 1}q with period m if m is the smallest, positive integer such that ϕm(p)=p.
The periodic orbit contained in (Γ, Φ, 1) has a period ≤|(Γ, Φ, 1)|. One of our tools uses theorem 1 to provide a method for finding a preimage attack on Φ based on the eventually periodic equivalence classes.
When q>K where k=|Kj|, there is an important subtlety to mention. At a first glance, one might expect that the sequence of dynamic keys K1, K2, . . . should always have a period ≤2k because the set {K1, K2, . . . K2
to contain two identical dynamic keys. If this dynamic key sequence were produced by a discrete, autonomous dynamical system ƒ: {0, 1}k→{0, 1}k, then the first collision would determine the periodicity of the key sequence. Instead the orbit (Γ, Φ, 1)⊂{0, 1}q is used to derive dynamic keys K1, K2, . . . . Thus, the dimension of (Γ, Φ, 1) can be much greater than 2k, particularly when q is substantially greater than k. This observation leads us to theorem 1.
Theorem 1. Suppose z∈{0, 1}q has period m with respect to ϕ. Then z has a preimage attack, by computing m−1 iterations of ϕ.
PROOF. Compute x=ϕm-1(z). Then ϕ(x)=ϕm(z)=z. □
The following definition helps analyze cryptographic methods 2 and 4.
Definition 4. A function ϕ: {0, 1}<N→{0, 1}q is regular on its subdomain {0, 1}k with k>q if for every y∈{0, 1}q, then the intersection of the inverse image ϕ−1(y) and {0, 1}k have the same number of points. This means that for every y∈{0, 1}q, then |ϕ−1(y)∩{0, 1}k|=2k-q.
Theorem 2. Suppose function ϕ: {0, 1}<N→{0, 1}q is regular on subdomain {0, 1}q. Then every point in {0, 1}q is a periodic point and lies in a unique periodic orbit with respect to ϕ.
PROOF. By reductio ad absurdum, suppose x∈{0, 1}q is not a periodic point. Let k be the smallest positive natural number such that y=ϕk(x) is a periodic point. Let m be the period of y. Then ϕ−1(y) contains at least two points ϕm-1(y) and ϕk-1(x). These two points contradict the regularity condition of ϕ. The uniqueness of x's periodic orbit immediately follows from the equivalence relation
that ϕ induces on {0, 1}q. □
When ϕ satisfies the regularity condition on subdomain {0, 1}q, theorems 1 and 2 are useful because there is no need to search for clever preimage attacks. Instead, the size and number of the periodic orbits of ϕ on {0, 1}q can be studied. Corollary 3 states that 2q equals the sum of the periods of each periodic orbit with respect to ϕ.
Corollary 3. Let function ϕ: {0, 1}<N→{0, 1}q be regular on subdomain {0, 1}q. Then
where the sum ranges over each equivalence class [x] induced by
and |[x]| is the number of points in [x]. That is, |[x]| is the period of x with respect to ϕ.
PROOF.
is an equivalence relation on {0, 1}q. Apply theorem 2. □
Corollary 3 creates a counting tool for finding the probability that a point lies in a periodic orbit with period m. As a simple example, let : {0, 1}8→{0, 1}8 denote the substitution box used in AES. Then
induces the five equivalence classes [0], [1], [4], [11], [115] on {0, 1}8. The equivalence class [0] has 59 elements. This implies 59(0)=0 since is a bijection. Observe that [11]={43, 241,161, 50, 35, 38, 247, 104, 69, 110, 159,219, 185,86, 177,200,232, 155,20,250 45,216, 97,239, 223, 158}. Also, |[1]|=81, |[4]|=87, |[11]|=27 and |[115]|=2 and |[0]|+|[1]|+|[4]|+|[11]|+|[115]|=28.
During a single execution of cryptographic method 2, there is a low probability of encrypting two distinct blocks with identical keys. In other words, when i≠j, the event Ki=Kj has a low probability. The following lemma helps sharpen the expression “low probability”.
Lemma 4. Suppose Φ{0, 1}<N→{0, 1}q is a (N, σ, , r+m+2) one-way preimage function satisfying the regularity condition on subdomain {0, 1}q, where r, m>1, N=n+1, and σ=q and =q2. Suppose machine computes Φ on any input x∈{0, 1}q in at most qm computational steps. Suppose Alice randomly chooses z∈{0, 1}q and computes Φ(x)=y. Suppose Eve only sees y. Set ={x∈{0, 1}q: |(Γ, Φ, 1)|<qr and πq∘Γ(0)=x}. Then
PROOF Outline. Using machine , Eve computes the orbit [y, Φ(y), Φ2(y), . . . ] with at most qr iterates. After completing the computation of each iterate Φk(y), Eve searches for a collision in {y, Φ(y), Φ2(y), . . . , Φk(y)}. If a collision is found, Eve's machine halts. If Eve's machine reaches Φq
When there is a collision in {y, Φ(y), . . . , Φk(y)}, by theorem 2, the regularity condition implies that y lies in this periodic orbit (equivalence class). Let a=|[y]|. Then theorem 1 implies x=Φa-1(y) is the preimage point sought by Eve. If
then Eve's machine will find preimage point x in less than qr+m−1 log q computational steps with probability greater than
contradicting that Φ is a (N, σ, , r+m+2) one-way preimage function. □
Consider Φ512, where q=512. Assume m=3 because 5123 steps is a more conservative upper bound for a TM computing Φ512 on x∈{0, 1}512 than 5122. If Φ512 satisfies the regularity condition on subdomain {0, 1}512 and Φ512 is a (2128, q, q2, 9) pre-image function, then the probability is ≤2−256 that the key generator in cryptographic method 2 has an orbit satisfying |(Γ, Φ512, 2)|<q4; with probability at least 1-2−256, whenever j≠k, then Γ(j)≠Γ(k) for an encryption length up to 8.5 billion bytes. Seeing two identical keys that encrypt distinct blocks requires a SHA-512 collision after only 134,217,728 iterations of SHA-512. Currently, no mathematical proof exists of Φ512's one-wayness; however, (2128, q, q2, 9) seems conservative based on the biclique preimage attack [52] that depends on a reduced 50 rounds instead of the standard 80 rounds.
Remark 9.
In the prior art, standard block cipher algorithms such as AES, Serpent or DES must not reveal the static key to Eve: in the prior art, if the static key is compromised, the cryptographic security is fatally compromised. The embodiments described in this specification are superior: If a dynamic key used in methods 2, 3, 4 and 5 is compromised to Eve, this compromise does not reveal prior dynamic keys and future dynamic keys used by block cipher .
To construct future dynamic keys Kk such that k>j, Eve must find the preimage point Γ(j), the jth key generator. In cryptographic method 2, suppose the block cipher is AES-256, q=512 and n=1024 and suppose a processor backdoor leaks a 256-bit key Kleak to Eve. Even after the leak, constructing future keys requires Eve knowing Γ(j). For algorithm 2, constructing future keys involves considerably more computational steps for Eve than finding a single, preimage point x∈{0, 1}1024 such that Φ512(x)=Kleak. If Φ512 is regular on subdomain {0, 1}1024, then |Φ512−1(Kleak)|=2512. The regularity condition implies Eve must guess Γ(j) from 2512 possible preimage points. When Eve attempts to find dynamic keys that precede Kj, she has even less information available than when she is attempting to construct future keys. While the last n-q bits of Γ(j) are invariant, even if Eve knows key generator Γ(j), Eve's knowledge does not enable her to immediately capture Γ(j−1) because Φ512(Γj-1,0 . . . Γj-1,q-1)=Γj,0 . . . Γj,q-1 and Φ512 is resistant to preimage attacks.
Remark 10.
A Boolean function ƒ: {0,1}n→{0,1} can be expressed as
over 2[x1, . . . , xn]/(x12−x1, . . . , x2−xn), where
and x≤a iff xi≤ai for each i. The algebraic degree of ƒ is defined as deg ƒ=max{wt(a): a∈{0,1}n, ca≠0}, where wt(a) is the Hamming weight of a. Consider functions ƒ1, ƒ2 . . . ƒn: {0, 1}n→{0, 1} and function F: {0, 1}n→{0, 1}n, defined as F(x)=(ƒ1(x), ƒ2(x), . . . , ƒn(x)). The algebraic degree of F=max{deg ƒ1, deg ƒ2, . . . , deg ƒn}. For a static AES key K, the AES encryption function εK: {0, 1}128→{0, 1}128 has an algebraic degree ≤128 and εK is a function of 128 Boolean variables. It is well-known that a Boolean function's resistance to differential cryptanalyis and higher order differentials depends on its algebraic degree and how quickly its degree can be reduced by taking discrete derivatives [53, 54, 55].
Set M=|(Γ, Φ, 4)|. For each dynamic key Ki, let εK
6.6 Dynamic Keys Stop a Generic Block Cipher Attack
The dynamic keys, derived in cryptographic methods 2, 3, 4 and 5, help stop Huang and Lai's generic block cipher attack [56], which is described below in Huang and Lai's algorithm 6. The following list describes the symbols, used in their attack algorithm 6.
P plaintext
C ciphertext
n block size
K master key
k master key size
R number of rounds
S non-linear layer
L linear layer
Kr subkey used in round r
Xr input block to round r where X0=P
Yr output block of the key nixing in round r
Zr output block of the nonlinear layer in round r
Zir i th subblock in Zr
S1 is the internal state that can be calculated from P only with k1 bits of subkeys, where k1 is the maximum smaller than k that can be obtained. Similarly, S2 is the internal state that can be derived from C only with (other) k1 bits of subkeys. For any block cipher, the states of S1 and S2 can be found. The attack algorithm has two stages:
Line numbers have been added to this attack algorithm [56] to help explain how cryptographic methods 2 and 4 hinder this attack.
Algorithm 6's method of using a candidate key list to find the static key of the block cipher is not effective against cryptographic methods 2 and 4. To illustrate this, consider cryptographic method 2, for example, using a 16-byte block cipher such as Serpent, with q=512 and n=768. After each 16 byte block is encrypted, the candidate list of keys changes because the next 256-bit key is derived from an updated key generator Γj,0 . . . Γj,767 and the average Hamming distance between Γj,0 . . . Γj,511 and Γj-1,0 . . . Γj-1,511 is 256. Consider cryptographic method 2, encrypting 25,600 bytes of voice data per second. At this rate, a 1 hour phone conversation requires a key generator orbit (Γ0,0 . . . Γ0,511), Φ512(Γ0,0 . . . Γ0,511), . . . Φ5121440000 (Γ0,0 . . . Γ0,511) with size 1,440,001. If a collision occurred in this orbit during a one hour phone call, then theorem 1 provides a devastating, preimage attack on SHA-512 with at most 1,440,000 iterations of SHA-512. Based on an extremely low probability of this rare event (such orbits may not even exist), a collision would also imply that SHA-512 does not satisfy any reasonable values of (2128, σ, , r) preimage complexity. “Reasonable” means not constraining Eve's machine so much that she cannot compute, for example, SHA-512. Consider =1, so machine can have only one state.
Recall that the biclique preimage attack [52]—on a reduced 50 rounds of SHA-512 instead of the complete 80—has an estimated preimage complexity of 2511.5. For a typical orbit, it is extremely likely that (Γ, Φ512, 2) has a size far greater than the number of SHA-512 iterations needed to provide a complete encryption for any foreseeable application. In this case, the assumption that there are
(plaintext, ciphertext) pairs does not hold for method 2. Furthermore, the lack of
(plaintext, ciphertext) pairs invalidates the effectiveness of the loop composed of lines 1 through 7 and the loop composed of lines 8 through 18.
6.7 Integrating the H, P and S Processes
Information 104 in
Encryption. Consider a block of plaintext of size M=JN, where N is the size of the output of the block cipher used and J is a natural number i.e., {1, 2, 3, . . . , 8, . . . , 16, . . . ,}. This part describes an encryption process S∘P∘H, where stage 1 is process H, stage 2 is process P and stage 3 is process S. Plaintext =[B1, B2, . . . , Bj] is the current block that will be encrypted where each subblock Bk has size N.
Decryption. For each block of ciphertext of size M=JN, this part describes a decryption process H−1 ∘P−1 ∘S−1 in 3 stages. Ciphertext [e1, e2, . . . , eM] is the current block that will be decrypted where M=Kn.
In other embodiments, during encryption, process H may be executed after the S or P process. For example, an embodiment may compute H∘P∘S as the encryption. This means the H process is executed in stage 3 and the S process is executed in stage 1. For the nth block B of size M, formally this encryption computation is represented as H(P(S(B, KS(n)), KP(n)), KH(n)), where KS(n) is the key generator for process S on the nth block; KP(n) is the key generator for process P on the nth block; and where KH(n) is the key generator for process H on the nth block.
In other embodiments, the H process may be performed in the second stage. For example, S∘H∘P may be computed as the encryption. In an embodiment, an order generator KO(n) may be used to determine the order of processes H, S, P for the encryption of the nth block B of size M. For example, in the first block, during encryption, S∘H∘P may perform the encryption computation. In the second block, H∘S∘P may perform the encryption computation. In the third block, H∘P∘S may perform the encryption computation. In the fourth block, P∘S∘H may perform the encryption and so on. In embodiment, the order generator KO(n) may be updated to KO(n+1) for the n+1th block, according to the key generator updating methods, described in section 6.9.
6.8 Cryptographic Hardware and Infrastructure
Information system 200 illustrates some of the variations of the manners of implementing information system 100. Sending machine 202 is one embodiment of sending machine 101. Sending machine 202 may be a secure USB memory storage device as shown in 3A. Sending machine 202 may be an authentication token as shown in
Sending machine 202 or sending machine 400 may communicate wirelessly with computer 204. In an embodiment, computer 204 may be a call station for receiving encrypted plaintext 109 from sending machine 400. A user may use input system 254 and output system 252 of sending machine (mobile phone) 400 to transmit encrypted voice data to a receiving machine that is a mobile phone. In an embodiment, input system 254 in
Computer 204 is connected to system 210, and is connected, via network 212, to system 214, system 216, and system 218, which is connected to system 220. Network 212 may be any one or any combination of one or more Local Area Networks (LANs), Wide Area Networks (WANs), wireless networks, telephones networks, and/or other networks. System 218 may be directly connected to system 220 or connected via a LAN to system 220. Network 212 and system 214, 216, 218, and 220 may represent Internet servers or nodes that route encrypted plaintext (voice data) received from sending machine 400 shown in
In
In an embodiment, the NADO processes H, P and S execute in a secure area of processor system 258 of
A state refers to a particular value or set of values of any set of one or more internal variables, where the manner in which operations are carried out are affected by the choice of the value or the set of values that make up the state. A state generator performs one or more operations to update a state.
In an embodiment, memory system 256 stores process P permutation instructions 132 as described in section 6.13, titled The P PROCESS: PERMUTING INFORMATION and section 6.15, titled UPDATING PERMUTATIONS IN THE S OR P PROCESS. In an embodiment, memory system 256 stores process S substitution box instructions 134, as described in section 6.16, titled THE S PROCESS and section 6.15, titled UPDATING PERMUTATIONS IN THE S OR P PROCESS. In an embodiment, memory system 256 stores encrypted voice data that is waiting to be sent to output system 252 and sent out along transmission path 110, routed and served by system computers 210, 214, 216, 218 and 220 and network 212.
In an embodiment, the H process instructions 130, the P process instructions 132 and S process instructions 134 execute in a secure area of processor system 258 that is inside self-contained USB drive shown in
In an embodiment, the H process 130, the P process 132 and the S process 134 encrypt a voice conversation in a secure area of processor system 258 is inside mobile phone 400 that is an embodiment of sending machine 102 and receiving machine 112).
In an embodiment, in
6.9 An Alternative Embodiment of Key Generator Updating with One-Way Functions
The binary operator ⊕ represents addition modulo 2 (mathematicians) or exclusive-or (computer scientists). ⊕ is defined as: 1⊕0=1. 0⊕1=1. 0⊕0=0. 1⊕1=0. If k and d represent more than one bit and have the same length in bits, then the bitwise exclusive-or function is defined by applying ⊕ to corresponding bits. As an example, suppose the key generator k=[10110000], and the digest d=[00101110]. In this case, ⊕(k,d)=[1⊕0, 0⊕0, 1⊕1, 1⊕0, 0⊕1, 0⊕1, 0⊕1, 0⊕0]=[10011110].
Suppose K=[k0, k1, . . . , kn-1] is the current key generator. In the description below, K may represent the current key generator KP used in the P process; or K may be the current key generator KH used in the H process; or S may be the current key generator KS used in the S process.
Let Φ denote a one-way hash function. In an embodiment, Φ may be SHA-512. In an embodiment, Φ may be SHA-1. In another embodiment Φ may be Keccak. In another embodiment Φ may be BLAKE. In another embodiment Φ may be JH. In another embodiment Φ may be GrØstl. In another embodiment Φ may be Skein.
Suppose the digest size of Φ is q elements. Let Km=[k0, k1, . . . , km-1] where m≤n. Let the output of the one-way hash Φ on input Km be Φ(Km)=[d0, d1, . . . , dq-1] where q<n. After the last round of encryption or decryption, in an embodiment, the key generator K may be updated to Knext, where Knext=[kn-1 ⊕d0, k0⊕d1, k1⊕d2, . . . , kq-2⊕dq-1, kq-1, . . . , kn-2]. This computation of Knext is shown in
The purpose of the rotation and one-way hash of part of the key generator is to exploit the avalanche effect of the one-way function. The exclusive-or operation ⊕ mixes the output of the one-way hash function, by not skewing what ideally should be a 50% probability of each bit being 0 or 1. The rotation enables the key generator update to use a much larger key generator than the key size used by the H, P or S process.
For example, the standard AES-256 block cipher uses a static 256-bit key. However, key generator KH for the H process may be greater than 512 bits. A much larger key generator that is dynamically updated using a one-way function enables NADO to significantly enhance the cryptographic strength of the block cipher when a block cipher is used in process H. The rotation eventually mixes the output of the one-way hash function even if the one-way function is SHA-1 which has an output size of only 160 bits.
The following C code implements the above computation with the following assumptions. Each subscript above indexes a byte (8 bits) of unsigned char. Each element K[i] is an unsigned char. In the C syntax, the symbol {circumflex over ( )} performs the bitwise exclusive-or computation, represented above as ⊕. The symbol {circumflex over ( )} is above the numeral 6 on a standard American computer keyboard. Function one_way_hash (unsigned char* d, unsigned char* K, int K_length) implements one-way hash function Φ, where int K_length is the size of input K[0] . . . K[m−1] to function one_way_hash.
K may refer to the H process key generator KH(i) where after the update Knext is the name of H process key generator KH(i+1) as described in section 6.7. Similarly, in the C code listing, K may refer to the P process key generator KP(i) where after the update Knext is the name of P process key generator KP(i+1). Similarly, symbol K may refer to the S process key generator KS(i) where after the update Knext is the name of S process key generator KS(i+1). Similarly, symbol K in the C code listing or above may refer to the order generator KO(i) being updated to KO(i+1).
The C code above executes generator updating that corresponds to rotating the key generator K by one to the right. The three instructions
rotate the circular array K[0], K[1], . . . K[n−1] by one to the right, where it is understood that key generator value K[0] lies one to the right of key generator value K[n−1]. In
In another embodiment, after the prior round of encryption or decryption, the key generator K may be updated to Knext, by first rotating K one element to the left and then exclusive-or'ing this rotated K key with the one-way hash of Km. In this embodiment, Knext=[k1⊕d0, k2⊕d1, . . . , kq⊕dq-1, kq+1, . . . , kn-1, k0]. In other embodiment, key generator K may be rotated left by i elements where 1<i<n. For example, K may be rotated left by i=5 elements. In other embodiment, key generator K may be rotated right by j elements where 1<j<n. When q=n, an embodiment may choose to NOT rotate key K before the one-way hash of Km is exclusive-or'd with elements of K. In another embodiment, the key generator KH for the process H is updated in this way after one byte of information has been encrypted as described in section 6.17.
In what follows, a key generator update of KP for |KP|=512 bits is described that uses one-way hash SHA-512. This demonstrates how the updated key generator KP changes and how the Hamming distance between KP(n) and KP(n+1) stays close to ½|KP(n)|=256 bits. Below is KP(1) represented as bytes. Each byte is represented by a number between 0 and 255 inclusive.
Below is key generator KP(1) represented as 512 bits.
Observe that 250 represents 11111010 and 133 represents 10000101 and so on all the way to the last byte where 35 represents 00100011. Below is KP(2) represented as 64 bytes.
Below is KP(2) represented as 512 bits.
Below is KP(1)⊕KP(2) represented as 512 bits.
The Hamming distance between KP(1) and KP(2) is the number of ones in KP(1) e KP(2), which is 254. Observe that
is about 0.496 which is close to 50%. The value ½|K(p)(n)|=256 is the expected value for the Hamming distance between consecutive key generators updated by a true random process with a uniform distribution. A uniform distribution means that there is a 50% probability of the next bit being a zero and a 50% probability of the next bit being a one. In some embodiments, it is preferable for the Hamming distance between consecutive key generators to be in the range of 40 percent to 60 percent of the total number of bits in one of the key generators. For example, if two consecutive key generators each have a length of 1000 bits, then in these embodiments, it is preferable for the Hamming distance between the two key generators to be between 400 and 600.
Below is KP(3) represented as 64 bytes.
Below is KP(3) represented as 512 bits.
Below is KP(2) ⊕KP(3) represented as 512 bits.
The Hamming distance between key generator KP(2) and key generator KP(3) is 250.
In order to illustrate the other statement that the order of the zeroes and ones changes unpredictably between consecutive key generator updates, we compute [KP(1)⊕KP(2)]⊕[KP(2)⊕KP(3)]=KP(1)⊕KP(3):
The number of ones in KP(1) ⊕KP(3) is 252 which is close to 50%. Analogous to the second derivative in calculus, this computation illustrates the statement that the order of the zeroes and ones is unpredictable and close to the expected value of a random process with a uniform distribution.
In some embodiments, in each process, a different one-way hash function may be used for key generator updating. In an embodiment, Keccak may be used to update the key generator in process H; BLAKE may be used to update the key generator in process P; and SHA-512 may be used to update the key generator in process S. In section 6.15, titled UPDATING PERMUTATIONS IN THE S OR P PROCESS, further details are provided on how to update the permutation μ based on one of the nth key generators KH(n) or KP(n) or KS(n).
6.10 Process H as a Block Cipher
Before an embodiment with key updating for enhanced AES-256 is described below, the standard AES block cipher is briefly described. There is a 128-bit state. Standard AES supports three static key sizes: 128, 192, and 256 bits and is a 16 byte block cipher that uses 10 rounds for a static 128-bit key; 12 rounds for a static 192-bit key and 14 rounds for a static 256-bit key. The internal state can be represented as a 4×4 matrix of bytes. During each round, the internal state is transformed by the following operations:
An additional AddRoundKey operation is performed before the first round. The MixColumns operation is omitted in the last round. The key schedule produces eleven, thirteen or fifteen 128-bit subkeys from master static keys of sizes 128, 192 or 256 bits, respectively. The block ciphers are referred to as standard AES-128, standard AES-192 and standard AES-256, respectively, where the number specifies the master key size. Each 128-bit subkey contains four words. A word is a 32-bit quantity which is denoted by W[⋅].
Let the number of rounds be Nr. Let the number of 32-bit words in the master key be Nk. Standard AES-128 has Nr=10 and Nk=4. Standard AES-256 has Nr=14 and Nk=8. Below is the key schedule expressed in pseudo-code.
where RCON[⋅] are round constants and RotWord(⋅) rotates four bytes by one byte to the left.
A C code listing of the four operations applied during a round is shown below. The 4×4 state matrix is represented as unsigned char State [4] [4].
An example of this key updating and encrypting with enhanced AES-256 is shown below. Consider the plaintext “Photons are keysPhotons are keysPhotons are keysPhotons are keys” The phrase “Photons are keys” repeats four times in the plaintext. In what follows, each byte of ciphertext and the current enhanced AES-256 key will be expressed as a number between 0 and 255 inclusive.
Plaintext “Photons are keys” is
80 104 111 116 111 110 115 32 97 114 101 32 107 101 121 115
The first key K1 derived from key generator KH(1) is
After encrypting plaintext block B1=“Photons are keys” with enhanced AES and key K1, the ciphertext is 251 150 133 203 3 182 4 7 13 198 112 173 159 22 26 173.
The second key K2 derived from key generator KH (2) is
After encrypting plaintext block B2=“Photons are keys” with enhanced AES and key K2, the ciphertext is 65 7 228 219 145 13 117 25 52 169 72 225 225 81 104 11.
The third key K3 derived from key generator KH (3) is
After encrypting plaintext block B3=“Photons are keys” with key K3, the ciphertext is 23 116 212 23 67 91 3 235 82 172 89 172 223 144 115 250.
The fourth key K4 derived from key generator KH(4) is
After encrypting plaintext block B4=“Photons are keys” with key K4, the ciphertext is 8 161 3 243 173 80 124 200 110 18 216 43 156 194 22 206.
In some embodiments, the key generator update of KH occurs after every other encryption of a subblock: the update occurs after subblocks B2, B4, B6 . . . but not after the subblocks B1, B3, B5 . . . . In other embodiments, the key generator update occurs only after subblocks B1, B3, B5 . . . but not after the subblocks B2, B4, B6 . . . . In some embodiments, the key generator update of KH occurs after only the fourth subblocks B4, B8, B12 . . . of encryption.
6.11 Deriving a Block Cipher Key from a Key Generator
This section describes the derivation of a block cipher key from the current key generator KH(n). In an embodiment for a block cipher that uses a m-bit key, the first m bits of the current key generator KH (n) may be used to encrypt the current block. In this embodiment, m-bit key changes each time the key generator KH is updated. In an embodiment, the block cipher is enhanced AES-256 and the length of the key generator KH is 64 bytes (512 bits). In an alternative embodiment, the length of the key generator is 128 bytes (1024 bits).
In the embodiment described below, the key generator KH is 64 bytes. The block cipher is AES-256. After every other block of 16 bytes, the key generator is updated as described in section 6.9. Below key generator KH(1) is 64 bytes, where each number between 0 and 255 inclusive represents 8 bits.
The AES-256 block cipher uses the first 256 bits of key generator KH(1) as the key:
This key is used to encrypt the first 16 byte block of plain text in process H. In the second 16 byte block, KH(2)=KH(1) because no updating has occurred. The same 256-bit key is used to encrypt the second 16 byte block of plain text in process H.
Before the third block is encrypted, key generator is updated as described in section 6.9. Key generator KH(3) equals:
The enhanced AES-256 block cipher uses the first 256 bits of key generator KH (3) as the key:
Enhanced AES-256 uses this key to encrypt the third 16 byte block of plain text in process H. Enhanced AES-256 uses this same key to encrypt the fourth 16 byte block of plain text in process H.
Before the fifth block is encrypted, key generator is updated. Key generator KH (5) equals:
The enhanced AES-256 block cipher uses the first 256 bits of key generator KH (5) as the key:
AES-256 uses this key to encrypt the fifth 16 byte block of plain text in process H. This key derivation and updating method is continued indefinitely until the whole data stream has been encrypted.
In an alternative embodiment described below, the key generator KH is 96 bytes and the block cipher is enhanced DES. After every block of 8 bytes is encrypted, the key generator is updated as described in section 6.9. Key generator KH(1) equals
The enhanced DES block cipher uses a 56-bit key that is generated by applying SHA-512 to the key generator KH(1) and using the first 56 bits of the digest as the key:
199 20 209 195 126 132 197
Before the second block of 8 bytes is encrypted, key generator is updated as described in section 6.9. Key generator KH(2) equals
A 56-bit key is generated by applying SHA-512 to the key generator KH(2) and then enhanced DES uses the first 56 bits of the digest as the key:
227 114 181 58 168 40 196
Before the third block of 8 bytes is encrypted by DES, key generator is updated as described in section 6.9. Key generator KH(3) equals
A 56-bit key is generated by applying SHA-512 to the key generator KH(3) and enhanced DES uses the first 56 bits of the digest as the key:
106 7 29 109 200 183 151
A third 8 byte block of plain text is encrypted with this new 56-bit key. This key derivation and updating method is continued indefinitely until the whole data stream has been encrypted.
6.12 Permutations
Process P applies an unpredictable sequence of permutations to scramble the information elements across the whole block. Process S uses an unpredictable sequence of permutations to create a new substitution box for each block of information.
Let the symbol X denote a set. X can be a finite or infinite set. A permutation is a function σ: X→X that maps elements of X to elements of X, is 1 to 1, and is onto. 1 to 1 means that no two distinct elements from X get mapped by σ to the same element. More formally, if s1, s2 are any two distinct element from X, in other words s1≠s2, then σ(s1)≠σ(s2). Onto means that if you choose any element r from X, you can find an element s so that σ maps s to r. In other words, for any element r from X, there is some element s in X satisfying σ(s)=r. In the context of cryptography, the properties 1 to 1, and onto are useful because they help assure that a sequence of information that has been scrambled by a permutation(s) can be unscrambled by the inverse permutation(s).
When X is finite and contains n elements, then the set of all permutations on X is called the symmetric group on n elements; there are n! permutations in Sn. For example, when n=5, then S5 contains 5*4*3*2*1=120 permutations.
The identity permutation is the permutation that sends every element to itself. Formally, i: X→X. For every element s in X, i(s)=s. As an example, choose X to be the numbers 0 thru 4, inclusive. The identity i sends every element to itself means that i(0)=0, i(1)=1, i(2)=2, i(3)=3, and i(4)=4.
A finite permutation is a permutation on a finite set. Any finite permutation can be represented as a finite sequence of numbers. The word ‘sequence’ means that the order of the numbers matters. The sequence [1,2, 3] is not the same sequence as [2, 3, 1].
The sequence, [0, 1,2, 3, 4], represents the identity permutation on X. This sequence is interpreted as a permutation in the following way. The number 0 is at the beginning of the sequence, so i(0)=0. The next number in the sequence is 1, so i(1)=1. The number 2 follows 1 in the sequence, so i(2)=2. The number 3 follows 2 in the sequence, so i(3)=3. Finally, 4 follows 3 in the sequence, so i(4)=4.
As a different example, choose X to be the numbers 0 thru 7, inclusive. Choose λ=[1, 5, 3, 6, 7, 2, 4, 0]. The number 1 is at the beginning of the sequence, so λ(0)=1. The next number in the sequence is 5, so λ(1)=5. The number 3 follows 5, so λ(2)=3. Similarly, λ(3)=6, λ(4)=7, λ(5)=2, λ(6)=4, and λ(7)=0.
There is a simple way to check that λ is 1 to 1 and onto. Check that all 8 numbers are in the sequence, and make sure none of these numbers occurs in the sequence more than once.
If σ is a permutation, then the inverse of σ is denoted σ−1. When you apply σ and then apply σ−1, or vice versa, this composite function is the identity map. Formally, σ∘σ−1=σ−1 ∘σ=i. In other words, the function σ∘σ−1 sends every element to itself, and the function σ−1∘σ maps every element to itself.
The inverse of λ, denoted λ−1, is represented by the sequence, [7, 0, 5, 2, 6, 1, 3, 4]. The following analysis verifies that this sequence defines the inverse of lambda. From the sequence, λ−1(0)=7, λ−1(1)=0, λ−1(2)=5, λ−1(3)=2, λ−1(4)=6, λ−1(5)=1, λ−1(6)=3, and λ−1(7)=4. Next, check that λ∘λ−1(0)=λ(7)=0, λ∘λ−1(1)=λ(0)=1, λ∘λ−1(2)=λ(5)=2, λ∘λ−1(3)=λ(2)=3, λ∘λ−1(4)=λ(6)=4, λ∘λ−1(5)=λ(1)=5, λ∘λ−1(6)=λ(3)=6, λ∘λ-(7)=λ(4)=7.
This paragraph defines two different operations on a permutation. A transposition is an operation that swaps two elements in a permutation. Let σ=[1, 0, 2, 6, 7, 5, 3, 4] be the initial permutation. Transpose 2 and 5 in σ. After the transposition, σ=[1, 0, 5, 6, 7, 2, 3, 4]. A rotation is an operation that rotates the elements in a permutation. Let σ=[1, 0, 2, 6, 7, 5, 3, 4] be the initial permutation. After a rotation, the new permutation is σ=[4, 1, 0, 2, 6, 7, 5, 3].
Any permutation can be constructed efficiently using transpositions. Consider the permutation σ=[a0, a1, . . . , an-1] on n elements. In other words, σ(k)=ak. σ can be constructed from the identity [0, 1, . . . , n−1]. Starting with the identity, the transpositions (0 c0), (1 c1), (n−1 cn-1) are successively applied, where ck is the array index of ak in the current state of the permutation as consequence of the previous transpositions (0 c0) . . . (k−1 ck-1).
Mathematically, the application of these transpositions is not function composition of a transposition with a permutation even though both the permutation and transposition lie in Sn. Instead, each transposition τk acts as an transformation on the current permutation, where τk: Sn→Sn and as defined previously.
The following example demonstrates how to build λ=[1, 5, 3, 6, 7, 2, 4, 0] in S8, starting with the identity permutation and applying transpositions as transformations. The identity permutation on 8 elements is represented by the sequence [0, 1, 2, 3, 4, 5, 6, 7].
[0, 1, 2, 3, 4, 5, 6, 7]. The array index of a0=1 is 1, so c0=1. Apply transposition (0 1).
[1, 0, 2, 3, 4, 5, 6, 7]. The array index of a1=5 is 5, so c1=5. Apply transposition (1 5).
[1, 5, 2, 3, 4, 0, 6, 7]. The array index of a2=3 is 3, so c2=3. Apply transposition (2 3).
[1, 5, 3, 2, 4, 0, 6, 7]. The array index of a3=6 is 6, so a3=6. Apply transposition (3 6).
[1, 5, 3, 6, 4, 0, 2, 7]. The array index of a4=7 is 7, so a4=7. Apply transposition (4 7).
[1, 5, 3, 6, 7, 0, 2, 4]. The array index of a5=2 is 6, so a5=6. Apply transposition (5 6).
[1, 5, 3, 6, 7, 2, 0, 4]. The array index of a6=0 is 7, so a5=6. Apply transposition (6 7).
[1, 5, 3, 6, 7, 2, 4, 0].
It took 7 transpositions to transform the identity permutation to the permutation λ. Starting with the identity permutation, it takes at most 8 transpositions to generate any of the possible permutations. There are a total of 8!=8*7*6*5*4*3*2*1=40320 possible permutations.
For a permutation of size 256, the number of possible permutations is greater than 10506. In the future, as the speed of computers improves, the size of the permutations used in the S and P processes should increase enough so that attacks are impractical.
If X has n elements, it takes at most n transpositions to construct any permutation on X. The general procedure for constructing any of the n! permutations is similar to the steps already mentioned. Start with the identity permutation, and then execute n transpositions.
Initialize σ equal to the identity permutation, [0, 1, 2, 3, . . . , n−2, n−1].
Execute the steps inside the brackets at least n times.
This procedure is shown for a permutation of length 32. Initialize σ equal to the identity permutation:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31].
Choose 21 and 4 randomly. Transpose the 21st and 4th elements.
[0, 1, 2, 3, 21, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 4, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]
Choose 27 and 14 randomly. Transpose the 27th and 14th elements.
[0, 1, 2, 3, 21, 5, 6, 7, 8, 9, 10, 11, 12, 13, 27, 15, 16, 17, 18, 19, 20, 4, 22, 23, 24, 25, 26, 14, 28, 29, 30, 31]
Choose 29 and 4 randomly. Transpose the 29th and 4th elements.
[0, 1, 2, 3, 29, 5, 6, 7, 8, 9, 10, 11, 12, 13, 27, 15, 16, 17, 18, 19, 20, 4, 22, 23, 24, 25, 26, 14, 28, 21,30, 31]
Choose 11 and 17 randomly. Transpose the 11th and 17th elements.
[0, 1, 2, 3, 29, 5, 6, 7, 8, 9, 10, 17, 12, 13, 27, 15, 16, 11, 18, 19, 20, 4, 22, 23, 24, 25, 26, 14, 28, 21,30, 31]
Continue these steps for another 28 transpositions to build a random permutation on 32 elements. This method of constructing an arbitrary permutation is important because it prevents an intruder from trying to guess the permutation. A potential intruder can not eliminate permutations that may be unreachable by some other algorithm that constructs a permutation. In our case, the intruder must check on average
possibilities. Further, transpositions can be executed very quickly on a digital computer. A permutation σ of size 256 requires only 256 memory swaps, and about 2*256=512 bytes of memory to store σ and the inverse of σ. On the other hand, a brute force attack requires checking more than 10506 permutations because
This transposition method when combined with key generator updating using one-way hash functions is able to generate an unpredictable sequence of permutations, using a small amount of computation (256 memory swaps), and a small amount of memory.
6.13 The P Process: Permuting Information
This section describes in further detail how permutations are used to represent and compute the diffusion (spreading) of information across a block. It describes methods of using permutations to change the order of a sequence of information. The information may be plaintext. The information may be partially encrypted plaintext. The information may be a key generator or key generators. The information may be states that are used by a block cipher or stream cipher.
In section 6.7, titled CRYPTOGRAPHIC PROCESS, the permutation μ: {1,2, . . . , M}→{1,2, . . . , M}, in the P process, diffuses information across a block of size M. The information is diffused by reordering the information, based on the permutation μ. By updating the permutation μ after each block, this enables the P process to diffuse the information across the block of size M in an unpredictable way.
In some embodiments, the elements of information are bits (0's and 1's). As an illustrative example, consider σ=[4, 2, 0, 5, 3, 1] applied to the 6 bits of information b0b1b2b3b4b5. This permutation of 6 bits is shown in
In
In some embodiments, elements of information are permuted that may be larger than a bit. The element of information may be a sequence of bits. In some embodiments the number of bits in an element may change. In other embodiments, the element of information that is permuted may be different from a bit. Although current computers are built from hardware that is natively base 2, information elements can be used that are based on a different base from base 2. For example, in base 3 each element of information ek in [e1, . . . , ek, . . . , en] could represent 0, 1, 2. This embodiment is useful when the native hardware of a computer has 3 physical states instead of 2 physical states (bits). Then these information elements could be permuted to [eμ(1), . . . , eμ(k), . . . , eμ(n)] where μ: {1, 2, . . . , n}→{1, 2, . . . , n} is a permutation. In some embodiments, the information elements could represent part of a continuum instead of a discrete symbol.
Details are provided below that describe how different permutations sizes may be used. Let D=[m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12] be a sequence of information with 13 elements. Each information element, mi, represents n, information elements, where ni≥1. Define the permutation λ of length 4 to be [2, 0, 3, 1]. This means that λ(0)=2, λ(1)=0, λ(2)=3, and λ(3)=1. Define the permutation σ of length 6 to be σ=[4, 2, 0, 5, 3, 1]. This means that σ(0)=4, σ(1)=2, σ(2)=0, σ(3)=5, σ(4)=3, and σ(5)=1. Define γ=[2, 0, 1]. Then γ(0)=2, γ(1)=0, and γ(2)=1.
Apply λ to permute the first 4 elements of D, apply σ to permute the next 6 elements of D, and apply γ to permute the last 3 elements of D. The permuted sequence is: [mλ(0), mλ(1), mλ(2), mλ(3), mσ(0)+4, mσ(1)+4, mσ(2)+4, mσ(3)+4, mσ(4)+4, mσ(5)+4, mγ(0)+10, mγ(1)+10, mγ(2)+10]=[m2, m0, m3, m1, m8, m6, m4, m9, m7, m5, m12, m10, m11].
Here are some details on σ is applied to the subsequence, [m4, m5, m6, m7, m8, m9], of the information sequence D. Applying σ creates a new permuted subsequence [m8, m6, m4, m9, m7, m5]. The 0th element of the permuted subsequence is m8 because σ(0)+4=8. The first element of the permuted subsequence is m6 because σ(1)+4=6. The second element of the permuted subsequence is m4 because σ(2)+4=4. The third element of the permuted subsequence is m9 because σ(3)+4=9. The fourth element of the permuted subsequence is m7 because σ(4)+4=7. The fifth element of the permuted subsequence is m5 because σ(5)+4=5. Notice that 4 is added each time because 4 is the sum of the lengths of the previous permutations applied to D. In this particular case, λ is the only previous permutation applied to D and λ's length is 4 so the sum is 4.
Further details are provided here on how to apply γ to the subsequence [m10, m11, m12] of the information sequence D. Applying γ creates a new permuted subsequence [m12, m10, m11]. The 0th element of the permuted subsequence is m12 because γ(0)+10=12. The first element of the permuted subsequence is m10 because γ(1)+10=10. The second element of the permuted subsequence is m11 because γ(2)+10=11. Notice that 10 is added each time because 10 is the sum of the lengths of the previous permutations, λ and σ, applied to D.
In a similar way, λ, σ, and γ can permute the sequence of states S=[s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12]. After applying λ, σ, and γ, the permuted sequence is [s2, s0, s3, s1, s8, s6, s4, s9, s7, s5, s12, s10, s11].
In general, let D be a sequence of information [m0, m1, m2, m3, m4, . . . mn-1] with n information elements. Choose any sequence of permutations [σ1, σ2, . . . σk], where σ1 is a permutation of length n1, σ2 is a permutation of length n2, and so forth up to, σk is a permutation of length nk, and all the lengths sum to n. In other words, n1+n2+n3+ . . . +nk=n. Permute the information sequence D with this sequence of permutations so that the new permuted information sequence is [mα
Similarly, let S be a sequence of states [s0, s1, s2, s3, s4, . . . sn-1] with n elements. Choose any sequence of permutations [σ1, σ2, . . . σk], where σ1 is a permutation of length n1, σ2 is a permutation of length n2, and so forth, σk is a permutation of length k, and all the lengths sum to n. In other words, n1+n2+ . . . +nk=n. Permute this sequence of states S: the permuted sequence is [sσ
6.14 Initializing Permutations with a Generator
A NADO key generator is a collection of integers, or a sequence of bits interpreted as a collection of integers or a sequence of bytes, where 8 bits is a byte.
To generate a permutation σ, first initialize σ to the identity permutation, where n is the size of σ. A part of the NADO key generator can be a sequence of non-negative integers, denoted as k0, k1, . . . , km. When the following three conditions hold,
In the case where the three previous conditions do not hold, note that num_keys is m+1. Also, k[j] corresponds to key generator kj. Further sigma_inverse corresponds to σ−1 and similarly, sigma_inverse [i] corresponds to σ−1(i). Finally, mod corresponds to modulo arithmetic. In an embodiment, execute the steps in the following for loop to initialize permutation σ.
In embodiments, the permutations used in processes S and P can be initialized from the NADO key generators using either of these methods.
6.15 Updating Permutations in the S or P Process
This section describes how to create an unpredictable sequence of permutations that are used in the P process and the S process. There is an initial permutation μ with length L. K=[k0, . . . , kn-1] represents the key generator KP for process P or the key generator KS for process S. s is an index satisfying 0≤s<L. μ represents a permutation that can represent the substitution box σ in the S process or the permutation that diffuses the bits across a block in the P process, as described in section 6.7. μ−1 is the inverse permutation of μ; in other words, μ∘μ−1(a)=a for every a satisfying 0≤a<L. In this code, notice that permutation μ: {0, . . . , L−1}→{0, . . . , L−1}, since programming languages generally use arrays that start at 0 instead of 1.
The number of times the loop is executed is based on a variable num_iterates. In the code shown below, mu corresponds to μ. The expression mu_inverse corresponds to μ−1 and mu_inverse(s) is μ−1(s). The expression k[j] corresponds to kj. The expression mod means perform modulo arithmetic. 23 mod 11 is 1. In an embodiment, the next permutation is generated by the instructions in the following for loop.
Before entering the for loop, suppose μ: {0, . . . , 255}→{0, . . . , 255} is the permutation:
[44,248,189, 104, 187,201,127, 3, 220,136,155,237,86,144,166,27,152,204,150,202 114,157,67,245,172,22,89,167,214,145,42,191,57,77,186,251,31,161,221,111, 250,51,117,205,0,48,79,165,76,209,181,151,198,78,200,129,179,49,230,226,102, 222,146,203,30,227,70,196,140,109,177,63,32,75,228,178,253,43,10,105,38,128, 11,174,23,215,25,223,110,182,137,216,176,229,141,163,212,94,143,193,219,88, 133,218,197,180,90,171,255,84,95,81,124,185,108,121,247,194,87,40,9,41,238, 92,131,168,184,115,2,14,54,103,17,122,26,192,246,4,208,225,71,119,126,118,33, 130,183,46,101,159,224,1,125,142,107,217,37,234,242,15,35,239,211,236,65,154, 16,5,34,98,61,156,53,6,59,100,162,116,206,68,169,85,58,113,45,62,148,106,243, 249,7,55,147,66,91,233,39,36,47,190,252,29,235,82,96,60,188,97,18,213,24,153, 240,158,195,139,232,72,120,93,135,210,199,164,149,99,160,134,13,19,83,52,132, 175,231,123,241,28,207,73,112,64,50,12,80,74,20,56,8,173,254,138,244,170,69,21]
One iteration of the loop is described when r is 0. Suppose the key size n is 79. Before entering the loop, suppose s is 3 and k[0] is 7.
The first instruction j=r mod n sets j to 0. The second instruction i=k[j] mod L sets i to 7. For the transposition instruction, the elements μ(7) and μ−1(3) of μ are transposed. μ(7)=3 and μ−1(3)=7.
Thus, the third element (104) and the seventh element (3) are swapped. μ is updated to:
44,248,189, 3, 87,201,127, 104, 220,136,155,237,86,144,166,27,152,204,150,202 114,157,67,245,172,22,89,167,214,145,42,191,57,77,186,251,31,161,221,111, 250,51,117,205,0,48,79,165,76,209,181,151,198,78,200,129,179,49,230,226,102, 222,146,203,30,227,70,196,140,109,177,63,32,75,228,178,253,43,10,105,38,128, 11,174,23,215,25,223,110,182,137,216,176,229,141,163,212,94,143,193,219,88, 133,218,197,180,90,171,255,84,95,81,124,185,108,121,247,194,87,40,9,41,238, 92,131,168,184,115,2,14,54,103,17,122,26,192,246,4,208,225,71,119,126,118,33, 130,183,46,101,159,224,1,125,142,107,217,37,234,242,15,35,239,211,236,65,154, 16,5,34,98,61,156,53,659,100,162,116,206,68,169,85,58,113,45,62,148,106,243, 249,7,55,147,66,91,233,39,36,47,190,252,29,235,82,96,60,188,97,18,213,24,153, 240,158,195,139,232,72,120,93,135,210,199,164,149,99,160,134,13,19,83,52,132, 175,231,123,241,28,207,73,112,64,50,12,80,74,20,56,8,173,254,138,244,170,69,21]
Also, μ−1 is updated accordingly with the changes μ−1(104)=7 and μ−1(3)=3. The last instruction is s=(s+mu(i)) mod 256 which is computed as s=(3+104) mod 256=107.
6.16 The S Process
This section describes how permutations are used to represent and compute a substitution box. In an embodiment, a substitution box used in process S is a permutation σ in the symmetric group S256. In alternative embodiments, the substitution boxes used in process S may be permutations in the symmetric group S512, S2048 or even S65536. In process S, the substitution box is not static during the encryption process. It is updated based on methods shown in 6.15. In some embodiments, the avalanche effect of the one-way functions used during the key generator updating of KS helps unpredictably update the substitution box σ.
An embodiment is further described where the permutation σ is in S256 and the block size M for the P process is 512 bits, where this block is represented as 64 bytes [e1, e2, . . . , e64]. In this embodiment, during the S process, σ1 is applied to the first byte e1, received from process P, σ2 is applied to the second byte e2, received from process P, and so on, all the way up to σ64 is applied to the 64th byte e64, received from process P. After each application of σk(ek), σk is updated to σk+1. In other words, the substitution box σk in S256 is updated after each byte of encryption. After the last byte of encryption by σ64(e64), the key generator KS(n) is updated using the methods described in section 6.9. After the key generator KS(n) is updated to the new key generator KS(n+1), the new key generator KS(n+1) helps further transpose the elements of σ64, using transposition methods similar to those described in section 6.12.
To distinguish between the successive 64 byte blocks, σ1 represents the substitution box that encrypts the first byte of the first 64 byte block; σ64 represents the substitution box that encrypts the 64th byte of the first 64 byte block; σ65 represents the substitution box that encrypts the first byte of the second 64 byte block; σ66 represents the substitution box that encrypts the second byte of the second 64 byte block, and so on.
Suppose σ1 initially equals:
[206, 45, 204, 90, 93, 99, 166, 53, 3, 9, 211, 68, 233, 229, 23, 178, 159, 205, 213, 43, 185, 2, 209, 51, 227, 76, 238, 4, 247, 73, 191, 142, 122, 201, 85, 49, 54, 37, 219, 86, 151, 164, 102, 231, 162, 78, 123, 147, 148, 71, 144, 132, 35, 52, 169, 216, 218, 128, 214, 228, 225, 177, 136, 103, 236, 104, 146, 224, 11, 33, 44, 1, 126, 10, 27, 56, 193, 24, 65, 16, 174, 5, 8, 230, 248, 255, 47, 250, 105, 82, 115, 120, 167, 235, 25, 114, 69, 244, 116, 170, 29, 62, 118, 125, 139, 58, 34, 28, 223, 176, 101, 0, 194, 249, 131, 89, 160, 7, 111, 192, 150, 96, 32, 12, 135, 110, 237, 94, 57, 112, 74, 240, 215, 234, 17, 220, 40, 252, 221, 38, 81, 155, 246, 137, 119, 196, 88, 175, 163, 199, 64, 138, 46, 232, 239, 165, 127, 183, 195, 222, 60, 189, 243, 70, 158, 212, 72, 55, 200, 21, 121, 181, 50, 190, 254, 179, 48, 245, 207, 124, 95, 203, 42, 157, 106, 173, 152, 63, 15, 130, 226, 14, 202, 156, 186, 66, 149, 100, 97, 187, 39, 41, 208, 113, 242, 134, 182, 98, 83, 184, 107, 154, 141, 217, 129, 161, 210, 36, 253, 197, 26, 251, 19, 6, 91, 171, 77, 20, 59, 13, 140, 92, 153, 180, 18, 198, 87, 108, 84, 67, 30, 117, 172, 109, 61, 143, 31, 188, 80, 241, 133, 168, 22, 75, 79, 145]
This means that σ1 maps 0 to 206, σ1(1)=45, σ1(2)=204, . . . and σ1(255)=145. In this notation, the byte 0 corresponds to the eight bits 00000000. Byte 1 corresponds to the eight bits 00000001. The byte 2 corresponds to the eight bits 00000010. The byte 3 corresponds to the eight bits 00000011 . . . . The byte 149 corresponds to the bits 10010101 . . . . The byte 255 corresponds to the eight bits 11111111. For example, in bits σ1(11111111)=10010001.
The function perturb_generator_w_hash(uchar* K, int n, uchar* digest, int q)—defined in the C code listing below—is a method for updating a key generator or order generator. This method of updating the generator was described in section 6.9. It exploits the avalanche effect of the one-way hash function one_way_hash(uchar* digest, uchar* K, int n). In an embodiment, one_way_hash(uchar* digest, uchar* K, int n) is implemented with Keccak. In another embodiment, it is implemented with SHA-512. In another embodiment, it is implemented with BLAKE. In another embodiment, it is implemented with JH. In another embodiment, it is implemented with GrØstL.
In the C listing, function transpose(uchar* mu, uchar* mu_inverse, int a, int b) transposes the elements of permutation mu (μ) and mu_inverse (μ−1) as described in section 6.12, titled PERMUTATIONS. transpose_sbox(uchar* mu, uchar* mu_inverse, int offset, int num_transpositions) transposes the elements of mu and mu_inverse based on the digest derived from the current key generator. Since the digest values exhibit an avalanche effect, this updates the permutation mu in an unpredictable manner.
In an embodiment, perturb_sbox(uchar* sbox, . . . , uchar* digest, int q) transposes about the same number of elements as the number of elements in the symmetric group. For example, in the C code embodiment, transpose_sbox( . . . ) is called inside a loop 8 times and num_transpositions=32. Thus, 8*32=256 and the substitution box S_box lies in the symmetric group S256. This embodiment follows the observation from section 6.12 that it is possible with n transpositions to transform any permutation in Sn to any other permutation in Sn.
Function call initialize_permutatatin_inverse (S_box_inverse, S_box, S_BOX_LENGTH); exits with the array S_box_inverse storing the inverse permutation of σ1 i.e., σ1−1.
In the embodiment shown below, function one_way_hash is implemented with SHA-512. After encrypting the first block of 64 bytes perturb_sbox(S_box, S_box_inverse, 32, K, N, Digest); is called. Consequently, σ65 equals
[176,53,151,217,20,99,87,247,251,228,25,65,27,196,206,98,175, 198,171,52,173,2,105,233,28,190,238,4,162,156,136,70,186, 165,209,168,82,178,174,10,9,195,102,231,249,220,14,158,54, 202,144,132,253,90,213,133,146,37,187,128,122,44,143,5,55, 7,218,46,160,95,113,1,172,232,135,166,142,6,68,185,48, 103,141,159,248,255,58,245,236,69,115,120,75,71,36,114,91, 194,116,180,205,104,118,31,139,157,169,242,56,214,101,76,254, 63,131,89,92,239,203,161,8,96,49,100,35,110,237,94,134, 112,84,224,240,226,59,252,211,246,30,22,3,216,73,137,62, 183,88,147,197,200,184,138,12,29,81,97,127,199,77,153,125, 0,74,154,149,51,219,189,241,43,121,38,229,126,244,16,24, 117,108,124,13,19,85,193,86,188,152,208,42,130,234,21,18, 181,182,39,227,191,79,223,215,170,207,109,106,221,93,192,148, 78,107,250,163,57,41,32,15,230,23,150,34,50,155,17,179, 26,66,47,129,212,140,11,222,40,225,177,72,45,123,235,61, 80,164,201,33,67,119,243,204,83,111,60,64,167,210,145]
perturb_sbox(S_box, S_box_inverse, 32, K, N, Digest); is called again after encrypting the second block of 64 bytes. Consequently, σ129 equals
[97,6,252,94,20,68,99,13,240,228,202,66,70,83,9,222,133, 154,87,82,207,89,147,176,28,157,80,65,81,203,136,131,57, 16,199,48,139,214,193,5,95,231,7,166,249,104,179,192,114, 183,115,178,172,245,105,209,116,61,243,128,170,44,145,210,142, 162,159,126,47,255,73,124,58,204,56,33,184,153,235,221,135, 112,141,143,29,106,93,90,181,118,144,64,152,194,36,219,85, 244,37,111,251,125,107,238,67,102,239,78,177,165,241,217,254, 225,100,122,190,200,71,195,8,224,49,88,35,17,163,31,150, 79,253,130,205,226,167,75,113,246,30,212,3,180,188,137,42, 232,160,213,247,191,1,138,168,121,186,220,189,223,164,27,175, 62,74,134,54,51,52,127,101,43,236,38,229,174,215,182,206, 146,156,185,96,19,14,208,23,155,120,218,69,123,234,21,18, 22,60,39,77,171,55,161,216,211,4,148,103,46,117,187,109, 10,92,76,72,53,25,237,15,230,91,0,34,50,119,110,173, 26,197,84,129,32,140,198,86,40,59,149,227,45,132,63,41, 196,201,248,12,108,242,233,151,158,11,24,98,2,250,169]
In some embodiments, a static substitution box with a good avalanche effect may be applied first, followed by a dynamic substitution box. It is known that the static substitution box shown below exhibits statistics that are close to a good avalanche effect [57]. In an embodiment, consider this substitution box r shown below.
[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202, 130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183, 253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4, 199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9, 131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83, 209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208, 239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81, 163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205, 12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96, 129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224, 50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231, 200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186, 120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112, 62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225, 248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140, 161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]
Using function composition, in an embodiment, σ1∘τ is applied to the first byte of information e1 and computed as σ1∘τ(e1). On the second byte e2 of information σ2 ∘τ(e2) is computed. On the 65th byte e65 of information, σ65∘τ(e65) is computed. On the 129th byte e129 of information, σ129 ∘τ(e129) is computed.
As an example of this composition of substitution boxes, if e65=255, then σ65∘τ(e65)=σ65(22)=105, based on the substitution boxes previously shown for σ65 and τ. If e129=255, then σ129∘τ(e129)=σ65(22)=147.
This composition of substitution boxes yields a favorable cryptographic property because a static substitution box (static permutation) can be used that is known to exhibit close to a good avalanche effect and the other substitution box is unknown to the adversary. Furthermore, due to the good avalanche effect of one-way hash functions and the use of the key generator updating, the unknown substitution box unpredictably changes as the encryption process executes. This increases the computational complexity of potential cryptographic attacks.
6.17 Process H as a State Generator
In an alternative embodiment, process H is a state generator. This process is a dynamical system that creates a sequence of states. An iterative autonomous dynamical system is created by a function ƒ: X→X, where X is a set. When a function ƒ and an initial orbit point x are chosen, the iteration of ƒ on x creates a sequence of states: [x, ƒ(x), ƒ∘ƒ(x), ƒ∘ƒ∘ƒ(x), . . . ]. This sequence of states is called the orbit of x with the function ƒ. It is also possible to create a sequence of states using a sequence of functions [ƒ1, ƒ2, ƒ3, ƒ4, . . . ], rather than a single function. The iteration of this collection on an initial orbit point x creates a sequence of states: [x, ƒ1 (x), ƒ2 ∘ƒ1 (x), ƒ3 ∘ƒ2 ∘ƒ1 (x), ƒ4 ∘ƒ3 ∘ƒ2 ∘ƒ1(x), . . . ]. As the system is iterated, if the function applied sometimes changes, then this is an iterative non-autonomous dynamical system [58]. An iterative autonomous dynamical system is a special case of a non-autonomous dynamical system. If all the ƒi represent the same function, then this is the definition of an autonomous dynamical system.
A smooth dynamical system is created by a vector field on a manifold [59]. If the vector field does not change over time, then it is a smooth autonomous dynamical system. If the vector field changes smoothly over time, then it is a smooth non-autonomous dynamical system. In a smooth dynamical system, one creates a sequence of unpredictable states by sampling the coordinates of the trajectory at successive time intervals: t0<t1<t2< . . . .
Below is a summary of an alternative embodiment when the H process acts as a state generator.
Process H State Generator Encryption. For each block of plaintext of size n, this part describes an encryption process P∘S∘H. Plaintext [m1, m2, . . . , mn] is the current block that will be encrypted.
In one embodiment, the current key generator for process H is KH=[k1, k2, . . . , kn] and m is a positive integer such that m<n. The current plaintext element p will be encrypted by the next state, which is determined as described here. In an embodiment, key generator KH is used to help construct a state generator, wherein one-way hash function Φ is applied to two different portions of the key generator KH and the resulting two message digests are compared to generate the next state. In an alternative embodiment, only one message digest is computed and states are determined based on the parity of elements of this single message digest.
In an embodiment, a one-way function Φ is applied to one portion k1, k2, . . . , km and Φ is applied to a second portion kj, kj+1, . . . , km-j where j+1<n−m or j+1<m. In an embodiment, one message digest is Φ(k1, k2, . . . , km) and the second message digest is Φ(k3, k4, . . . , km-2). In an alternative embodiment, when m is an even number, one message digest is Φ(k1, k3, k5, . . . , km-1) and the second message digest is Φ(k2, k4, k6, . . . , km).
Let [t1, t2, . . . , tq] denote the first aforementioned message digest and let [u1, u2, . . . , uq] denote the second aforementioned message digest. In one embodiment, plaintext message element p is 8 bits and each bit of p is encrypted by comparing elements of the first message digest [t1, t2, . . . , tq] with elements of the second message digest [u1, u2, . . . , uq].
Suppose q≥40. In an embodiment, the first bit of p is exclusive-or'd with 1 if [u1, u9, u7, u25, u33] is less than [t1, t9, t17, t25, t33] with respect to the dictionary order. The first bit of p is left unchanged if [u1, u9, u17, u25, u33] is greater than [t1, t9, t17, t25, t33] with respect to the dictionary order. Ties are determined by whether u33 is odd or even.
The following code computes [u1, u9, u17, u25, u33] is less than [t1, t9, t17, t25, t33] with respect to the dictionary order.
In an embodiment, the second bit of p is exclusive-or'd with 1 if [u2, u10, U18, u26, u34] is less than [t2, t10, t18, t26, t34] with respect to the dictionary order. The second bit of p is left unchanged if [u2, u10, u18, u26, u34] is greater than [t2, t10, t18, t26, t34]. Ties are resolved the same way as for bit 1: i.e., if (u[34] is even)
return true; else return false;.
In an embodiment, the third bit of p is exclusive-or'd with 1 if [u3, u11, u19, u27, u35] is less than [t3, t11, t19, t27, t35] with respect to the dictionary order. The third bit of p is left unchanged if [u3, u11, u19, u27, u35] is greater than [t3, t11, t19, t27, t35]. Ties are resolved the same way as for bit 1: i.e., if (u [35] is even) return true;
else return false;
This same pattern of dictionary order comparison and encryption is continued for bits 4, 5, 6, 7 and bit 8 of plaintext information p.
In some other embodiments, q<40. In some embodiments, a different comparison operator is used on the two message digests. In some embodiments, only one message digest is computed and each bit of the plaintext is encrypted, based on whether one element of the message digest has an odd or even number of 1 bits.
6.18 Distribution of the NADO Key Generators
NADO uses symmetric private key generator sequences KH, KP and KS. This means the initial private key generator that the encryptor uses for each process is the same as the private key generator that the decryptor uses for that corresponding process. There are different methods for distributing the NADO private key generators.
Method 1 is preferable when the number of potential recipients of an encrypted transmission is large and potential recipients are unknown. These applications include: Secure wireless applications such as mobile phone conversations, wireless e-mail transmissions, wireless transactions, wireless e-commerce, and satellite transmissions. Secure software applications such as e-mail applications, enterprise computing, online e-commerce, online messaging, enterprise portal software, and other internet applications.
In applications where the number of potential recipients of an encrypted transmission is small and the recipients are known beforehand, method 2 can be used, where sending and receiving agents can agree to have the private key or key generators transmitted in a secure way. This method can be used when there are concerns about man-in-the-middle attacks on the key exchange.
6.19 Exchange of Key Generators
In the prior art, the Diffie-Hellman-Merkle key exchange is a key exchange method where two parties (Alice and Bob) that have no prior knowledge of each other jointly establish a shared secret key over an insecure communications channel. In this specification, an extension to this exchange method is used by two parties (Alice and Bob) to establish an initial shared key generator KH(0) for the H process; establish an initial shared key generator KP(0) for the P process; and establish an initial shared key generator KS(0) for the S process.
The key generator exchange depends on the properties of abelian groups. A group G is a set with a binary operation *, (g2 means g*g and g5 means g*g*g*g*g), such that the following four properties hold:
In an abstract context, the operator is sometimes omitted so a*b is written as ab. ba Sometimes the identity of the group is represented as 1 when the group operation is a form of multiplication. Sometimes the identity of the group is represented as 0 when the group operation is a form of addition. The integers { . . . , −2, −1,0, 1, 2, . . . } with respect to the binary operation + are an example of an infinite group. 0 is the identity element. For example, the inverse of 5 is −5 and the inverse of −107 is 107. The set of permutations on n elements {1,2, . . . , n}, denoted as Sn, is an example of a finite group with n! elements where the binary operation is function composition. Each element of Sn is a function σ: {1, 2, . . . , n}→{1, 2, . . . , n} that is 1 to 1 and onto. In this context, σ is called a permutation. The identity permutation e is the identity element in Sn, where e(k)=k for each k in {1, 2, . . . , n}.
If H is a non-empty subset of a group G and H is a group with respect to the binary group operation * of G, then H is called a subgroup of G. H is a proper subgroup of G if H is not equal to G (i.e., H is a proper subset of G). G is a cyclic group if G has no proper subgroups. The integers modulo n (i.e., Zn={[0], [1], . . . [n−1]} are an example of a finite group with respect to addition modulo n. If n=5, [4]+[4]=[3] in 5 because 5 divides (4+4) 3. Similarly, [3]+[4]=[3] in 5. 5 is a cyclic group because 5 is a prime number. When p is a prime number, p is a cyclic group containing p elements {[0], [1], . . . [p−1]}. [1] is called a generating element for cyclic group p since [1]m=[m] where m is a natural number such that 0<m<p−1 and [1]p=[0]. This multiplicative notation works as follows: [1]2=[1]+[1]; [1]3=[1]+[1]+[1]; and so on. This multiplicative notation (i.e. using superscripts) is used in the description of the key generator exchange described below.
There are an infinite number of cyclic groups and an infinite number of these cyclic groups are extremely large. The notion of extremely large means the following: if 21024 is considered to be an extremely large number based on the computing power of current computers, then there are still an infinite number of finite cyclic groups with each cyclic group containing more than 21024 elements.
Steps 1, 2, 3, 4, and 5 describe the key generator exchange.
Alice and Bob sometimes agree on finite cyclic group G and element g long before the rest of the key exchange protocol; g is assumed to be known by all attackers. The mathematical concepts of cyclic group, generating element and finite field are presented in [60].
Both Alice and Bob are now in possession of the group element gab, which can serve as the shared secret key. The values of (gb)a and (ga)b are the same because g is an element of group G. Alice can encrypt information m, as mgab, and sends mgab to Bob. Bob knows |G|, b, and ga. For finite groups, Lagrange's theorem implies that the order of every element of a group divides the number of elements in the group, denoted as |G|. This means x|G|=1 for all x in G where 1 is the identity element in group G. Bob calculates (ga)|G|−b=(g|G|)ag−ab=(gab)−1. After Bob receives the encrypted information mgab from Alice, then Bob applies (gab)−1 and decrypts the encrypted information by computing mgab(gab)−1=m.
6.20 Elliptic Curve Key Generator Exchange
This section describes an asymmetric key cryptography, called elliptic curve cryptography, which in some embodiments can be used to implement a key generator exchange. The notation Enc(E, m) is used to represent the result of encrypting plaintext m using an elliptic curve E. In what follows, the notation Dec(E, c) is used to represent the result of decrypting ciphertext c which is embedded as a point on elliptic curve E. In an embodiment, elliptic curve cryptography is an asymmetric cryptography method used to establish shared key generators between Alice and Bob.
In an embodiment, it is assumed that E is an elliptic curve over finite field p where p is a prime number and H is a cyclic subgroup of E(p) generated by the point P that lies in E(p). Alice wants to securely send information to Bob whose public key is (E, P, aP) and whose private key is the natural number a<p−1.
Alice executes the following Encryption Stage. Chose a random natural number b<p−1. Consider the plaintext information embedded as points m on E. Compute β=bP and γ=m+b(aP). Send the ciphertext Enc(E, m)=c=(β,γ) to Bob.
Bob executes the following Decryption Stage after receiving the ciphertext c=(β,γ). The plaintext m is recovered using the private key as Dec(E, c)=m=γ−aβ.
Elliptic curve computations over a finite field also enable Alice and Bob to establish common private key generators before the symmetric cryptography is started. The following is a simple example described here for illustrative purposes, not security purposes. Consider the elliptic curve E given by y2=x3+4x+4 over 13. It can be shown that E(13) has 15 elements which is necessarily cyclic. Also, P=(1, 3) is a generator of E. Assuming that Bobs public key is (E, P, 4P) where a=4 is the private key and m=(10, 2) is the information that Alice wants to send to Bob, then Alice performs the following. Alice chooses b=7 at random. Then Alice calculates Enc(E, m)=Enc(E, (10, 2))=(bP, m+b(aP))=(7P, (10, 2)+7(4P))=((0, 2), (10, 2)+7(6, 6))=((0, 2), (10, 2)+(12, 5))=((0, 2), (3, 2))=(β,γ)=c. Then Alice sends ciphertext c=(β,γ)=((0, 2), (3, 2)) to Bob who uses his private key to decrypt the ciphertext and recover information m=(10, 2) as follows: Dec(E, c)=(3, 2)−4(0, 2)=(3, 2)−(12, 5)=(3, 2)+(12, 8)=(10, 2). For further information on elliptic curves, see [61, 62].
In an embodiment, the 25519 curve [42] may be used to perform a elliptic curve key generator exchange. The curve 25519 function is p restricted x-coordinate multiplication on E(p2), where p is the prime number 2255−19 and E is the elliptic curve y2=x3+486662x2+x. The order of the basepoint 9 on curve 25519 is 2252+27742317777372353535851937790883648493 which is a prime number so the group for this elliptic curve is cyclic. Curve 25519 is conjectured to have a complexity of 2128 for conventional Turing machine algorithms, based on the last two decades of research on elliptical curve cryptography.
A private elliptic curve point for curve 25519 can be created by any sequence of 32 bytes (256 bits). In an embodiment shown in 136 of
Each corresponding public elliptic curve point is computed, using curve 25519, the basepoint 9 and the 32 byte private elliptic curve point that was obtained from non-deterministic generator 136 in
As a result of performing this exchange 6 times, Alice and Bob are able to establish a shared 64 bytes for key generator KH(0) and a shared 64 bytes for key generator KP(0), and also and a shared 64 bytes for key generator KS(0). In this embodiment and other embodiments, each of these shared key generators may be established independently of the other two.
Next a particular execution—of curve 25519 establishing a shared secret of 32 bytes between Alice and Bob—is described. From a non-deterministic generator (e.g., the hardware in
Alice uses her private elliptic curve point and basepoint 9 to compute on curve 25519 the following public key.
Alice sends her public elliptic curve point to Bob.
From non-deterministic hardware shown in
Bob uses his private elliptic curve point and basepoint 9 to compute on curve 25519 the following public elliptic curve point.
Bob sends his public elliptic curve point to Alice.
Next Alice uses her private elliptic curve point and Bob's public elliptic curve point to compute on curve 25519 the shared point shown below.
Similarly, Bob uses his private elliptic curve point and Alice's public elliptic curve point to compute on curve 25519 the shared point shown below.
When this exchange is performed 6 times, this enables Bob and Alice to establish 64 bytes of shared key generator KH(0) for process H, 64 bytes of shared key generator KP(0) for process P and 64 bytes of shared key generator KS(0) for process S.
Although the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the true spirit and scope of the invention. In addition, modifications may be made without departing from the essential teachings of the invention.
http://commons.wikimedia. org/wiki/File: Sha1_avalanche_effect.png#
This application claims priority benefit of U.S. Provisional Patent Application Ser. No. 61/865,134, entitled “NADO Cryptography using one-way functions”, filed Aug. 13, 2013, which is incorporated herein by reference; this application claims priority benefit of U.S. Provisional Patent Application Ser. No. 61/992,915, entitled “NADO Cryptography using key generators with one way functions”, filed May 14, 2014, which is incorporated herein by reference; this application claims priority benefit of U.S. Provisional Patent Application Ser. No. 62/004,852, entitled “NADO Cryptography Using One-Way functions”, filed May 29, 2014, which is incorporated herein by reference; this application claims priority benefit of the International Patent application with Application number PCT/US14/50462, entitled “NADO Cryptography Using One-Way Functions”, filed Aug. 10, 2014, which is incorporated herein by reference; this application claims priority benefit of U.S. Provisional Patent Application Ser. No. 62/056,537, entitled “Key Generators Strengthen Symmetric Cryptography”, filed Sep. 28, 2014, which is incorporated herein by reference; this application is a continuation-in-part of U.S. Non-provisional patent application Ser. No. 14/292,935, entitled “NADO Cryptography Using One-Way Functions”, filed Jun. 1, 2014, which is incorporated herein by reference. This application is a continuation-in-part of U.S. Non-provisional patent application Ser. No. 14/843,999, entitled “NADO Cryptography with Key Generators”, filed Sep. 3, 2015, which is incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
4991210 | Chaum | Feb 1991 | A |
6324558 | Wilber | Nov 2001 | B1 |
6477254 | Miyazaki | Nov 2002 | B1 |
8576283 | Foster | Nov 2013 | B1 |
8832466 | McGregor, Jr. | Sep 2014 | B1 |
8837719 | Reffe | Sep 2014 | B2 |
20060174323 | Brown | Aug 2006 | A1 |
20070234034 | Leone | Oct 2007 | A1 |
20090080647 | Mantin | Mar 2009 | A1 |
20090228698 | Shirlen | Sep 2009 | A1 |
20090228981 | Shirlen | Sep 2009 | A1 |
20100111296 | Brown | May 2010 | A1 |
20110069834 | Urbanik | Mar 2011 | A1 |
20110283110 | Dapkus | Nov 2011 | A1 |
20120185698 | Fiske | Jul 2012 | A1 |
20130136256 | Relyea | May 2013 | A1 |
20130287207 | Zaverucha | Oct 2013 | A1 |
20150026461 | Devi | Jan 2015 | A1 |
20150127950 | Irvine | May 2015 | A1 |
20170063530 | Fiske | Mar 2017 | A1 |
20180233069 | Fiske | Aug 2018 | A1 |
20200226952 | Lightowler | Jul 2020 | A1 |
20210152351 | Anson | May 2021 | A1 |
20210165916 | Abhyankar | Jun 2021 | A1 |
Number | Date | Country | |
---|---|---|---|
20200228315 A1 | Jul 2020 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 14843999 | Sep 2015 | US |
Child | 16826304 | US |