How to Encrypt Plain Text

By encoding the novelty of the plaintext into the first block using a fingerprint function, the method generates a new initialization vector, addressing inefficiencies and security issues in symmetric block cipher encryption for short messages, ensuring secure and efficient encryption without explicit initialization vectors.

JP2024536356AInactive Publication Date: 2024-10-04MERCEDES BENZ GROUP AG
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2024520659
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-10-19
Filing Date
2022-10-07
Publication Date
2024-10-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing methods for encrypting short messages using symmetric block ciphers face inefficiencies due to the need for initialization vectors, which increase message length and can lead to security vulnerabilities when not properly managed.

Method used

A method that encodes the novelty of the entire plaintext into the first block of plaintext using a fingerprint function, allowing the generation of a new initialization vector without explicit transmission, thereby reducing message length and enhancing security.

Benefits of technology

This approach ensures secure encryption of short messages without the need for explicit initialization vectors, maintaining message integrity and reducing resource overhead while minimizing security risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024536356000001_ABST
    Figure 2024536356000001_ABST
Patent Text Reader

Abstract

The present invention relates to a method for encrypting a plaintext with a block cipher E of block size LE using a symmetric key K. The present invention relates to a fingerprint function (FP u ) is used, and the two requests are to find a fingerprint function (FP) for a bit sequence from two unequal bit sequences (BF1 ≠ BF2) with a sufficiently high probability for application. u ) results in unequal (FP u (BF1) ≠ FP u (BF2)) and the fingerprint function (FP u ) for the inverse fingerprint function (FP u -1 ), so that FP u -1 (FP u (BF)||BF[u+1..L(BF)])=BF[1..u], where u and L E are not necessarily the same, the first complete u bits of the plaintext PB u A fingerprint function is applied to the concatenation of 1 and selected or all bits of the remaining plaintext FPInput using a general cipher EGen, and then the first block of the ciphertext CB1 is converted to a result FP of length u. u (PB u 1||FPInput) EGen encryption, i.e., CB1:=EGen(FP u (PB u 1||FPInput)) and the encryption of the first u bits of the plaintext CB1 thus produced is used as an initialization vector IV:=CB1 for encrypting some or all of the remaining plaintext with the block cipher E, for which any mode of operation requiring an initialization vector (IV) is utilized.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention uses a symmetric key K to generate a block of size L E This invention relates to a method for encrypting a plaintext using a block cipher E. [Background technology]

[0002] The frequent sending and receiving of short messages is very important in some applications within the vehicle ecosystem, which can be found, for example, in US Pat. No. 5,399,633. In that case, as shown in this publication, it is often essential to provide cryptographic integrity protection and / or cryptographic replay protection for these messages without significantly increasing their length, and, as described in the above publication, for efficiency reasons only symmetric methods may be considered for this purpose. However, in some cases it may be important to encrypt the entire message, or at least a part of it, such as the useful data, for example to protect secret useful data and / or to prevent a potential attacker from reading and interpreting both and thereby reverse engineering the message and the utilized protocol.

[0003] Similar considerations as made in the patent application WO 2005 / 023363 for integrity and replay protection also apply to encryption. Essentially, particularly short messages can be encrypted asymmetrically, for example by RSA-based methods, with the caveat that the plaintext RSA ciphertext is at least as long as the key used for encryption, i.e., 2048 bits when using RSA-2048 for example. This results in an encrypted transfer message of at least 2048 bits long, from an unencrypted message of, for example, 20 bytes, i.e., 160 bits long, which is completely in contradiction to the need to use short messages. Furthermore, asymmetric decryption is many times slower than symmetric encryption or decryption. This therefore means that only symmetric methods are considered for efficient encryption of short and frequent messages.

[0004] Currently, block ciphers, such as AES, are mainly used for symmetric encryption. In this specification, the block size of the block cipher E is L E or L_E. Block size L E In raw encryption of E by a block cipher, E A plaintext of length L bits, so-called plaintext block, can be decrypted using a symmetric key. E The block size L E In raw decryption by a decryption function D belonging to a block cipher E of E The ciphertext block (of length L bits) is decoded using a symmetric key E In both cases, E-Raw encryption and D-Raw decryption are always processed, i.e., exactly one complete block is always processed, and inputs of different lengths are not accepted. RAW Or D RAW E-Raw encryption with a symmetric key K is denoted as E RAW K and D-Raw decryption with symmetric key K is denoted by D RAW K As shown in the figure.

[0005] When encrypting with block cipher E, L E The plaintext longer than 10 ... E The plaintext is divided into corresponding blocks, which are then encrypted separately with a symmetric key. Encryption of the individual plaintext blocks completely independent of each other is called ECB mode (block cipher). Unlike raw encryption, ciphers operating in ECB mode can handle inputs of any length. In that case, so-called padding is applied to fill the last plaintext block in a defined way if it is shorter than the block cipher's block size. ECB is the simplest mode of operation for block ciphers, but it has the disadvantage that the same plaintext block is encrypted to the same ciphertext block when using the same key, which allows an attacker to make inferences about the corresponding plaintext blocks.

[0006] To counter this weakness of ECB, more complex modes of operation (CBC, CFB, OFB, CTR, etc.) have been developed in which, instead of directly encrypting each plaintext block independently of the others, as in ECB mode, the encryption of each plaintext block is more or less intertwined, so that the encryption of the next plaintext block contains, in addition to the plaintext block itself and the key, further data generated during the encryption of the previous block, usually one block size in length, which may depend on the previous plaintext block (CBC, CFB) or not (OFB, CTR).

[0007] Thus, roughly speaking, the same plaintext block is usually encrypted to various ciphertext blocks, but this is not the case for the first plaintext block, since there is no preceding block from which it can receive additional input data. To deal with this, an initialization vector is usually used, one block size long, which is utilized as this additional data when encrypting the first block. In that case, each initialization vector is only allowed to be used once, i.e. for one plaintext, otherwise the same ciphertext block is also generated for the same plaintext block (with the same key), i.e. while using the same key, the initialization vector must be a nonce. In that case, the initialization vector only needs to be new, i.e. a nonce, and does not need to be kept secret. Rather, the initialization vector used for encryption is also required for decryption, i.e. the initialization vector needs to be known by both sender and receiver. Since the initialization vector does not need to be kept secret, it can be transferred as an explicit, unencrypted part of the message, as is done, for example, in TLS. In that case, the initialization vector is not allowed to be transferred in encrypted form, since without the initialization vector present as a plaintext block, the receiver would not be able to decrypt the encrypted message.

[0008] However, the explicit transfer of the initialization vector, especially as part of a short message, is resource-intensive, since the initialization vector is usually one block long, e.g. 128 bits for AES. If the number of messages to be encrypted with the same key is known in advance, a counter can be used on the sender's side, which is incremented by one for each new message. From this counter, for example by a suitable padding method agreed between sender and receiver, a new, usually one block long, initialization vector can then be generated by the sender for each new message, for example by complementing the counter bits with additional bits using this padding method or by using a cryptographic hash function, followed by a possible adaptation of the length required, and used to encrypt the message, since the counter increment was performed before. Then, instead of transmitting the entire initialization vector together with each message, only the counter, i.e. the counter bits representing the counter and the number of the respective message, are transmitted together. This allows the space required in the message to be reduced, for example from 128 bits to, for example, 32 bits for a 32-bit long counter.

[0009] It would be particularly space-saving to use an implicitly shared initialization vector by first having the sender and receiver agree on a common starting initialization vector and rules for generating a new next initialization vector from the current initialization vector, and then, for each new message, synchronizing on both sides to generate this new next initialization vector using the previously agreed upon rules. The problem with this is that messages can get lost or arrive out of order, causing the initialization vectors used by the sender and receiver to become out of synchronization.

[0010] Another, equally space-saving way to implicitly synchronize the initialization vector between sender and receiver is to derive it in a secure way from the message itself, which needs to be transferred anyway, and sender and receiver can do this independently of each other. The problem in this case is that the initialization vector, on the one hand, must be known to the sender before the encryption process and therefore derivable from the plaintext message, but, on the other hand, must be known to the receiver before the decryption process and therefore derivable from the encrypted message, which are (seemingly) contradictory requirements.

[0011] The so-called synthetic initialization vector (SIV), used in a special AEAD method ("Authenticated Encryption with Associated Data"), i.e. a scheme allowing both encryption and authentication, is characterized in that the initialization vector used for encryption is generated from the message itself, by generating a unique authentication stamp (tag) from the message, which is then used as the initialization vector when initializing the message or a part of the message. Variants of AEAD based on synthetic initialization vectors have been developed for different AEAD operation modes, for example the combination of CMAC and CTR (SIV-AES), AES-GCM (AES-GCM-SIV) or CCM (CCM-SIV) (see also US Pat. No. 5,399,136). However, since the initialization vector, i.e. the authentication stamp generated from the unencrypted message, is also needed when decrypting the message, but the initialization vector cannot be derived directly by the recipient from the encrypted message, the initialization vector has to be transmitted unencrypted to the recipient together with the encrypted message, so that no space is saved in the message by using a synthetic initialization vector in the above-mentioned way,

[0012] In this connection, reference may essentially be made to patent document WO 2006 / 023991.

[0013] In patent document 4, an authentication method similar to CBC-MAC based on block ciphers is defined, which is calculated not only over the message itself, as in the case of CBC-MAC, but over an extension of the message by a prefix that contains the hash value of the message.

[0014] As mentioned before, the main weakness of ECB mode is the fact that the same plaintext will encrypt to the same ciphertext when using the same key. Since this problem only exists in the context of using the same key, and replacing the key resets the problem to some extent, the rest of the document assumes a fixed shared symmetric key K.

[0015] The widespread requirement to use a new initialization vector for encrypting every new plaintext is sufficient but not necessary to overcome the weaknesses mentioned above. That is, if it can be ensured that the first block of plaintext is always new, the requirement to use a new initialization vector can be omitted in modes of operation where the previous block, especially the previous ciphertext block, is included when concatenating blocks (e.g. CBC, CFB). That is, in certain cases, for a fixed key, it is sufficient that the combination of the initialization vector and the first plaintext block is new. If the first plaintext block is always new, in these certain cases the use of an initialization vector can even be omitted altogether.

[0016] For example, if one wishes or must omit, for space reasons, a guaranteed new (explicitly or not explicitly included) initialization vector for each plaintext to be encrypted, it makes sense to design the format of the plaintext such that the probability that the first block of the plaintext is always new is maximized.

[0017] Since the probability that an individual plaintext is "novel", i.e., pairwise different, is greater than the probability that the first block of each plaintext is novel, i.e., pairwise different, in order to achieve the greatest possible probability of a novel first block, it makes sense to concentrate the "novelty" of the entire plaintext in the first block, i.e., to design the first block of each plaintext such that it is always different from any two distinct plaintexts.

[0018] Here, the difference between two plaintexts can appear in different places in the plaintexts depending on the plaintext pair, i.e. the "novelty" can be distributed over the bit positions of the plaintexts. Therefore, in the general case, it is not possible to find a plaintext format that guarantees the maximally possible novelty of the first plaintext block by simply re-sorting each plaintext bit. However, the "novelty" contained in the plaintext can be accumulated very well by applying a cryptographic hash function HASH to selected specific sequences of bits whose combinations are likely to be novel. Then, if two bit sequences BF1 and BF2, belonging to two different plaintexts and used to form the hash values, appear to differ in at least one of the bits, then with a very high probability the hash values ​​HashTag1:=HASH(BF1) and HashTag2:=HASH(BF2) of the two bit sequences containing this different bit will also differ.

[0019] The hash value HashTag:=HASH(BF) thus calculated can then be used directly as an initialization vector, or from it one can derive an initialization vector that is new whenever there is a plaintext bit sequence BF included in the calculation of the hash value. In the case of the above mentioned synthetic initialization vector (SIV), for example, this is done like this. The problem then is that the receiver must know the initialization vector in order to be able to decrypt the fully or partially encrypted plaintext, as already explained above. If one does not want to explicitly transfer the initialization vector unencrypted as part of the plaintext, which is undesirable for space saving reasons, this means that the part of the bit sequence BF used to form the hash value HashTag must not be encrypted, since otherwise the receiver would not be able to derive the initialization vector used by the sender in the encryption from the received partially or fully encrypted plaintext. [Prior art documents] [Patent documents]

[0020] [Patent Document 1] DE 102021001095 A1 [Patent Document 2] DE 102019113026 [Patent Document 3] US Patent Application Publication No. 2015 / 0349950 [Patent Document 4] International Publication No. 2009 / 013420 Summary of the Invention [Problem to be solved by the invention]

[0021] It is therefore an object of the present invention to provide an improved method for encrypting a plaintext by means of a block cipher using a symmetric key K, and the mechanisms required for this. [Means for solving the problem]

[0022] According to the invention, the problem is solved by the features of claim 1. Advantageous embodiments emerge from the dependent claims which are dependent on claim 1. The problem is further solved by the features of claim 12. Again, advantageous developments emerge from the dependent claims which are dependent on claim 12.

[0023] First, a way is needed to code the entire plaintext novelty in the first block of plaintext, so that any change in the entire plaintext, including the first block, acts as a change to the first plaintext block.

[0024] Using a symmetric key K according to the present invention, E The method according to the invention for encrypting a plaintext, in particular a plaintext of at least (u+1) bits length, by a block cipher E of u ) to the concatenation of the complete first u bits of the plaintext and selected or all bits of the remaining plaintext, as a proxy for the combination of the initialization vector and the first u bits of the plaintext. The fingerprint function then has the effect that, as a consequence of two unequal bit sequences (BF1 ≠ BF2), there is a sufficiently high probability for the application that the fingerprints of the two bit sequences are also unequal in the sense defined above (FP u (BF1) ≠ FP u (BF2)) and one fingerprint function (FP u ) for each fingerprint inverse function (FP u -1 ), so that FP u -1 (FP u All that needs to be satisfied is that (BF)||BF[u+1..L(BF)]) = BF[1..u].

[0025] In that case, u and L E The first u bits of the plaintext, PB, are not necessarily the same as uAs mentioned above, the encryption of 1 requires FP u is the complete first u bits of the plaintext PB u 1 and selected or all bits of the remaining plaintext FPInput, and then the first block of the ciphertext CB1 is applied to the concatenation of the result FP u (PB u In general, a cipher EGen is used that does not require an initialization vector, since it is calculated by encrypting EGen with 1||FPInput. In that case, the symbol || represents the concatenation of two bit sequences, i.e., in that case, CB1:=EGen(FP(PB u 1||FPInput). In that case, it is essentially the case that EGen is of equal length, and CB1 does not need to be u bits long either, even though in practice that is usually the case.

[0026] The encryption of the first u bits of the plaintext CB1 thus produced can then be used as an initialization vector IV:=CB1 for encrypting part of the plaintext or all remaining parts of the plaintext with the block cipher E, thereby making it possible to utilize any mode of operation that requires an initialization vector (IV).

[0027] Before encryption by EGen, the fingerprint function FP u By using the fingerprint function FP, it is possible to ensure that a new plaintext will very likely result in a new input to the cipher EGen, which will in turn very likely result in a new ciphertext CB1 and thus a new initialization vector IV. Tag,_u,Scramble_u FP u When used as a pseudorandom CB1 calculation, the plaintext PB u The first u bits of 1 (Scramble u via) and the rest of the plaintext (Tag u If both the first plaintext and the second plaintext are equally included, and therefore the entire first plaintext is also new, then FP Tag、_u、Scramble_u , and it is guaranteed with a very high probability that the initialization vector IV derived from the first u bits CBu1 encrypted by EGen is new.

[0028] According to a very advantageous embodiment of the solution according to the invention, to generate a fingerprint of length u bits of a bit sequence BF whose length is greater than u, the fingerprint is calculated using a function FP u (BF) or FP Tag_u、Scramble_u (BF), which is intended to be realized as a result of Scramble u (BF[1..u])@(In the figure, + in the circle)Tag u (BF[u+1..L(BF)]), and Tag u is a function that computes, for any length of bit sequence, a unique, say pseudo-random, value of length with a sufficiently high probability for the application, where Scramble u is a reversible function that maps a bit sequence (BF) of length u to a bit sequence of length u, and @ denotes the bitwise XOR combination of two bit sequences (BF).

[0029] That is, to code the novelty of the entire plaintext into the first u bits of the plaintext and to be able to exploit this fact for encryption, we define the function FP u A fingerprint ("fingerprint") is searched for, which is a bit sequence FP of length u if L(BF)>u, where L(BF) denotes the bit length of BF in this document. u (BF) is determined as follows: -2 bit sequence BF1 ≠ BF2) with a sufficiently high probability for the application u (BF1) ≠ FP u (BF2) -FP u For FP inverse function FP u -1 Therefore, there is always FP u -1 (FP u (BF)||BF[u+1..L(BF)])=BF[1..u], Here, for a bit sequence BF and natural numbers i, j, with 1≦i≦j≦L(BF), BF[i..j] denotes a subsequence of BF consisting of bits i to j, i.e. for example BF=BF[1..L(BF)], and || denotes the concatenation of two bit or byte sequences.

[0030] In this case, "with a sufficiently high probability for application" means that for a given application of two bit sequences BF1, BF2, where BF1 ≠ BF2, the FP u (BF1) ≠ FP u This can be understood as the probability that the function Tag will produce the result (BF1) ≠ Tag(BF2) with sufficient certainty. In this case, by principle, it cannot show a precise value since the function Tag is a mapping of a (u+x)-length bit sequence BF to a u-length bit sequence, so that for two different bit sequences BF1, BF2, their tags are "as different as possible", i.e. BF1 ≠ BF2, so Tag(BF1) ≠ Tag(BF2) "as much as possible".

[0031] However, in practice, there is no function Tag that guarantees this 100% for all BF1, BF2, since Tag(BF) is always u bits long and therefore shorter than "most" bit sequences. For example, if we choose u=2, there are only four distinct tags: 00, 01, 10, 11. Thus, for any five distinct bit sequences BF1..BF5, there is a 100% probability of at least one collision, i.e., at least two of the five tags Tag(BF1)...Tag(BF5) will overlap. Furthermore, for u=2, there is at least a 25% probability of a collision for any two randomly chosen bit sequences BF1,BF2, i.e., Tag(BF1)=Tag(BF2). Thus, the function Tag u The “quality” of (i.e., the quality or probability that (BF1 ≠ BF2 → Tag(BF1) ≠ Tag(BF2)) is at most as large as the size of u.

[0032] On the other hand, Tag uThere are collision-resistant cryptographic hash functions that guarantee this desirable property (BF1 ≠ BF2 → Tag(BF1) ≠ Tag(BF2)) "almost 100%", assuming a large enough u. However, these hash functions cannot guarantee this 100%, see considerations above. However, it is believed that the probability that (BF1 ≠ BF2 → Tag(BF1) ≠ Tag(BF2)) when using collision-resistant cryptographic hash functions as tags is so high that the security of many cryptographic mechanisms that are considered secure is based on this. The aforementioned probability principle is also the basis for, for example, legally resistant digital signatures.

[0033] A hash function may provide, for example, a 256-bit value (hashtag), as for example SHA-256 does. The function Tag according to the invention shall use a value u=20. In that case, the first 20 bits of the hashtag provided by SHA-256 can be used as tag. This gives the "almost 100%" quality provided by SHA-256, which is significantly reduced by the use of u=20. A meaningful choice of u and the function Tag then depends on each individual case or use case. For example, the choice of u=128 and the first 128 bits of the value provided by SHA-256 as tag is considered "on the safe side" for all applications according to current knowledge. However, for certain applications, in practice, for example u=80 bits may be absolutely sufficient, and therefore, if BF1≠BF2, a sufficiently high FP for this application may be obtained. u (BF1) ≠ FP u There are certainly cases where a probability of (BF2) is guaranteed. If the value of the probability needs to be a number, in practice u>=80 is chosen in almost all cases, so that the probability of (1-2 -20 ) is obtained.

[0034] In that case, in this advantageous embodiment of the solution according to the invention, the function FP u For the general form FPu (BF)bzw.FP Tag_u,Scramble_u :=Scramble u (BF[1..u])@Tag u It is proposed to use (BF[u+1..L(BF)]), where -Tag u is a function, e.g. a cryptographic hash function, that computes for any length of bit sequence a unique, e.g. pseudorandom, value of length u with sufficiently high probability for application, and the hash value of the cryptographic hash function can be converted, if necessary, in a secure manner, i.e., for e.g. excessively long hash values, by converting the last u bits of this hash value to the Tag. u (BF), or if the hash value is too short, it is adapted to the length u by stretching it to the length u, for example using a cryptographic key stretching technique. oTag u By appropriately selecting , weak-weak and weak-strong FP collision resistance can be achieved, as well as non-reversible, strong-weak FP collision resistance, and strong-strong FP collision resistance, as will be further explained below. -Scramble u is an invertible function that maps a bit sequence of length u to a bit sequence of length u, e.g., equal-length encryption (with associated decryption as the inverse function), oScramble u By selecting the appropriate u With proper selection of functions, it is possible to achieve properties of irreversibility, strong-weak FP collision resistance, and strong-strong FP collision resistance that are only relevant to an attacker, as will be explained further below.

[0035] -@ denotes the bitwise XOR combination of two bit sequences of equal length.

[0036] In that case, FP Tag_u,Scramble_u The inverse FP function of F is (FP Tag_u,Scramble_u ) -1 (BF)=Scramble u -1 (BF[1..u]@Tag u(BF[u+1..L(BF)]). The function FP u If has the general form given above, this function is a function of two functions Tag u and Scramble u is uniquely determined by

[0037] Therefore, this fingerprint function FP Tag_u、Scramble_u makes it possible to omit the use of the initialization vector in the symmetric encryption of the new plaintext without significant loss of security, and in so doing encrypt the plaintext in its entirety.

[0038] In that case, according to a very advantageous development, the cryptographic hash function is the function Tag u and it can be envisaged that the hash value of this hash function will be adapted to the length u in a secure manner.

[0039] Furthermore, in an advantageous development of the method according to the invention, the function Tag u It may also be contemplated that has non-reciprocal properties and / or is collision resistant in at least one way.

[0040] In that case, irreversibility means that the attacker must be able to u It makes it virtually impossible to find a bit sequence BF2 for a given bit sequence BF1 such that (BF2)||BF1[u+1..L(BF)]. In that case, an attacker, as opposed to a "non-attacker" in the sense of this specification, is an attacker that is not an FP u can be understood as a person who does not know the (secret) key used in defining or determining

[0041] Regarding collision resistance, four different varieties are considered, which are referred to here as two-tuples of the form (r1,r2)∈{strong,weak}×{strong,weak}, where the first element r1 denotes the inherent FP collision resistance, and the meaning of the second element r2 is based on collision resistance terms known from cryptographic hash functions. -[Weak-Weak FP Collision Resistance] For a given bit sequence BF1, BF1[1..u]=BF2[1..u], BF1[u+1..L(BF1)]≠BF2[u+1..L(BF2)] and FP u (BF1)=FP u It is virtually impossible to find a bit sequence BF2 such that (BF2). -[Strong-Weak FP Collision Resistance] If an attacker is given a bit sequence BF1, BF1 ≠ BF2 and FP u (BF1)=FP u It is virtually impossible to find a bit sequence BF2 such that (BF2). -[Weak-Strong FP Collision Resistance] BF1[1..u]=BF2[1..u], BF1[u+1..L(BF1)]≠BF2[u+1..L(BF2)] and FP u (BF1)=FP u It is virtually impossible to find two bit sequences BF1 and BF2 such that (BF2).

[0042] -[Strong-Strong FP Collision Resistance] If the attacker does not meet the condition that BF1 is equal to BF2 and FP is not equal to BF1, u (BF1)=FP u It is virtually impossible to find two bit sequences BF1 and BF2 such that (BF2).

[0043] It is clear that irreversibility and all kinds of collision resistance can then only be achieved for u large enough.

[0044] A very advantageous development of this method is the use of a key-free or key-dependent cryptographic hash function HASH (K_H) is the function Tag u where K_H denotes a key on which HASH possibly depends and is indicated by parentheses, and HASH may or may not depend on K_H.

[0045] Furthermore, a highly advantageous embodiment of the method is such that the identity function or the isometric encryption function is the function Scramble uIt can also be envisaged that the block size L E = u and L E For a symmetric key K_S of bit length, E-Raw encryption using K_S, i.e., E RAW K_S But the function Scramble u It is further contemplated that the present invention may be utilized as a

[0046] In an advantageous embodiment, it is further proposed to use the encryption of the first u bits of the plaintext CB1 thus generated as an initialization vector IV:=CB1 for encrypting part or all of the remaining plaintext by means of a block cipher E, for which purpose it is possible to make use of an operating mode requiring any one initialization vector, prior to which, possibly depending on the length of CB1 and depending on the selected operating mode, an adaptation of the initialization vector IV in a secure manner to the length of the initialization vector required by the respective operating mode, for example L(CB1)=L E In, shortening occurs when using the IV as a nonce in the CTR mode of operation.

[0047] According to another advantageous embodiment of the invention, a block size L is generated using a symmetric key K. E When encrypting a plaintext by a block cipher E, the above kind of FP function, i.e., FP Tag_u,Scramble_u In the general case, u ≠ L E It is proposed to use a general cipher EGen that can be used for FP Tag,_u,Scramble_u is the complete first u bits of the plaintext ("plaintext block") and all the remaining bits of the plaintext FPInputPB u 1, followed by the first block of ciphertext, CB1, resulting in a u-bit long result, FP Tag_u,Scramble_u (PB u 1||FPInput) by EGen encryption, i.e., CB1:=EGen(FP Tag_u,Scramble_u (PB u1||FPInput).

[0048] Since one goal of this method is to generate messages that are as short as possible, it is proposed to choose an equal-length cipher as the general cipher EGen, so that, for example, L(CB1) = u always. u It is represented by 1.

[0049] It can then be estimated to what extent the actual novelty of the so-calculated initialization vector is guaranteed when selecting an operating mode for encrypting the remaining plaintext. If the novelty of the initialization vector is guaranteed, for example by incorporating a perfect non-repeating counter in the bit sequence BF, then each operating mode requiring a new initialization vector can be used safely. In contrast, if the novelty of the initialization vector is only guaranteed depending on the novelty of the plaintext itself, but this novelty is, for example, probable but not certain, then a relatively high risk is associated with the use of, for example, OFB or CTR, but also CFB, and preferably, for example, CBC must be utilized.

[0050] This allows in many cases to omit the use of an initialization vector when encrypting the first block with no or little loss of security. Thus, modes of operation that require an initialization vector, such as CBC, CFB, OFB, CTR, etc., can be utilized for encrypting the remaining blocks by using the new encrypted first block of new plaintext as the initialization vector for the encryption of the remaining blocks.

[0051] In that case, according to an advantageous development of the method according to the invention, the length of the initialization vector IV is adapted depending on the selected operating mode and / or depending on the length of CB1.

[0052] An alternative solution to the method according to the invention as defined in claim 12 is to use a block size L EWe intend to encrypt a plaintext, in particular a plaintext of length at least (U+1) bits, by a block cipher E of u ) as the fingerprint function FP Tag_u,Scramble_u (BF):=Scramble u (BF[1..u])@Tag u (BF[u+1..L(BF)]) is used. In that case, Tag u is a function that computes a unique value of length u with sufficiently high probability for the intended application, where Scramble u is a reversible function that maps a bit sequence (BF) of length u to a bit sequence (BF) of length u, and @ represents the bitwise XOR combination of two bit sequences (BF) of the same length. For each new message, we apply the fingerprint function FP Tag_u、Scramble_u Tags u A key-dependent hash function HASH is secure if it guarantees the novelty of the bit sequences involved in the function. K_H is the fingerprint function FP u K_H Tags u It is used as the basis for the K_H function, omitting the additional encryption of the first u bits of the plaintext by EGen, and instead encrypting the first u bits of CB u FP as encryption of 1 u K_H The fingerprint is used directly.

[0053] Therefore, F.P. Tag_u,Scramble_u (BF):=Scramble u (BF[1..u])@Tag u The form FP, defined by (BF[u+1..L(BF)]) Tag_u,Scramble_u The fingerprint function is used, where Tag u is a secure key-dependent hash function HASH K_H The output length of this hash function is appropriately adapted to u, where Scramble uis a reversible function that maps a bit sequence (BF) of length u to a bit sequence (BF) of length u, where @ represents the bitwise XOR combination of two bit sequences (BF) of the same length, and u and L E are not necessarily the same, and the fingerprint function FP Tag_u,Scramble_u FPInput is the complete first u bits of the plaintext and all selected or remaining bits of the plaintext PB u 1 and the fingerprint function FP Tag_u,Scramble_u Tags u If the novelty of the bit sequence FPInput contained in the function is guaranteed for each new message, then the first u bits CB u 1 encryption, FP Tag_u,Scramble_u The fingerprint is used directly, i.e. CB1:=FP Tag_u,Scramble_u (PB u 1||FPInput), and the encryption of the first u bits of the plaintext, CB1, so produced is used as an initialization vector IV:=CB1 to encrypt the remaining plaintext, or a portion of all the remaining plaintext, with the block cipher E, whereby any mode of operation that requires an initialization vector (IV) is utilized.

[0054] Further advantageous refinements and various embodiments of the method according to the invention emerge from the further dependent claims which are dependent on claims 1 and 12 and from the exemplary embodiments which are described in detail below with reference to the drawings. [Brief description of the drawings]

[0055] [Figure 1] FIG. 1 is a schematic diagram showing the Fingerprint (FP) function together with its inverse. [Diagram 2] FIG. 1 illustrates the working principle of encryption and decryption using two common FP functions as independent components. [Diagram 3]A diagram illustrating the operating principle of encryption and decryption using FP functions FPTag,_u,Scramble_u and (FPTag,_u,Scramble_u)-1 decomposed into components. [Figure 4] FIG. 1 shows in a summarized form the operation principle of two FP functions FPu HASH(K_H),ID(furu=LE) and FPHASH(K_H),E-K_S. [Diagram 5] FIG. 1 illustrates the principle of operation of encryption and decryption using two FP functions as independent components (for FPu HASH(K_H),ID and FPHASH(K_H),E-K_S when u=LE). [Figure 6] FIG. 1 illustrates the principle of operation of encryption and decryption using two FP functions as component decomposed FP functions (for FPu HASH(K_H),ID and FPHASH(K_H),E-K_S when u=LE). [Figure 7] FIG. 2 illustrates a procedure for an alternative encryption and decryption method. [Figure 8] FIG. 2 illustrates a procedure for an alternative encryption and decryption method. [Figure 9] FIG. 2 is a schematic diagram of the method of US Pat. No. 5,399,633 as a complement to the method according to the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0056] A first related aspect of the method of encryption is to generate a u-bit long fingerprint (FP u ) is a method for generating a function FP u ("fingerprint") is calculated for a bit sequence FP of length u if L(BF)>u (in this document L(BF) denotes the bit length of the bit sequence BF). u (BF) is determined as follows: -BF1 ≠ BF2, FP with high probabilityu (BF1)FP u (BF2) -FP u For FP inverse function FP u -1 Therefore, there is always FP u -1 (FP u (BF)||BF[u+1..L(BF)])=BF[1..u], where for a bit sequence BF and natural numbers i, j, with 1≦i≦j≦L(BF), BF[i..j] denotes a subsequence of BF consisting of bits i to j, i.e. for example BF=BF[1..L(BF)], and || denotes the concatenation of two bit or byte sequences; Optionally, the condition of non-reversibility is satisfied, i.e., for a given bit sequence BF1, an attacker can prove that BF1=FP u It is virtually impossible to find a bit sequence BF2 such that (BF2)||BF1[u+1..L(BF)]. -Optional FP u is also collision resistant.

[0057] Function FP u has the general form FP u (BF)=Scramble u (BF[1..u])@Tag u It is proposed to use (BF[u+1..L(BF)]), where -Tag u computes with high probability a unique, e.g. pseudorandom, value of length u, e.g. a cryptographic hash function, for any length of bit sequence, and the hash value of this cryptographic hash function is encoded in a secure manner if necessary, i.e. if the hash value is excessively long, its last u bits are encoded as Tag u (BF), or if the hash value is too short, the hash value is adapted to the length u, for example by stretching it to the length u using a cryptographic key stretching technique. oTag uBy appropriate selection of , weak-weak, weak-strong FP collision resistance can be achieved, and irreversibility, strong-weak FP collision resistance, and strong-strong FP collision resistance can be enabled. -Scramble u is an invertible function that maps a bit sequence of length u to a bit sequence of length u, e.g., equal-length encryption (with associated decryption as the inverse function), oScramble u By selecting the appropriate u With appropriate choice of functions, it is possible to achieve properties that are only relevant to an attacker: irreversibility, strong-weak FP collision resistance, and strong-strong FP collision resistance. -@ denotes the bitwise XOR combination of two bit sequences of equal length.

[0058] In that case, FP u The inverse FP function of is FP u -1 (BF)=Scramble u -1 (BF[1..u]@Tag u (BF[u+1..L(BF)]). The function FP u If has the general form given above, this function is a function of two functions Tag u and Scramble u The FP function described by these two functions is called FP Tag_u、Scramble_u These can be seen in the flow chart of Figure 1.

[0059] For a general cipher EGen(Encryption), an associated decryption function DGen(Decryption), and a bit sequence BF, let EGen(BF) denote the result of encrypting BF with EGen, and DGen(BF) denote the decryption of BF with DGen, i.e., always (EGen(BF))=BF.

[0060] For a block cipher E (Encryption) and its associated decryption function D (Decryption), and an operation mode OM ("Operation Mode") that requires an initialization vector, E OM K (IV, PT) is an initialization vector IV used in an operation mode OM with a key K. OM Let E denote the result of E encryption of a plaintext PT ("plaintext") of length that fits D. OM K (IV,CT) is a vector E using the initialization vector IV and the key K in the operation mode OM. OM The result of D-decryption of ciphertext CT of length conforming to

[0061] The proposed encryption method encrypts a message M P As input, the encryption method takes some components of M and encrypts some of them with key K. The following description of the encryption method includes a description of the components it uses, a description of the input format, and the encryption of the plaintext message M. P A message M that is fully or partially encrypted using components C This consists of a description of the original method of generating

[0062] The components of a cryptographic system include: - EGen, a general, isometric and secure cipher -Block size L E Block cipher E -E OM , length L OM-IV A block cipher E operating in mode of operation OM that requires an initialization vector of - Fingerprint function FP, hereafter abbreviated as FP u , - Obtain a pseudorandom OM initialization vector from a bit sequence of length u in a secure manner, e.g., the bit sequence is first symmetrically encrypted and then encrypted with the established method L OM-IV a post-processing function OM-NB, optionally adapted to the operating mode OM, whereby a length adaptation to

[0063] Input format: -Length L E symmetric key K, A message M consisting of a plaintext part PT to be encrypted followed by an associated part AD ("Associated Data"). P , i.e. M P =PT||AD, where L(PT)>u, i.e. PT is longer than u. The relevant part AD is not encrypted, but contributes to the formation of the OM initialization vector and thus to its novelty. The plaintext part PT is divided into three parts PB u 1. PT OM 1, and PT OM 2, i.e. PT=PB u 1||PT OM 1||PT OM 2, where PB u 1 and PT OM 2 contributes to the formation of the OM initialization vector, PT OM 1 does not contribute to the formation of the OM initialization vector, where ·L(PB u 1)=u,PB u 1, i.e. exactly u bits long, ·PT OM 1||PT OM 2 is E OM Since it has a length that fits E OM PT OM 1||PT OM 2 can be encrypted. -OM can contribute to increasing the probability of novelty of the initialization vector and is known to the sender and the receiver alike, thereby P For example, a counter known to both sides or a hash or encryption of such a counter. o A bit sequence of arbitrary length, ImplAD ("implicit additional data"), used as an additional input to the fingerprint function FP. If you want to omit the use of ImplAD, you can select an empty bit sequence as ImplAD. oFP fingerprints A bit sequence of length u used to XOR combine Impl u . Impl u If you omit the use of Impl, the bit sequence consisting of u0 bits is u (a 0 bit is a neutral element with respect to XOR).

[0064] Encryption with key K E FP, EGen, OM, OM-NB, i.e. E FP、EGen、OM、OM-NB K : -input: 1.PB u 1,PT OM 1,PT OM 2, ADmitM P =PB u 1||PT OM 1||PT OM 2||AD 2. ImplAD, Impl u -M C The encrypted part of M C Decision: 1.FPB:=FP(PB u 1||PT OM 2||AD||ImplAD) 2.CB u 1:=EGen(FPB@Impl u ) 3. OM-IV:=OM-NB(CB u 1) 4.CT OM :=E OM K (OM-IV,PT OM 1||PT OM 2) -output: 1.CB u 1,CT OM ,in this case, M C :=CB u 1||CT OM || AD - In summary, PB u 1,PT OM1,PT OM 2. A plaintext message M consisting of AD P =PB u 1||PT OM 1||PT OM 2 || AD Encryption M C It is proposed to determine as follows: E FP,EGen,OM,OM-NB K (PB u 1,PT OM 1,PT OM 2,AD,ImplAD,Impl u ):= CB u 1||E OM K (OM-NB(CB u 1), PT OM 1||PT OM 2) and Here, C.B. u 1:=EGen(FP(PB u 1||PT OM 2||AD||ImplAD)@Impl u ).

[0065] The components of the decoding system include: - DGen, a decryption function belonging to the generally secure equal-length cipher EGen - Decryption function D belonging to block cipher E -E OM A decoding function D belonging to OM - FP, OM-NB, FP as in the case of encryption -1 Inverse function for FP

[0066] Input format: - a symmetric key K, as in the case of encryption - a message M consisting of a ciphertext CT' followed by an associated unencrypted part AD' C ', i.e. M C '=CT'||AD', where L(CT')>u. The ciphertext part CT' also consists of two parts: the encrypted first block CB u 1' and the subsequent ciphertext CTOM ', i.e. CT'=CB u 1'||CT OM ' and M C '=CB u 1'||CT OM '||AD', where ·L(CB u 1')=u,CB u 1', i.e. exactly u bits long ·CT OM ' is D OM The length of the CT OM 'D OM It can be decoded by: -In the case of encryption, ImplAD', Impl u '

[0067] Decryption D with key K FP,DGen,OM,OM-NB , i.e. D FP,DGen,OM,OM-NB K : -input: 1.CB u 1',CT OM ',AD', where M C '=CB u 1'||CT OM '||AD' 2.L PT1 ,plaintext part PT OM Length of 1 3. ImplAD', Impl u ' -M P Determining the decoded portion of : 1. OM-IV':=OM-NB(CB u 1') 2.PT OM ':=D OM K (OM-IV',CT OM ') 3.PT OM 1':=PT OM '[1..L PT1 ] and PT OM 2':=PT OM '[L PT1 +1..L(PTOM ')] 4.PB u 1':=FP -1 ((DGen(CB u 1')@Impl u ')||PT OM 2'||AD||ImplAD') -output: 1.PB u 1',PT OM ',in this case M P ':=PB u 1'||PT OM’ ||AD'

[0068] In summary, C.B. u 1',CT OM A ciphertext message consisting of ',AD' M C '=CB u 1'||CT OM Decoding '||AD' M P It is proposed to define ' as follows: D FP,DGen,OM,OM-NB K (CB u 1',CT OM ',AD',L PT1 ,ImplAD',Impl u '):= FP -1 ((DGen(CB u 1')@Impl u ')||PT OM '[L PT1 +1..L(PT OM ')]|| AD||ImplAD')||PT OM ' and Here, PT OM ':=D OM K (OM-NB(CB u 1) CT OM ').

[0069] The two figures, Figure 2 and Figure 3, show one using two common FP functions as independent components and the other using the decomposed FP function FPTag,_u,Scramble_u and (FP Tag,_u,Scramble_u ) -1 The operating principle of encryption and decryption using the above method is shown below.

[0070] In that case, the FP partial function Tag u can be based on keyless cryptographic hash functions, e.g. SHA-256 or SHA-512, or key-dependent cryptographic hash functions, e.g. HMAC, CBC-MAC, or CMAC. The use of keyless cryptographic hash functions has the advantage that the one-way property and possibly weak or strong collision resistance of the cryptographic hash function applies regardless of whether the key is known, whereas in the case of key-dependent cryptographic hash functions these properties are not always given when the key used is known. The use of key-dependent cryptographic hash functions has the advantage that a potential attacker cannot compute a hash value from a bit sequence known to this attacker without knowing the key. HMAC or Key Derivation Functions (KDFs) combine the advantages of the combination of the two approaches and therefore of the two classes of hash functions. In this document, keyless cryptographic hash functions are denoted by HASH and key-dependent cryptographic hash functions using a key K_H are denoted by HASH. K_H Let us denote by HASH either a keyless cryptographic hash function or a key-dependent cryptographic hash function using a key K_H. (K_H) Shown in Tag. u K_H The name comes from Tag u Hash function HASH depends on key K_H K_H It is used when using FP as a basis. u K_H is a related Tag u A hash function HASH whose function depends on the key K_H K_H indicates the use of FP as a basis. u Tag u If we use a cryptographic hash function that satisfies the conditions for weak (strong) hash collision resistance as the basis for FP u has the property of weak-weak (weak-strong) FP collision resistance. u By using a cryptographic hash function as the basis for uThe preconditions for strong-weak or strong-strong FP collision resistance are formed.

[0071] HASH (K_H) If u generates a hash value of a different length than u, then the length adaptation function LA u Use HASH (K_H ) to u and obtain the resulting composite LA u ○HASH (K_H) Tag u It is proposed to use it as, where LA u can be used to prove, using methods known in cryptography, that if the output bit sequence PZBF is excessively long, for example, that the last u bits of PZBF are u (PZBF) or, if the bit sequence PZBF is too short, it is stretched to length u, for example using a key stretching method.

[0072] Furthermore, the function Scramble u In the case of , it has been proposed to use an identity function ID that does not change the bit sequence, which is similar to Scramble. u This is equivalent to omitting the function. The inverse of the identity function is the identity function ID itself. This particularly simple Scramble u Variations of the formula are also possible, e.g., FP u A simple FP that can be advantageously used when function irreversibility and strong-weak or strong-weak FP collision resistance are not required. u This results in a function.

[0073] Keyless or key-dependent cryptographic hash function HASH (K_H) In the case of ,FP u HASH(K_H),ID is HASH (K_H) Tag u Scramble the identity function ID as a function u FP used as a function u Denote the function and the corresponding length fitting function LA uTherefore, the application of FP u HASH(K_H)、ID is the HASH of the plaintext bits outside the first plaintext block (K_H) A hash value is formed and this is u After length adaptation by , we use @ to append to the first u unchanged bits of the plaintext block. FP u HASH(K_H)、ID is HASH (K_H) If it itself has weak or strong collision resistance, it has weak-weak or weak-strong FP collision resistance.

[0074] However, F.P. u There may be constellations where the non-invertibility of the function and / or its strong-weak and / or strong-strong FP collision resistance is advantageous. For example, in such cases, the function Scramble u It is proposed to use equal-length encryption for Scramble. u The result of is not disclosed and is further encrypted by EGen, so this encryption does not necessarily have to be strong, but the corresponding FP u The strength of the attacker-relevant properties of a function depends on the scramble used. u It should be noted that the strength of the encryption used depends directly on the

[0075] For a block cipher E, u=L E In the case of E RAW The encryption can be advantageously used as a constant-length encryption that does not require an initialization vector that an attacker cannot compute or reverse. If u is equal to the block size of the symmetric cipher E, i.e., u=L E In this case, E-Raw encryption is used, and Scramble u As a function, i.e., Scramble on a symmetric key K_S u :=E RAW K_S It is suggested to use E RAW K_S The inverse of is the associated decoding function D RAW K_S Scramble E-Raw Encryption uand at the same time use it as a cryptographic hash function HASH (K_H) Tag u By using it as FP u Properties related only to the attacker, such as function irreversibility, strong-weak FP collision resistance or strong-strong FP collision resistance, are also achieved.

[0076] Keyless or key-dependent cryptographic hash function HASH (K_H) For a block cipher E with a matching symmetric key K_S, FP HASH(K_H)E-K_S is HASH (K_H) Tag u As a function of E RAW K_S Scramble u FP used as a function u Show the function, where u=L E and the corresponding length fitting function LA L_E The application of FP is considered. HASH(K_H)、E-K_S is the HASH of the plaintext bits outside the first plaintext block (K_H) A hash value is formed and this is L_E After length matching by @, add it to the E-Raw encryption of the first plaintext block. (K_H) If has weak or strong pierce resistance, FP HASH(K_H)、E-K_S has the property of being irreversible and has strong-weak or strong-strong FP collision resistance.

[0077] Figure 4 shows two FP functions FP u HASH(K_H),ID (u=L E (In the case of FP HASH(K_H),E-K_S The operating principle of FP is summarized below. HASH(K_H),(E-K_S) represents both of these FP functions, and (E RAW K_S ) is the identity function ID or E-Raw encryption E RAW K_S (D RAW K_S ) is the identity function ID or E-Raw decoding D RAW K_S Shows.

[0078] In that case, the encryption method described above, e.g. FP,EGen,OM,OM-NB K So, as an FP function, FP u HASH(K_H),ID or FP HASH(K_H),E-K_S can be used.

[0079] Both Figures 5 and 6 show encryption and decryption (u=L, u=L) using two FP functions as independent components, and the other using the FP functions decomposed into their components. E The operating principle of the

[0080] The encryption method according to the present invention described above, e.g. FP,EGen,OM,OM-NB Another advantageous embodiment of the present invention is a symmetric L E A key K of bit length, i.e. E RAW K Using the block size L E = u's block cipher E is used for E-Raw encryption.

[0081] E as EGen RAW K Using PB1,PT OM 1,PT OM 2. A plaintext message M consisting of AD P =PB1||PT OM 1||PT OM 2||AD, where L(PB1)=L E Encryption of M C are two explicitly not included bit sequences ImplAD and Impl u can be defined as follows, depending on E FP,E-Raw,OM,OM-NB K (PB1,PT OM 1,PT OM 2,AD,ImplAD,Impl u ):= CB1||E OM K (OM-NB(CB1),PT OM 1||PT OM 2) and Here, CB1:=ERAW K (FP u (PB1||PT OM 2||AD||ImplAD)@Impl u ) and CB1',CT OM ',AD', L(CB1')=L E A ciphertext message M C '=CB1'||CT OM Decoding '||AD' M P ' is L PT1 and two explicitly not included bit sequences ImplAD' and Impl u ' is defined as follows, depending on D FP,D-Raw,OM,OM-NB K (CB1',CT OM ',AD',L PT1 ,ImplAD',Impl u '):=FP u -1 ((D RAW K (CB1')@Impl u ')||PT OM '[L PT1 +1..L(PT OM ')]||AD||ImplAD')|| PT OM ' Here, P.T. OM ':=D OM K (OM-NB(CB u 1) CT OM ').

[0082] For any sufficiently large u, a secure key-dependent hash function HASH K_H For example, if a secure key derivation function using key K_H is an FP function FP u K_H Tags u K_H When used as the basis of a function, an attacker can derive the value Tag for a given bit sequence BF without knowing the key K_H. u K_H (BF) cannot be determined. Furthermore, the value Tagu K_H If the bit sequence BF included in the computation of (BF) is guaranteed to be new for each new message, then the Tag u K_H The value calculated using Tag u K_H (BF) is also new for each new message. If these two conditions are met, then u The result of the application of the function is u bits long, and we write a (new and secret) value Tag u K_H The u-bit fingerprint obtained by XORing (BF) with a new u-bit key Tag u K_H It can be viewed as the encryption of the first u bits of the plaintext using (BF).

[0083] Therefore, the fingerprint function FP u Tags u A key-dependent hash function HASH that is secure for each new message if the novelty of the bit sequence involved in the function is guaranteed. K_H FP function FP u K_H Tags u K_H use it as the basis of the function, omit the additional encryption of the first u bits of the plaintext by EGen, and instead use the first u bits of CB u FP as encryption of 1 u K_H Using the fingerprint directly, i.e., for example, the encryption method E mentioned above. FP,EGen,OM,OM-NB In the case of , C.B. u 1, the value FP u K_H (PB u 1||PT OM 2||AD||ImplAD), i.e., CB u 1:=FP u K_H (PB u 1||PT OM 2||AD||ImplAD). Thus, E FP,EGen,OM,OM-NBThe encryption method derived from E FP-K_H,OM,OM-NB The next two figures 7 and 8 show the steps of such a method. In that case, CB u 1 Novelty is (PT OM 2||AD||ImplAD), the implicit value Impl u The use of E for the encryption of the first u bits is optional. FP-K_H,OM,OM-NB It should be noted that when applying FP, only the key K_H is used, and in that case, the key K is not used specifically. u K_H Scramble u It should also be noted that the present study does not impose any special requirements on

[0084] The proposed method allows a certain weak integrity check of the received message, because the cryptographic hash function HASH (K_H) This is because the hash value generated using C Each modification of the plaintext block PB1', i.e. of the ciphertext CT' or of the additional data AD', will result in a difference from the initial plaintext block PB1' obtained upon decryption from the original plaintext block PB1, irrespective of the block in which this modification was made (this is not usually the case for other parts of the message, in particular for the other blocks of the ciphertext CT'). It is therefore proposed to format the plaintext PT in such a way that the initial plaintext block PB1 is as predictable as possible, i.e. contains as little entropy as possible, and obeys particularly strong consistency rules, i.e. contains information with the greatest possible redundancy, so that a consistency check will, for example, enable its recipient to recognize modifications of the initial plaintext block with high probability, for example by analyzing it. If the recipient sees after decryption that one of the consistency rules has been violated, this will allow him to determine whether the message M CIt can recognize that a message has been manipulated and possibly initiate exception handling. Examples of such redundant information could be the recipient ID, the sender ID, the protocol version used, etc.

[0085] In some modes of operation, e.g. CBC, only complete plaintext blocks can be encrypted. If the last plaintext block is incomplete, a padding method is used to fill it in. If padding is used and the plaintext has a fixed length known to the sender and receiver, as is often the case for short datagram-like messages, then every plaintext block will have the same number of bits L. pad , the unused padding bits of the first plaintext block PB1 are inserted at a fixed position, e.g., at the end, and the remaining plaintext is correspondingly inserted as L pad It is proposed to shift the number of bits added to the first plaintext block PB1 to the end of the plaintext. In this way, the last plaintext block is completed and no padding is required, but the length of the encrypted plaintext CT is not changed thereby. It is further proposed to use the bits added in this way to the first plaintext block PB1 to strengthen the authentication of the message, where these L pad A value PAD whose bits can be checked by the receiver, e.g. a fixed value, e.g. a sequence of 0 bits, or a value that can be derived from the plaintext message, e.g. a HASH of the original complete plaintext message, i.e. the complete plaintext message without the PAD bits inserted. K_H The final L of the hash value formed using pad Then, after decryption, it can be checked whether the PAD value of a bit sequence at a known position in the decrypted message corresponds to an expected PAD value known to the recipient or derived from the decrypted message after the PAD' bits were encrypted. If not, the message can be considered to have been manipulated.

[0086] A drawback of the proposed encryption method is that on the one hand the first plaintext block is only decrypted at the end of the decryption process and therefore the information contained in it can only be used once the entire decryption process is finished. On the other hand, this block must be transferred first, since without it the rest of the ciphertext cannot be decrypted. The information contained in the first transferred plaintext block PB1 can therefore only be used after the decryption process is completed, which may be a drawback, but is of less importance due to the short message intended. To further mitigate this drawback, the first block must contain, as far as possible, information that is not needed during the decryption process. The selection of information belonging to the first plaintext block is therefore determined by two requirements that are sometimes in tension with each other: the requirement of "minimum entropy" and the requirement of "non-urgent use".

[0087] As already hinted at several times, the CBC mode of operation is in many circumstances more secure than, for example, the equal-length CFB, OFB and CTR modes of operation, when using possibly non-novel initialization vectors, because the repeated use of initialization vectors in the CBC mode of operation does not usually lead to the disclosure of the ciphertext, whereas this is the case for example for frequently occurring constellations common in CTR. It is therefore considered that, for the proposed method, although it can increase the probability for the novelty of the initialization vector, this probability does not warrant the use of CBC as the mode of operation OM of the block cipher E in the general case. A major drawback of the conventional CBC mode of operation is that it can only encrypt whole blocks, which means that incomplete blocks need to be completed with padding, which has a negative effect on the length of the generated ciphertext and thus on the length of the transferred message.

[0088] However, the CBC mode of operation can be combined in a known manner with the CTS mode ("Ciphertext Stealing"), whereby a ciphertext length equal to the plaintext length is achieved even when using the CBC mode of operation. The CTS mode uses a ciphertext length longer than the block size of the block cipher E used, i.e. L E It is only applicable to plaintexts longer than L. E If the ciphertext length is greater than 1, the above encryption method can be combined with the CBC-CTS mode. By using CBC, the above method becomes robust against possibly non-new initialization vectors, and by using CTS, the length of the ciphertext does not exceed the length of the plaintext. Therefore, it is proposed to utilize the CBC-CTS mode of operation as the operation mode OM in the above method.

[0089] In some circumstances, it may be useful to encrypt the transmitted initialization vector, for example to make it harder for an attacker to analyze an intercepted message. C Before sending the message M, we encrypt the first block CB1 again, i.e. C =CB1||CT OM || Instead of AD, message M CC =CCB1||CT OM It is proposed to send ||AD, where CCB1:=E RAW K_IV (CB1) is a bit length L that is known to both sender and receiver. E represents the secret symmetric key K_IV of the message M CC '=CCB1'||CT OM After receiving '||AD', in the first step, the first block CCB1' is K_IV, i.e. CB1':=D RAW K_IV (CCB1'), and then the message M C ':=CB1'||CT OM '||AD' is decoded as above.

[0090] In the patent application EP 1 233 363 A, a counter-based method is proposed to recognize short messages that have been dropped and then recaptured, and to protect against replay attacks. In particular, it is proposed to use a synchronous counter S.TotCounter or E.TotCounter of fixed bit length, which is incremented by one by the sender (S) and the receiver (E) when sending or receiving each new message M, and to split this counter into two parts of fixed length: a body counter TrunkCounter and a subsequent transfer counter TransCounter, so that S.TotCounter = S.TrunkCounter || S.TransCounter and E.TotCounter = E.TrunkCounter || E.TransCounter, where the bit length of TransCounter is denoted by TransCounter. It is further proposed therein to transfer only the TransCounter part with each message M as M.TransCounter, and to reconstruct the total counter E.TotCounter from E.TrunkCounter and M'.TransCounter at the receiver side according to the method described in the patent application EP 1 233 363 A (see FIG. 9).

[0091] Next, when encrypting a particular portion of message M, including M.TransCounter, in order to save space in the message while obtaining a new initialization vector for each message, a total counter S.TotCounter is used to form the initialization vector, e.g., a pseudo-random initialization vector is generated from S.TotCounter, e.g., a value S.IV:=LA(HASH (K_H)It is conceivable that the sender can derive the initialization vector used for encryption in a secure manner by using S.TransCounter as the initialization vector for encryption by the sender. If the sender sends S.TransCounter as part of message M, i.e., together as M.TransCounter, after receiving the message, the receiver can derive the initialization vector used for encryption as E.IV:=LA(HASH(S.TrunkCounter)) since S.TrunkCounter=E.TrunkCounter is implicit on both sides. (K_H) (E.TrunkCounter||M'.TransCounter)). However, this procedure only works if M.TransCounter is transmitted in the clear. On the other hand, if M.TransCounter should be transmitted encrypted, the traditional approach no longer works, since the recipient cannot read the value of the transmission counter of the message directly, especially before M' is decrypted.

[0092] In this case, the method proposed herein can be used advantageously, since it is thus possible to achieve that the combination of the initialization vector and the first block of plaintext to be encrypted is novel with a high probability, and that M.TransCounter can be transferred as part of the encrypted part of the message M, and still allow the decryption of the ciphertext CT by the sender. For this purpose, S.TransCounter is taken into the first plaintext block PB1 of the message M, which in fact corresponds to the length TranCounter. <L E is always valid, so it should always be possible to do this in a safe way from a known counter part S.TrunkCounter = E.TrunkCounter on both sides, e.g. u := LA(HASH K_H (S.TrunkCounter)), S.Impl which combines with the first plaintext block PB1 containing S.TransCounter to form a unique, specifically novel combination u Finally, according to the proposed method, the message M is generated by S.Impl uThe total counter S.TotalCounter = S.TrunkCounter || is then encrypted with the symmetric key K. Then the novelty of the total counter S.TotalCounter = S.TrunkCounter || is determined by the value S.Impl u and the first plaintext block PB1 containing the counter portion S.TransCounter are guaranteed to be unique, i.e., new, with a very high probability.

Claims

1. Using the symmetric key K, E In a method for encrypting a plaintext by a block cipher E of A fingerprint function (FP) that satisfies these two requirements u ) is used, and the two requests are From two unequal bit sequences (BF1 ≠ BF2), the fingerprint function (FP u ) results in inequality (FP u (BF1) ≠ FP u (BF2)), and The fingerprint function (FP u ) with the inverse fingerprint function (FP u -1 ) exists, so that FP u -1 (FP u (BF)∥BF[u+1..L(BF)]) = BF[1..u], Here, u and L E are not necessarily the same, and a general cipher EGen can be written as u 1 , and the remaining plaintext, selected or all bits FPInput, are applied to the concatenation of the ciphertext CB 1 The first block of u (PB u 1 ||FPInput) EGen encryption, i.e., CB 1 := EGen(FP u (PB u 1 ||FPInput)) and the plaintext CB thus generated 1 The encryption of the first u bits of the plaintext is an initialization vector IV:=CB for encrypting part or all of the remaining plaintext with a block cipher E. 1 , so that any mode of operation that requires an initialization vector (IV) can be utilized. A method comprising:

2. Fingerprint function FP u , the fingerprint function FP Tag_u,Scramble_u (BF):=Scramble u (BF[1..u]) @Tag u (BF[u+1..L(BF)]) is used, where Tag u is a function that computes a unique value of length u with sufficiently high probability for the intended application for any length bit sequence BF, where Scramble u is a reversible function that maps the bit sequence (BF) of length u to a bit sequence (BF) of length u, and @ represents the bitwise XOR combination of two bit sequences (BF) of the same length. Characterized in that The method of claim 1.

3. The function Tag U A cryptographic hash function is utilized, and the hash value of the cryptographic hash function is adapted to the length u in a secure manner. Characterized in that The method of claim 2.

4. The function Tag u has the property of being non-reversible and / or is collision resistant in at least one respect Characterized in that The method according to claim 2 or 3.

5. The function Tag u , a keyless or key-dependent cryptographic hash function HASH (K_H) is used Characterized in that The method according to any one of claims 2 to 4.

6. P.B. u 1 , P.T. OM 1 , P.T. OM 2 , AD, P = P.B. u 1 | | PT OM 1 | | PT OM 2 | | AD encryption M C are two explicitly not included bit sequences ImplAD and Impl u Using a general equal-length cipher EGen and a block cipher E, E FP,EGen,OM,OM-NB K (PB u 1 , P.T. OM 1 , P.T. OM 2 ,AD,ImplAD,Impl u ): = C.B. u 1 ||E OM K (OM-NB (CB u 1 ), P.T. OM 1 | | PT OM 2 ) and Here, C.B. u 1 := EGen(FP u (PB u 1 | | PT OM 2 ||AD||ImplAD) @Impl u ) and C.B. u 1 ', C.T. OM A ciphertext message M consisting of ', AD' C '=CB u 1 '||CT OM Decoding M of '||AD' P ' are the two explicitly not included bit sequences ImplAD' and ImplAD' that do not belong to the message. u ', which is defined as follows: D FP,DGen,OM,OM-NB K (C.B. u 1 ', C.T. OM ', A.D.', L PT1 ,ImplAD',Impl u '):= FP u -1 ((DGen(CB u 1 ') @Impl u ') | | PT OM ' [L PT1 +1. . L(PT OM ')] | | AD | | ImplAD') | | PT OM ' and Here, P.T. OM ':=D OM K (OM-NB (CB u 1 '), C.T. OM 6. The method according to claim 1, wherein the hydroxyl group is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3

7. In the encryption method, the fingerprint function FP u , the fingerprint function FP u HASH(K_H),ID or FP HASH(K_H),E-K_S One of the following is used: Characterized in that The method according to any one of claims 1 to 6.

8. In the encryption method, a common encryption code EGen is a symmetric L E The block size L using the bit length key K E = E-Raw encryption of the block cipher E of u, that is, E RAW K is used Characterized in that The method according to any one of claims 1 to 7.

9. P.B. 1 , P.T. OM 1 , P.T. OM 2 , AD, and L(PB 1 ) = L E A plaintext message M P = P.B. 1 | | PT OM 1 | | PT OM 2 | | AD encryption M C are two explicitly not included bit sequences ImplAD and Impl u Dependent on the block size L E Using a block cipher with u, E FP,E-Raw,OM,OM-NB K (PB 1 , P.T. OM 1 , P.T. OM 2 ,AD,ImplAD,Impl u ): = C.B. 1 ||E OM K (OM-NB (CB 1 ), P.T. OM 1 | | PT OM 2 ) and Here, C.B. 1 :=E RAW K (FP (PB 1 | | PT OM 2 ||AD||ImplAD) @Impl u ) and C.B. 1 ', C.T. OM ', AD', L(CB 1 ') = L E A ciphertext message M C '=CB 1 '||CT OM Decoding M of '||AD' P ' is L PT1 and two explicitly not included bit sequences ImplAD′ and ImplAD′ that do not belong to the message. u ' and depends on the block size L E = u's block cipher is defined as follows: D FP,D-Raw,OM,OM-NB K (C.B. 1 ', C.T. OM ', A.D.', L PT1 ,ImplAD',Impl u '):= FP -1 ((D RAW K (C.B. 1 ') @Impl u ') | | PT OM ' [L PT1 +1. . L(PT OM ')] | | AD | | ImplAD') | | PT OM ' and Here, P.T. OM ':=D OM K (OM-NB (CB u 1 '), C.T. OM ') Characterized in that The method according to any one of claims 6 to 8.

10. The CBC mode of operation is used as the OM operation mode, and padding of blocks outside the first block is omitted, and instead the CTS mode of operation is applied in combination with the CBC mode of operation. Characterized in that 10. The method according to claim 8 or 9.

11. L (CB 1 ) = L E , the message M C Before transmitting the first block CB 1 is encrypted again Characterized in that The method according to any one of claims 1 to 10.

12. Using the symmetric key K, E In a method for encrypting a plaintext by a block cipher E of Fingerprint Function (FP u ) as the fingerprint function FP Tag_u,Scramble_u (BF):=Scramble u (BF[1..u]) @Tag u (BF[u+1..L(BF)]) is used, where Tag u is a function that computes a unique value of length u with sufficiently high probability for the intended application for any length bit sequence BF, where Scramble u is a reversible function that maps the bit sequence (BF) of length u to a bit sequence (BF) of length u, and @ represents the bitwise XOR combination of two bit sequences (BF) of the same length; Fingerprint function FP Tag_u,Scramble_u The Tag u To guarantee the novelty of the bit sequence involved in the function, a secure key-dependent hash function HASH is used for each new message. K_H is the fingerprint function FP u K_H Tags u K_H is used as the basis of the function, and the additional encryption of the first u bits of the plaintext by EGen is omitted, and instead the first u bits CB u 1 FP as encryption u K_H The fingerprint is used directly A method comprising:

13. The format of the plaintext PT is the first plaintext block PB 1 is formed to contain information with maximum possible redundancy that is as predictable as possible, in particular following strong consistency rules, the observance of said consistency rules being checked by the recipient after decoding the message, and in case of a violation of said consistency rules an exception process is initiated. Characterized in that The method according to any one of claims 1 to 12.

14. Function Scramble u As the inverse function, the identity function or the isometric encryption function is used, and in the case of encryption, the decryption function that matches the encryption is used as the inverse function. Characterized in that The method according to any one of claims 1 to 13.

15. Block size L E = u's block ciphers E and L E The symmetric key K_S of 128 bits length is u Then, E-Raw encryption by K_S, i.e., E RAW K_S is used Characterized in that The method of claim 14.

16. The length of the initialization vector IV depends on the selected operating mode and / or CB 1 Depending on the length of Characterized in that 16. The method according to any one of claims 14 or 15.

17. The encryption is used for a plaintext of at least (u+1) bits length. Characterized in that The method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Encrypting method and decrypting method

    JP2009175544A

  • AUTOMOBILE NONCE - ANTI-ABUSE AUTHENTICATED ENCRYPTION

    DE102019113026A1

  • Counter-based method for detecting lost and replayed messages

    DE102021001095A1

  • Construction and uses of variable-input-length tweakable ciphers

    US20150349950A1

  • Verification of mac code without disclosure

    WO2009013420A1