A NON-DETERMINISTIC PUBLIC KEY ENCRYPTION SYSTEM

Abstract: A non-deterministic public key encryption system whereby a public key is generated from a private key using mathematical operations equivalent to exponentiation in finite fields. Thus an attacker is required to compute logarithms over finite fields. Encryption involves generating a random initialisation key (R) which is used to (1) exponentiate the message receiver's public key (E) to produce initial values (K) for a pseudorandom binary mixture generator, and to (2) compute an open key (Q) by exponentiating an initial known generator state (a0). A ciphertext (C) is produced from plaintext (P) by clocking the mixture generator from the initial value (K) and combining the output keystream with the plaintext (P). The open key (Q) is attached to the ciphertext prior to transmission. Decryption involves extracting the open key (Q) and exponentiating this by the message receiver's private key (D) to compute (K) which is then used to set the initial value of a mixture generator. The mixture generator is clocked and its output keystream combined with the ciphertext (C) to produce plaintext (P). The invention may be implemented in special purpose hardware or in software for a general purpose processor.

Description: A NON-DETERMINISTIC PUBLIC KEY ENCRYPTION SYSTEM TECHNICAL FIELD This invention relates to cryptographic systems and more particularly but not solely to a method and means for realising a computationally secure public-key encryption system and digital signature (authentication) system. 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 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 έach participaift in the communication system has two keys, a pubhc 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 the private key the pubhc key is generated. The pubhc key can be thought of as the encryption key (E) while the private key may be thought of as the decryption key (D). In pubhc 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 pubhc 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 pubhc key from a publicl available register or file and uses it to encrypt the message M. The ciphertext C is th result of encrypting the message M and is transmitted to user B who then transforms th 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 awar of the pubhc key and perhaps also has full knowledge of the cryptographic system, th private key (decryption key) must be determined from the known pubhc key. As ha been mentioned, the system relies upon the fact that this operation is extremely difficul to carry out. Alternatively, the attacker may have nothing but the intercepted encrypte message and a limited knowledge of the statistical properties of the message language. 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 ver large numbers are very hard to factorise. This system, however, has the disadvantage o requiring extensive multiplication of large (for example, 512-bit) integers, which is a ver slow process. Another disadvantage of this system is that the encryption method used i 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 t 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 o cryptographic systems such as orie 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 Nolume 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 pubhc 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 pubhc key will produce the message text M. It can be seen that if the message 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 pubhc key, implying a heavy demand for access to the pubhc key file. A further disadvantage is that the problem of managing the pubhc key file is comphcated by the possible need to retain and identify old pubhc keys even after they may have been superseded. Yet another disadvantage is that the pubhc 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. DISCLOSURE OF INVENTION It is, therefore, an object of the present invention to provide a complete pubhc-key encryption system which will go some way towards overcoming the above disadvantages or which will at least provide industry with a useful choice. Accordingly, in one aspect the invention consists in a pubhc-key encryption system wherein a message sender encrypts a plaintext message using a publicly known key unique to a message receiver and the message receiver decrypts the encrypted message using a secret private key from which the pubhc key has been derived, characterised in that: (1) a private key (D) is selected which comprises a plurality of binary numbers D J -'l to n * (2) a pubhc key (E) is exponentiated using the private key by, for each of the said numbers D x to n , calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the private key D x to n and providing each of the calculated binary states E α t0 n as a component of the pubhc key E; (3) the message sender (a) selects a random initialisation key (R) comprising a set of binary numbers R x to n and exponentiates the initial state using each number by, for each of th numbers R x t0 n , calculating the state of a pseudo-random binary number generator fro a given initial state after a number of clock pulses or state transitions equal to th corresponding number given by the Random Initiahsation Key R t to n and providing eac of the calculated binary states Q x to n as a component of an open key Q, (b) exponentiates the components of the pubhc key E by the component of the random initialisation key R to produce generator initiahsation states K x ton by, fo each of the said numbers E 1 to n and R x to n , calculating the state of a pseudo-rando binary number generator that would result from applying the process defined in step (2 a number of times equal to the corresponding binary number R j t0 n , (c) loads a set (n) of pseudo-random binary number generators, the output of which are combined to form a mixture generator, with initial values K : to n , (d) clocks the mixture generator to obtain a keystream serial output an combines this output with the binary plaintext message to produce an encrypted bi stream, (e) transmits the encrypted bit stream together with the open key Q to th message receiver; (4) the message receiver (a) extracts the open key Q from the encrypted bit stream, (b) exponentiates the open key Q by the private key D to derive generato initialisation states K α t0 n by, for 'each of the safd numbers O^ t0 „ and D x to n , calculatin the state of a pseudo-random binary number generator that would result from applyin the process defined in step (3)(a) a number of times equal to the corresponding binar number D l to n , (c) loads a second set (n) of pseudo-random binary number generators, the outputs of which are combined to form a mixture generator, with the generator initiahsation states K j to n , (d) clocks the mixture generator to obtain a keystream serial output and combines this output with the received encrypted bit stream to produce the sender's plaintext message. In a second aspect the invention consists in encryption apparatus for a pubhc key encryption system in which a private key (D) is selected which comprises a plurahty of binary numbers D x to n and a pubhc key (E) is exponentiated using the private key by, for each of the said numbers D x ton , calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the private key D x to n , and providing each of the calculated binary states E α to n as a component of the pubhc key E, said apparatus comprising: means for generating a random initialisation key (R) comprising a set of binary numbers R x to n ; means for exponentiating the initial state using each number by, for each of the said numbers R x to n , calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the random initiahsation key R x to n and providing each of the calculated binary states Q x to n as a component of an open key Q; means for exponentiating the components of the pubhc key E by the components of the random initialisation key R to produce generator initiahsation states K x t0 n by, for each of the said numbers E x t0 n and R to n , calculating the state of a pseudo-random binary number generator that would result from applying the process used to exponentiate pubhc key (E) a number of times equal to the corresponding binary number a mixture generator comprising a set (n) of pseudo-random binary number generators, the outputs of which are combined to form the output of the mixture generator; ' * means which load said set (n) of pseudo-random binary number generators with initial values equal to K x to n ; means which clock the mixture generator to obtain a keystream serial output; means which receive a plaintext message and combine the output of the mixture generator with the binary plaintext message to produce an encrypted bit stream; and means for transmitting the encrypted bit stream together with the open key Q to the message receiver. In a third aspect the invention consists in decryption apparatus for a pubhc-key encryption system in which a private key (D) is selected which comprises a plurahty of binary numbers D t to n and a pubhc key (E) is exponentiated using the private key by, for each of the said numbers D x t0 n , calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the private key D x t0 n , and providing each of the calculated binary states E 1 to n as a component of the pubhc key E, and wherein a plaintext message is encrypted according to a process whereby the message sender (1) selects a random initialisation key (R) comprising a set of binary numbers Ri , 0 n and exponentiates the initial state using each number by for each of the said numbers R 2 to n , calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the random initiahsation key R x to n and providing each of the calculated binary states Q α to n as a component of an open key Q; (2) exponentiates the components of the pubhc key E by the components of the random initiahsation key R to produce generator initiahsation states K x to n by, for each of the said numbers E x to n and R x t0 n , calculating the state of a pseudo-random binary number generator that would result from applying the process previously defined, wherein a private key is used to exponentiate a pubhc key, a number of times equal to the corresponding binary number R x to n ; (3) loads a set (n) of pseudo-random binary number generators, the outputs of which are combined to form a mixture generator, with initial values K x to n ; (4) clocks the mixture generator to obtain a keystream serial output and combines this output with the binary plaintext message to produce an encrypted bit stream; (5) transmits the encrypted bit stream together with the open key Q to the message receiver, 4 * said decryption apparatus comprising: means for extracting the open key Q from the encrypted bit stream; means for exponentiating open key Q by the private key D to derive generator initiahsation states K j to n by, for each of the said numbers Qi to n and O t to n , calculating the state of a pseudo-random binary number generator that would result from applying the process defined above for deriving the open key (Q) a number of times equal to the corresponding binary number D x to n ; a set (n) of pseudo-random binary number generators, the outputs of which are combined to form a mixture generator; means which load said set (n) of pseudo-random binary number generators with initial values equal to K x t0 n ; means for clocking the mixture generator to obtain a keystream serial output; and means for combining this output with the received encrypted bit stream to produce the plaintext message. In a fourth aspect the invention consists in a public-key authentication system wherein a message sender appends signature information to a message and registers corresponding authentication information together with his name in a signature archive that is open to pubhc inspection and wherein a message verifier obtains the message and its signature information, and the authentication information from the public signature archive and uses these to confirm whether or not the message has been sent by the sender identified by said signature information, characterised in that: (1) the message sender (a) selects a random digital signature (S) consisting of a plurahty of binary numbers S 2 to n ; (b) exponentiates a verification key V by, for each of said numbers Sj to n , by calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the random digital signature S t , o n and providing each of the calculated binary states V 1 to n as a component of the verification key V; (c) checks said signature archive to ensure that the verification key V computed in (b) has not yet been registered and if V has previously been registered repeats steps (a) and (b); (d) computes a generalised cyclic -fedundancy check (CRC) value C by, for each one of a set (n) of pseudo-random binary number generators, computing the remainder resulting from dividing the sequence of bits comprising the message being sent by a modulus corresponding to said pseudo-random binary number generator and providing each such remainder C x to n as a component of the generalised CRC value C; (e) computes the sum C + S (modulo 2) and registers this sum and the verification key V under his name in the pubhc signature archive; (f) appends S to the message being sent, and (2) the message verifier (a) extracts the digital signature (S) consisting of a plurahty of binary numbers S x t0 n from the message; (b) computes a generalised cyclic redundancy check (CRC) value C by, for each of the said numbers S j to n , computing the remainder resulting from dividing the sequence of bits comprising the received message by a modulus corresponding to a pseudo-random binary number generator and providing each such remainder C x t0 n as a component of the generahsed CRC value C; (c) computes a verification key V by, for each of said numbers S 1 10 n , exponentiating a given initial state of the corresponding pseudo-random binary number generator using each said number S x to n by means of the process defined in step (l)(b); (d) computes the sum C + S (modulo 2); (e) searches the pubhc signature archive under the name of the sender identified by said signature information of the message for authentication information matching the values C + S (modulo 2) and V computed in (c) and (d); (f) validates the message as authentic if the search in (e) is successful, or rejects it as spurious if the search in (e) is unsuccessful. In a fifth aspect the invention consists in a pubhc-key authentication system wherein a message authenticator selects a private key D which comprises a plurahty of binary numbers D x to n and exponentiates a pubhc key E using the private key by, for each of the said numbers D x to n , calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the private key D to n and providing each of the calculated binary states E x to n as a component of the pubhc key E, and makes E available for pubhc inspection, and wherein a message sender registers unique authentication information with' said message* authenticator and appends signature information to a message, and wherein a message verifier obtains the message, calculates a generahsed CRC value for the message, submits the message signature information, the generahsed CRC value and the sender's name or other identifying information to the message authenticator, and wherein said message authenticator uses said generahsed CRC value, said message signature information and said registered authentication information to confirm whether or not the message has been sent by the sender identified by said authentication information, characterised in that: (1) the message sender (a) selects an authentication password (P) consisting of a plurahty of binary numbers; (b) requests said signature authenticator to register the authentication password P to correspond to his name or other identifying information and to confirm that P has not yet been registered by anyone and if informed that P has previously been registered repeats step (a); (c) computes a generahsed cyclic redundancy check (CRC) value C M by, for each one of a set (n) of pseudo-random binary number generators, computing the remainder resulting from dividing the sequence of bits comprising the message being sent by a modulus corresponding to said pseudo-random binary number generator and providing each such remainder to n as a component of the generahsed CRC value C M ; (d) computes intermediate signature information by appending the generalised CRC value C M to the authentication password P; (e) computes message signature information S PM by encrypting the intermediate signature information computed in step (d) using the signature authenticator's pubhc key E by (i) selecting a random initiahsation key (R) comprising a set of binary numbers R x ton and exponentiating the initial state using each number by, for each of the said numbers R x to n , calculating the state of pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions given by the random initiahsation key R x to n and providing each of the calculated binary states Q x to n to produce an open key Q, (ii) exponentiating the components of the signature authenticator's pubhc key E by the components of the random initiahsation key R to produce generator initiahsation states K x to n by, for 'each of the safd numbers E 1 to n and R x to n , calculating the state of a pseudo-random binary number generator that would result from applying the process previously defined, wherein a private key is used to exponentiate a pubhc key, a number of times equal to the corresponding binary number R x to n , (hi) loading a set (n) of pseudo-random binary number generators, the outputs of which are combined to form a mixture generator, with initial values K x t0 n , (iv) clocking the mixture generator to obtain a keystream serial output and combining this output with said intermediate signature information to produce encrypted intermediate signature information, (v) appending said encrypted intermediate signature information to said open key Q to produce message signature information S P)M . (f) appending the said message signature information S PιM to the message and also appending his name or other identifying information to the message, (2) the message verifier (a) extracts the message signature information (S P M ) and the sender's name or other identifying information from the message; (b) computes a generahsed CRC value c M ' for the message by means of the process defined in step (l)(c); (c) submits the said message signature information and the sender's name or other identifying information and the said generahsed CRC value c u ' to the signature authenticator and requests said signature authenticator to compare the authentication password P and generahsed CRC value C M encrypted within the message signature information S PJ ^ with c u ' and the sender's name or other identifying information, and (3) the message authenticator (a) decrypts the message signature information S P ^ using its private key D by (i) extracting the open key Q from the message signature information, (ii) exponentiating the open key Q by the private key D to derive generator initialisation states K x to n by, for each of the said numbers Q x to „ and D x to n , calculating the state of a pseudo-random binary number generator that would result from applying the process defined in step (l)(e)(i) a number of times equal to the corresponding binary number D x to n , (hi) loading a second set (n) of pseudo-random binary number generators, the outputs of which are combined to form a mixture generator, with the generator initiahsation states K x to n , (iv) clocking the mixture generator to obtain a keystream serial output and combining this output with the message signature information to thereby recover the intermediate signature information P and C computed in step (l)(d); (b) compares the value of P contained in said intermediate signature information with the authentication password registered as corresponding to the name or other identifying information submitted in step (2)(c); (c) compares the value of C M contained in said intermediate signature information with the value of c M ' submitted in step (2)(c); (d) confirms to the message verifier that the message is authentic if both of the comparisons in steps (c) and (d) are successful, or rejects it as spurious if either comparison fails. In a sixth aspect the invention consists in a method for generating random numbers comprising the steps of: (1) a user manipulating an input device whose state at any time t can be described as a point Xj represented by a plurahty of coordinates (X^ X^, ---X tn ); (2) measuring the points -X, describing the states of said input device at a plurahty of time instants t = 1, 2, ..., n; (3) selecting a subset of the points thus measured corresponding to a subset of said time instants; (4) computing a numerical function of the coordinates of all the points thus selected; (5) obtaining the desired random numbers as the plurahty of binary digits which represent the value of the numerical function thus computed. In a seventh aspect the invention consists in a method of combining a serial keystream output with binary information P, comprising a succession of parts P ..., P N in which each part P j represents a number of bytes n- j , to produce an encrypted bit stream C comprising a succession of parts , said method comprising the steps of, for each successive part P^ (1) generating a pseudorandom permutation T of the bytes 1, ..., H; using a plurality of bytes of the serial keystream output; (2) permuting the relative positions of the bytes -Qj within the part Pj according to the permutation T to form an intermediate part I j j (3) forming the i-th part of the encrypted bit stream by for each byte B of the intermediate part ; (a) generating one or more bytes of the serial keystream output; and (b) 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. In an eighth aspect the invention consists in a method of combining a serial keystream output with an encrypted bit stream C comprising a succession of parts , ..., C N , in which each part consists of a number of bytes r^, to recover binary information P containing by a succession of parts P j , said method comprising the steps of for each successive part : (1) generating a pseudorandom permutation T of the numbers 1, ... n^ using plurahty of bytes of the serial keystream output; (2) forming an intermediate part I j by for each byte B of the part (a) generating one or more bytes of the serial keystream output; and (b) replacing the byte B with a quantity that depends upon the byte and the said generated byte or bytes of the serial keystream output; and (3) permuting the relative positions of the bytes within the intermediate par Ij according to the permutation T to form the i-th part P j of said binary information. BRIEF DESCRIPTION OF DRAWINGS Figure 1 is a diagrammatic representation of a mixture generator with MLSR 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 embodifnent 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 ah, 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 pubhc-key cryptosystems, sometimes referred to as asymmetric-key systems, is according to the type of one-way function that relates private- key/pubhc-key pairs, and more specifically according to the mathematical problem whose solution is required in order to invert the one-way function (i.e., to infer a private key from its pubhc key). Three such problems account for virtually all pubhc-key systems proposed to date: prime factorisation, discrete logarithms, and knapsacks. For example, the best-known pubhc-key algorithm, RSA, is based on the difficulty of prime factorisation of large integers. Diffie-Hellman, which is a pubhc key distribution system rather than a true pubhc-key cryptosystem, is based on the discrete logarithm problem, as is the ElGamal pubhc-key cryptosystem. In mathematical terms, the present system is based upon the discrete logarithm problem. This means that in this system a pubhc 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 pubhc 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[2 P ], 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 deteπninistic or non-deterministic. The first mention of non-deterministic cryptosystems is beheved 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-Heterministic cryptosystem. In tra-nsforming 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. 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 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 othe component pseudorandom binary generators. Figure 1 shows a mixture generator where the mixer generator G m is a maximal-period linear shift register whose last three stages at time T are used to select one of 8 other MLSRGs (G 0 , ... , Gj , ..., G 7 ) whose output is to be used at time T. The clock rate of the mixer generator G m can be taken as three times the clock rate of the component generators Gj. 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 G m 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 b 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^+x? 9 , the top generator has 127 stages with (primitive) generator trinomial l+x^+x 127 , and the bottom generator has 521 stages with (primitive) generator trinomial l+x^+x 521 . A smaller (and less secure) instance is one in which the three generators correspond to the respective trinomials I+JC^+J^ 7 , I+X^+Λ* 9 , and l+x^+x™. 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 have a prime number of stages, so that the lengths of their periods are Mersenne primes. Throughout the balance of this document, the symbol p(x) is used to denote the generator polynomial corresponding to a MLSRG. A mixture generator, as defined here, need not necessarily be restricted to component generators consisting of MLSRG or MCG components. Instead, the components, including the mixer, might weU 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, 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 (i.e., 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 ver long, their complexity is very high, their distribution of zeroes and ones is well-balanced, and successive outputs are substantially uncorrelated. Their outputs also have excellen statistical properties in terms of their n-tuple distribution and runs statistics. Some o these properties can be demonstrated mathematically, while others have been verifie 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 cryptographi 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 ofte 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 show in Figure 2. We denote the numbers of stages in the MLSRGs forming the mixer, top and bottom generators by r , ^ and , and the initial states (at time T=0) of the respective generators by 2^, a^ and a^, respectively. We assume now for convenience that each of these initial states is fixed and pubhcly known. A variation of the invention consists of using the initial stated as part of a key known only to a particular group o users in order to permit secure and authenticated transmission of messages among members of this group. File encryption on personal computers using this type of mixture generator with n,,, = 87, -tt f = 89 and = 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 ri m = 89, ri t = 127 and -n,, = 521. The latter three ah give rise to Mersenne primes. It is possible to show mathematically that the period (i.e., 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: (2""-l)(2 n, -l)(2 ,, *-l) • 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 n- uj -ti t + (1 + -O n ,)-^. 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 o 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 an 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 o 2 303 . 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 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 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 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 pubhc 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 pubhc 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 requirements and limitations. In the RPK system, the selection of a private key is completely free 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 D m , D t and D b , where D m is in the range from 1 to 2" m - 1 , D t is in the range from 1 to 2"' - 1 and D b is in the range from 1 to 2 n " - 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 E m , E t and -E,, of the three component generators after D m , D t and D b clock cycles (shifts), respectively. For a mixture generator with, say, N component generators, the private and pubhc keys will have N, rather than 3, such component states. Note that the number of bits required to form either a private or pubhc key is -Q j jj + - t + , 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 pubhc 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 pubhc 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 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 coefficients of a polynomial in one "indeterminate" x. Since the register has n stages, the contents of the stages can represent the coefficients of the powers of x : ljc, x , ..., xP±. Note that such polynomials are different from the "generator polynomial" p(x) 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 feedback tap in the middle of the generator. The final (output) stage of the generator will then be numbered (n - m - 1), 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 (i.e., 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 p(x). Polynomial addition and multiphcation 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 ao 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 l 'X'x- x- ... 'X, where the factor x appears D times. The resulting product can be denoted as j(P- mod p(r). Using D as an exponent in this way suggests that an efficient method for computing x^ mod p(x) involves pre- computing and tabulating the (n - 1) polynomials representing the binary powers 1 x x^ x* x** x x^ ' ' ' ' ■ " ' , all modulo p(z), and then multiplying together (again, modulo p( ) each time) those corresponding to one bits in the binary representation of D. This conceptual process of multiplying polynomials modulo p(x) can be accomphshed in practice very simply and efficiently using the shift register itself. No elaborate actual multiphcation is required. To see this, we observe that since clocking the generator once is equivalent to multiplying the polynomial corresponding to its contents by x, we can multiply by ir, say, by clocking the generator j times. Multiplying by an arbitrary polynomial is accomphshed 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 ehminates the need for a separate procedure for polynomial division in reducing products modulo p(x). Designing special-purpose circuitry or chips to accomphsh 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 (D m , D t , D b ) while user A's pubhc key E consists of the three numbers (E m , E t , E which are assumed to be pubhcly known, perhaps posted in a pubhc directory file, and which represent the states of the corresponding generators at times D m , D t and D b starting from given and known initial states s^ = (s^, a^, a^) at time zero. Equivalently, using D and E to denote times and states for a generic MLSRG, in polynomial notation we have E = x° mod p(x), -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 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 initiahsation key R = (R,,,, Ry R b ) that is to be used solely during the encryption of P. R is analogous to D in that it represents "exponents" for the component generators, and the three components of R must fall in the same ranges as those of D. User B next computes Q = (Q m , Q t , Q b ) from R in the same way that a pubhc key E is computed from a private key D. That is, Q represents the states of the component generators at time R, starting from the initial state a Q . 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 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 pubhc key) and then again uses the same random initialisation key R = (R^, R j , R b ) to compute a final state K = (K,,,, K- j , I^) by "exponentiating" A's pubhc key E, taking R as the exponent. In polynomial notation this can be written as v = E*> mod p(x), for j = m, t, b. User B does this "exponentiation" of A's pubhc key using the mixture generator's component shift registers to compute products of binary powers E* (k = 0, 1, ..., n - 1) > analogous to the way that a pubhc key is computed from a private key. Note that user B has used both the random initiahsation key R and user A's pubhc key E in computing K, as well as pubhcly available knowledge of the initial state &Q 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 D), despite the fact that user B has been able to compute K without knowing D. The state K is used as a final generator initiahsation 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 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 has serious cryptographic flaws when used by itself. 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 pubhc-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 (i.e., 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 applying the above-mentioned pseudorandom transposition (i.e., permutation) and substitution procedures more thah once. * 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 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 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. 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 accomphshed accordingly. This can also be done in hardware without unacceptable complexity. In summary, then, the encrytion process involves the following steps, all of which are accomphshed 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 pubhc key E, thereby generating a final (internal) generator initiahsation 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 ciphertext C. Note that since R is chosen randomly, even if the same plaintext were to be encrypted again using the same pubhc 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 initiahsation 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 the term "current CRC value" to refer to the 32-bit CCll ' l cychc 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 generahsed 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 generator 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 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 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 of pseudorantiomly permuti- ig the data within a chunk can be varied 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 (i, 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: (/7-1)(/7-3)...(3)(1) 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; i+ +) tablep] = i; for (k = 0, remaining = n; remaining > 1; remaining = remaining - 2) { index = k + 1 + ( stut_clock8( ) MODULO (remaining - 1) ); k = k + 1; if (index NOT_EQUAL k) { temp = tablepndex]; tablepndex] = table[k]; table[k] = temp; } k = k + 1; } } In the above code, the function stut_clock8( ) 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. (If n 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 swap table is used for each 256-byte block. In any case, it is worth emphasising here that the actual permutations apphed 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 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 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 chunk size is taken (for simplicity) to be only 4 bytes: Plaintext chunk: "ABCD" (whose hexadecimal representation is 41 42 43 44) Stuttered keystream output (hexadecimal): 37 04 FF BO 55 Encryption: 1. Calculate the CCTTT CRC32 value for the plaintext chunk. This value turns out 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 (0, 2) and (1, 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 B0 = Fl, 42 XOR 55 = 37, so the ciphertext consists of the sequence of bytes (in hexadecimal) 47 BB Fl 37. 5. The last byte of the CCTTT 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 key Q contained in the message header to compute the generator state corresponding to Q D , 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- D is just K, as noted earlier. In polynomial notation this fact can be expressed as E R = (x°) R = K = (x ) 0 = Q D • 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 initiahsation 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. 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 pubhc key by a random initiahsation 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 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 earher to the intermediate text block. This step inverts the transposition process 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 generating a representative pseudorandom permutation of a representative chunk corresponding to that needed to invert the permutation apphed 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 pseudorando ly permuted version of the plaintext. Thirdly, the same permutation apphed to the representative chunk is apphed 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 apphed 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 55. 2. Generate the pseudorandom swap table exactly as in the encryption process, using the first stuttered keystream byte. The table contains the pairs (0, 2) and (1, 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 B0 = 41, 37 XOR 55 = 42. The intermediate ciphertext is thus 43 44 41 42. 4. Apply the swap table by swapping first the 0th and 2nd bytes of the intermediate ciphertext and then the 1st and 3rd bytes: 41 42 43 44. 5. 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 las byte is A5, so as before we generate and discard the next 165 bytes of the stuttered 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. It is a TTL-compatible CMOS device that operates at up to 16 MHz, and performs exponentiation over the field GF[2 593 ]. 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 pubhc 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 initiahsation 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 chips or implemented as field- programmable gate arrays. Figure 4 shows a hardware implementation of an encrypter while Figure 5 shows a hardware implementation of the decrypter process, both of which perform in hardware the functions previously described. 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 property that anyone is able to compare the signature with pubhcly 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 message-dependent. We remark here that an unstated assumption underlying any pubhc-key encryption system is that the pubhc file (containing the hst of addressees and their pubhc keys) must be secure against unauthorised modifications. If this were not the case, an intruder could replace someone else's pubhc key with his own and thereby compromise the victim's security until the tampering was detected. The security of such pubhc files against unauthorised tampering is usually provided by password systems or callback procedures, and sometimes by physical means. Here we assume that a secure pubhc 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 pubhc signature archive may also be the same one that contains pubhc key information for the'encryption system, but note that the two files have different functions and probably different legal status. The costs and frequencies of modifications and accesses may also have different structures and different administrative requirements, suggesting that separating these two publicly-accessible files is advisable. As background, we summarise the concept of a CRC (cychc redundancy check) value for a message. CRC values are in common use as indicators of file and communications integrity, and various international standards (such as CCTTT 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 CCTTT standard, the generator polynomial is x* 2 + x 26 + x + x 22 + x 16 + x + x 11 + x 10 + JC 8 + x 1 + x 5 + x 4 + x 2 + 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 C M = (C^, C Mt , On,) in which each of the three components denotes the generator state resulting from dividing the message text by the corresponding generator polynomial p(x). We do not describe here the method for utilising the shift register itself to perform the division, since it is well-documented elsewhere. C M 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 pubhc signature archive or other message authentication authority. The pubhc signature archive or authentication authority possesses its own private key D s with its corresponding pubhc key E s previously defined with reference to the pubhc key cryptographic system that is the subject of this invention. When user B intends to sign a message M he is sending to user A, he calculates the generahsed CRC value C M and forms a signature S M by appending C M to his authentication password P B , and then encrypting the pair (P B , C M ) usin^ the pubhc key E s of the pubhc signature archive. He then appends the signature S M to the message. If the recipient of the message or a third party wishes to verify the authenticity of the signature S M , he computes the generalised CRC value c u ' for the actual message and submits it, together with the signature S M and the name or other information identifying user B, to the pubhc signature archive or authentication authority for authentication. The pubhc signature archive or authentication authority decrypts the signature using its private key D s and compares the generahsed CRC value included therein with the value of ύ. and compares the included password with the authentication password registered for user B. If both of these match, the pubhc signature archive vahdates the signature as an authentic signature of message M by user B. It can be seen from the foregoing that only the actual signer of the message can generate the signature S M since doing so requires knowledge of both user B's authentication password and the generahsed 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 pubhc authentication archive each time a message is to be signed. An alternative preferred embodiment of the pubhc-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 S^, S Mt and S^ and calculates C M + S M and also V u = x 5 " mod p(x) for each component generator. User B then registers the pair (C M + S M , V M ) under his name in the pubhc signature archive, and "signs" the message by appending S M to the message header. If V m has already been registered in the pubhc signature archive, user B repeats this process, computing a new S m and corresponding V m , until a unique V m is determined. (That is, one which has not been previously registered in the pubhc 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 pubhc signature archive can compute the CRC value c u ' for the actual message and add S M in order to verify that the result matches the alue posted in the pubhc signature archive. It is also possible for anyone to compute γ = x 5 * mod p(x) and to verify that it also matches the value posted in the pubhc 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 S M that meets these requirements. As is common in other approaches to authentication, the possibihty 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. 10. 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 th simplest variant of this type of generator, a sequence of numbers is generated using th relationship x n = cx n (mod q), where q is a prime number and c is a constant intege between 2 and (q-1) chosen in such a way that c is a "primitive root of unity." Th starting value or "seed" x 0 is selected arbitrarily. For example, q is sometimes chosen t be 2 31 - 1, which is a convenient Mersenne prime, and c might be chosen as the intege 524287. The resulting sequence of integers between 1 and (q-1) has period (q-1) essentially being a permutation of all 31-bit integers except for the two whose binar representations are all zeroes or all ones. Although these sequences have the attractive properties of being quick and eas to compute and having reasonably long periods, they have long been known to have poo statistical properties when used as pseudorandom number generators (unless they ar nonlinearly "shuffled") and D. Knuth has published a detailed analysis of their inadequac as keystream generators in cryptography. However, these weaknesses do not necessaril impair their usefulness as component generators in mixture generators of the types w have described, which have a highly nonlinear structure. Assuming that an MCG is selected so that its modulus q is a Mersenne prime o the form 2 n - 1, the generator output comes in n-bit blocks. These can be viewed as stream of bits starting with the low-order bit. "Clocking" or advancing an MCG specified number of bits is accomplished by caπying out the appropriate number o integer exponentiations and multiplications moϋulo q to obtain the necessary block an then selecting the correct bit position within the block. Thus, for this type of componen generator, integer multiphcation modulo 2 n -l replaces polynomial multiphcation modul p(x). This procedure carries with it the need to perform arithmetic on quite larg integers, but methods exist to perform this arithmetic reasonably efficiently, particularl when q is a Mersenne prime. Using an MCG as the mixer generator can be accomplished either by utilising th 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 from the MCG can be used, three bits at a time, to accomphsh the selection. 11. Ciyptographic Security We will discuss in general terms both the security level afforded by the transformation from private keys to pubhc keys and the properties of the ciphertext 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 pubhc key is known and the attacker has full knowledge of the cryptographic system and is able to apply it to generate a pubhc 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(2 P ). Since a different random initialisation key R is chosen for each message, the operation of advancing a generator in order to generate a pubhc key corresponding to a given private key can be viewed as mathematically equivalent to exponentiation over GF(2 P ), and the inverse problem of finding the private key from the pubhc key is mathematically equivalent to computing logarithms over GF(2 P ). The level of computational security of this part of the proposed system is therefore comparable to the diBBculty of computing logarithms over GF(2 P ). Although in the late 1970's the best known algorithm for doing £ this required on the order of 2 operations, more recent progress in this field now indicates that using the best currently known method, only on the order of 2 c ^ plo ^ 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 π7 ), which would earlier have been effectively impossible, is now only moderately difficult, requiring only a few hours on a modern mainframe computer. In terms of the small example suggested earlier in this document, in which three MLSRGs of lengths 87, 89 and 127 were used in the Geffe configuration shown in Figure 2, these figures imply that only a moderate level of computation security is obtained. In the larger example suggested, using the same Geffe generator configuration bu with MLSRG lengths of 89, 127 and 521, the pubhc key system proposed here can stil be easily implemented on a personal computer, but the level of computational securi is much higher. Considering only the longest generator, of length 521, the above figure indicate that the number of operations needed to compute logarithms over GF(2 521 would be on the order of about 2 50 using the best currently-known algorithm, which i beheved to be near-optimal. Even assuming improvements of several orders o magnitude over present-day computers, the proposed pubhc-key system will b computationally secure in these circumstances; that is, it will be infeasible to compute a unknown private key from all available information regardless of the computationa resources brought to bear. Furthermore, still larger component generators can be use with only a modest increase in the computational effort required for encryption an decryption and without unduly burdening the pubhc key file as a result of the additiona key length, so that the security of the system can be increased to any desired level. Using multiplicative congruential generators instead of shift register generator tends to increase the computational difficulty of the discrete logarithm problem, an therefore to enhance the security of the encryption procedure. This is because th logarithms must be computed over a field GF(q) where q is a prime rather than ove GF(2 P ), and the best currently known algorithfii for this case is less efficient, requirin on the order of 2 c '^ pΛo * p operations when the modulus q is a Mersenne prime 2 P - 1. Fo example, this translates roughly into about 2 40 * IO 12 operations when p = 127, severa thousand times greater than in the case of GF(2 P ). We now discuss the security of the system from the viewpoint of a "chose plaintext" attack against the keystream generator and combining procedure describe earlier. This type of attack is one in which a cryptanalyst has access to all pubhc key and has available a complete cryptographic system, including direct access to th keystream generator (the mixture generator in this case) that he can use to generat corresponding pairs of plaintext-ciphertext messages. This situation means that th cryptanalyst can inspect any number of subsequences of any length he chooses from th keystream output, starting from any desired initial state of the generator. Note that th period length of a mixture generator is very long (approximately 2 303 even for the smalle 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 (2 40 bits per second), that the plaintext length averages one gigabit (2 30 bits) and that an overlap with a search fragment can be effectively detected instantaneously (i.e., in zero time) with a sliding correlator using search fragments only 2 10 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 240 seconds! A probabilistic analysis also shows that, under the same assumptions, the probabihty of any overlaps at all for messages corresponding to randomly chosen initiahsation keys is negligible, so that a "known plaintext" attack based on this approach (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 the gain in security must be evaluated in the light of the consequent performance penalty. 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 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() for these three generators are, respectively: 1 + x + x 2 , l +x+jt 3 , 1 + x + X s The entire output streams (i.e., full periods) of these three generators are: Mixer: 101 Top: 1001011 Bottom: 00100001011101100011111001101 Table 1 Mixer Top Bottom State 1 x State 1 x x 2 State 1 xxW 01 10 001 100 00100 10000 10 01 100 010 00010 01000 11 11 010 001 00001 00100 101 110 10000 00010 110 Oil 01000 00001 111 111 10100 10010 Oil 101 01010 01001 10101 10110 11010 01011 11101 10111 OHIO 11001 10111 11110 11011 01111 01101 10101 00110 11000 00011 01100 10001 00110 11000 00011 11100 10011 11110 11011 11111 11111 01111 11101 00111 11100 10011 01110 11001 00111 01100 10001 10110 11010 01011 01101 00101 10100 10010 01010 01001 00101 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 x). 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: Inspecting the stage numbers displayed in Figure 3 shows that each of these states ft-l corresponds to the polynomial i = 1 JC ° + O J -'- For each of the three component generators, the polynomial coefficients corresponding to binary powers of x are easily computed (modulo p(x)) 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 x* Topx* Bottom x State 1 x State lxx 2 State 1 x xVx 4 2°= 1 10 01 100 010 00010 01000 2 1 = 2 11 11 010 001 00001 00100 2 2 = 4 110 011 01000 00001 2 3 = 8 11010 01011 2 4 = 16 10001 00110 If we choose a private key of D = (3, 6, 24), the corresponding pubhc key is computed as follows, using Table 2 extensively: a) Since D m = 3 (11 in binary), we compute x 3 = x 2 1 by first loading the mixer generator with the state 11 corresponding to the polynomial x 2 , then clocking it once to multiply by x, resulting in the state 0 1. (0\ This gives = ,U b) Since D t = 6 (110 in binary), we compute x 6 = x 4 .-* 2 by first loading the top generator with the state 1 1 0 (polynomial coefficients O i l) corresponding to the 5 polynomial x 4 , then clocking it twice to multiply by x 2 , resulting in the state O i l. This gives E = c) Since D b = 24 (11000 in binary), we need to compute x 24 = x^-x 8 . This is shghti more complex than the previous cases, since the second factor x 8 corresponds to a polynomial with more than one nonzero coefficient. We see from Table 2 that x 8 = 10 0.1 + lx + O C 2 + 1-x 3 + 1-x 4 (that is, polynomial coefficients 0 1 0 1 1), so that we must load the generator three times with the state 1 0 0 0 1 corresponding to x 16 , clocking it 1, 3 and 4 times respectively, to multiply by x, x 3 and x 4 since these are the powers of x that appear with nonzero coefficients in 8 , and then adding correspondin coefficients modulo 2. These 3 resulting states are: 15 11000, 11110, 11111 and adding their corresponding coefficients modulo 2 gives a final state of 1 1 0 0 1. This gives E h = Now suppose that some other user wishes to send us a message by encrypting a plaintext of, say, the characters "AA", whose ASCII representation in binary is 20 01000001 01000001. The sender first generates a random initialisation key R. Various means for accomplishing this are possible, for example utilising a noisy diode. We suppose that R has been generated here as R = (2, 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) Q m 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 = x 2 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 Q b we use Table 2 to compute x 7 = x*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 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. The message header will then contain Q as follows (it may well contain additional message-specific 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 pubhc key E to powers given by R. g) First K m is obtained by raising the polynomial corresponding to E m to the power R m = 2. It happens in this example that E m corresponds to the zero-degree B-1 polynomial 1 = 1.x 0 + O JC -S 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 E m , 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 D m 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 SUBSTITUTE SHEET the system. h) Next we raise E t to the power R t = 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 £ 2 , since E = E.E • Since E t is the state Oil, corresponding to the polynomial 1 + x 2 , we load the top generator with this state, clock it twice to obtain 100 and then add corresponding coefficients of these modulo 2 to get the state 111 corresponding to £ 2 . Then we use the generator again to multiply this by E t . We do this by loading the generator with 111, clocking it twice to obtain 001 and adding coefficients of these modulo 2 to finally obtain 11 0 for K,. i) To compute K b we raise E b to the power R b = 7. Again we need to build a table similar to Table 2 to obtain and £ 2 , then compute = E.El.E b - We have E b = 11001 = x 2 + x 3 + x 4 , so we get £ 2 as the modulo 2 sum of Ε^x 2 = 10110, E b -x 3 = 01011 and E b X 4 = 00101 (obtained by clocking the generator), which yields 11000, corresponding to x 3 + x 4 . Squaring this gives £ 4 as 10000, eventually giving K b as 01101. » The state K will therefore be given by: j) The output streams from the 3 generators starting from these states will be: Mixer: 101101101101101101... Top: 011100101110010111001... 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 m) 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 g), h) and i) above. Briefly, we have K = Q m = Q = K* = Q?' = Q? = Q?.Q? and these last two factors corresponding to the states 111 and 011, respectively, so that , = Finally we can compute jr = Q b = Q = Ql 6 .Ql, calculating the latter two factors as corresponding to the respective states 11110 and 01100. This gives the result n) Since (as expected) the state K is the same as the one computed by the sender 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, utihses 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 high 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 easily- remembered 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 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 initiahsation 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 the system. 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 16- bit 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 no distort or destroy randomness of the attributes being measured. For instance, in the Microsoft Windows operating environment, the timing resolution available for externa 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 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, and provide compromise approaches we discuss here. In particular, if a 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 pubhc-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 generated easily from data (for example, a password) which is to reside solely in human memory. Since conventional alphanumeric symbols provide only between 5 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 supphed 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 vulnerable to cryptanalytic "key cluster" attacks or .the like, but by extending the number of clock cycles used in the initiahsation 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. INDUSTRIAL APPLICABILITY The encryption system of the present invention has application in most areas where secure cornmunications are required with the advantages which flow from a true pubhc key system. Non-limiting examples include: (1) the secure transfer of personal or financial information, including credit card numbers or authorisations, over pubhc networks such as the Internet, to eliminate the risk of theft or misuse of such information, (2) the transmission of secure voice communications over existing computer network including the Internet, or over pubhc 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", (3) ensuring the privacy of electronic mail or facsimile communications over either pubhc switched lines or computer networks, including the Internet. ADVANTAGES • Known cryptanalytic difficulty The difficulty of successful cryptanalysis of the present algorithms can be assesse 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 apphcation. • High speed Whether implemented in software or hardware, the present algorithms allow the following tasks to be accomphshed as quickly as possible: a) Generating a pubhc key from an arbitrarily chosen private key b) Encryption of an arbitrary plaintext bit stream c) Decryption of an encrypted ciphertext. • High security The system is capable and provable of offering very high security, in terms of modern cryptographic standards and methods, against sophisticated modern 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. • Non-deterministic Even if the system is required to encrypt an identical plaintext more than once using the same pubhc key, each resulting ciphertext differs from the others in a non- systematic 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: CLAIMS 1. A pubhc-key encryption system wherein a message sender encrypts a plaintext message P using a pubhcly known key unique to a message receiver and the message receiver decrypts the encrypted message using a secret private key from which the pubhc key has been derived, characterised in that: (1) a private key (D) is selected which comprises a plurahty of binary number D r -'l to n> (2) a pubhc key (E) is computed by exponentiation (as hereinbefore defined) using the private key by, for each of the said numbers Ω x to n , calculating the state of a pseudo-random binary number generator from a given and known initial state after a number of clock pulses or state transitions equal to the corresponding number given by the private key D x to n and providing each of the calculated binary states E x to n as a component of the pubhc key E; (3) the message sender (a) generates a random initiahsation key (R) comprising a set of binary numbers R x to n and computes by exponentiation an open key Q by, for each of the numbers R x to n , calculating the state of a pseudo-random binary number generator from a given and known initial state after a number of clock pulses or state transitions equal to the corresponding number given by the random initiahsation key Rj t0 n and providing each of the calculated binary states O to n as a component of the open key Q, (b) exponentiates the components of the pubhc key E by the components of the random initialisation key R to produce generator initiahsation states K x to n by, for each of the said numbers E x t0 n and R x to n , calculating the state of a pseudo- random binary number generator that would result from applying the process defined in step (2) a number of times equal to the corresponding binary number R x to n , (c) loads a set (n) of pseudo-random binary number generators, the outputs of which are combined to form a first mixture generator, with initial values -- ■ to n» (d) clocks the first mixture generator to obtain a keystream serial output, (e) combines said keystream output with the binary plaintext message P to produce an encrypted bit stream ciphertext C, (f) adds the ciphertext C to the open key Q to produce a message stream, (g) transmits the message to the message receiver; (4) the message receiver (a) extracts the open key Q from the message stream, (b) exponentiates the open key Q by the private key D to derive generato initiahsation states K t to n by, for each of the said numbers Q x t0 n and D- to n , calculating the state of a pseudo-random binary number generator that would result from applying the process defined in step (3)(a) a number of times equal to the corresponding binary number D x to n , (c) loads a second set (n) of pseudo-random binary number generators, th outputs of which are combined to form a mixture generator, with the generator initialisation states K j to n , (d) clocks the mixture generator to obtain a keystream serial output and combines this output with the received encrypted bit stream to produce the sender's plaintext message. 2. A pubhc key encryption system according to claim 1 wherein said mixture generator comprises a set (n) of maximal period linear shift register generators, with one generator in the set arranged to select in a memoryless fashion the outputs of the remaining (n - 1) members of the set to provide said keystream serial output when all generators are clocked. 3. A pubhc key encryption system according to claim 1 wherein generating said random initialisation key R coniprises the stej-fe: (1) manipulating an electronic pointer device whose state at any time t can be described as a point X j represented by a plurahty of coordinates (-X^, X^, ...X t ,,); (2) measuring the points X j describing the states of said input device at a plurahty of time instants t = 1, 2, ..., n; (3) selecting a subset of the points thus measured corresponding to a subset o said time instants; (4) computing a numerical function of the coordinates of all the points thus selected; (5) producing the desired random numbers as the plurahty of binary digits which represent the value of the numerical function thus computed. 4. A pubhc key encryption system according to any one of claims 1 to 3 wherein combining said keystream with the binary plaintext P to produce said ciphertext C, comprises the steps of, for each component of P, P-: (1) generating a pseudorandom permutation T of the bytes 1, ..., n- using a plurahty of bytes of the serial keystream output; (2) permuting the relative positions of the bytes n- j within the part Pj according to the permutation T to form an intermediate part 1^ (3) forming the i-th part of the encrypted bit stream by for each byte B of the intermediate part I j j (a) generating one or more bytes of the serial keystream output; and (b) 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. 5. A pubhc key encryption system according to claim 4 including the steps of for each successive part P { computing a cumulative current message digest value Dj for all parts of the binary information P from its beginning up to and including P j j and obtaining and discarding a number of additional bytes of the serial keystream output, said number depending upon the current message digest value D t . 6. Encryption apparatus for a pubhc key encryption system in which a private key (D) is selected which comprises a plurahty of binary numbers D x to n and a pubhc key (E) is exponentiated using the private key by, for each of the said numbers D 1 t0 n , calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the private ke D x to n , and providing each of the calculated binary states E 1 to n as a component of the pubhc key E, said apparatus comprising: means for generating a random initialisation key (R) comprising a set of binary numbers R x t0 n ; means for calculating by exponentiation an open key Q by, for each of the said numbers R j to n , calculating the state of a pseudo-random binary number generator from a given and known initial state after a number of clock pulses or state transitions equal to the corresponding number given by the random initiahsation key Ri to n and providing each of the calculated binary states Q x to n as a component of the open key Q; means for exponentiating the components of the pubhc key E by the components of the random initialisation key R to produce generator initiahsation states K x t0 n by, for each of the said numbers E x t0 n and R x to n , calculating the state of a pseudo- random binary number generator that would result from applying the process used to exponentiate pubhc key (E) a number of times equal to the corresponding binary number R l to n ; a mixture generator comprising a set (n) of pseudo-random binary number generators, the outputs of which are combined to form the output of the mixture generator; means which load said set (n) of pseudo-random binary number generators with initial values equal to K x to n ; means which clock the mixture generator to obtain a keystream serial output; means which receive a plaintext message and combine the output of the mixture generator with the binary plaintext message to produce an encrypted bit stream; means for adding the ciphertext C to the open key Q to produce a message stream, and means for transmitting the message stream to the message receiver. 7. Decryption apparatus for a pubhc-key encryption system in which a private key (D) is selected which comprises a plurahty of binary numbers D x to n and a pubhc key (E) is exponentiated using the private key by, for each of the said numbers D t to n , calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the private key O t to n , and providing each of the calculated binary states Ej to n as a component of the pubhc key Ε, and wherein a plaintext message is encrypted according to a process whereby the message sender (1) generates a random initiahsation key (R) comprising a set of binary numbers R 1 to n and computes by exponentiation an open key Q by for each of the said numbers R λ to n , calculating the state of a pseudo-random binary number generator from a given and known initial state after a number of clock pulses or state transitions equal to the corresponding number given by the random initialisation key R x to n and providing each of the calculated binary states Q x to n as a component of the open key Q; (2) exponentiates the components of the pubhc key E by the components of the random initiahsation key R to produce generator initiahsation states K x to n by, for each of the said numbers E x to n and R x t0 n , calculating the state of a pseudo-random binary number generator that would result from applying the process previously defined, wherein a private key is used to exponentiate a pubhc key, a number of times equal to the corresponding binary number R x to n ; (3) loads a set (n) of pseudo-random binary number generators, the outputs of which are combined to form a mixture generator, with initial values K x to n ; (4) clocks the mixture generator to obtain a keystream serial output and combines this output with the binary plaintext message to produce an encrypted bit stream ciphertext C, and (5) transmits the encrypted bit stream together with the open key Q to the message receiver, said decryption apparatus comprising: means for extracting the open key Q from the encrypted bit stream; means for exponentiating the components of the open key Q by the components of the private key D to derive generator initialisation states K x to n by, for each of the said numbers Q x t0 n and D x to n , calculating the state of a pseudo-random binary number generator that would result from applying the process defined above for deriving the open key Q a number of times equal to the corresponding binary number D ■L -'l to n» a set (n) of pseudo-random binary number generators, the outputs of which are combined to form a mixture generator; means which load said set (n) of pseudo-random binary number generators with initial values equal to K x to n ; means for clocking the -mixture generatofto obtain a keystream serial output; and means for combining this output with the received ciphertext C to produce the plaintext message P. 8. A pubhc-key authentication system wherein a message sender appends signature information to a message and registers corresponding authentication information together with his name in a signature archive that is open to pubhc inspection and wherein a message verifier obtains the message and its signature information, and the authentication information from the pubhc signature archive and uses these to confirm whether or not the message has been sent by the sender identified by said signature information, characterised in that: (1) the message sender (a) selects a random digital signature (S) consisting of a plurahty of binary numbers S 1 10 n ; (b) exponentiates a verification key V by, for each of said numbers Si to n , by calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the random digital signature S x t0 n and providing eac of the calculated binary states Y x to n as a component of the verification key V; (c) checks said signature archive to ensure that the verification key V computed in (b) has not yet been registered and if V has previously been registered repeats steps (a) and (b); (d) computes a generahsed cychc redundancy check (CRC) value C by, fo each one of a set (n) of pseudo-random binary number generators, computing the remainder resulting from dividing the sequence of bits comprising the message being sent by a modulus corresponding to said pseudo-random binary number generator an providing each such remainder to n as a component of the generahsed CRC value (e) computes the sum C + S (modulo 2) and registers this sum and the verification key V under his name in the pubhc signature archive; (f) appends S to the message being sent, and (2) the message verifier (a) extracts the digital signature (S) consisting of a plurahty of binary numbers S l to n from the message; (b) computes a generalised cychc redundancy check (CRC) value C by, fo each of the said numbers S x to „,' computing thέ remainder resulting from dividing the sequence of bits comprising the received message by a modulus corresponding to a pseudo-random binary number generator and providing each such remainder C α to n as a component of the generalised CRC value C; (c) computes a verification key V by, for each of said numbers S x to n , exponentiating a given initial state of the corresponding pseudo-random binary number generator using each said number S x t0 n by means of the process defined in step (l)(b); (d) computes the sum C + S (modulo 2); (e) searches the pubhc signature archive under the name of the sender identified by said signature information of the message for authentication information matching the values C + S (modulo 2) and V computed in (c) and (d); (f) vahdates the message as authentic if the search in (e) is successful, or rejects it as spurious if the search in (e) is unsuccessful. 9. A pubhc-key authentication system wherein a message authenticator selects a private key D which comprises a plurahty of binary numbers D x to n and exponentiates a pubhc key E using the private key by, for each of the said numbers D x to n , calculating the state of a pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions equal to the corresponding number given by the private key O t t0 n and providing each of the calculated binary states E 1 to n as a component of the pubhc key E, and makes E available for pubhc inspection, and wherein a message sender registers unique authentication information with said message authenticator and appends signature information to a message, and wherein a message verifier obtains the message, calculates a generahsed CRC value for the message, submits the message signature information, the generalised CRC value and the sender's name or other identifying information to the message authenticator, and wherein said message authenticator uses said generahsed CRC value, said message signature information and said registered authentication information to confirm whether or not the message has been sent by the sender identified by said authentication information, characterised in that: (1) the message sender (a) selects an authentication password (P) consisting of a plurahty of binary numbers; (b) requests said signature authenticator to register the authentication password P to correspond to his name or other identifying information and to confirm that P has not yet been registered by anyone and if informed that P has previously been registered repeats step (a); (c) computes a generahsed cychc redundancy check (CRC) value C M by, for each one of a set (n) of pseudo-random binary number generators, computing the remainder resulting from dividing the sequence of bits comprising the message being sent by a modulus corresponding to said pseudo-random binary number generator and providing each such remainder t0 n as a component of the generahsed CRC value C M ; (d) computes intermediate signature information by appending the generahsed CRC value C M to the authentication password P; (e) computes message signature information S P M by encrypting the intermediate signature information computed in step (d) using the signature authenticator's pubhc key E by (i) selecting a random imtiahsation key (R) comprising a set of binary numbers R 1 to n and exponentiating the initial state using each number by, for each of the said numbers R x to n , calculating the state of pseudo-random binary number generator from a given initial state after a number of clock pulses or state transitions given by the random imtiahsation key R t to n and providing each of the calculated binary states Q 1 10 n to produce an open key Q, (ii) exponentiating the components of the signature authenticator's pubhc key E by the components of the random initiahsation key R to produce generator initialisation states K x to n by, for each of the said numbers E l to n and R x to n , calculating the state of a pseudo-random binary number generator that would result from applying the process previously defined, wherein a private key is used to exponentiate a pubhc key, a number of times equal to the corresponding binary number R x to n , (iii) loading a set (n) of pseudo-random binary number generators, the outputs of which are combined to form a mixture generator, with initial values K x to n , (iv) clocking the mixture generator to obtain a keystream serial output and combining this output with said intermediate signature information to produce encrypted intermediate'signature info-fmation, (v) appending said encrypted intermediate signature information to said open key Q to produce message signature information S P;M , (f) appending the said message signature information S PιM to the message and also appending his name or other identifying information to the message, (2) the message verifier (a) extracts the message signature information (S PιM ) and the sender's name or other identifying information from the message; (b) computes a generahsed CRC value c ror me message by means of the process defined in step (l)(c); (c) submits the said message signature information and the sender's name or other identifying information and the said generalised CRC value c u ' to the signature authenticator and requests said signature authenticator to compare the authentication password P and generahsed CRC value C M encrypted within the message signature information S P M with c u ' and the sender's name or other identifying information, and (3) the message authenticator (a) decrypts the message signature information S ? using its private key D by (i) extracting the open key Q from the message signature information, (ii) exponentiating the open key Q by the private key D to derive generator initiahsation states K x to n by, for each of the said numbers Q 1 to n and D x t0 n , calculating the state of a pseudo-random binary number generator that would result from applying the process defined in step (l)(e)(i) a number of times equal to the corresponding binary number D x to n , (hi) loading a second set (n) of pseudo-random binary number generators, the outputs of which are combined to form a mixture generator, with the generator initiahsation states K t to n , (iv) clocking the mixture generator to obtain a keystream serial output and combining this output with the message signature information to thereby recover the intermediate signature information P and C computed in step (l)(d); (b) compares the value of P contained in said intermediate signature information with the authentication password registered as corresponding to the name or other identifying information submitted in step (2)(c); (c) compares the value of C M contained in said intermediate signature information with the value of c u ' submitted in step (2)(c); (d) confirms to the message verifier that the message is authentic if both of the comparisons in steps (c) and (d) are successful, or rejects it as spurious if either comparison fails. 10. A method for generating random numbers comprising the steps of: (1) manipulating an electronic pointer device whose state at any time t can be described as a point Xj represented by a plurahty of coordinates (-X^, Xg, ...X tn ); (2) measuring the points X j describing the states of said input device at a plurahty of time instants t = 1, 2, ..., n; (3) selecting a subset of the points thus measured corresponding to a subset o said time instants; (4) computing a numerical function of the coordinates of all the points thus selected; (5) producing the desired random numbers as the plurahty of binary digits which represent the value of the numerical function thus computed. 11. A method of combining a serial keystream output with binary information P, comprising a succession of parts P α , ..., P N in which each part P j represents a number of bytes ri j , to produce an encrypted bit stream C comprising a succession of parts , said method comprising the steps o-ζ for each successive part P J : (1) generating a pseudorandom permutation T of the bytes 1, ..., ^ using a plurahty of bytes of the serial keystream output; (2) permuting the relative positions of the bytes -O; within the part P ; accordin to the permutation T to form an intermediate part I j j (3) forming the i-th part of the encrypted bit stream by for each byte B of the intermediate part I;; (a) generating one or more bytes of the serial keystream output; and (b) replacing the byte B with a quantity that depends upon the byte and the said generated byte or bytes of the serial keystream output. 12. A method of combining a serial keystrea h with binary information according to claim 11 including the steps of for each successive part P j computing a cumulative current message digest value Dj for all parts of the binary information P from its beginning up to and including P.,; and obtaining and discarding a number of additional bytes of the serial keystream output, said number depending upon the current message digest value Dj. 13. A method of combining a serial keystream output with an encrypted bit stream C comprising a succession of parts C α , .... C N , in which each part consists of a number of bytes π- j , to recover binary information P containing by a succession of parts P j , said method comprising the steps of for each successive part : (1) generating a pseudorandom permutation T of the numbers 1, ... rij using a plurahty of bytes of the serial keystream output; (2) forming an intermediate part I; by for each byte B of the part (a) generating one or more bytes of the serial keystream output; and (b) 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 (3) permuting the relative positions of the bytes within the intermediate part I; according to the permutation T to form the i-th part P f of said binary information. 14. A method of combining a serial keystream with an encrypted bit stream accordin to claim 14 including the steps of for each successive part P t computing a current message digest value D j for all parts of the binary information P from its beginning up to and including P j j and obtaining and discarding a number of additional bytes of the serial keystream output, said number depending upon the current message digest value Dj. 15. A mixture generator suitable for use in a pubhc key encryption system comprising: a set (n) of maximal period linear shift register generators, means for clocking said n generators, means for sequentially selecting the outputs of n - 1 of said generators to produce a mixed keystream, decoding means for decoding the outputs of a plurahty of the last m stages of the nth generator, said decoder output controlling said selecting means in its selection of the particular generator output to use during each clock period. 16. A mixture generator according to claim 15 wherein n = 3 and m = 1.

Inventors: RAIKE WILLIAM MICHAEL, RAIKE, WILLIAM, MICHAEL
Applicants: RAIKE WILLIAM MICHAEL, RAIKE, WILLIAM, MICHAEL
Application year: 1994
Main classification: H04L9
IPC codes: G09C1, H04L9