US 20090220083 A1 Abstract A first bit sequence is generated using a first pseudorandom bit source. A second bit sequence is generated using a second pseudorandom bit source. A third bit sequence is generated by multiplying the first bit sequence with the second bit sequence over a finite field of even characteristic, modulo a fixed primitive polynomial. A message is received. The third bit sequence is comingled with the message to conceal contents of the message.
Claims(25) 1. A method of securing data, comprising:
generating a first bit sequence using a first pseudorandom bit source; generating a second bit sequence using a second pseudorandom bit source; generating a third bit sequence by multiplying the first bit sequence with the second bit sequence over a finite field of even characteristic, modulo a fixed primitive polynomial; receiving a message from a message source; and comingling the third bit sequence with the message to conceal contents of the message. 2. The method of 3. The method of generating one or more additional bit sequences with one or more additional linear feedback shift registers, each of the one or more additional linear feedback shift registers having a distinct feedback function defined by a distinct primitive polynomial; and generating the third bit sequence by multiplying together the first bit sequence, the second bit sequence and the one or more additional bit sequences over the finite field of even characteristic, modulo the fixed primitive polynomial. 4. The method of 5. The method of 6. The method of initializing the first linear feedback shift register by filling the first linear feedback shift register with at least one first fixed bit and a first plurality of random starting bits, and by combining a first key with the first plurality of random starting bits; and initializing the second linear feedback shift register by filling the second linear feedback shift register with at least one second fixed bit and a second plurality of random starting bits, and by combining one of the first key or a second key with the second plurality of random starting bits. 7. The method of clocking the first LFSR a predetermined number of times if all bits of the first bit sequence have a value of zero 8. The method of using the third bit sequence to generate one or more keys; and using the one or more keys in a block cipher to encipher the message. 9. The method of determining a plurality of bits from the third bit stream to comingle with the message. 10. The method of 11. An encryption system comprising:
a first pseudorandom bit source to generate a first bit sequence; a second pseudorandom bit source to generate a second bit sequence; a value randomizer, connected with the first pseudorandom bit source and the second pseudorandom bit source, to generate a third bit sequence by multiplying the first bit sequence with the second bit sequence over a finite field of even characteristic, modulo a fixed primitive polynomial; and an encryption logic component, connected with the first encryption logic component and a message source, to comingle the third bit sequence with a message received from the message source to conceal the message. 12. The encryption system of 13. The encryption system of one or more additional linear feedback shift registers, each of the one or more additional linear feedback shift registers having a distinct feedback function defined by a distinct primitive polynomial, and each of the one or more additional linear feedback shift registers to generate one or more additional bit sequences; the value randomizer to generate the third bit sequence by multiplying together the first bit sequence, the second bit sequence and the one or more additional bit sequences over the finite field of even characteristic, modulo the fixed primitive polynomial. 14. The encryption system of 15. The encryption system of the first linear feedback shift register is initialized by filling the first linear feedback shift register with at least one first fixed bit and a first plurality of random starting bits, and by combining a first key with the first plurality of random starting bits; and the second linear feedback shift register is initialized by filling the second linear feedback shift register with at least one second fixed bit and a second plurality of random starting bits, and by combining one of the first key or a second key with the second plurality of random starting bits. 16. The encryption system of 17. The encryption system of 18. The encryption system of 19. A computer readable storage medium including instructions that, when executed by a processing system, cause the processing system to perform a method comprising:
generating a first bit sequence using a first pseudorandom bit source; generating a second bit sequence using a second pseudorandom bit source; generating a third bit sequence by multiplying the first bit sequence with the second bit sequence over a finite field of even characteristic, modulo a fixed primitive polynomial; receiving a message from a message source; and comingling the third bit sequence with message to conceal the message. 20. The computer readable storage medium of 21. The computer readable storage medium of 22. The computer readable storage medium of 23. The computer readable storage medium of initializing the first linear feedback shift register by filling the first linear feedback shift register with at least one first fixed bit and a first plurality of random starting bits, and by combining a first key with the first plurality of random starting bits; and initializing the second linear feedback shift register by filling the second linear feedback shift register with at least one second fixed bit and a second plurality of random starting bits, and by combining one of the first key or a second key with the second plurality of random starting bits. 24. The computer readable storage medium of using the third bit sequence to generate one or more keys; and using the one or more keys in a block cipher to encipher the message. 25. The computer readable storage medium of determining a plurality of bits from the third bit stream to comingle with the message. Description Embodiments of the present invention relate to data encryption, and more specifically to data encryption with a stream cipher that uses multiplication over a finite field of even characteristic. Encryption is a process of transforming information (referred to as plaintext) into an unreadable form (referred to as ciphertext). Decryption is a transformation that recovers the plaintext from the ciphertext. A cipher performs a transformation that is controlled using a symmetric key (same key used for ciphering and deciphering) or an asymmetric key (different keys used for ciphering and deciphering) such that when the key is input to the cipher along with plaintext, the plaintext is enciphered via an encryption transformation, and when the key is input to the cipher along with ciphertext, the ciphertext is deciphered via a decryption transformation (which is an inverse of the encryption transformation). Encryption transformations are performed by an encryption algorithm (function) of a cipher, and decryption transformations are performed by a decryption algorithm (function) of the cipher. Encryption is used to protect military and civilian systems, examples of which include internet e-commerce, mobile telephone networks, bank automatic teller machines, etc. As technology and computing power advance, new vulnerabilities are commonly discovered for encryption mechanisms that were previously considered secure. When such weaknesses are discovered, new encryption mechanisms and techniques are required to maintain security of sensitive information. The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which: Described herein is a method and apparatus for encrypting and decrypting data. In one embodiment, a first bit sequence is generated using a first pseudorandom bit source. The first pseudorandom bit source include a first linear feedback shift register that has a first feedback function defined by a first primitive polynomial. A second bit sequence is generated using a second pseudorandom bit source. The second pseudorandom bit source include a linear feedback shift register that has a second feedback function defined by a second primitive polynomial. The first linear feedback shift register and second linear feedback shift register may each be initialized before generating bit sequences. A third bit sequence is generated by multiplying the first bit sequence with the second bit sequence over a finite field of even characteristic, modulo a fixed primitive polynomial. In one embodiment, the degree of the first primitive polynomial and the degree of the second primitive polynomial are pairwise coprime. In another embodiment, the fixed primitive polynomial has a degree that is less than or equal to the first primitive polynomial and the second primitive polynomial. A message is received. The third bit sequence is comingled with the message to conceal contents of the message. In the following description, numerous details are set forth. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention. Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like. It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise, as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “generating”, “forwarding”, “receiving”, “performing”, “encrypting”, or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices. The present invention also relates to an apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, each coupled to a computer system bus. The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose systems may be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these systems will appear as set forth in the description below. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein. The present invention may be provided as a computer program product, or software, that may include a machine-readable medium having stored thereon instructions, which may be used to program a computer system (or other electronic devices) to perform a process according to the present invention. A machine-readable medium includes any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer). For example, a machine-readable (e.g., computer-readable) medium includes a machine (e.g., a computer) readable storage medium (e.g., read only memory (“ROM”), random access memory (“RAM”), magnetic disk storage media, optical storage media, flash memory devices, etc.), a machine (e.g., computer) readable transmission medium (electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.)), etc. Finite field arithmetic will now be discussed in more detail. A finite field (also known as a Galois Field) is a field that contains only finitely many elements. A finite field can be represented mathematically as GF(p Arithmetic in a finite field is different than standard integer arithmetic. Using finite field arithmetic, all operations performed in the finite field result in an element of the finite field. For example, in a finite field of GF(2) the only elements of the field are 0 and 1, and thus 1+1=0. Elements of a finite field GF(p In some embodiments of the invention, finite fields of GF(2 In one embodiment, message source In one embodiment, cipher To encipher or decipher the received data, cipher In one embodiment, cipher Stream ciphers are divided into synchronous stream ciphers and self-synchronizing stream ciphers. In a synchronous stream cipher the keystream is generated independently of the plaintext and ciphertext messages. In a self-synchronizing stream cipher ciphertext bits are used in computing the keystream. Examples of stream ciphers include Rivest Cipher, number 4 (RC4), A5/1, Fibonacci Shrinking (FISH), Phelix, MUGI, etc. In another embodiment, cipher For a block cipher to be made secure, it may be used in a mode of operation, which may encrypt different blocks in different ways. Thereby, even if two different blocks include the same plaintext, the corresponding ciphertext will be different for the two blocks. Examples of modes of operation include electronic codebook (EBC), cipher-block chaining (CBC), propagation cipher-block chaining (PCBC), cipher feedback (CFB), output feedback (OFB), etc. In yet another embodiment, cipher In one embodiment, cipher A linear feedback shift register (LFSR) is a shift register whose input bit is a linear function (called the feedback function) of its previous state. The linear function can be computed by performing exclusive OR (XOR) calculations between bits in the LFSR. Those bits that are combined by the XOR operation are called taps. The linear function of a LFSR is deterministic. Therefore, given a current state of a LFSR with a known feedback function, the next states and previous states will always be the same, and can be predicted with 100% accuracy. A LFSR can be constructed in a Fibonacci configuration, in which XOR gates are fed sequentially into one another (e.g., the XOR gates are external to the shift register). A LFSR can also be constructed in a Galois configuration, in which XOR gates feed into different registers (bit memory elements) within the LFSR and are not sequential (e.g., the XOR gates are within the shift register). LFSRs of either configuration can be used with the present invention. However, illustrated examples included herein only show LFSRs in the Fibonacci configuration. In one embodiment, each of the first LFSR In one embodiment, the primitive polynomial that defines the feedback function associated with first LFSR Because LFSRs are deterministic, it is important that their initial value (called the seed or initialization vector) be a value that cannot be easily determined. Before the first LFSR In the preinitialization phase, some or all of the first LFSR In one embodiment, in a software implementation of an LFSR, a buffer (not shown) is used to contain the state of the LFSR. In a further embodiment, the buffer is used as a virtual LFSR. The buffer may have a size that is equal to or greater than the LFSR. If the buffer is longer than the LFSR that is being emulated, the register can be emulated by stepping through the buffer, and placing the results into the buffer just ahead of the current end of the virtual LFSR. This can result in a bit stream that is equivalent to the LFSR being emulated. For example, a four bit LFSR with a feedback function defined by the polynomial x However, if the LFSR is a virtual LFSR implemented in a 5 bit buffer, the output bit would be placed in the next open bit, as follows 0011x→00111. The last four bits of the buffer would then represent the current state of the LFSR. Once the last bit in the buffer represents the last bit of the LFSR, the LFSR is aligned with the buffer. A portion of the buffer that represents the virtual LFSR may be populated with random values, and another portion of the buffer may be assigned fixed values. In one embodiment, at least one of the last q bits of the buffer has a fixed value of 1, where q is the length of the virtual LFSR. In an alternative embodiment, at least one of the first q bits of the buffer has a fixed value of 1. In one embodiment the LFSR has a size q and the buffer has a size b that is at least twice the size of the LFSR (b>=2q). The first b−q bits of the buffer can be filled with the essentially random bit string, the last q−1 bits can be filled with zeros, and the remaining bit can be set to 1. For example, using a 4 bit LFSR whose feedback function is defined by the polynomial x In another embodiment, in which the LFSR is implemented in a buffer, the LFSR has a size q and the buffer has a size b that is one bit larger than q. The last bit of the buffer is fixed at 1. The remaining bits are filled with an essentially random bit string, as described above. For example, the preinitialized state of an 8 bit buffer that represents a 7 bit LFSR might be 01100111. The fixed bits in the buffer can prevent the LFSR from entering a degenerate state (in which all the values are zero and all future values will be zero). In the initialization phase, the preinitialized state of the LFSR is combined with keying information to generate an initialized state (also known as a keyed state). The combination may be performed by using the XOR function, using polynomial multiplication, etc. In one embodiment, the keying information is XORed sequentially into the preinitialized state of the LFSR. If the LFSR has more bits than the keying information, then some or all of the key bits (bits of the keying information) can be applied to the LFSR multiple times. In one embodiment, once all of the key bits have been combined with bits of the LFSR, the key bits are rotated before combining them with remaining bits of the LFSR. This reduces any patterns that might be detected by a cryptanalyst. In one embodiment, in which a buffer with one or more fixed bits is used, the keying information is not combined with the fixed bits of the buffer (e.g., no keying information is combined with the 1000 of the 0110 0110 1000 preinitialized state in the example above). In one embodiment, in a software implementation of the LFSR, the key bits are XORed into the first b−q bits of the buffer that contains the LFSR. If all of the key bits are used, then the bits of the keying information are rotated by a number of bits coprime with (b−q) and the length k of the key. The new first bit of the key can then be XORed into the buffer at its next bit position, and so on. This rotation can provide a minimum of alignment between different buffers. For example, continuing the example above with the preinitialized buffer of 0110 0110 1000, assume a 6 bit key 100101 is to be used for initialization, and that the fixed bits of the buffer will not be combined with the keying information. After combining the key with the first 6 bits of the preinitialized state, the key would be rotated by a value coprime with (b−q) and k, which in this example is 1 or 5. Rotating the key by one bit to the left yields 001011. Therefore, the remaining 2 bits of the initialized state are combined with 00 (the first 2 bits of the rotated key). The resultant combined state of the LFSR is 1111 0010 1000. In one embodiment, once the key bits have been combined into the buffer, the LFSR is clocked a number of times to align the beginning of the virtual LFSR with the beginning of the buffer. In a further embodiment, such alignment is attained by clocking the LFSR b−q times, skipping the fixed bit having the value of 1, and clocking the LFSR an additional q−1 times. (e.g., XORing the result into the resulting bit position). Continuing the above example, the virtual LFSR is initially aligned with the left of the buffer (which has a value of 1111 0010 1000), with the portions of the buffer that do not represent the current state of the buffer being xed out to provide 1111 xxxx xxxx. Clocking the LFSR a single time moves the virtual LFSR one position to the right in the buffer, providing 1111 0010 1000, where the virtual LFSR has the value x111 1xxx xxxx. Clocking the LFSR three more times yields 1111 0011 1000, where the LFSR is xxxx 0011 xxxx. Skipping the next bit position, which in this example is fixed, and clocking an additional 3 times yields 1111 1101 1110, where the LFSR occupies the last four bits as xxxx xxxx 1110. In one embodiment, the last q bits of the buffer are the initialized (keyed) state of the LFSR. This initialized state may be securely stored so that it can later be used to decrypt encrypted data and/or encrypt additional data. In another embodiment, in a software implementation of the LFSR in which the buffer has a size that is at least one bit longer than the LFSR, the keying information is combined with all but the last bit of the buffer. In a further embodiment, all LFSRs have buffers that are equally sized, regardless of the size of the LFSRs. Therefore, for example, a 6 bit LFSR and a 7 bit LFSR may each have an 8 bit buffer. In still a further embodiment, all buffers that include virtual LFSRs may have a length that is an even multiple of a byte or word (e.g., 8 bits in an x86 operating system). As described above, the key is rotated where there are more bits in the buffer than in the key. For example, XORing The above described initialization techniques represent algorithms that can be used to initialize the first LFSR Additional key state information can be mixed with the state of the first LFSR Key state mixing can be used to safely encipher multiple messages using the same initial state (e.g., the same master key). Key state mixing can also be used to create a random-access blocked stream cipher (e.g., as used for disk encryption). In one embodiment, a non-linear substitution is used for a block number (e.g., a cryptographic hash, the multiplicative inverse of over the field GF(2 After the first LFSR Returning to In one embodiment, for each new bit sequence, each of the first pseudorandom bit source Once a new state (e.g., bit sequence) of each pseudorandom bit source (e.g., each LFSR) has been generated, value randomizer The first pseudorandom bit source In some cases a subset of the bits of one or both of the first pseudorandom bit source Encryption logic component In one embodiment, all of the bits of the received bit sequences are combined with received plaintext or ciphertext. Alternatively, only some of the bits in the received bit sequences may be combined with the plaintext or ciphertext. For example, every other bit of the received bit sequence may be combined with the received plaintext or ciphertext, or the last half of the bits in the bit sequence may be combined with the received plaintext or ciphertext. In one embodiment, encryption logic component In an example, assume that encryption logic component To decipher the ciphertext and reproduce the plaintext, the ciphertext may be combined with the same pseudorandom bit sequence 0001 1111. In one embodiment, encryption logic component Cipher A mixing function F performs polynomial multiplication between bit sequences output by the first LFSR In one embodiment, the mixing function F combines the bit sequences using multiplication over a finite field of even characteristic, modulo a fixed primitive polynomial. In a further embodiment, the fixed primitive polynomial generates the field GF(2 Mixing function F performs polynomial multiplication between bit sequences output by the first LFSR Referring to At block At block At block Though method Referring to At block At block At block At block At block At block A block Though method The exemplary computer system Processor The computer system The secondary memory While the machine-readable storage medium It is to be understood that the above description is intended to be illustrative, and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. Although the present invention has been described with reference to specific exemplary embodiments, it will be recognized that the invention is not limited to the embodiments described, but can be practiced with modification and alteration within the spirit and scope of the appended claims. Accordingly, the specification and drawings are to be regarded in an illustrative sense rather than a restrictive sense. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled. Referenced by
Classifications
Legal Events
Rotate |