AU5342000A - A method of combining a serial keystream output with binary information - Google Patents

A method of combining a serial keystream output with binary information Download PDF

Info

Publication number
AU5342000A
AU5342000A AU53420/00A AU5342000A AU5342000A AU 5342000 A AU5342000 A AU 5342000A AU 53420/00 A AU53420/00 A AU 53420/00A AU 5342000 A AU5342000 A AU 5342000A AU 5342000 A AU5342000 A AU 5342000A
Authority
AU
Australia
Prior art keywords
generator
bytes
key
byte
keystream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
AU53420/00A
Other versions
AU750408B2 (en
Inventor
William Michael Raike
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
RPK New Zealand Ltd
Original Assignee
RPK New Zealand Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by RPK New Zealand Ltd filed Critical RPK New Zealand Ltd
Priority to AU53420/00A priority Critical patent/AU750408B2/en
Publication of AU5342000A publication Critical patent/AU5342000A/en
Assigned to RPK NEW ZEALAND LIMITED reassignment RPK NEW ZEALAND LIMITED Amend patent request/document other than specification (104) Assignors: RAIKE, WILLIAM MICHAEL
Application granted granted Critical
Publication of AU750408B2 publication Critical patent/AU750408B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Description

Regulation 3.2
AUSTRALIA
PATENTS ACT, 1990 COMPLETE SPECIFICATION 0 .r 0 FOR A STANDARD PATENT
ORIGINAL
IP Australia Documents received on: 1 6 AUG 2000 Batch No: Name of Applicant: Actual Inventor: Address for service in Australia: Invention Title: WILLIAM MICHAEL RAIKE William Michael RAIKE A J PARK, Level 11, 60 Marcus Clarke Street, Canberra ACT 2601 A Method of Combining a Serial Keystream Output with Binary Information The following statement is a full description of this invention, including the best method of performing it known to me/us -1- A METHOD OF COMBINING A SERIAL KEYSTREAM OUTPUT WITH BINARY INFORMATION TECHNICAL FIELD This invention relates to cryptographic systems and more particularly but not solely to a method of combining a serial keystream output with binary information for use in a public key encryption system. New Zealand Patent Specifications 277128 and 329808 claim other aspects of the invention disclosed herein.
BACKGROUND ART Data security is an increasingly important aspect in the design of modern communication systems. Encryption systems have been devised in an attempt to scramble or code a message so that to an observer (or "attacker"), the message being communicated appears nonsensical. Many encryption systems have utilised the idea of "keys" with which the message to be communicated is first encoded by the sender and then decoded by the receiver of the message. In this type of conventional encryption system there is the disadvantage that before a message can be decrypted by the intended recipient of the message, the sender of the message must first communicate, to the intended recipient, the decryption key. In addition, any change 20 in the encryption key requires a corresponding change in the decryption key which "must then be transmitted to the intended recipient. In the transmission or transportation of keys to the recipient there is always a danger than an observer or attacker will discover the key.
Public-key encryption systems have been developed in order to overcome this problem of the necessity to exchange keys. This type of system was introduced by Diffie and Hellman in 1976 in which each participant in the communication system has two keys, a public key which is made publicly available to all participants in the communication system and a private key which each participant keeps to himself. Each participant's private key is determined (either by choice or random selection) and from -2the private key the public key is generated. The public key can be thought of as the encryption key while the private key may be thought of as the decryption key In public key encryption systems, the mathematical relationship which exists between the keys is often a "one-way function." That is, it is arranged that the public key may be relatively easily generated from the private key, however, determining the private key from the public key is computationally infeasible (that is, given an enormous quantity of computational resources, determination of the private key could probably not be effected within a lifetime).
In order for participant A to communicate a message M to a participant B in a public-key encryption system, user A first obtains user B's public key from a publicly available register or file and uses it to encrypt the message M. The ciphertext C is the result of encrypting the message M and is transmitted to user B who then transforms the ciphertext C using his own private key to obtain the message M.
To an observer or attacker wanting to discover the message M and who is aware of the public key and perhaps also has full knowledge of the cryptographic system, the oo .private key (decryption key) must be determined from the known public key. As has been mentioned, the system relies upon the fact that this operation is extremely difficult to carry out. Alternatively, the attacker may have nothing but the intercepted encrypted •go* message and a limited knowledge of the statistical properties of the message language.
20 An example of a public-key encryption system is disclosed in U.S. Patent No.
4,405,829 to Rivest et al. The one-way function disclosed makes use of the fact that very large numbers are very hard to factorise. This system, however, has the disadvantage of requiring extensive multiplication of large (for example, 512-bit) integers, which is a very slow process. Another disadvantage of this system is that the encryption method used is completely deterministic, that is, if the same message is later sent to the same recipient, the identical ciphertext is produced, which can enable an attacker or eavesdropper to obtain significant information about message traffic being sent. A further disadvantage is that the system does not permit engineering trade-offs or compromises between speed and security, whereas it would be an advantage to be able to design a variety of types of cryptographic systems such as one with extremely high speed and moderate security, or one with moderately high speed and extremely high security. Yet another disadvantage is that the system is cumbersome to implement using very fast special purpose electronic devices as opposed to general-purpose digital computers.
Another desirable property of a secure communication system is the ability to conclusively prove that the participant indicated as being the originator of a message is the actual originator of the message. This is the so-called signature and authentication problem.
A prior example of a proposed public-key distribution system is disclosed in U.S. Patent No. 4,200,770 to Hellman et al. However, the proposed system is a "key exchange" system rather than a true public-key encryption system. Hellman and Diffie also proposed a digital signature scheme in the paper "Privacy and Authentication: An Introduction to Cryptography," published in the Proceedings of the IEEE on page 401 of Volume 67, Number 3 of March 1979. In the signature system disclosed therein a participant A who wishes to send a message M to participant B first encrypts the message text M with his own private key, then encrypts this result with user B's public key to produce the ciphertext C which is transmitted to user B. User B then utilises his private key to transform the ciphertext to a form whereby a further transformation by user A's public key will produce the message text M. It can be seen that if the message 20 is reproduced after this series of steps then the message must have come from user A.
One disadvantage of this system is that the encryption process must be performed twice by both the sender and receiver, adversely affecting the speed of the process. Another disadvantage is that it is necessary, in order to decrypt a message, to know the sender's public key, implying a heavy demand for access to the public key file. A further disadvantage is that the problem of managing the public key file is complicated by the possible need to retain and identify old public keys even after they may have been superseded. Yet another disadvantage is that the public key file is required to play a part in both privacy and authentication, whereas it would be an advantage to be able to separately manage information needed to accomplish these quite different functions.
SUMMARY OF INVENTION It is an object of the present invention to provide a method of combining a serial keystream output with binary information for use in a public-key encryption system.
Accordingly the invention consists in a method of combining a serial keystream output with binary information P, comprising a succession of parts PN in which each part P, represents a number of bytes ni, to produce an encrypted bit stream C comprising a succession of parts Ci, said method comprising the steps of, for each successive part P,: generating a pseudorandom permutation T of the bytes 1, ni using a plurality of bytes of the serial keystream output; permuting the relative positions of the bytes n i within the part, P according to the permutation T to form an intermediate part Ii; forming the i-th part C i of the encrypted bit stream by for each byte B of the intermediate part Ii; 15 generating one or more bytes of the serial keystream output; and replacing the byte B with a quantity that depends upon the byte B and the said generated byte or bytes of the serial keystream output.
BRIEF DESCRIPTION OF DRAWINGS 20 Figure 1 is a diagrammatic representation of a mixture generator with MLSRG component generators which could be utilised to implement the present invention, Figure 2 is a diagrammatic representation of a preferred implementation of the mixture generator of Figure 1, namely a Geffe-type generator, and Figure 3 is a diagrammatic representation of an example configuration of shift registers shown in Figure 2.
Figure 4 is a block diagram of a hardware realisation of an encrypter, and Figure 5 is a block diagram of a hardware realisation of a decrypter.
BEST MODES FOR CARRYING OUT THE INVENTION This description discloses a preferred embodiment of the present invention and also mentions several variations. The discussion in this document is from the viewpoint of implementation of the invention in software on a digital computer, but it should be noted that it is possible to implement all, or part, of the entire system using special purpose electronic hardware components. Such components include, but are not restricted to, logic elements such as LSI memories, shift registers, field-programmable gate arrays (FPGAs) and discrete logic.
1. Classification of the Present Invention One way of classifying public-key cryptosystems, sometimes referred to as asymmetric-key systems, is according to the type of one-way function that relates private-key/public-key pairs, and more specifically according to the mathematical problem whose solution is required in order to invert the one-way function to infer 15 a private key from its public key). Three such problems account for virtually all publico*key systems proposed to date: prime factorisation, discrete logarithms, and knapsacks.
For example, the best-known public-key algorithm, RSA, is based on the difficulty of prime factorisation of large integers. Diffie-Hellman, which is a public key distribution system rather than a true public-key cryptosystem, is based on the discrete logarithm 20 problem, as is the E1Gamal public-key cryptosystem.
In mathematical terms, the present system is based upon the discrete logarithm problem. This means that in this system a public key is calculated from a private key using operations mathematically equivalent to exponentiation in finite fields.
Consequently, breaking the system in the sense of computing a private key from its public key requires an attacker to compute logarithms over finite fields. For reasons of computational efficiency, simplicity and speed, as well as security, the finite fields underlying the present system are the Galois fields GF[2P], where in addition p is selected so that 2 P 1 is a large prime (a "Mersenne" prime). As will be seen, the system involves exponentiation over more than one such field.
Another way of classifying cryptographic systems pertains to whether they are deterministic or non-deterministic. The first mention of non-deterministic cryptosystems is believed to be due to Carl Nicolai. Although the notion can be stated more or less precisely in a number of ways, one of the properties of a non-deterministic cryptosystem is that even if the same key is used to encrypt a given plaintext on more than one occasion, the resulting ciphertexts will differ in a non-systematic way, ideally in a truly random fashion. The present system is a non-deterministic cryptosystem.
In transforming plaintext into ciphertext, a cryptosystem may may increase or decrease the length of the original plaintext, or may leave it unchanged. The present system produces a ciphertext that is exactly the same length as the plaintext, except that it prefixes the ciphertext with a short header block. The length of this header block depends upon the parameters chosen for a particular implementation, but will typically be between 64 and 256 bytes. Its format is not critical.
15 2. Mixture Generators The central component of the invention is a pseudorandom binary keystream generator of a new type referred to here as a mixture generator, by analogy with the concept, taken from probability theory, of a mixture of independent and identically distributed random variables. A mixture generator consists of a single pseudorandom 20 binary generator, such as a maximal-period linear shift register generator (MLSRG) or a maximal-period multiplicative congruential generator (MCG), whose outputs or states are used to successively select, in a memoryless fashion, one member of a set of other component pseudorandom binary generators. Figure 1 shows a mixture generator where the mixer generator Gm is a maximal-period linear shift register whose last three stages at time T are used to select one of 8 other MLSRGs (Go, Gi, whose output is to be used at time T. The clock rate of the mixer generator Gm can be taken as three times the clock rate of the component generators A simpler example, shown in Figure 2, is a special case of this and is known as a Geffe generator. In Figure 2, the last stage of the mixer generator Gm selects the output of the top generator
G
t if the mixer output at time T is a 1, or the output of the bottom generator G, if the mixer output at time T is a 0. More specifically, a concrete instance of this configuration is the case in which the mixer generator has 89 stages with (primitive) generator trinomial l+x 38
+X
8 9 the top generator has 127 stages with (primitive) generator trinomial l+x 3 0 +x 1 2 7 and the bottom generator has 521 stages with (primitive) generator trinomial 1+x' 6 8
+X
5 21 A smaller (and less secure) instance is one in which the three generators correspond to the respective trinomials l+x' 3
+X
87 1+x 38
+X
89 and 1+X 3
°+X
1 2 7 When using MLSRGs as component generators, it is essential to use generators with the mathematical property that their generator polynomials are primitive polynomials. In addition, such generators may have the property that they 10 have a prime number of stages, so that the lengths of their periods are Mersenne oooo primes.
~Throughout the balance of this document, the symbol p(x) is used to denote the S generator polynomial corresponding to a MLSRG.
A mixture generator, as defined here, need not necessarily be restricted to 15 component generators consisting of MLSRG or MCG components. Instead, the components, including the mixer, might well be mixture generators themselves, or nonlinear generators of other types with desirable statistical or cryptographic **properties.
Mixture generators can be implemented in very fast special-purpose hardware, 20 either using discrete logic or custom integrated circuits, or simulated in software on a general-purpose computer.
Since it is a finite-state device, starting from any particular state of its mixer and other component generators a mixture generator can be used to generate a periodic binary sequence a sequence of zeroes and ones that will eventually repeat). The state of the generator is described by a collection of binary values specifying the state of each stage of each of its components.
The advantages of mixer generator configurations are that their periods are very long, their complexity is very high, their distribution of zeroes and ones is wellbalanced, and successive outputs are substantially uncorrelated. Their outputs also have excellent statistical properties in terms of their n-tuple distribution and runs statistics.
Some of these properties can be demonstrated mathematically, while others have been verified statistically (for example, using chi-square and runs tests).
Any periodic binary sequence is capable of being generated by some MLSRG, and one of the critical factors in assessing the suitability of a sequence for cryptographic purposes is the length of the shortest linear feedback shift register required to generate the sequence. A strong advantage of mixture generator configurations is that it is often easy to precisely characterise this length as a function of the mixer and component generator lengths, and that the length, which is a good measure of the complexity of the generator and consequently its usefulness for some cryptographic purposes, is very high.
:*The way in which mixture generators are used in the encryption system of the present invention will be described in terms of the Geffe-type mixture generator shown in Figure 2. We denote the numbers of stages in the MLSRGs forming the mixer, top and bottom generators by n m t and g and the initial states (at time T=O) of the S 15 respective generators by am 0 atO and ab, respectively. We assume now for convenience o that each of these initial states is fixed and publicly known. A variation of the invention consists of using the initial states as part of a key known only to a particular group of users in order to permit secure and authenticated transmission of messages among members of this group.
S. 20 File encryption on personal computers using this type of mixture generator with Snm 87, ri 89 and rq 127 produces an extremely rapid system with a moderate security level. A much more secure system, still possible on a PC, results from the choice nm 89, nt= 127 and nb= 521. The latter three all give rise to Mersenne primes.
It is possible to show mathematically that the period the number of clock cycles after which the generator output repeats itself) of a Geffe-type generator is the product of the periods of the component generators: Its complexity, as measured by the number of stages in the shortest equivalent linear shift register generator which is able to produce the same output sequence, may be calculated by nmnt (1 i )pn. More complex mixture generators can also be analysed, with analogous results.
3. Using a Mixture Generator to Implement a One-Way Function The very long binary sequence generated by a mixture generator has a number of useful properties. It is possible to actually run or "clock" the generator to obtain its output stream and its sequence of internal states. Since the generator's period is so long, it is not possible to generate more than a tiny segment of the entire output stream in any reasonable period of time no matter how fast the generator can be clocked; even for the smaller of the example generators mentioned above, the period length is on the order of 2303.
It is possible to use the mixture generator to rapidly and efficiently "calculate" what its final internal state would be if its individual components were clocked any 0 given numbers of times, no matter how huge, starting from a known starting state.
~It is, however, not computationally feasible to answer the inverse question. That is, given known final states for each component, it is extremely difficult to determine the numbers of times each of them would need to be clocked in order to reach such 15 final states from known starting states. Answering this question is tantamount to solving a so-called "discrete logarithm" problem. The best known algorithm for solving such problems is the one due to D. Coppersmith, which is highly efficient. The **time required to execute it on any conceivable computer can be estimated quite accurately. While it is practical to carry out the necessary calculations in a modest 20 length of time on very fast computers in the case when the longest component generator is of length 127, this is not the case when the longest component generator length is above 500 or so. Solving such problems will remain computationally infeasible even under the most optimistic predictions concerning available computing power.
Moreover, the difficulty of obtaining solutions can be accurately engineered by selecting generator lengths appropriately. Mixture generators incorporating components with lengths considerably higher than 500 are still efficient and practical to implement.
4. Private and Public Keys In the present system, a private key is equivalent to a set of (binary) numbers which specify arbitrary numbers of times the components of the mixer generator are to be imagined to be clocked. These can be interpreted as "distances" (measured in units of clock ticks) within the periodic output stream of each component.
The public key corresponding to a private key is the final state of the mixture generator that would result if each component were to be clocked a number of times given by the corresponding part of the private key.
A major distinction exists between the pairs of private keys and public keys used in this system and those used in most other systems. In many other systems, the key pairs must be generated together automatically at the same time, according to specific :i requirements and limitations. In the RPK system, the selection of a private key is completelyfree and unrestricted. It may be selected arbitrarily by its user, if desired, rather than being assigned. This is not only a significant practical advantage, but also forms a major point of difference between the RPK system and other patented techniques.
In the context of the illustrative Geffe generator, for purposes of selecting a private key a user A selects three numbers Dm, D, and Db, where Dm is in the range from i to 2" 1 D, is in the range from 1 to 1 and D b is in the range from 1 to :.7 2 b 1 It should be noted that each of these ranges include the extreme values mentioned, although strictly speaking the high end of the range (all ones in binary) should be excluded since it is equal to the period. The public key for user A will consist of the states Em, E t and Eb of the three component generators after D m
D
t and Db clock cycles (shifts), respectively. For a mixture generator with, say, N component generators, the private and public keys will have N, rather than 3, such component states.
Note that the number of bits required to form either a private or public key is n. n, b, which is 303 in the case of the smaller Geffe configuration being used for an example and 737 for the larger one. One might wish to compare this with the 56 key bits employed in the widely-used DES conventional encryption algorithm.
The following description of efficient methods for computing the public key from any given private key is included for completeness and to aid in an understanding of the invention but should be apparent to a practitioner skilled in the art. For reasons based on the mathematics underlying the methods, it is appropriate to refer to the process of determining a public key from a given private key as exponentiation.
It should be obvious that a method is required for calculating the future state of a mixture generator, since in view of the extremely long period of such generators it is ao 10 not possible to actually run them long enough to generate more than a tiny fraction of the number of states required. A highly compact and efficient method for calculating the future state of a linear feedback shift (MLSRG) register generator exists and depends upon interpreting the contents of the stages of the register (that is, its state) as 00• coefficients of a polynomial in one "indeterminate" x. Since the register has n stages, 15 the contents of the stages can represent the coefficients of the powers ofx lx, x 2 sees Note that such polynomials are different from the "generator polynomial" p(x) 9 *0 mentioned earlier, which is of degree n. It is convenient to renumber the stages of the .generator from zero to n-1, where stage 0 corresponds to the stage immediately following the middle generator tap, so that stage (n 1) denotes the stage with the 20 feedback tap in the middle of the generator. The final (output) stage of the generator 0 will then be numbered (n m where m as before denotes the exponent in the middle term of the "generator polynomial" p(x).
Using this interpretation, it is possible to verify that the state resulting from clocking the generator once is equivalent to multiplying the polynomial representing its state by the polynomial consisting just of the single term x. This is to be done with the understanding first of all that all the arithmetic on the coefficients is done modulo 2 1+1 0, etc.), and second that the polynomial "product", if it is of degree n or higher, is understood to refer to the product modulo the generator polynomial p(x).
This last statement means that any polynomial of degree n or higher is to be replaced by the remainder that would result after dividing it by Polynomial addition and -12multiplication and division follow the usual algebraic rules, except that in this case arithmetic on the coefficients is done modulo 2 (equivalent to XOR).
Taking this idea of multiplying polynomials modulo p(x) one step further, if the initial generator state a 0 is taken to be the one with a single 1 in the zero-numbered stage, then the process of advancing the generator by a time D (or clocking it D times) is equivalent to computing the product 1 .x x x, where the factor x appears D times. The resulting product can be denoted as x mod Using D as an exponent in this way suggests that an efficient method for computing x mod p(x) involves precomputing and tabulating the (n 1) polynomials representing the binary powers Xo 1x, x ,x 4 g X X 2 10 ,all modulo and then multiplying together (again, modulo p(x) each time) those corresponding to one bits in the binary 0 representation of D.
This conceptual process of multiplying polynomials modulo p(x) can be accomplished in practice very simply and efficiently using the shift register itself No elaborate actual multiplication is required. To see this, we observe that since clocking the generator once is equivalent to multiplying the polynomial corresponding to its to contents by x, we can multiply by say, by clocking the generator j times.
Multiplying by an arbitrary polynomial is accomplished simply by saving the states corresponding to such intermediate "multiples" (for example, in registers) and adding corresponding coefficients modulo 2 (that is, XOR-ing). This procedure eliminates the need for a separate procedure for polynomial division in reducing products modulo Designing special-purpose circuitry or chips to accomplish the entire process very quickly is a straightforward matter, or it can be emulated easily in software if desired.
5. Encryption As stated above, the private key D for user A consists of three numbers (Dm, D,, Db) while user A's public key E consists of the three numbers (F I, 1 which are assumed to be publicly known, perhaps posted in a public directory file, and which represent the states of the corresponding generators at times Din, D t and Db starting from -13given and known initial states a 0 (am0, at, ab) at time zero. Equivalently, using D and E to denote times and states for a generic MLSRG, in polynomial notation we have E xD mod assuming that the initial state corresponds to the zero-degree polynomial 1.
It is preferable that any plaintext message P to be encrypted has first undergone data compression. This is a well-known technique that is useful not only for reducing data transmission costs and/or storage space but which also decreases the redundancy of the underlying message. This increases the difficulty of successful cryptanalysis and also enhances the propagation of errors resulting either from transmission errors or S 10 from malicious modifications ("spoofing") of the ciphertext.
In order to encrypt a plaintext message P, so that it can only be decrypted by user A (using A's private key) another user B first generates a random initialisation key R R t Rb) that is to be used solely during the encryption ofP. R is analogous to D in that it represents "exponents" for the component generators, and the three S 15 components of R must fall in the same ranges as those of D. User B next computes Q (Qm, Q, Qb) from R in the same way that a public key E is computed from a private a."key D. That is, Q represents the states of the component generators at time R, starting from the initial state a 0 User B then includes Q in the ciphertext message header, to be transmitted or stored in the clear (that is, not encrypted) and which may also contain 20 other information useful for communication purposes. For instance, a particular application might include addressing information, cyclic redundancy check (CRC) bytes or other error-correction data in the message header.
To continue the actual encryption process, user B next loads the component generators with an initial state consisting of E (user A's public key) and then again uses the same random initialisation key R (Rm, R, Rb) to compute a final state K (KI,
K
1 Kb) by "exponentiating" A's public key E, taking R as the exponent. In polynomial notation this can be written as K 1 ERJ mod for j m, t, b. User B does this "exponentiation" of A's public key using the mixture generator's component shift registers to compute products of binary powers E2 (k o, 1, n analogous to the way that a public key is computed from a private key.
-14- Note that user B has used both the random initialisation key R and user A's public key E in computing K, as well as publicly available knowledge of the initial state a 0 and the structure of the underlying mixture generator. The total computational effort has amounted only to the polynomial exponentiations required to advance the states of the component generators twice (that is, once to compute Q and once to compute K).
The essential property of K for purposes of the present encryption system is that K describes the state resulting from advancing the generators first by D and then exponentiating this state by R (that is, the state that would be the result if the generator could be advanced by a time equal to R multiplied by despite the fact that user B S. 10 has been able to compute K without knowing D.
The state K is used as a final generator initialisation state with which to begin creating the ciphertext. User B generates the body of the ciphertext C by using the keystream obtained by clocking (running) the mixture generator starting from the state K, operating with it and combining it with the plaintext bit stream P. This combining 15 process must be invertible (that is, it must be possible to recover the plaintext P given K and C) and can be done in a variety of ways.
Although the simplest imaginable combining technique involves simply a bitwise XOR (exclusive-OR) between the plaintext and the keystream, this approach serious cryptographic flaws when used by itself.
20 Many simple combining methods are possible. For instance, a block encryption system could be devised in which a fixed number L of keystream bits are combined with L plaintext bits by interpreting these two blocks of bits as integers in the range 0 to 2 L 1 and defining the corresponding ciphertext block to be their product. This results in an encryption system somewhat analogous to the well-known El Gamal public-key cryptosystem. Unfortunately, it produces a ciphertext double the length of the plaintext.
The preferred combining method in the present system is one that produces a quasi-block cipher. In classical cryptographic terminology, this part of the algorithm can be compared to a running-key cipher combined with a pseudorandom transposition cipher. The idea is to first create an intermediate ciphertext block by utilising a part of the keystream generator output) as a means for generating a pseudorandom permutation of the bytes (or even individual bits) of the plaintext block. One then combines the intermediate ciphertext block with a subsequent portion of the keystream, either on a bit-by-bit basis by XORing them together or on a byte-by-byte basis by performing substitution using a lookup table. This approach produces a ciphertext body whose length is the same as that of the plaintext. (Slightly different handling is required when the plaintext length is not an integral multiple of the block size, to accommodate the final partial block.) An obvious refinement involves cascading this combining process by alternately S 10 applying the above-mentioned pseudorandom transposition permutation) and substitution procedures more than once.
o The only performance penalty associated with the preferred combining method is to increase the quantity of generator output required. However, since mixture generators run very quickly this is unlikely to be a significant issue except in 15 applications requiring extremely high encryption bit rates. Additionally, in order to achieve the maximum possible degree of security it may be advisable, although not essential, to restrict the maximum length of any plaintext enciphered with a single ooo* random initialisation key R. This is not a major restriction, since very long plaintexts can simply be broken into a sequence of segments of acceptable size.
20 More complex ways of combining the keystream with the plaintext in order to achieve various objectives include variations on known techniques such as cipher block chaining. In one such variant, the plaintext is first broken into blocks of fixed size to which additional timing, authentication or error-correction information may be appended or prefixed. Each plaintext block is first XORed with the previous ciphertext block before combining it with the next block of the keystream.
When implementing the RPK system in software, it is useful to note that it is not difficult to clock the mixture generator 8 bits (or more) at a time, and the entire combining process can be accomplished accordingly. This can also be done in hardware without unacceptable complexity.
-16- In summary, then, the encrytion process involves the following steps, all of which are accomplished using the mixture generator and its components: Generate a random initialisation key R and use it to exponentiate the base state, thereby generating an open key Q which is included within a header, preceding the main body of the ciphertext.
Use R again to exponentiate the public key E, thereby generating a final (internal) generator initialisation state K.
Starting from the state K, run the mixture generator to obtain a keystream output and combine the keystream output with the plaintext P to obtain the main body of the 10 ciphertext C.
Note that since R is chosen randomly, even if the same plaintext were to be encrypted again using the same public key the second ciphertext would differ randomly from the first one, both in the open key Q and in the ciphertext body itself since the final (internal) generator initialisation states would differ.
6. Combining Keystream with Plaintext A novel preferred combining method will now be described that incorporates a number of the advanced approaches alluded to above. In what follows, we shall assume that the plaintext is represented as a sequence of 8-bit bytes, and we shall use 20 the term "current CRC value" to refer to the 32-bit CCITT cyclic redundancy check value corresponding to the portion of the plaintext starting at the beginning and continuing up to any particular byte position within it. It should however be understood that this term could equally well refer to another type of CRC or message digest computation or even to a generalised CRC of the type mentioned later in this document.
We shall also assume that it is convenient to process the plaintext, for combining purposes, in moderately large "chunks" that are presented as the contents of a buffer.
A typical such chunk size might be in the order of two to four thousand bytes. Finally, we shall use the term "stuttered keystream" to refer to the output of a mixture generator modified so that the clocking of one or more of the component generators is made state-dependent. An easy way to do this is to sense the states of a particular set of -17generator stages and discard the generator output (that is, clock the generator an additional tick) if the states obey some criterion. For example, one can sense whether a particular set of four stages of a component contain all ones and clock this component an extra tick when this is so. It is well known that this procedure greatly increases the non-linearity, and hence complexity, of a keystream generator.
The general combining process is then as follows. First, compute the current CRC value of the plaintext up through the end of the current chunk. Second, use a portion of the stuttered keystream to generate a pseudorandom permutation of the bytes in the current chunk and then XOR the permuted data with subsequent consecutive 10 bytes of the stuttered keystream. Finally, clock the stuttered keystream a number of bytes which depends upon the current CRC value, discarding the bytes thus generated; the number of bytes to discard might be given by, for example, simply the numerical value of the low-order byte of the current CRC value. This final step ensures that the portion of the keystream used for combining with any chunk depends both on the initial S 15 generator states and on the entire plaintext prior to that chunk and can thus be viewed as a type of cipher block chaining. It also ensures that any single-bit alteration or transmission error in the ciphertext causes a cascading of errors, averaging 50%, in subsequent chunks of decrypted text.
The manner ofpseudorandomly permuting the data within a chunk can be varied 20 as efficiency considerations may dictate. One economical approach involves viewing the chunk as a sequence of 256-byte blocks, possibly followed by a shorter end block if the chunk size is not a multiple of 256. As we shall demonstrate, we can then use 127 stuttered keystream bytes to generate one pseudorandom swap table to be used for all the 256-byte blocks, and a smaller additional number of stuttered keystream bytes to generate one smaller pseudorandom swap table, if necessary, to be used for the shorter end block. For the case of 256-byte blocks, such a pseudorandom swap table provides a set of 128 pairings j) of distinct integers in the range 0 to 255. To use the swap table, one simply exchanges the positions of bytes i and j within the block for each (i, j) in the table. A key feature of this method is that it is essentially self-inverting, that is, applying the identical permutation a second time restores the original byte ordering.
It is interesting to note that the total possible number of such swap tables, when the block size n is even, is given by: n 2 2 A particularly simple algorithm for generating a swap table of size n is concisely described by the following fragment written in the C programming language: typedef unsigned char BYTE; BYTE stut_clock8(void); #define MODULO #define NOT_EQUAL void MakeSwapTable(int n, BYTE table) int index, remaining, i, k; BYTE temp; for (i 0; i n; table[i] i; for (k 0, remaining n; remaining 1; remaining remaining 2) index k 1 stut_clock8() MODULO (remaining 20 k=k+1; if (index NOTEQUAL k) temp table[index]; table[index] table[k]; table[k] temp; k=k+1; In the above code, the function stutclock8( returns the next byte of the stuttered keystream. After it is executed, the table[] array will contain a sequence of consecutive pseudorandom pairs of the integers from 0 to n 1. (Ifn happens to be odd, the last table entry will designate a byte position which is not to be swapped.) If a modest increase in computational overhead is acceptable, a somewhat more complex version of the above approach is possible in which a different pseudorandom -19swap table is used for each 256-byte block. In any case, it is worth emphasising here that the actual permutations applied are different for each encrypted message since a different (and randomly selected) portion of the keystream is used for each message.
Finally, although it does not constitute a part of the combining method discussed above, we point out here an additional feature of this approach that bears upon the issues of validation and authentication. Since a CRC value for the entire plaintext is available at the end of the encryption process, it is a relatively simple matter either to append this value to the plaintext and encrypt it as well, or to insert an encrypted version of it into the message header if desired. The resulting information can be used 10 during decryption to detect whether the message has been altered during transmission.
Summary measures other than the CRC or generalised CRC can be used here, and See.
particular security requirements may suggest the use of alternatives such as the Rivest MD4 algorithm or the NIST Secure Hash Algorithm.
The following is an example of the preferred combining technique, in which the 15 chunk size is taken (for simplicity) to be only 4 bytes: Plaintext chunk: "ABCD" (whose hexadecimal representation is 41 42 43 44) S0 On 0Stuttered keystream output (hexadecimal): 37 04 FF BO Encryption: 1. Calculate the CCITT CRC32 value for the plaintext chunk. This value turns out 20 to be DB 17 20 A5 (hexadecimal representation).
2. Generate a pseudorandom swap table using the first byte of the stuttered keystream (apply the procedure given by the C language fragment in the text): a) Initialise table to: 0 1 2 3.
b) The first stuttered keystream byte 37, modulo 3, is 1, so permute the elements 1 and 2 in the table to produce a table of 0 2 1 3.
c) The resulting swap table contains the pairs 2) and 3).
3. Permute the bytes ABCD by swapping the 0th and 2nd bytes, then the 1st and 3rd bytes, to produce CDAB, whose hexadecimal representation is 43 44 41 42. This is the permuted chunk.
4. XOR the permuted chunk byte-by-byte with the succeeding stuttered keystream bytes: 43 XOR 04 47, 44 XOR FF BB, 41 XOR BO F1, 42 XOR 55 37, so the ciphertext consists of the sequence of bytes (in hexadecimal) 47 BB Fl 37.
The last byte of the CCITT CRC32 value is A5, which is equal to 165 in decimal, so we would then generate and discard 165 bytes of the stuttered keystream before encrypting the next chunk.
7. Decryption To decrypt the received ciphertext, user A first uses the state given by the open 10 key Q contained in the message header to compute the generator state corresponding to QD, where the exponent is his private key D. This process of exponentiating Q by D is done using the same kind of process used to exponentiate E by R during encryption. We observe that the resulting generator state is K, since Q represents the generator state after a time R starting from the base state ao and the state after time R- 15 D is just K, as noted earlier. In polynomial notation this fact can be expressed as E R
D
)R K (x R) Q Note that this means that the recipient has been able to compute K without the need to know the random initialisation key R generated for encryption. User A can then run the mixture generator starting from the final initialisation state K (that is, clock it through successive states) to obtain the keystream bits needed to invert (that is, undo) the combining process performed during encryption. Since the mixture generator is started from the state K for both encryption and decryption, the keystream output will be identical in both cases.
If the combining process used for encryption were to involve simply XORing the plaintext with the keystream, we note that XORing the resulting ciphertext with the same keystream again would recover the plaintext. For the preferred combining process described earlier, it is easy to invert the pseudorandom transposition and substitution operations in reverse order for each successive block to recover the ciphertext from the plaintext.
-21- The specific steps required for decryption, referring to the preferred combining process discussed earlier, are: 1. Using the private key, exponentiate the open key Q contained in the ciphertext header to compute the final initialisation key K. The procedure for doing this is the same as the one used to exponentiate a public key by a random initialisation key during encryption. The state of the mixture generator will then be given by K.
2. For each block of the ciphertext body, run the mixture generator to obtain a part of the keystream output and use this to generate a pseudorandom permutation table.
3. Then run the mixture generator to obtain additional keystream output and 10 combine it with the ciphertext block, either bit-by-bit by XORing the two together or byte-by-byte using a lookup table, to generate an intermediate text block. This step inverts the substitution process performed during encryption.
4. Apply the pseudorandom permutation defined by the permutation table created earlier to the intermediate text block. This step inverts the transposition process 15 performed during encryption and produces a block of the original plaintext.
For the preferred combining method described earlier a slightly more complex process of inverting is necessary. The steps taken to initialise the generator are identical to those for the decryption of the simply combined ciphertext. However, the process of undoing the combination process involves, for each chunk, firstly the step of 20 generating a representative pseudorandom permutation of a representative chunk corresponding to that needed to invert the permutation applied to the plaintext in the enciphering process, using the equivalent portion of the stuttered keystream. Secondly, XORing the current ciphertext chunk with the subsequent consecutive bytes of the stuttered keystream. This will produce a decrypted but pseudorandomly permuted version of the plaintext. Thirdly, the same permutation applied to the representative chunk is applied to the permuted version of the plaintext, to recover the plaintext.
Lastly the current CRC value of the decrypted text, up to the end of the current chunk, is calculated, and the stuttered keystream is clocked a number of bytes dependent on the current CRC value. For the earlier example where the pseudorandom permutation was applied using a pseudorandom swap table to re-order the bytes of each 256 byte block of the chunk, the same swap table would be generated, before XORing the keystream with the ciphertext. Then the swap table, being self-inverting, would be used on the resulting deciphered but still permuted plaintext to recover the plaintext.
The following is an example of the preferred separating technique, corresponding to the earlier example of the preferred combining technique: Decryption of the ciphertext 47 BB Fl 37: 1. Assuming the correct decryption key (private key) is available, the sequence of stuttered keystream bytes will be identical to that used for encryption: 37 04 FF BO 2. Generate the pseudorandom swap table exactly as in the encryption process, 10 using the first stuttered keystream byte. The table contains the pairs 2) and 3).
3. Before swapping, XOR the ciphertext with the succeeding bytes of the stuttered keystream: 47 XOR 04 43, BB XOR FF 44, Fl XOR BO 41, 37 XOR 55 42.
The intermediate ciphertext is thus 43 44 41 42.
4. Apply the swap table by swapping first the Oth and 2nd bytes of the intermediate 15 ciphertext and then the 1st and 3rd bytes: 41 42 43 44.
The result is 41 42 43 44, which is the hexadecimal representation of the ASCII string "ABCD", the correctly deciphered plaintext.
6. Calculate the CRC32 value for the plaintext up to this point. As before, its last byte is A5, so as before we generate and discard the next 165 bytes of the stuttered 20 keystream before decrypting the next chunk.
8. Hardware Implementation Although the present system is easy to implement in software, one of its outstanding advantages is its ability to be implemented in very fast special-purpose hardware. Very large scale integrated circuit technology is progressing so rapidly that any specific implementation details are soon out of date. However, off-the-shelf components do exist that provide some insight into the relative ease or difficulty, and achievable speed, of such an implementation. For example, special-purpose chips for performing exponentiation over GF[2 n do exit, such as the CA34C168 key management processor produced by Newbridge Microsystems, a Canadian company.
-23- It is a TTL-compatible CMOS device that operates at up to 16 MHz, and performs exponentiation over the field GF[2 59 3 This chip has a throughput of 300K bits/second.
Despite the fact that this field is not necessarily ideal for the present system, these specifications give some idea of the rate at which public keys, open keys and final generator initialisation keys can be calculated. The same company produces the RBG 1210 random bit generator that produces a true random bit stream at 20 K bits/second.
Such a device would be suitable for generating the random initialisation keys R required here. Very long shift registers and discrete logic gates capable of operating at extremely high speeds are available off-the-shelf or can be easily integrated into custom 10 chips or implemented as field-programmable gate arrays.
Figure 4 shows a hardware implementation of an encrypter while Figure .shows a hardware implementation of the decrypter process, both of which perform in hardware the functions previously described.
S 15 9. Signatures and Authentication A major and important variant of the preceding approach allows the recipient of an encrypted message (user A in our terminology) to confirm that the received and decrypted plaintext originated from a specific source (that is, user B) and is not "forged." The requirement is to be able to append to a message a "signature" with the 20 property that anyone is able to compare the signature with publicly available information in order to verify its origin, but that no one else is able to duplicate the signature. This requirement should be understood to also imply that it must not be possible to use signatures of previous messages to generate signatures for new or spurious messages. It is therefore essential that such a "digital signature" be messagedependent.
We remark here that an unstated assumption underlying any public-key encryption system is that the public file (containing the list of addressees and their public keys) must be secure against unauthorised modifications. If this were not the case, an intruder could replace someone else's public key with his own and thereby compromise the victim's security until the tampering was detected. The security of -24such public files against unauthorised tampering is usually provided by password systems or callback procedures, and sometimes by physical means.
Here we assume that a secure public signature archive exists that can hold appropriate information registered by individuals who wish to "sign" communications, and that this archive is available to inspection by anyone, but secure against the threat of modification by anyone other than a legitimate subscriber. We also assume that the security of this archive is such that a subscriber is able to append additional signature information to his own file but not to modify or delete existing information without leaving an adequate audit trail that permits system administrators to record and track such modifications. We remark that such precautions are not too different from those that must surround "specimen" signatures of the conventional variety.
:We allow the possibility that the public signature archive may also be the same one that contains public key information for the encryption system, but note that the two files have different functions and probably different legal status. The costs and *o 15 frequencies of modifications and accesses may also have different structures and different administrative requirements, suggesting that separating these two publiclyaccessible files is advisable. 000o As background, we summarise the concept of a CRC (cyclic redundancy check) value for a message. CRC values are in common use as indicators of file and 20 communications integrity, and various international standards (such as CCITT standards) exist. The CRC value of a message is a numerical value, typically either 16 or 32 bits long, computed from the message in such a way that any small change, distortion or error in the message text results in a completely different CRC value. The method of computation essentially involves the use of a shift register generator (implemented either in hardware or software) to divide a message polynomial (whose coefficients are just the bits of the message) by a specific CRC generator polynomial.
The CRC value represents the coefficients of the remainder modulo the CRC generator polynomial. In the case of the 32-bit CCITT standard, the generator polynomial is x 3 2
-X
2 6 X2 3 X22 xl6 X1 2 XII XIO X 7
'X
5 +X4 +X2 +X 1.
Our authentication method utilises the CRC concept. In particular, in the context of our example mixture (Geffe) generator, for any message M we can define CM (Cm, C M, C M) in which each of the three components denotes the generator state resulting from dividing the message text by the corresponding generator polynomial We do not describe here the method for utilising the shift register itself to perform the division, since it is well-documented elsewhere. CM then represents a value that is essentially equivalent to the message itself, up to multiples of p(x).
With this background, a method for secure authentication is as follows. Each participant in the communication system is assumed to possess exclusive knowledge of an authentication password P which is unique to that participant and which is registered with a public signature archive or other message authentication authority.
go o° :The public signature archive or authentication authority possesses its own private key DS with its corresponding public key E s previously defined with reference to the public key cryptographic system that is the subject of this invention. When user B intends to S 15 sign a message M he is sending to user A, he calculates the generalised CRC value CM and forms a signature SM by appending CM to his authentication password P, and then encrypting the pair (PB, CM) using the public key Esofthe public signature archive. He then appends the signature SM to the message.
If the recipient of the message or a third party wishes to verify the authenticity 20 of the signature SM, he computes the generalised CRC value C/ for the actual message and submits it, together with the signature SM and the name or other information identifying user B, to the public signature archive or authentication authority for authentication. The public signature archive or authentication authority decrypts the signature using its private key D s and compares the generalised CRC value included therein with the value of C and compares the included password with the authentication password registered for user B. If both of these match, the public signature archive validates the signature as an authentic signature of message M by user
B.
-26- It can be seen from the foregoing that only the actual signer of the message can generate the signature SM since doing so requires knowledge of both user B's authentication password and the generalised CRC value of the message. Any attempt to duplicate one valid signature in order to sign additional messages is fruitless, since the encrypted generalised CRC value matches the one of the message to which it corresponds. An advantage of this method is that it does not require additional information to be inserted into the public authentication archive each time a message is to be signed.
An alternative preferred embodiment of the public-key authentication system will now be described. When user B intends to sign a message M he is sending to user A, he generates random numbers SMm SMt and SMb and calculates C M and also M x SM mod p(x) for each component generator. User B then registers the pair (CM SM, VM) under his name in the public signature archive, and "signs" the message by S appending SM to the message header. IfVm has already been registered in the public 15 signature archive, user B repeats this process, computing a new Sm and corresponding Vm, until a unique V m is determined. (That is, one which has not been previously registered in the public signature archive.) In order to verify that the above process ensures an authentic "signature," observe first that anyone in possession of the message and able to inspect the public °oo•• signature archive can compute the CRC value c' for the actual message and add SM in order to verify that the result matches the value posted in the public signature archive. It is also possible for anyone to compute v m x S, rod p(x) and to verify that it also matches the value posted in the public signature archive. However, assuming that our underlying encryption process is adequately secure (as will be discussed later), it would have been impossible for anyone other than user B to determine a signature SM that meets these requirements. As is common in other approaches to authentication, the possibility of generating a spurious message with the same CRC value(s) can be forestalled by insisting on a specific message structure or protocol, although the fact that the present approach utilises three or more different polynomials makes it highly unlikely that such precautions are required.
Multiplicative Congruential Generators as Component Generators So-called multiplicative congruential generators (MCGs), or Lehmer generators, are widely used in computer systems as pseudorandom number generators. In the simplest variant of this type of generator, a sequence of numbers is generated using the relationship x n cxni (mod where q is a prime number and c is a constant integer between 2 and chosen in such a way that c is a "primitive root of unity." The starting value or "seed" x 0 is selected arbitrarily. For example, q is sometimes chosen 9• to be 231 1, which is a convenient Mersenne prime, and c might be chosen as the integer 524287. The resulting sequence of integers between 1 and has period (qessentially being a permutation of all 31-bit integers except for the two whose binary representations are all zeroes or all ones.
••oo 15 Although these sequences have the attractive properties of being quick and easy to compute and having reasonably long periods, they have long been known to have 9 9poor statistical properties when used as pseudorandom number generators (unless they are nonlinearly "shuffled") and D. Knuth has published a detailed analysis of their inadequacy as keystream generators in cryptography. However, these weaknesses do 20 not necessarily impair their usefulness as component generators in mixture generators of the types we have described, which have a highly nonlinear structure.
Assuming that an MCG is selected so that its modulus q is a Mersenne prime of the form 2" 1, the generator output comes in n-bit blocks. These can be viewed as a stream of bits starting with the low-order bit. "Clocking" or advancing an MCG a specified number of bits is accomplished by carrying out the appropriate number of integer exponentiations and multiplications modulo q to obtain the necessary block and then selecting the correct bit position within the block. Thus, for this type of component generator, integer multiplication modulo 2"-1 replaces polynomial multiplication modulo This procedure carries with it the need to perform -28arithmetic on quite large integers, but methods exist to perform this arithmetic reasonably efficiently, particularly when q is a Mersenne prime.
Using an MCG as the mixer generator can be accomplished either by utilising the binary state given by the contents of several fixed bit positions within the generator and discarding the rest (that is, clocking the MCG at a rate n times as fast as the generators whose outputs are being selected) or by using groups of successive bits in the MCG's bit stream output. An example of the latter approach is analogous to the one shown in Figure 1, in which the MCG is used as a mixer to select among 8 other generators (whose structures are irrelevant here). The entire stream of bits coming °10 from the MCG can be used, three bits at a time, to accomplish the selection.
oo oeoe 11. Cryptographic Security o.
We will discuss in general terms both the security level afforded by the transformation from private keys to public keys and the properties of the ciphertext 15 resulting from a simple XOR combination of the generator keystream output with the plaintext.
In terms of a so-called "chosen plaintext attack" against the private key, the security level of the proposed system corresponds directly to the computational difficulty of discovering a private key when its corresponding public key is known and 20 the attacker has full knowledge of the cryptographic system and is able to apply it to generate a public key corresponding to any chosen private key. Assuming a generator structure such as the one shown in Figure 2, the outputs of each of the 3 component MLSRGs can be viewed mathematically as elements of a finite field of order 2 P known as GF(2P). Since a different random initialisation key R is chosen for each message, the operation of advancing a generator in order to generate a public key corresponding to a given private key can be viewed as mathematically equivalent to exponentiation over GF(2P), and the inverse problem of finding the private key from the public key is mathematically equivalent to computing logarithms over GF(2P). The level of computational security of this part of the proposed system is therefore comparable to the difficulty of computing logarithms over GF(2P). Although in the late 1970's the -29p best known algorithm for doing this required on the order of 2 2 operations, more recent progress in this field now indicates that using the best currently known method, only on the order of 2 p g-p operations are required, where c is a "small" constant that has been empirically estimated as about 1.4 or 1.5. In the case when a (1,30,127) MLSRG is used, so that p 127, a comparison of these two quantities shows the difference between an exponent of about 63 in the first case as compared to about 26 or 27 in the second case. This means that computation of logarithms in GF(2' 2 7 which would earlier have been effectively impossible, is now only moderately difficult, requiring only a few hours on a modem mainframe computer. In terms of the small example 10 suggested earlier in this document, in which three MLSRGs of lengths 87, 89 and 127 used in the Geffe configuration shown in Figure 2, these figures imply that only a moderate level of computational security is obtained.
In the larger example suggested, using the same Geffe generator configuration but with MLSRG lengths of 89, 127 and 521, the public key system proposed here can 15 still be easily implemented on a personal computer, but the level of computational security is much higher. Considering only the longest generator, of length 521, the above figures indicate that the number of operations needed to compute logarithms over _GF(2 521 would be on the order of about 2" using the best currently-known algorithm, which is believed to be near-optimal. Even assuming improvements of several orders of magnitude over present-day computers, the proposed public-key system will be computationally secure in these circumstances; that is, it will be infeasible to compute an unknown private key from all available information regardless of the computational resources brought to bear. Furthermore, still larger component generators can be used with only a modest increase in the computational effort required for encryption and decryption and without unduly burdening the public key file as a result of the additional key length, so that the security of the system can be increased to any desired level.
Using multiplicative congruential generators instead of shift register generators tends to increase the computational difficulty of the discrete logarithm problem, and therefore to enhance the security of the encryption procedure. This is because the logarithms must be computed over a field GF(q) where q is a prime rather than over GF(2P), and the best currently known algorithm for this case is less efficient, requiring on the order of 2c I V PlOg P operations when the modulus q is a Mersenne prime 2 P 1.
For example, this translates roughly into about 240 1012 operations when p 127, several thousand times greater than in the case of GF(2P).
We now discuss the security of the system from the viewpoint of a "chosen plaintext" attack against the keystream generator and combining procedure described earlier. This type of attack is one in which a cryptanalyst has access to all public keys and has available a complete cryptographic system, including direct access to the 10 keystream generator (the mixture generator in this case) that he can use to generate corresponding pairs of plaintext-ciphertext messages. This situation means that the cryptanalyst can inspect any number of subsequences of any length he chooses from the keystream output, starting from any desired initial state of the generator. Note that the period length of a mixture generator is very long (approximately 2 30 3 even for the o smaller of the Geffe configurations discussed).
By generating a large number of such portions of the keystream ("search fragments") and performing a sliding correlation between each of them and an unknown ciphertext, the cryptanalyst might try to discover "overlaps" which could be detected by statistical analysis. The likelihood of detectable overlaps depends upon the lengths of messages and the speed at which the generator can be run, but probabilistic analysis shows that the likelihood of any overlaps at all is extremely small. For example, even assuming that the generator is capable of being clocked at 1000 gigabits per second (240 bits per second), that the plaintext length averages one gigabit (230 bits) and that an overlap with a search fragment can be effectively detected instantaneously in zero time) with a sliding correlator using search fragments only 210 bits (one kilobit) long, then in the case of the smaller Geffe-type generator the expected time for "finding" a particular ciphertext is on the order of 2 24 0 seconds! A probabilistic analysis also shows that, under the same assumptions, the probability of any overlaps at all for messages corresponding to randomly chosen initialisation keys is negligible, so that a "known plaintext" attack based on this -31approach (the so-called "common birthday" problem) is also futile. In addition, even if portions of the plaintext corresponding to an unknown ciphertext are assumed to be known (or can be guessed) by the cryptanalyst, it is impossible to "extend" the keystream (in a manner analogous to the solution of a running key cipher) so as to solve for the remaining portions of the plaintext unless the length of such a known portion exceeds the "complexity" of the generator, which is 58193 bits even for the smaller of the Geffe generator configurations illustrated. Even this remote contingency can be addressed by limiting the maximum length of a plaintext to be enciphered under any single random initialisation key, segmenting longer messages when necessary, although .o 10 the gain in security must be evaluated in the light of the consequent performance penalty.
°oe A simpler form of correlation attack in which the analyst attempts to discover correlations between the output keystream and component generators has been .discussed in the mathematical literature but is ineffective in the present system because of the very long periods of the component generators and their excellent autocorrelation and cross-correlation properties.
12. A Small Example Although it is useless for cryptographic purposes, for clarity we include a small .otoo: S 20 example to illustrate the operation of the proposed system. This example will use MLSRG components in a Geffe configuration as shown in Figure 2. The individual generators are shown in Figure 3. The stage numbers indicate the power of x corresponding to the given stage.
The generator polynomials p(x) for these three generators are, respectively: 1 +x+x 2 1 x+x 3 1 +X 3
+X
The entire output streams full periods) of these three generators are: Mixer: 101 Top: 1001011 Bottom: 00100001011101100011111001101 10100 100 0 1010 01001I 0010 1 10100 101 10 1 1010 010 11 01 10 1 10001 001 I11100 1001 1 01 110 1 1001 001 11 11100 101 11 1 1 110 111 I 11111 II 1 101 1 01 11 1 1 100 1 0011 1 1 1000 0001 1 0 1100 10 00 1 00110 1 1000 000 11 011 00 10101 10 1 11110o 1101 1 01 1 11 11 10 1 100 11 01 11 0 1 110 1 1011 1 1 10 10 0101 1 0 1101 10 101 100110 010 10 1 0100 1 001 01 11 1 10000 000 10 01 1 01000 00001 101 00100 10000 010 11 11 00010 01000 001 10 01 00001 00100 100 01 V J fxx OUS XJI xW1I uomoi doj J13X! I oluj S. 55.
S
SS
S
-33- Table 1 above shows the complete sequences of states for these generators, and the corresponding polynomial coefficients (that is, the state but with the stages renumbered to match the appropriate powers of We should emphasize, however, that the sizes of the generators involved would make computation of Table 1 impossible in a practical sense and it is included here for illustrative purposes only.
Sorting the columns of the table would effectively provide tables of logarithms modulo the generator polynomials.
Here the initial states are given by: 0 0 S: 10 0 0 0 0 a a 1o 0 0 15 Inspecting the stage numbers displayed in Figure 3 shows that each of these n-l p states corresponds to the polynomial 1 l.x O.xJ.
For each of the three component generators, the polynomial coefficients corresponding to binary powers of x are easily computed (modulo as those given in Table 2 below. We again emphasize that the states corresponding to these powers are obtained simply by rotating (that is, renumbering) the bits appropriately.
Table 2 Power k Mixer xk Top xk Bottom xk State State State 2°0=1 10 100 00010 01000 2'=2 11 01 0 00001 00100 22=4 1 0 01000 00001 1010 01011 24=16 10001 00110 If we choose a private key of D 6, 24), the corresponding public key is computed as follows, using Table 2 extensively: a) Since Dm 3 (11 in binary), we compute X1 X2 x' by first loading the mixer generator with the state I I corresponding to the polynomial then clocking it once to multiply by x, resulting in the state 0 1.
This gives E_ I b) Since Dt 6 (110 in binary), we compute X1 X4.X2 by first loading the top generator with the state I 1 0 (polynomial coefficients 0 1 1) corresponding to the polynomial X4, then clocking it twice to multiply by resulting in the state 0 1 1.
0 This gives Et I c) Since Db 24 (11000 inbinary), we need to compute X24 P2. This is slightly more complex than the previous cases, since the second factor x' corresponds to a polynomial with more than one nonzero coefficient. We see from Table 2 that X8 0. 1 1.X O.X2 l.X1 I.X4 (that is, polynomial coefficients 0 1 0 1 so that we must load the generator three times with the state 10 0 0 1 corresponding to P, clocking it 1, 3 and 4 times respectively, to multiply by X, X3 and X4 since these are the powers of x that appear with nonzero coefficients in xg, and then adding corresponding coefficients modulo 2. These 3 resulting states are: 1 1000, 1 1 1 10, 1 1 1 1 1 and adding their corresponding coefficients modulo 2 gives a final state of I 10 0 1 1 1 This gives Eb 0 Now suppose that some other user wishes to send us a 0 1 message by encrypting a plaintext of, say, the characters whose ASCII representation in binary is 01000001 01000001. The sender first generates a random initialisation key R. Various means for accomplishing this are possible, for 5 example utilising a noisy diode. We suppose that R has been generated here as R 3, 7).
The sender's first task is to compute Q. This is done in the same fashion as computing E from D, and makes use of Table 2 as before.
d) Qm can be read directly from the x 2 line of the table as the state 1 1.
e) We obtain Q by computing x 3 xZ.x. The state of the top generator corresponding to x 2 is 0 1 0, and loading the generator with these contents and clocking it once to multiply by x results in the state 1 0 1.
f) To compute Qb we use Table 2 to compute x 7 x 4 .x 2 .x for the bottom generator.
The last two of these powers contain only a single nonzero coefficient each, so it is easy to load the bottom generator with 0 1 0 0 (the state corresponding to x 4 clock the generator two times, and finally clock it one more time. The resulting state is 1 0 1 0 1.
-36- The message header will then contain Q as follows (it may well contain additional message-specific information) Q Q Qb 1 0 S1) o a. eoe a a" a.
rooo a The next step is to calculate K. We do this by a similar exponentiation process, but this time raising polynomials corresponding to the components of the public key E to powers given by R.
g) First Km is obtained by raising the polynomial corresponding to Em to the power R, 2. It happens in this example that Em corresponds to the zero-degree n-i polynomial 1 1.x° O0.x', so that no work at all is required as, obviously, 1 raised to any power is still 1. Thus K m is the same as Em, and corresponds to the state 0 1. This situation should never be expected to occur in practice. It has been caused by the choice of Dm to be 3, equal to the period length of the mixer generator. This obviously poor choice for either D or R is simple to disallow when implementing the system.
h) Next we raise E t to the power R, 3. To compute this, we need to build a table similar to Table 2, but listing the binary powers of E t rather than of x. For purposes of this example, we only need to compute since E, Since E t is the state 0 1 1, corresponding to the polynomial 1 x 2 we load the top generator with this state, clock it twice to obtain 1 0 0 and then add corresponding coefficients of these modulo 2 to get the state 1 1 1 corresponding to Then we use the generator again to multiply this by E. We do this by loading the generator with 1 1 -37- 1, clocking it twice to obtain 0 0 1 and adding coefficients of these modulo 2 to finally obtain 1 10 for K,.
i) To compute Kb we raise Eb to the power Rb 7. Again we need to build a table similar to Table 2 to obtain E and E, then compute E E b .E.Eb. We have Eb =1 1001 x 2 3 4 so we get E as the modulo 2 sum of Eb.X 2 101 Eb.X 3 0 101 1 and Eb.X 4 0 0 10 1 (obtained by clocking the generator), which yields 1 1 000, corresponding to x 3 x 4 Squaring this gives E4 as 1 0000, eventually giving Kb as 0 1 10 1.
10 The state K will therefore be given by: 151 *K 1 K j) The output streams from the 3 generators starting from these states will be: Mixer: 1 0 1 1 0 110 1 1 0 1 1 0 Top: 0111001011100 1011 1001...
Bottom: 1011000111110011010010000101011...
k) The first 16 bits of the resulting (mixture) keystream will then be: 0011001111100001...
1) Computing the exclusive-OR of this stream with the plaintext will then yield the ciphertext: 0111001010100000 -38m) The decryption process begins with the computation of K by raising the components of Q to powers given by the private key D. This exponentiation process is completely analogous to the procedures already illustrated in steps h) and i) above. Briefly, we have Km Q Q K Q.t and these last two factors corresponding to the states 1 1 1 and 0 1 1, respectively, so that K 1 Finally we can compute K b b Qb calculating the latter two factors as corresponding to the respective states 1 1 1 1 0 and 0 1 1 0 0.
This gives the result 0 1 K 1 o *b 1 of the message, starting the mixture generator from this state produces the same keystream output as shown in steps j) and k) above, which can be XOR-ed with the ciphertext to recover the plaintext.
13. Randomisation and Key Management Issues The present method involves a fairly high total number of key bits by comparison with existing systems. The U.S. Data Encryption Standard (DES), for example, utilises 56 bits for the key, whereas the Geffe generators used as examples above involve 87+89+127 303 key bits or 89+127+521 737 key bits, equal to the sums of the lengths of the component generators. While these long keys provide -39high levels of security, their lengths are high enough to merit special key management techniques.
First, all cryptographic keys are best selected randomly, rather than as easilyremembered or systematically generated patterns, to protect against the more naive forms of cryptanalytic attacks. Well-known hardware means exist for generating true random bit streams, such as noisy diodes. Another approach is to use biometric methods. Since microsecond-resolution timing hardware is present on virtually all personal computers these days, an example of this is to record the time intervals between successive asynchronous human-generated events such as keystrokes. The 10 low-order digits of the lengths of such intervals have acceptable randomness properties. In any case, it is important to attempt to select the random initialisation keys R in the present invention in as nearly as possible a truly random manner, since systematic or repeated use of such keys would severely compromise the security of Sthe system.
9*99 S 15 The present invention envisages the use of another biometric technique, with a multi-dimensional (for example a two-dimensional) computer input device such as a pen, a drawing pad, a mouse or other pointing device, or a touch screen. A user can be requested to draw or "scribble" a random pattern, whereupon various possible "attributes of the generated pattern can be used to obtain adequately random input.
For example, when a mouse is available the low-order bits of the numbers representing the mouse coordinates at specified times may be suitable.
Alternatively, the speeds of the mouse at particular times, or the time intervals between particular types of mouse events, or spatial properties (such as curvature) of the parametric curve traced by the mouse may be used.
In a preferred embodiment, a user can be requested to move a mouse pointer more or less randomly (that is, to "wave it" or "scribble" with it) within the area of a window displayed on a computer display screen for this purpose. The x and y coordinates of the positions of the mouse pointer sensed by the computer's operating environment at successive times can then be recorded as a succession of pairs of 16bit binary numbers, until an adequate number of mouse movements has occurred.
The first 25% and last 25%, for example, of these points can be discarded as being possibly insufficiently random, and then the low-order 4 bits of all the remaining 16-bit coordinate values can be extracted and concatenated to form the desired random number.
Care needs to be taken to ensure that quirks of the hardware and software do not distort or destroy randomness of the attributes being measured. For instance, in the Microsoft Windows operating environment, the timing resolution available for external events such as mouse or keyboard events is only 55 milliseconds, so that inter-event timings may turn out to be very non-random. Also, attempts to intercept 10 or interfere with system timing information or mouse event processing must be guarded against, since such intrusions could represent a serious security threat.
While most pseudorandom number generators in common use on computer systems are not adequate for these needs, the keystream output of the mixture generators discussed in the present document have excellent randomness properties, 15 and provide compromise approaches we discuss here. In particular, ifa moderate number of the states in each component generator are initialised from a truly •random source and the generator is then run (or advanced) for a brief time (say, 1000 clock cycles), the resulting final generator state will be statistically indistinguishable from a true random state. We refer to this process as "key hashing." The high complexity of the generators described here makes this a reasonable alternative to other means that have been suggested, such as the use of a DES chip or algorithm in so-called "counter" mode.
The storage and management of cryptographic keys must be addressed, although a public-key system is inherently less dependent upon such factors for its security than conventional or private-key systems. If a private key is stored anywhere in a computer or data storage system, physical security becomes an important issue. In some applications, electromagnetic emissions of the cryptographic equipment or computer must be considered. While compact storage is possible on portable media such as magnetic or optically-encoded cards, cost or other considerations may dictate that keys must either consist of or be able to be -41generated easily from data (for example, a password) which is to reside solely in human memory. Since conventional alphanumeric symbols provide only between and 6 bits of information per character, and since typical passwords are limited to no more than 8 to 10 characters, no more than 50 to 60 key bits can be supplied in this manner.
The present invention envisages initialising a limited number of stages of the component generators of a mixture generator with key bits obtained from a password and then imitating the approach mentioned above, running or advancing the generators for a brief time to simulate a random key. Such a system may be oo 10 vulnerable to cryptanalytic "key cluster" attacks or the like, but by extending the number of clock cycles used in the initialisation or "hashing" phase and introducing nonlinearities like "stutter" (to inhibit rapid advancing of the generators and thus limit the rate at which trial keys can be generated) security can be enhanced.
15 INDUSTRIAL APPLICABILITY The encryption system of the present invention has application in most areas where secure communications are required with the advantages which flow from a true public key system. Non-limiting examples include: the secure transfer of personal or financial information, including credit card S 20 numbers or authorisations, over public networks such as the Internet, to eliminate the risk of theft or misuse of such information, the transmission of secure voice communications over existing computer networks, including the Internet, or over public switched lines, to ensure the privacy of such communications. In this application, digitised and/or compressed voice data can be encrypted in real time without the need for prior contact or prearrangement of a secret "key", ensuring the privacy of electronic mail or facsimile communications over either public switched lines or computer networks, including the Internet.
-42-
ADVANTAGES
Known cryptanalytic difficulty The difficulty of successful cryptanalysis of the present algorithms can be assessed in quantitative terms. It is possible to "tailor" this difficulty to any desired level by a straightforward choice of system parameters depending upon the intended field of application.
High speed Whether implemented in software or hardware, the present algorithms allow the following tasks to be accomplished as quickly as possible: 10 a) Generating a public key from an arbitrarily chosen private key b) Encryption of an arbitrary plaintext bit stream Sc) Decryption of an encrypted ciphertext.
High security The system is capable and provable of offering very high security, in terms of 15 modem cryptographic standards and methods, against sophisticated moder cryptanalytic attacks.
Minimum length of ciphertext To prevent inefficiencies in transmission, the system produces ciphertext whose length is substantially equivalent to the length of the plaintext.
20 Non-deterministic Even if the system is required to encrypt an identical plaintext more than once using the same public key, each resulting ciphertext differs from the others in a nonsystematic way in order to deter compilation of a "codebook" and to foil other cryptanalytic attacks.
Simplicity and efficiency of implementation The essential computations required to implement the system are able to be accomplished either in hardware or software while making a minimum of demands on computational equipment. This facilitates implementation in embedded systems, custom or dedicated hardware or "smart cards," as well as in software running on widely available processors.

Claims (5)

1. A method of combining a serial keystream output with binary information P, comprising a succession of parts P, in which each part Pi represents a number of bytes to produce an encrypted bit stream C comprising a succession of parts Ci, said method comprising the steps of, for each successive part Pi: generating a pseudorandom permutation T of the bytes 1, n i using a plurality of bytes of the serial keystream output; permuting the relative positions of the bytes n, within the part P, 10 according to the permutation T to form an intermediate part Ii; forming the i-th part C, of the encrypted bit stream by for each byte B of the intermediate part Ii; *1 generating one or more bytes of the serial keystream output; and replacing the byte B with a quantity that depends upon the byte B 15 and the said generated byte or bytes of the serial keystream output.
2. A method of combining a serial keystream with binary information according to claim 1 including the steps of for each successive part Pi computing a cumulative current message digest value Di for all parts of the binary information P from its 20 beginning up to and including and obtaining and discarding a number of additional bytes of the serial keystream output, said number depending upon the current message digest value Di.
3. A method of combining a serial keystream output with an encrypted bit stream C comprising a succession of parts C, CN, in which each part C, consists of a number of bytes to recover binary information P containing by a succession of parts said method comprising the steps of for each successive part C,: generating a pseudorandom permutation T of the numbers 1, ni using a plurality of bytes of the serial keystream output; forming an intermediate part I, by for each byte B of the part C, -44- generating one or more bytes of the serial keystream output; and replacing the byte B with a quantity that depends upon the byte B and the said generated byte or bytes of the serial keystream output; and permuting the relative positions of the bytes within the intermediate part I, according to the permutation T to form the i-th part P, of said binary information.
4. A method of combining a serial keystream with an encrypted bit stream according to claim 5 including the steps of for each successive part P, computing a current message digest value D, for all parts of the binary information P from its 10 beginning up to and including Pi; and obtaining and discarding a number of additional bytes of the serial keystream output, said number depending upon the current message digest value D i
5. A method of combining a serial keystream with an encrypted bit stream 15 substantially as hereinbefore described. 20 WILLIAM MICHAEL RAIKE AJPARK Patent Attorneys for the Applicant Dated: 15 August 2000
AU53420/00A 1993-12-01 2000-08-16 A method of combining a serial keystream output with binary information Ceased AU750408B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU53420/00A AU750408B2 (en) 1993-12-01 2000-08-16 A method of combining a serial keystream output with binary information

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
NZ250337 1993-12-01
NZ250475 1993-12-16
NZ260712 1994-06-09
AU53420/00A AU750408B2 (en) 1993-12-01 2000-08-16 A method of combining a serial keystream output with binary information

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
AU11321/99A Division AU729638B2 (en) 1993-12-01 1999-01-13 A non-deterministic public key encryption system

Publications (2)

Publication Number Publication Date
AU5342000A true AU5342000A (en) 2000-11-02
AU750408B2 AU750408B2 (en) 2002-07-18

Family

ID=3739423

Family Applications (1)

Application Number Title Priority Date Filing Date
AU53420/00A Ceased AU750408B2 (en) 1993-12-01 2000-08-16 A method of combining a serial keystream output with binary information

Country Status (1)

Country Link
AU (1) AU750408B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910700A (en) * 2021-01-29 2021-06-04 郑州信大捷安信息技术股份有限公司 Offline strategy recovery code generation method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910700A (en) * 2021-01-29 2021-06-04 郑州信大捷安信息技术股份有限公司 Offline strategy recovery code generation method and system

Also Published As

Publication number Publication date
AU750408B2 (en) 2002-07-18

Similar Documents

Publication Publication Date Title
AU729638B2 (en) A non-deterministic public key encryption system
CN110677237B (en) File encryption method with chaos-like characteristic
US5623549A (en) Cipher mechanisms with fencing and balanced block mixing
Simmons Symmetric and asymmetric encryption
US6185679B1 (en) Method and apparatus for a symmetric block cipher using multiple stages with type-1 and type-3 feistel networks
US6185304B1 (en) Method and apparatus for a symmetric block cipher using multiple stages
US20100166174A1 (en) Hash functions using elliptic curve cryptography
KR100994841B1 (en) METHOD OF GENERATING A STREAM CIPHER USING MULTIPLE KEYS and RECORDING MEDIUM
US20140112469A1 (en) Novel encryption processes based upon irrational numbers and devices to accomplish the same
US8705740B2 (en) Elliptic curve-based message authentication code system and method
US20100169658A1 (en) Elliptic curve-based message authentication code
JP2000511755A (en) How to encrypt binary code information
US8190892B2 (en) Message authentication code with blind factorization and randomization
Naskar et al. A secure symmetric image encryption based on linear geometry
JP2001503534A (en) Data decorrelation method
RU2141729C1 (en) Method for encrypting of binary data units
AU750408B2 (en) A method of combining a serial keystream output with binary information
AU750323B2 (en) A method of generating a key for a public key encryption system
Simmons Symmetric and asymmetric encryption
Hamsanandhini et al. Securing Data in the Image Using SHA & ECC
Simmons 10. Symmetric and
Ghadi Improving the Robustness of RSA Encryption Through Input-Based Key Generation.
Suwais et al. New classification of existing stream ciphers
Yılmaz Two versions of the stream cipher snow
Nepal Enhanced Security Encryption for Data Storage Using Multiple Keys

Legal Events

Date Code Title Description
TC Change of applicant's name (sec. 104)

Owner name: RPK NEW ZEALAND LIMITED

Free format text: FORMER NAME: WILLIAM MICHAEL RAIKE

FGA Letters patent sealed or granted (standard patent)
MK14 Patent ceased section 143(a) (annual fees not paid) or expired