Symmetric key stream cipher cryptographic method and device
11165563 · 2021-11-02
Assignee
Inventors
Cpc classification
International classification
H04L9/06
ELECTRICITY
Abstract
The subject of the invention is a symmetric key stream cipher cryptographic method for encrypting plaintexts and decrypting ciphertexts during which process a text to be encrypted or an encrypted text is scanned with an input/output data buffer (5), a pseudo random number is created with a pseudo random number generator (8) with a seed (12), a key automaton (11) is used for encryption and/or decryption. It is characterized in that the procedure involves the method whereby using the characters of the text scanned by the input/output data buffer (5) and the pseudo random number generated by the pseudo random number generator (8), an element of the key automaton's (11) transition matrix is directly reached from the input/output data buffer (5); the procedure is then repeated. A symmetric key stream cipher cryptographic device for implementing the method of claim 1 is also the subject of the invention.
Claims
1. A symmetric key stream cipher cryptographic method for encrypting a plaintext, the method comprising the steps of: scanning the plaintext to be encrypted with an input/output data buffer, performing encryption using a key automaton, characterized in that a pseudo random character sequence of a given length is generated based on a seed of a pseudo random number generator for a subsequent character of the plaintext, the transition matrix of the key automaton being a 16×16 or 256×256 Latin square is stored in a data memory and the key automaton is an automaton without output, and in the course of the encryption of the subsequent character of the plaintext, transmitting the pseudo random character sequence to the key automaton as input signal sequence, and creating with the key automaton a subsequent character of a ciphertext, which is chosen to be the last element of a state sequence through which the key automaton is transited starting from a state being the same as the subsequent character of the plaintext scanned by the input/output data buffer effected by the input signal sequence.
2. A symmetric key stream cipher cryptographic method for decrypting the ciphertext encrypted by the method according to claim 1, the method comprising the steps of: scanning the ciphertext to be decrypted with an input/output data buffer, performing decryption using the key automaton's inverted key automaton, characterized in that a pseudo random character sequence of a given length is generated based on the seed of the pseudo random number generator for a subsequent character of the ciphertext, the transition matrix of the key automaton's inverted key automaton being a 16×16 or 256×256 Latin square is stored in a data memory and the key automaton's inverted key automaton is an automaton without output, and in the course of the decryption of the subsequent character of the ciphertext, transmitting a mirror image of the pseudo random character sequence to the key automaton's inverted key automaton as input signal sequence, and creating with the key automaton's inverted key automaton a subsequent character of a plaintext, which is chosen to be the last element of a state sequence through which the key automaton's inverted key automaton is transited starting from a state being the same as the subsequent character of the ciphertext scanned by the input/output data buffer effected by the input signal sequence.
3. The method according to claim 1, characterized in that the pseudo random character sequence is 16- or 32-characters-long.
Description
THE BRIEF DESCRIPTION OF THE DRAWING
(1) In what follows, we will present the invention's advantageous implementation forms as examples through drawings, where
THE IMPLEMENTATION FORMS OF THE INVENTION
(2) The invention includes a cryptographic device for stream cipher encrypting a plaintext; the device includes an input module for entering the plaintext, an output module for issuing the ciphertext, and a key automaton capable of converting plaintext ciphertext.
(3) The invention further includes a cryptographic device for decrypting a ciphertext; the device comprises an input module for entering a ciphertext, an output module for issuing plaintext, and a key automaton for converting ciphertext into plaintext.
(4) In both the cryptographic method and device for encrypting the plaintext according to the invention and in the cryptographic method and device for decrypting the ciphertext according to the invention, the key automaton is an automaton without output, whose transition matrix forms a Latin square.
(5) The transition matrix of the automaton forms a Latin square if both the rows and the columns of the transition matrix form a permutation of the state set. The inverted automaton of such an automaton with a transition matrix is the automaton whose transition matrix forms a Latin square where the permutations of the rows of the inverse automaton's Latin square are the inverted permutations of the permutations of the rows of the original automaton's Latin square. Thus, the matrix element's value in column j of row i of the original matrix is exactly k if the matrix element in column k of row i of the inverse matrix is j. The key automaton is chosen so that the set of both its states and input signals coincide with the character set of the plaintext, which character set in turn coincides with the character set of the ciphertext.
(6) The definitions necessary to understand the invention will be described below.
(7) In case of any H set let |H| indicate the multiplicity of set H. Those matrices are called Latin squares over set H in which each row and each column are permutations of the elements of H. An automaton without output is an algebraic structure consisting of two non-empty sets, the state set and the input signal set, and a function (the transition function), which maps the Cartesian product of the state set and the input signal set into the state set. An automaton without output is conventionally marked as A=(A,X,δ), where A is the state set, X is the input signal set and δ: A×X.fwdarw.A is the transition function (that assigns a state to all those pairs, the first element of which is a state, while the second is an input signal).
(8) The transition function can thus be characterized by the fact that this is a function that assigns a state to each pair whose first element is a state, the other element is an input signal.
(9) In the followings, let us assume that the sets of states and input signals of the examined automaton are finite. We also assume that both the state set and the input signal set are ordered sets, and in this sense we will talk about the zero, first, second, . . . , and last element of these sets. (For technical reasons, we do not start counting from one, but from zero.)
(10) In the case of finite state and input signal sets, the transition function (which in its general form is abstract) is usually represented as a matrix, which we call transition matrix. The transition matrix has as many rows as input signals, and there are as many columns as states of the automaton. An element k in the i-th row (numbering started from zero) and j-th column (numbering started from zero) of the transition matrix will be the serial number (numbering started from zero) of the state which is assigned to the pair consisting of the j-th state and the i-th input signal by the transition function. We say about this element k of the transition matrix in the i-th row and j-th column that the i-th input signal takes the automaton from the j-th state to the k-th state. (In fact, in this case it is also usual to say that the automaton goes from the j-th state to the k-th state under the effect of the i-th input signal i.)
(11) The rows of the transition matrix can be identified with the input signals of the automaton, and its columns with the states of the automaton, while the transition matrix itself with the transition function of the automaton. The serial number of the input signals is therefore marked by the serial number of the rows, while the serial number of the states is indicated by the serial number of columns. Below—if it does not cause any misunderstanding—the input signals or states are sometimes identified by their serial number.
(12) For instance, in the case of the A=({a.sub.0,a.sub.1,a.sub.2}, {x.sub.0,x.sub.1}, δ) automaton and the δ(a.sub.0, x.sub.0)=a.sub.1, δ(a.sub.0, x.sub.1)=a.sub.2, δ(a.sub.1, x.sub.0)=a.sub.0, δ(a.sub.1, x.sub.1)=a.sub.0, δ(a.sub.2, x.sub.0)=a.sub.1, δ(a.sub.2, x.sub.1)=a.sub.1 function values the transition matrix's shape will take the following shape:
(13) TABLE-US-00001 δ a.sub.0 a.sub.1 a.sub.2 x.sub.0 a.sub.1 a.sub.0 a.sub.1 x.sub.1 a.sub.2 a.sub.0 a.sub.1
(14) In this example the 0. row of the transition matrix is marked x.sub.0, its first row x.sub.1, 0. column a.sub.0, its first column a.sub.1, its second column a.sub.2.
(15) The finite list (possibly including repetitions) constituted by the elements of the state set is called state sequence, while the finite list (possibly including repetitions) constituted by the elements of the input signal set is called input signal sequence. (State and input sequences of one length, i.e. consisting of one element, are also allowed.) Signal sequences made up of 0 or 1 (binary) elements we will also call bit sequences or bit chains. As it is customary, in the case of both state and input sequences, we will not mark the commas separating the elements of the sequences. If a a.sub.1a.sub.2 . . . a.sub.s state sequence has at least three elements, then the a.sub.2, the a.sub.3, . . . , and the a.sub.s-1 states will be referred to (also) as intermediate states of the given state sequence. Thus, state sequences of one or two elements have no intermediate states.
(16) One can extend the automaton's transition function in a way that the extended transition function assigns a state sequence to each and every state and input signal sequence as follows: Let a be a state, and let x.sub.1x.sub.2 . . . x.sub.s an input signal sequence (where x.sub.1, x.sub.2, . . . , and x.sub.s are input signals). Let a.sub.1 regularly mark the state, into which the automaton is taken from state a by the input signal x.sub.1, the state a.sub.2 into which the automaton is taken from the state a.sub.1 by the input signal x.sub.2, the state a.sub.3 into which the automaton is taken from the state a.sub.2 by the input signal x.sub.3, . . . , and the state a.sub.s into which the automaton is taken from the state a.sub.s-1 by the input signal x.sub.s. Then, according to the definition, the extended transition function assigns to the pair consisting of state a and input signal sequence x1 . . . xs the state sequence a1 . . . as. Then we can also say that the input signal sequence x.sub.1x.sub.2 . . . x.sub.s takes the automaton through the state sequence a.sub.1a.sub.2 . . . a.sub.s-1 from state a to state a.sub.s, and we can also say that the automaton goes from state a to state a.sub.s through state sequence a.sub.1a.sub.2 . . . a.sub.s-1 under the effect of input signal sequence x.sub.1x.sub.2 . . . x.sub.s. Whenever it is not necessary, we omit the expression “through the state sequence a.sub.1a.sub.2 . . . a.sub.s-1”, and simply write that input signal sequence x.sub.1x.sub.2 . . . x.sub.s takes the automaton from state a to state a.sub.s, and also that the automaton goes from state a to state a.sub.s under the effect of input signal sequence x.sub.1x.sub.2 . . . x.sub.s.
(17) By character set in the most general sense we mean an ordered non-empty and finite set (for example, for binary data, {0,1} numbers, for text the letters of the alphabet etc.). Data encrypted and decrypted can also be referred to as “text”; hereafter, this expression will often be used. The strings of characters created from the character sets of unencrypted (plain), and encrypted (cipher) texts, or character sequences created from any other character set will also be called character chains.
(18) Any character sequence x.sub.1, x.sub.2, . . . , x.sub.s constituting character chain x.sub.1x.sub.2 . . . x.sub.s has a mirror image, which means the (x.sub.1x.sub.2 . . . x.sub.s).sup.T=x.sub.sx.sub.s-1 . . . x.sub.1 character chain.
(19) According to the invention, during encryption by the key automaton, an encrypted character is created for each (unencrypted) character of the plaintext, and the ciphertext is obtained by concatenating (positioning them in sequence and then linking) the resulting characters.
(20) The key automata preferably process 1-byte-long characters in one step. The automata can be designed to process states and input signals characterized by arbitrary character sets, but in the case of any text to be processed, any information (e.g. media) or other data it is desirable that the unencrypted text be converted into a binary form, i.e. to convert them into bit chains.
(21) In the method and device of the present invention therefore, the key automaton is used during both the encryption and decryption process.
(22) In the present invention, stream cipher encryption is used, in which the encryption passes from character to character.
(23) As discussed above, the present invention's method and device for encrypting plaintexts, the ciphertext's next character (at first the first one) is chosen to be that given character which corresponds to the key automaton's that given state into which the state corresponding to the plaintext's next (at first the first) character is transferred by the key automaton's that given input signal sequence, which corresponds to the next (at first the first) block generated by the pseudo random number generator. If, therefore, the plaintext's next (at first the first) character is a, the next (at first the first) string generated by the pseudo random number generator is p, then the ciphertext's next (at first the first) character is δ(a, p).
(24) In the present invention's method and device for decrypting ciphertexts, we create a sequence of pseudo random numbers using the pseudo random number generator's seed (in a similar fashion to encryption), and with the help of the ciphertext's next (at first the first) character b and the pseudo random number generator's next (at first the first) pseudo random string p we can arrive at the next (at first the first) character a of the plaintext; this is done by creating that given state a of the key automaton's inverted automaton, into which the inverted automaton of the key automaton goes from state b under the effect of the mirror image p.sup.T of the input word p. Thus a=δ.sup.−1(b, p.sup.T), where δ.sup.−1 denotes the transition function of the inverted automaton of the key automaton.
(25) Some implementation forms of the invented method are applicable to the implementation forms of the invented device—all of which can be equally used for encryption and decryption as well. The following is a description of performing a method in accordance with an implementation form of the invented method designed for encrypting and decrypting on certain corresponding implementation forms of the invented device.
EXAMPLE
(26) A simplified example illustrates the encryption and decryption process of the present invention; the solution offered by the present invention may be generalized easily. Consider the following four-state and four-input signal key automaton A:
(27) TABLE-US-00002 δ 0 1 2 3 0 1 2 3 0 1 3 0 1 2 2 2 3 0 1 3 0 1 2 3
(28) The transition matrix's row 0 lists the states, while its column 0 lists the possible input signals. In the present example it is also fulfilled that the state set and the input signal set of the key automaton is the same, but in some implementation forms, the state set and the input signal set of key automaton may be different. This transition matrix forms a Latin square. The key automaton's state set is {0,1,2,3}, which coincides with the input signal set of the key automaton, and with the character sets of both the plaintext and the ciphertext.
(29) Let us suppose, that the seed of the pseudo random number generator is the string m=123, and for the sake of simplicity, let us suppose, that for every n≥1 the subsequent (at first the first) pseudo random number generated is that given quaternary numeral system string, the numerical value of which is p.sub.n=(n+1).Math.m mod 2{circumflex over ( )}4. In that case, the pseudo random numbers generated are the following: p.sub.1=312, p.sub.2=101, p.sub.3=230, p.sub.4=013, p.sub.5=202, p.sub.6=120, p.sub.7=003, p.sub.8=132.
(30) First we will present encryption through the above example. Let us consider the hexadecimal numeral system-based 4F4B ASCII code of the word OK (the plaintext belongs to the word OK). Converting this 4F4B hexadecimal value into quaternary numeral system, we arrive at the string 10331023. This string is the plaintext.
(31) During encryption, let us add to A as input the pseudo random input signal sequence p.sub.1=312, which was generated by the pseudo random number generator from the m=123 seed. This input signal sequence takes the key automaton to match the first character of the plaintext, i.e., from state 1 to state 2 as follows:
(32) The key automaton A goes from state 1 to state 1 under the effect of input signal 3, goes from state 1 to state 0 under the effect of input signal 1, goes from state 0 to state 2 under the effect of input signal 2.
(33) After that, let us add to A as input the second pseudo random input signal sequence p.sub.2=101, which was generated by the pseudo random number generator. This input signal sequence takes the key automaton to match the second character of the plaintext, i.e., from state 0 to state 3 as follows:
(34) The key automaton A goes from state 0 to state 3 under the effect of input signal 1, goes from state 3 to state 0 under the effect of input signal 0, goes from state 0 to state 3 under the effect of input signal 1.
(35) After that, let us add to key automaton A as input the third pseudo random input signal sequence p.sub.3=230, which was generated by the pseudo random number generator. This input signal sequence takes the key automaton to match the third character of the plaintext, i.e., from state 3 to state 2 as follows:
(36) The key automaton A goes from state 3 to state 1 under the effect of input signal 2, goes from state 1 to state 1 under the effect of input signal 3, goes from state 1 to state 2 under the effect of input signal 0.
(37) After that, let us add to key automaton A as input the fourth pseudo random input signal sequence p.sub.4=013, which was generated by the pseudo random number generator. This input signal sequence takes the key automaton to match the fourth character of the plaintext, i.e., from state 3 to state 3 as follows:
(38) The key automaton A goes from state 3 to state 0 under the effect of input signal 0, goes from state 0 to state 3 under the effect of input signal 1, goes from state 3 to state 3 under the effect of input signal 3.
(39) After that, let us add to key automaton A as input the fifth pseudo random input signal sequence p.sub.5=132, which was generated by the pseudo random number generator. This input signal sequence takes the key automaton to match the fifth character of the plaintext, i.e., from state 1 to state 2 as follows:
(40) The key automaton A goes from state 1 to state 3 under the effect of input signal 2, goes from state 3 to state 0 under the effect of input signal 0, goes from state 0 to state 2 under the effect of input signal 2.
(41) Under the effect of the sixth pseudo random number p.sub.6=120 generated by the pseudo random number generator as input word, the key automaton goes into a state matching the sixth character of the plaintext, i.e. from state 0 to state 2 in the following manner:
(42) The key automaton A goes from state 0 to state 3 under the effect of input signal 1, goes from state 3 to state 1 under the effect of input signal 2, goes from state 1 to state 2 under the effect of input signal 0.
(43) Under the effect the seventh pseudo random number p.sub.7=003 generated by the pseudo random number generator as input word, the key automaton goes into a state matching the seventh character of the plaintext, i.e. from state 2 to state 0 in the following manner:
(44) The key automaton A goes from state 2 to state 3 under the effect of input signal 0, goes from state 3 to state 0 under the effect of input signal 0, goes from state 0 to state 0 under the effect of input signal 3.
(45) Finally, under the effect of the eighth pseudo random number p.sub.8=132 generated by the pseudo random number generator as input word, the key automaton passes into a state matching the plaintext's eighth character, i.e. from state 3 to state 0 in the following manner:
(46) The key automaton A goes from state 3 to state 2 under the effect of input signal 1, goes from state 2 to state 2 under the effect of input signal 3, goes from state 2 to state 0 under the effect of input signal 2.
(47) This way the ciphertext will be 23232200.
(48) The following section describes the decryption of the ciphertext. For encryption and decryption according to the present invention, and so in this example as well, we will apply the inverted automaton of the key automaton A. The transition table of the inverted key automaton will be:
(49) TABLE-US-00003 δ.sup.−1 0 1 2 3 0 3 0 1 2 1 1 2 3 0 2 2 3 0 1 3 0 1 2 3
(50) Let us consider the 23232200 string as ciphertext.
(51) During decryption, let us add to the inverted key automaton as input the mirror image p.sub.1.sup.T=213 of the pseudo random signal sequence p.sub.1=312, which we have generated by the pseudo random number generator from seed m=123. This input signal sequence p.sub.1.sup.T takes the inverted key automaton to match the first character of the ciphertext, i.e., from state 2 to state 1 in the following manner:
(52) The inverted key automaton goes from state 2 to state 0 under the effect of input signal 2, goes from state 0 to state 1 under the effect of input signal 1, goes from state 1 to state 1 under the effect of input signal 3.
(53) After that, let us add to the inverted key automaton as input the mirror image p.sub.2.sup.T=101 of the second pseudo random signal sequence p.sub.2=101, generated by the pseudo random number generator. This input signal sequence p.sub.2.sup.T takes the inverted key automaton to match the second character of the ciphertext, i.e., from state 3 to state 0 as follows:
(54) The inverted key automaton goes from state 3 to state 0 under the effect of input signal 1, goes from state 0 to state 3 under the effect of input signal 0, goes from state 3 to state 0 under the effect of input signal 1.
(55) After that, let us add to the inverted key automaton as input the mirror image p.sub.3.sup.T=032 of the third pseudo random signal sequence p.sub.3=230, generated by the pseudo random number generator. This input signal sequence p.sub.3.sup.T takes the inverted key automaton to match the third character of the ciphertext, i.e., from state 2 to state 3 as follows:
(56) The inverted key automaton goes from state 2 to state 0 under the effect of input signal 2, goes from state 0 to state 0 under the effect of input signal 3, goes from state 0 to state 3 under the effect of input signal 0.
(57) After that, let us add to the inverted key automaton as input the mirror image p.sub.4.sup.T=310 of the fourth pseudo random signal sequence p.sub.4=013, generated by the pseudo random number generator. This input signal sequence takes the inverted key automaton to match the fourth character of the ciphertext, i.e., from state 3 to state 3 as follows:
(58) The inverted key automaton goes from state 3 to state 3 under the effect of input signal 3, goes from state 3 to state 0 under the effect of input signal 1, goes from state 0 to state 3 under the effect of input signal 0.
(59) After that, let us add to the inverted key automaton as input the mirror image p.sub.5.sup.T=202 of the fifth pseudo random signal sequence p.sub.5=202, generated by the pseudo random number generator. This input signal sequence takes the inverted key automaton to match the fifth character of the ciphertext, i.e., from state 2 to state 1 as follows:
(60) The inverted key automaton goes from state 2 to state 0 under the effect of input signal 2, goes from state 0 to state 3 under the effect of input signal 0, goes from state 3 to state 1 under the effect of input signal 1.
(61) Under the effect of the mirror image p.sub.6.sup.T=021 of the sixth pseudo random signal sequence p.sub.6=120, generated by the pseudo random number generator as input word, the inverted key automaton goes into a state matching the ciphertext's sixth character, i.e. from state 2 to state 0 in the following manner:
(62) The inverted key automaton goes from state 2 to state 3 under the effect of input signal 1, goes from state 3 to state 1 under the effect of input signal 2, goes from state 1 to state 0 under the effect of input signal 0.
(63) Under the effect of the mirror image p.sub.7.sup.T=300 of the seventh pseudo random signal sequence p.sub.7=003, generated by the pseudo random number generator as input word, the inverted key automaton goes into a state matching the ciphertext's seventh character, i.e. from state 0 to state 0 in the following manner:
(64) The inverted key automaton goes from state 0 to state 0 under the effect of input signal 3, goes from state 0 to state 3 under the effect of input signal 0, goes from state 3 to state 2 under the effect of input signal 0.
(65) Finally, under the effect of the mirror image p.sub.8.sup.T=231 of the eighth pseudo random signal sequence p.sub.8=132, generated by the pseudo random number generator as input word, the inverted key automaton goes into a state matching the ciphertext's eighth character, i.e. from state 0 to state 3 in the following manner:
(66) The inverted key automaton goes from state 0 to state 2 under the effect of input signal 2, goes from state 2 to state 2 under the effect of input signal 3, goes from state 2 to state 3 under the effect of input signal 1.
(67) The following string is obtained by linking the new states obtained as a result of state transitions: 10331023. That is, we recovered the original plaintext.
(68) The Suggested Implementation of the Device
(69) The cryptographic device illustrated as an example in
(70) The cryptographic apparatus illustrated as an example in
(71) Into the program memory 2 we can allocate (burn) the program for the key exchange and for the pseudo random number generation method, and the program for the encryption in
(72) The data memory 3 stores the key automata 11, the pseudo random number seed 12, the buffer memory 13 for storing plain- and ciphertexts and the processing work data 14.
(73) The microcontroller 1 performs the interpretation of the operation of the following subunits.
(74) The Key Exchange Executive Unit 7.
(75) The key sharing of symmetric key systems, that is, the exchange of secret keys usually happens with the help of public key systems, or the use of a Diffie-Hellmann key exchange protocol. The secret key components of the method and device of the present invention are: the key automaton's 11 transition matrix and preferably a 16-byte-long string which is the fixed (secret) seed 12 of the pseudo random number generator 8.
(76) The key exchange between a sender and a recipient of a secret message is preferably achieved by using a public key such as RSA 2048 or a Diffie-Hellmann key exchange protocol. The key automaton 11 preferably has 256 states and 256 input signals in a way that its states and input signals are 1 byte in length. The unit executing the pseudo random number generation for encryption and decryption is located in the program memory 2, while the key automaton 11 is stored in the data memory 3. The key automaton 11 is designed as an automaton with a transition matrix for an n natural number (preferably n=256) of an n×n-type Latin square, i.e., both the rows and columns of the transition matrix are permutations of the {1, . . . , n} set; due to an identical input signal the key automaton's two different states cannot pass into one and the same state.
(77) Pseudo Random Number Generator 8.
(78) Secondary literature knows of several pseudo random number generators 8 [see e.g. https://en.wikipedia.org/wiki/Pseudorandom_number_generator]. One can choose any method and device known to secondary literature as a pseudo random number generator 8, but in a preferred implementation form for encryption and decryption, in the case of preferably 16-character (128-bit) pseudo random strings the Xoroshito 128+(XOR \ rotate \ shift \ rotate) pseudo random number generator is recommended [D. Backman and S. Vigna: xorosito128plus.c, http://xoroshiro.di.unimi.it/xoroshiro128plus.c, 2016].
(79) Preferably, the seed 12 of the pseudo random number generator 8 is a 128 bit randomly selected bit chain, and the generated pseudo random numbers are preferably 128 bit-long bit chains.
(80) The pseudo random number generator 8 located in the program memory 2 plays a role in both encryption and decryption. The seed 12 of the pseudo random number generator 8 necessary for encryption and decryption and the generated pseudo random numbers are stored in the data memory 3.
(81) Encryption Unit 9.
(82) The plaintext is encrypted with stream cipher encryption, as described above. The encryption device is stored in program memory.
(83) Decrypting Unit 10.
(84) Reverses the secret text as described above. The decoding equipment is stored in the program memory.
(85) In order to achieve a higher speed of operation, the input/output data buffer 5 should be as large as possible, in order to scan the public texts awaiting encryption through the input unit or to issue the secret sections through the output unit.
(86) The processing work data 14 generated during the execution is stored in the data memory 3. It is also in the data memory 3 that the buffered scanned or processed part of the plain- and ciphertext 13, the seed 12 of the pseudo random number generator 8, the key automaton 11 and its current state are stored.
(87) For example, the various blocks of the present implementation form of the cryptographic device can be realized by means of the following products (
(88) The operation of the key automaton 11, the pseudo random number generator 8, the encryption 9 of
(89) It should be noted that this design is very similar to the one used in the P1300501 patent application. A significant difference is caused by the fact that as microcontroller we apply a member of the PIC32MX microcontroller family which has a larger memory capacity, namely, the PIC32MX795F512L microcontroller 1 (512 kilobytes, i.e. eight times larger program memory and 128 kilobytes, that is, 16 times larger data memory). Thus, it is possible to design the present output blocks (pseudo random generation, key automaton 11 operation, encryption unit 9 and decrypting unit 10) in a way that they all get incorporated into the microcontroller 1. This results in a method and device that is more easily applicable and has greater encrypting and decoding speed. The other significant difference is that, in the present implementation, the role and function of the built-in units is significantly different from the one used in the P1300501 patent application. During this operation, we are working only with the repetition of a single, very quick and simple operation type.
(90) As mentioned, in the method and device of the present invention, the transition matrix of the key automaton 11 must be a Latin square.
(91) The method and device of the invention differ substantially from the solutions described in the Hungarian patents 227781 and 229534, among others, in the followings: In the method and device according to the invention, we apply a key automaton that structurally differs from the known solutions mentioned above. The method and device of the present invention uses encryption and decryption the principle of which is different from the known solutions, enabling faster encryption and decryption (fewer steps) than those above. The solution used in the method of the present invention makes it possible for the ciphertext to be not several times longer than the length of the plaintext. (In the solution used in the method of the present invention, the length of the ciphertext is equal to the length of the plaintext, which makes the method of the invention considerably more economical than the known solutions. This latter feature cannot be solved with the Hungarian patent applications 227781 and 229534, as these solutions often have a longer ciphertext than the length of the plaintext.) The current matrix of key automaton of the method and device of the present invention forms a Latin square that is resistant to statistical-type cryptographic attacks. During operation, we only rely on the repeated application of a very fast type of procedure.
(92) In addition to the examples above, within the circle of protection, the invention can be realized in other implementation forms and with other manufacturing procedures as well.