WO2008034998A1 - Improvement of the resistance to cryptanalytic attacks of a hash function - Google Patents

Improvement of the resistance to cryptanalytic attacks of a hash function Download PDF

Info

Publication number
WO2008034998A1
WO2008034998A1 PCT/FR2007/051943 FR2007051943W WO2008034998A1 WO 2008034998 A1 WO2008034998 A1 WO 2008034998A1 FR 2007051943 W FR2007051943 W FR 2007051943W WO 2008034998 A1 WO2008034998 A1 WO 2008034998A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
data
pseudo
length
random generation
Prior art date
Application number
PCT/FR2007/051943
Other languages
French (fr)
Inventor
Olivier Billet
Matthew Robshaw
Original Assignee
France Telecom
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by France Telecom filed Critical France Telecom
Publication of WO2008034998A1 publication Critical patent/WO2008034998A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • H04L9/0662Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher with particular pseudorandom sequence generator
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Definitions

  • the present invention relates to the field of computing and in particular to improving the resistance to cryptanalytical attacks of a condensation function (also known as “compression” or “hashing”). More particularly, the invention makes it possible to improve the security in the signature of the electronic messages.
  • Hash functions are currently widely used in cryptography. Indeed, they generate, from a message of arbitrary length input, a message of determined length output. They thus facilitate the creation of electronic signatures that guarantee the integrity and authenticity of the information. They serve, for example, to produce electronic certificates, and intervene in many authentication protocols.
  • the hash functions must be able to withstand different attacks. They must be able to withstand, for example, collisions. Collisions consist in obtaining, from different messages, the same result at the exit of the function. But for a hash function ensuring a good level of security, it is very difficult to find such messages in a reasonable time.
  • X. Wang and H. Yu demonstrated in their articles "How to Break MD5 and Other Hash Functions" in May 2005 and “Finding Collisions in the FuIl SHA-I" in August 2005, that by choosing messages with a structure particular, it is possible to build collisions in a reasonable time. This weakens the confidence that users place in these functions. Indeed, if a hash function does not survive collisions, there are doubts about its ability to guarantee other properties. These other properties are, for example, that of being one-way or that of being resistant to a second antecedent.
  • a pre-processing step modifies the structure of the messages before they enter the hash function.
  • the preprocessing step consists, in particular, in a simple duplication of all or part of the message. This operation could easily be bypassed by cryptanalysts, in order to create new collisions.
  • the present invention makes it possible to mitigate or at least reduce all or some of the aforementioned drawbacks in that during a method of transforming a first data message of any length into a third data message of determined length, a step pseudo-randomly generates a second data message from the first message, said second message being compressed into a third message.
  • the stage of Pseudo-random generation is implemented in a hash device.
  • the pseudo-random generation step unpredictably modifies the structure of the first message. It will therefore be more difficult for an attacker to impose a particular structure on the second message. This improves the cryptanalytical attack resistance of the hash function used during the compression step.
  • the method which is the subject of the invention has the additional characteristics taken separately or in combination, set out below:
  • the pseudo-random generation step makes it possible to generate a second data message of greater length than the first message.
  • the pseudo-random generation step uses a stream cipher algorithm. This algorithm generates messages. These messages, for an attacker, are indistinguishable from random messages. It is therefore very difficult for this attacker to determine a first message so that the second message has the desired structure. Moreover, it is very difficult to go back to the first message starting from the second. Finally, the use of such an algorithm makes it possible to adapt the length of the messages to the hash function used.
  • the pseudo-random generation step of the second data message is done from a string variable.
  • a device for transforming a first message comprises:
  • a device for pseudo-random generation of a second data message from the first message a hash device of the second message for generating a third data message of determined length, the pseudo-random generation device being implemented in the hash device.
  • the device that is the subject of the invention has the additional characteristics taken separately or in combination, set out below:
  • the pseudo-random generation device makes it possible to generate a second message of greater length than the first message.
  • the pseudo-random generation device uses a stream cipher algorithm.
  • a method of signing a first data message comprises:
  • a pseudo-random generation step of a second data message from the first data message a step of compressing said second message into a third data message; a cryptographic step of said third message to generate a fourth message;
  • a fourth object of the invention relates to a device for signing a first data message for implementing the method according to the third subject of the invention.
  • a computer program downloadable from a communication network and / or stored on a computer readable medium and / or executable by a microprocessor comprises instructions for performing the steps of the method according to the first object of the invention.
  • FIG. 1 a device for processing a data message according to a first embodiment of the invention
  • - In Fig.2 a device for processing a data message according to a second embodiment of the invention
  • the invention is described below in a particular application for the signature of electronic messages. However, this invention also applies to any system using a hash function.
  • FIG. 1 shows a device 1 for transforming a first message M according to a first embodiment of the invention.
  • This transformation device 1 makes it possible, from a first message M of data, of any length, to generate a third message H of determined length h.
  • the message M is here a digital data message, alternatively the data can be of any type.
  • the transformation device 1 comprises a pseudo-random generating device 5 of a second message N and a hashing device 4 for generating a third message H of a predetermined length. It will be noted that N can also be written W (M) where W is the function transforming the message M into a message N.
  • the generation device 5 is intended to form a pseudo-random data message N to from a message M of any length.
  • This device constitutes a pre-treatment or "pre-whitening" for the hash device 4.
  • Pre-whitening is an operation that makes the structure of a message unpredictable.
  • the generating device 5 thus comprises forming means 2, calculation means 13 and concatenation means 14.
  • the forming means 2 are intended to form a sequence Ml,..., Mi,..., Mt of t data blocks from a message M.
  • Each block is of a length of K bits, K being for example, of the order of 256 bits.
  • This can be typically done by adding additional elements ⁇ M to the message M to form a completed message M + ⁇ M.
  • the length of the completed message is then a multiple of that of a block Mi.
  • the additional elements ⁇ M may comprise information relating to the original message M, such as the initial length of this message M.
  • These training means 2 comprise and padding means 11 and padding means 12.
  • the stuffing means 11 are intended to stuff the message M by the additional elements ⁇ M.
  • the subdivision means 12 are intended to subdivide the completed message M + ⁇ M to form the sequence Ml, ... Mi, ... Mt of t blocks of length K bits.
  • Computing means 13 define a pseudo-random sequence, a sequence N1,..., Ni,..., Nt of t data blocks of length b bits from the sequence Ml, ..., Mi, ..., Mt of the first message.
  • These calculation means 13 are, for example, algorithms ensuring from a block Mi the generation of a block Ni. This generation is made so that it is very difficult for an attacker to distinguish the sequence Nl, ... Ni, ... Nt of a pseudo-random sequence.
  • the means 13 are non-invertible, that is to say the knowledge of the sequence N1,..., Ni,..., Nt does not make it easy to find, by these means, a sequence Ml , ..., Mi, ..., Mt corresponding to him.
  • the algorithms also allow an expansion of the length of each block.
  • the length b of a block Ni is thus greater than the length K of a block Mi.
  • the length b is, for example, 512 bits.
  • the calculation means 13 are, for example, flow cipher algorithms or "stream cipher" as the algorithm RC4. These algorithms make it possible to generate a pseudo-random sequence of blocks from a key K of length K bits. This key makes it possible to define the internal state of the means 13.
  • the length of the key is smaller than the size of the internal state of these means. Alternatively, the length of the key is equivalent to the size of the internal state.
  • the means 13 then constitute a simple pseudo-random generator of data blocks.
  • the calculation means 13 With the key CL, the calculation means 13 generate b data bits such that:
  • SC (K) S1 S2 S3 S4 S5 ... Sj with SC corresponding to the sequence S1, .., Sj of bits obtained with the means 13 by the use of the key K of length K bits.
  • the variable j corresponds to the number of clock strokes required to obtain a sequence SC of length b bits.
  • the means 13 of calculation use, here, the sequence Ml, ..., Mi, ..., Mt as t keys of length K bits.
  • the number of bits generated by the means 13 is e.
  • the use of the sequence Ml, ..., Mi, ..., Mt as t keys is not the only possibility. Floating algorithms often have a second entry called the initialization vector. This vector is a fixed number. In a variant, this vector varies. It corresponds, for example, to the sequence Ml, ..., Mi, ..., Mt of t blocks.
  • the key CL used in the calculation means 13 is a combination of the initialization vector and the sequence Ml,..., Mi,..., Mt of the t blocks.
  • block cipher or "block” algorithms These algorithms do not normally make it possible to easily vary the length of the blocks at the output of the calculation means 13. However, by using such algorithms in particular operating modes, such as the OFB or output feedback mode “or” counter “mode, it is possible to achieve the same result as a" stream cipher ".
  • the t * b bits generated by the calculation means 13 are then assembled by the concatenation means 14 to form the pseudo-random data message N.
  • the message N is then processed by the hash device 4.
  • a second padding device 15 stuffs the message N with additional elements ⁇ N in order to complete the message length so that it can be subdivided into blocks of the desired length.
  • Subdivision means 16 are thus intended to subdivide the completed message N + ⁇ N.
  • the means 16 then form the sequence N'1, ..., N'i, ..., N'c of c blocks of length d bits.
  • c and t are equal as well as the lengths b and d. It is not then necessary to complete the length of the message for its processing by the compression means 17. This is the case for example when combining an algorithm RC4, generating a message N multiple of 512 bits, with a function SHA-I hash that uses 512-bit block sequences as input. However, for reasons of cost and simplicity, it is sometimes appropriate to use existing compression devices 4. In this case, the means 15 and 16 are maintained.
  • the compression means 17 are here formed according to the Merkle-Damgard structure. This structure performs the compression in the form of a chain of operations successively performed by a compression function f. Alternatively, it is possible to perform the compression in the form of tree operations.
  • Step i uses two elements, namely a block N'i of length d bits and a string variable Vi-I of length h fixed.
  • the compression function transforms an input of h + d bits into an output of length h bits.
  • the initial string variable VO is dependent on the compression function f used.
  • determination means 18 make it possible to determine the third message H, also denoted by H (W (M)), as a function of the last output Vc.
  • the "pre-whitening" performed by the device 5 makes it possible to substitute the message M with a message N.
  • the "stream cipher" In order for the message N to be generated pseudo-randomly, the "stream cipher" must be strong at the cryptographic level. The stream cipher must therefore respect different conditions.
  • One of these conditions is that the sample of SC (CL) output must remain indistinguishable, for an attacker, from a sample derived from a real random source.
  • Another condition is that the means 13 must not be invertible.
  • the pre-processing device 5 furthermore makes it possible to reinforce the security of the chopper device 4. Even if the hash function is fragile to certain attacks, the calculation means 13 prevent an attacker imposing a particular message structure at the input of the device 4. The transformation device 1 is then generally resistant to the pre-image , the second pre-image or collisions while the hash function may not be. Preprocessing makes it possible to make the hash function cryptographically safer.
  • Fig.2 shows a device 20 for transforming a first data message according to a second embodiment of the invention.
  • transformation device 20 comprises a hashing device 24 in which calculation means 23 are implemented for the pseudo-random generation of a second message N.
  • the hashing device 24 consists, here, of forming means 22, compression means 27, determining means 28.
  • Calculation means 23 are inserted between the forming means 22 and the compression means 27. These means constitute a pre-treatment or "pre-whitening" for the compression means 27. The pseudo-random generating device 21 is therefore reduced here to the calculation means 23.
  • a first message M of any length data is first stuffed by the means 25 and then subdivided into a sequence Ml, ..., Mi ..., Mc of c data blocks of length k.
  • a second message N represented by a sequence N1,... Ni,..., Nc of c blocks of data of length b, is generated pseudo-randomly by the calculation means 23. Note that b is generally greater than c.
  • Fig.3 shows a device 30 for transforming a first data message according to a third embodiment of the invention.
  • This device comprises a hashing device 34 in which calculation means 33 are implemented for the generation of a second message N block sequence N1, ..., Ni, ..., Nc.
  • the pseudo-random generation device 31 is reduced here to the calculation means 33.
  • the means 33 receive as input the sequence N1, ..., Ni, ... Nc. This sequence comes from a first message M stuffed and subdivided by the means 35 and 36 constituting training means 32.
  • the means 33 also receive at each iteration of the compression function a string variable.
  • the block Ni constituting the pseudo-random sequence N1,..., Ni,..., Nc then comes from an operation, associating as input the block Mi with the variable Vi-I.
  • the use of the string variable thus makes it possible to improve the randomness of the sequence N1,..., Ni,..., Nc generated.
  • the "stream cipher” also adapts the size of each block Ni to the hash function used in the compression means 37.
  • Fig.4 shows a method of signing a first message. This method uses the steps of a method of transforming said first message M to generate a message H of determined length.
  • the transformation method thus comprises a pseudo-random generation step A of a second data message N from the first message M.
  • This step modifies in a non-predictable way for a attacking the message structure M. It will therefore be more difficult for an attacker to impose a particular structure on the second message N. This improves the resistance of the hash device.
  • step A generates a second message N of data longer than the first message. This increases the complexity for an attacker to impose a particular structure on the second message.
  • the pseudo-random generation step uses a stream cipher algorithm. This algorithm makes it possible to generate pseudo-random data messages that are difficult to distinguish for an attacker. In addition, with such an algorithm an attacker can not find the first message M from the knowledge of the second message N.
  • pseudo-random generation step A is implemented in a hash device.
  • the transformation method also comprises a step B of compressing the second message N into a third message H constituting the fingerprint of the message M.
  • the signature method further comprises steps A and B, a cryptography step C to generate a fourth message S or signature. This step is performed, for example, using a private key. It guarantees the authenticity and integrity of the third message M.
  • the fourth message S is then assembled with the first message M to form the M + S signed message.
  • the method of transforming a first data message and the method of signing a first data message are implemented by a computer program downloadable from a communication network and / or stored on a computer readable medium and / or executable by a microprocessor. This computer program thus comprises instructions for executing the steps of said methods. Alternatively, the different methods are implemented logically.

Abstract

Improvement of the resistance to cryptanalytic attacks of a hash function. The invention relates to a method of transforming a first data message (M) of any length into a third data message (H) of determined length comprising: - a step of pseudo-randomly generating (A) a second data message (N) on the basis of the first message (M); - a step (B) of compressing said second message (N) into a third data message (H).

Description

Amélioration de la résistance aux attaques cryptanalytiques d'une fonction de hachage . Improved resistance to cryptanalytic attacks of a hash function.
La présente invention se rapporte au domaine de l'informatique et notamment à l'amélioration de la résistance aux attaques cryptanalytiques d'une fonction de condensation (dite aussi de "compression", ou encore de "hachage") . Plus particulièrement, l'invention permet d'améliorer la sécurité dans la signature des messages électroniques .The present invention relates to the field of computing and in particular to improving the resistance to cryptanalytical attacks of a condensation function (also known as "compression" or "hashing"). More particularly, the invention makes it possible to improve the security in the signature of the electronic messages.
Les fonctions de hachage sont actuellement très utilisées en cryptographie. En effet, elles génèrent, à partir d'un message de longueur arbitraire en entrée, un message de longueur déterminée en sortie. Elles facilitent, ainsi, la création de signatures électroniques qui permettent de garantir 1 ' intégrité et l'authenticité des informations. Elles servent, par exemple, à produire des certificats électroniques, et interviennent dans de nombreux protocoles d' authentification .Hash functions are currently widely used in cryptography. Indeed, they generate, from a message of arbitrary length input, a message of determined length output. They thus facilitate the creation of electronic signatures that guarantee the integrity and authenticity of the information. They serve, for example, to produce electronic certificates, and intervene in many authentication protocols.
Pour garantir un haut niveau de sécurité, les fonctions de hachage doivent pouvoir résister à différentes attaques. Elles doivent pouvoir résister, par exemple, aux collisions. Les collisions consistent à obtenir, à partir de messages différents, le même résultat à la sortie de la fonction. Or pour une fonction de hachage garantissant un bon niveau de sécurité, il est très difficile de trouver de tels messages en un temps raisonnable . Cependant X. Wang et H. Yu ont démontré dans leurs articles "How to Break MD5 and Other Hash Functions" en mai 2005 et "Finding Collisions in the FuIl SHA-I" en août 2005, qu'en choisissant des messages avec une structure particulière, il est possible de construire des collisions en un temps raisonnable. Ceci fragilise la confiance que placent les utilisateurs dans ces fonctions. En effet, si une fonction de hachage ne résiste pas aux collisions, il y a des doutes sur sa capacité à garantir d'autres propriétés. Ces autres propriétés sont, par exemple, celle d'être à sens unique ou celle d'être résistante à un deuxième antécédent.To ensure a high level of security, the hash functions must be able to withstand different attacks. They must be able to withstand, for example, collisions. Collisions consist in obtaining, from different messages, the same result at the exit of the function. But for a hash function ensuring a good level of security, it is very difficult to find such messages in a reasonable time. However X. Wang and H. Yu demonstrated in their articles "How to Break MD5 and Other Hash Functions" in May 2005 and "Finding Collisions in the FuIl SHA-I" in August 2005, that by choosing messages with a structure particular, it is possible to build collisions in a reasonable time. This weakens the confidence that users place in these functions. Indeed, if a hash function does not survive collisions, there are doubts about its ability to guarantee other properties. These other properties are, for example, that of being one-way or that of being resistant to a second antecedent.
Szydlo et Yin ont alors proposé dans le document "Collision résistant Usage of SHA-I via Message Pre- Processing", une étape de pré-traitement. Cette étape modifie la structure des messages avant leur entrée dans la fonction de hachage. L'étape de prétraitement consiste, notamment, en une simple duplication de tout ou partie du message. Cette opération pourrait être facilement contournable par des cryptoanalystes, afin de créer de nouveau des collisions .Szydlo and Yin then proposed in the document "Resistant Collision Usage of SHA-I via Message Pre-Processing", a pre-processing step. This step modifies the structure of the messages before they enter the hash function. The preprocessing step consists, in particular, in a simple duplication of all or part of the message. This operation could easily be bypassed by cryptanalysts, in order to create new collisions.
La présente invention permet de palier ou pour le moins de réduire tout ou partie des inconvénients précités en ce qu'au cours d'un procédé de transformation d'un premier message de données de longueur quelconque en un troisième message de données de longueur déterminée, une étape génère pseudo-aléatoirement un deuxième message de données à partir du premier message, ledit deuxième message étant comprimé en un troisième message. L'étape de génération pseudo-aléatoire est implémentée dans un dispositif de hachage .The present invention makes it possible to mitigate or at least reduce all or some of the aforementioned drawbacks in that during a method of transforming a first data message of any length into a third data message of determined length, a step pseudo-randomly generates a second data message from the first message, said second message being compressed into a third message. The stage of Pseudo-random generation is implemented in a hash device.
Ainsi, l'étape de génération pseudo-aléatoire modifie de manière non prévisible la structure du premier message. Il sera donc plus difficile, pour un attaquant, d'imposer une structure particulière au deuxième message. Ceci améliore la résistance, aux attaques cryptanalytiques, de la fonction de hachage utilisée lors de l'étape de compression.Thus, the pseudo-random generation step unpredictably modifies the structure of the first message. It will therefore be more difficult for an attacker to impose a particular structure on the second message. This improves the cryptanalytical attack resistance of the hash function used during the compression step.
Selon des modes de réalisation préférentiels non limitatifs, le procédé objet de l'invention présente les caractéristiques supplémentaires prises isolément ou en combinaison, énoncées ci-après:According to preferred non-limiting embodiments, the method which is the subject of the invention has the additional characteristics taken separately or in combination, set out below:
L'étape de génération pseudo-aléatoire permet de générer un deuxième message de données de longueur plus grande que le premier message.The pseudo-random generation step makes it possible to generate a second data message of greater length than the first message.
Ainsi, l'obtention d'une structure voulue par l'attaquant pour le deuxième message, est plus difficile à obtenir.Thus, obtaining a structure desired by the attacker for the second message is more difficult to obtain.
L'étape de génération pseudo-aléatoire utilise un algorithme de chiffrement par flot. Cet algorithme permet de générer des messages. Ces messages, pour un attaquant, sont indistinguables de messages aléatoires. Il est donc très difficile, pour cet attaquant, de déterminer un premier message de telle sorte que le second message possède la structure voulue. De plus, il est très difficile de remonter au premier message en partant du second. Enfin, l'utilisation d'un tel algorithme permet d'adapter la longueur des messages à la fonction de hachage utilisée. L'étape de génération pseudo-aléatoire du deuxième message de données se fait à partir d'une variable de chaîne.The pseudo-random generation step uses a stream cipher algorithm. This algorithm generates messages. These messages, for an attacker, are indistinguishable from random messages. It is therefore very difficult for this attacker to determine a first message so that the second message has the desired structure. Moreover, it is very difficult to go back to the first message starting from the second. Finally, the use of such an algorithm makes it possible to adapt the length of the messages to the hash function used. The pseudo-random generation step of the second data message is done from a string variable.
L'utilisation de la variable de chaîne permet ainsi d'améliorer le caractère aléatoire du deuxième message généré.The use of the string variable thus makes it possible to improve the randomness of the second message generated.
Selon un deuxième objet de l'invention, un dispositif de transformation d'un premier message comprend:According to a second subject of the invention, a device for transforming a first message comprises:
- un dispositif de génération pseudo-aléatoire d'un deuxième message de données à partir du premier message; un dispositif de hachage du deuxième message destiné à générer un troisième message de données de longueur déterminée, le dispositif de génération pseudo-aléatoire étant implémenté dans le dispositif de hachage.a device for pseudo-random generation of a second data message from the first message; a hash device of the second message for generating a third data message of determined length, the pseudo-random generation device being implemented in the hash device.
Selon des modes de réalisation préférentiels non limitatifs, le dispositif objet de l'invention présente les caractéristiques supplémentaires prises isolément ou en combinaison, énoncées ci-après:According to preferred non-limiting embodiments, the device that is the subject of the invention has the additional characteristics taken separately or in combination, set out below:
Le dispositif de génération pseudo-aléatoire permet de générer un deuxième message de longueur plus grande que le premier message.The pseudo-random generation device makes it possible to generate a second message of greater length than the first message.
Le dispositif de génération pseudo-aléatoire utilise un algorithme de chiffrement par flot.The pseudo-random generation device uses a stream cipher algorithm.
La génération pseudo-aléatoire du deuxième message se fait à partir d'une variable de chaîne. Selon un troisième objet de l'invention, un procédé de signature d'un premier message de données comprend:The pseudo-random generation of the second message is done from a string variable. According to a third subject of the invention, a method of signing a first data message comprises:
- une étape de génération pseudo-aléatoire d'un deuxième message de données à partir du premier message de données; une étape de compression dudit deuxième message en un troisième message de données; une étape de cryptographie dudit troisième message pour générer un quatrième message;a pseudo-random generation step of a second data message from the first data message; a step of compressing said second message into a third data message; a cryptographic step of said third message to generate a fourth message;
- une étape d'assemblage dudit quatrième message avec le premier message de données.a step of assembling said fourth message with the first data message.
Un quatrième objet de l'invention concerne un dispositif de signature d'un premier message de données pour la mise en œuvre du procédé selon le troisième objet de l'invention.A fourth object of the invention relates to a device for signing a first data message for implementing the method according to the third subject of the invention.
Selon un cinquième objet de l'invention, un programme d'ordinateur téléchargeable depuis un réseau de communication et/ou stocké sur un support lisible par ordinateur et/ou exécutable par un microprocesseur, comprend des instructions pour l'exécution des étapes du procédé selon le premier objet de l'invention.According to a fifth subject of the invention, a computer program downloadable from a communication network and / or stored on a computer readable medium and / or executable by a microprocessor, comprises instructions for performing the steps of the method according to the first object of the invention.
L'invention sera mieux comprise et d'autres particularités et avantages apparaîtront à la lecture de la description, faite à titre d'exemple, cette description faisant références aux dessins annexés représentant :The invention will be better understood and other features and advantages will appear on reading the description, given by way of example, this description with reference to the appended drawings showing:
- A la Fig.l, un dispositif de traitement d'un message de données selon un premier mode de réalisation l'invention; - A la Fig.2, un dispositif de traitement d'un message de données selon un second mode de réalisation de l'invention;In FIG. 1, a device for processing a data message according to a first embodiment of the invention; - In Fig.2, a device for processing a data message according to a second embodiment of the invention;
- A la Fig.3, un dispositif de traitement d'un message de données selon un troisième mode de réalisation de l'invention;- In Fig.3, a device for processing a data message according to a third embodiment of the invention;
- A la Fig.4, un procédé de traitement d'un message de données ainsi qu'un procédé de signature d'un message de données selon l'invention.- In Fig.4, a method of processing a data message and a method of signing a data message according to the invention.
L'invention est décrite ci-après dans une application particulière à la signature des messages électroniques. Cependant, cette invention s'applique également à tout système utilisant une fonction de hachage .The invention is described below in a particular application for the signature of electronic messages. However, this invention also applies to any system using a hash function.
La Fig.l présente un dispositif de transformation 1 d'un premier message M selon un premier mode de réalisation de l'invention.FIG. 1 shows a device 1 for transforming a first message M according to a first embodiment of the invention.
Ce dispositif de transformation 1 permet à partir d'un premier message M de données, de longueur quelconque, de générer un troisième message H de longueur déterminée h. Le message M est ici un message de données numériques, en variante les données peuvent être de tout type.This transformation device 1 makes it possible, from a first message M of data, of any length, to generate a third message H of determined length h. The message M is here a digital data message, alternatively the data can be of any type.
Le dispositif de transformation 1 comprend un dispositif de génération pseudo-aléatoire 5 d'un second message N et un dispositif de hachage 4 pour la génération d'un troisième message H de longueur déterminée. On notera que N peut également s'écrire W(M) où W est la fonction transformant le message M en un message N.The transformation device 1 comprises a pseudo-random generating device 5 of a second message N and a hashing device 4 for generating a third message H of a predetermined length. It will be noted that N can also be written W (M) where W is the function transforming the message M into a message N.
Le dispositif de génération 5 est destiné à former un message N de données pseudo-aléatoire à partir d'un message M de longueur quelconque. Ce dispositif constitue un pré-traitement ou "pre- whitening" pour le dispositif de hachage 4. Le pre- whitening est une opération permettant de rendre la structure d'un message non prévisible.The generation device 5 is intended to form a pseudo-random data message N to from a message M of any length. This device constitutes a pre-treatment or "pre-whitening" for the hash device 4. Pre-whitening is an operation that makes the structure of a message unpredictable.
Par structure, il faut comprendre l'ensemble des propriétés qui régissent la valeur des bits de données entre eux.By structure, we must understand the set of properties that govern the value of the data bits between them.
Le dispositif de génération 5 comprend ainsi des moyens de formation 2, des moyens de calcul 13 et des moyens de concaténation 14.The generating device 5 thus comprises forming means 2, calculation means 13 and concatenation means 14.
Les moyens de formation 2 sont destinés à former une séquence Ml,..., Mi,..., Mt de t blocs de données à partir d'un message M. Chaque bloc est d'une longueur de K bits, K étant, par exemple, de l'ordre de 256 bits. Ceci peut être typiquement réalisé, en ajoutant des éléments supplémentaires ΔM au message M pour former un message complété M+ΔM. La longueur du message complété est alors un multiple de celle d'un bloc Mi. Avantageusement, les éléments supplémentaires ΔM peuvent comporter des informations relatives au message M d'origine, comme la longueur initiale de ce message M. Ces moyens 2 de formation comportent ainsi des moyens de bourrage 11 ou "padding means" et des moyens de subdivision 12. Les moyens de bourrage 11 sont destinés à bourrer le message M par les éléments supplémentaires ΔM. Ceci permet de compléter la longueur du message pour pouvoir le subdiviser en blocs Mi de longueur voulue. Les moyens de subdivision 12 sont destinés à subdiviser le message complété M+ΔM pour former la séquence Ml, ...Mi, ...Mt de t blocs de longueur K bits.The forming means 2 are intended to form a sequence Ml,..., Mi,..., Mt of t data blocks from a message M. Each block is of a length of K bits, K being for example, of the order of 256 bits. This can be typically done by adding additional elements ΔM to the message M to form a completed message M + ΔM. The length of the completed message is then a multiple of that of a block Mi. Advantageously, the additional elements ΔM may comprise information relating to the original message M, such as the initial length of this message M. These training means 2 comprise and padding means 11 and padding means 12. The stuffing means 11 are intended to stuff the message M by the additional elements ΔM. This makes it possible to complete the length of the message so that it can be subdivided into blocks Mi of desired length. The subdivision means 12 are intended to subdivide the completed message M + ΔM to form the sequence Ml, ... Mi, ... Mt of t blocks of length K bits.
Des moyens de calcul 13 définissent une séquence pseudo-aléatoire une séquence Nl,..., Ni,..., Nt de t blocs de données de longueur b bits à partir de la séquence Ml,..., Mi,..., Mt du premier message. Ces moyens de calcul 13 sont, par exemple, des algorithmes assurant à partir d'un bloc Mi la génération d'un bloc Ni. Cette génération se fait de manière à ce qu'il soit très difficile pour un attaquant de distinguer la séquence Nl, ...Ni, ...Nt d'une séquence pseudo-aléatoire. En outre, les moyens 13 sont non inversibles, c'est-à-dire que la connaissance de la séquence Nl,..., Ni,..., Nt ne permet pas aisément de retrouver, par ces moyens, une séquence Ml,..., Mi,..., Mt lui correspondant. Ces caractéristiques permettent, ainsi, d'éviter qu'un attaquant ne puisse imposer une structure choisie sur le second message N de données entrant dans le dispositif de compression 4. On notera que les algorithmes permettent également une expansion de la longueur de chaque bloc. La longueur b d'un bloc Ni est ainsi supérieure à la longueur K d'un bloc Mi. La longueur b est, par exemple, de 512 bits. Les moyens de calcul 13 sont, par exemple, des algorithmes de chiffrement par flot ou "stream cipher" comme l'algorithme RC4. Ces algorithmes permettent de générer une séquence pseudo-aléatoire de blocs à partir d'une clé CL de longueur K bits. Cette clé permet de définir l'état interne des moyens 13. La longueur de la clé est inférieure à la taille de l'état interne de ces moyens. En variante, la longueur de la clé équivaut à la taille de l'état interne. Les moyens 13 constituent alors un simple générateur pseudo-aléatoire de blocs de données.Computing means 13 define a pseudo-random sequence, a sequence N1,..., Ni,..., Nt of t data blocks of length b bits from the sequence Ml, ..., Mi, ..., Mt of the first message. These calculation means 13 are, for example, algorithms ensuring from a block Mi the generation of a block Ni. This generation is made so that it is very difficult for an attacker to distinguish the sequence Nl, ... Ni, ... Nt of a pseudo-random sequence. In addition, the means 13 are non-invertible, that is to say the knowledge of the sequence N1,..., Ni,..., Nt does not make it easy to find, by these means, a sequence Ml , ..., Mi, ..., Mt corresponding to him. These characteristics thus make it possible to prevent an attacker from imposing a chosen structure on the second message N of data entering the compression device 4. It will be noted that the algorithms also allow an expansion of the length of each block. The length b of a block Ni is thus greater than the length K of a block Mi. The length b is, for example, 512 bits. The calculation means 13 are, for example, flow cipher algorithms or "stream cipher" as the algorithm RC4. These algorithms make it possible to generate a pseudo-random sequence of blocks from a key K of length K bits. This key makes it possible to define the internal state of the means 13. The length of the key is smaller than the size of the internal state of these means. Alternatively, the length of the key is equivalent to the size of the internal state. The means 13 then constitute a simple pseudo-random generator of data blocks.
Grâce à la clé CL, les moyens 13 de calcul génèrent b bits de données tel que :With the key CL, the calculation means 13 generate b data bits such that:
SC(K)=Sl S2 S3 S4 S5 ... Sj avec SC correspondant à la séquence Sl, .. , Sj de bits obtenue avec les moyens 13 par l'utilisation de la clé CL de longueur K bits. La variable j correspond au nombre de coups d'horloge nécessaires pour obtenir une suite SC de longueur b bits. Les moyens 13 de calcul utilisent, ici, la séquence Ml,..., Mi,..., Mt comme t clés de longueur K bits. Ainsi, il est possible de générer la séquence Nl,..., Ni,..., Nt tel que: SC(Ml)=Sl, 1 Sl, 2 Sl, 3 ... Sl, j = Nl SC(M2)=S2,1 S2,2 S2,3 ... S2,j = N2SC (K) = S1 S2 S3 S4 S5 ... Sj with SC corresponding to the sequence S1, .., Sj of bits obtained with the means 13 by the use of the key K of length K bits. The variable j corresponds to the number of clock strokes required to obtain a sequence SC of length b bits. The means 13 of calculation use, here, the sequence Ml, ..., Mi, ..., Mt as t keys of length K bits. Thus, it is possible to generate the sequence N1,..., Ni,..., Nt such that: SC (M1) = S1, S1, S1, S1, S1, j = N1 SC (M2 ) = S2,1 S2,2 S2,3 ... S2, j = N2
SC(Mt)=St, 1 St, 2 St, 3 ... St, j = NtSC (Mt) = St, 1 St, 2 St, 3 ... St, j = Nt
On notera qu'à chaque coup d'horloge, le nombre de bits générés par les moyens 13 est de e. Lorsque e=l, on a donc j=b. En variante, à chaque coup d'horloge le nombre de bits générés par les moyens 13 est par exemple e=8, e=32 ou e=64, ce qui correspond ainsi respectivement à j=b/8, j=b/32 ou j=b/64.Note that at each clock stroke, the number of bits generated by the means 13 is e. When e = 1, we have j = b. In a variant, at each clock stroke the number of bits generated by the means 13 is for example e = 8, e = 32 or e = 64, which corresponds respectively to j = b / 8, j = b / 32 or j = b / 64.
L'utilisation de la séquence Ml,..., Mi,..., Mt comme t clés n'est pas la seule possibilité. Les algorithmes de chiffrement par flot ont souvent une deuxième entrée appelée vecteur d'initialisation. Ce vecteur est un nombre fixé. En variante, ce vecteur varie. Il correspond, par exemple, à la séquence Ml,..., Mi,..., Mt de t blocs. Ainsi la clé CL utilisée dans les moyens 13 de calcul est une combinaison du vecteur d'initialisation et de la séquence Ml,..., Mi,..., Mt des t blocs.The use of the sequence Ml, ..., Mi, ..., Mt as t keys is not the only possibility. Floating algorithms often have a second entry called the initialization vector. This vector is a fixed number. In a variant, this vector varies. It corresponds, for example, to the sequence Ml, ..., Mi, ..., Mt of t blocks. Thus the key CL used in the calculation means 13 is a combination of the initialization vector and the sequence Ml,..., Mi,..., Mt of the t blocks.
L'utilisation d'algorithmes de chiffrement par flot permet de faire varier aisément la longueur des blocs en sortie des moyens 13 de calcul. Pour cela, il suffit d'attendre autant de coups d'horloges que nécessaire. En effet, la longueur de la clé CL est variable. Ceci permet d'adapter le dispositif 5 de génération au dispositif 4 de hachage utilisé.The use of stream encryption algorithms makes it easy to vary the length of the blocks at the output of the calculation means 13. For this, just wait for as many clocks as necessary. Indeed, the length of the key CL is variable. This makes it possible to adapt the generating device 5 to the hash device 4 used.
En variante, il est possible d'utiliser des algorithmes de chiffrement par blocs ou "bloc cipher" . Ces algorithmes ne permettent, normalement, pas de faire varier facilement la longueur des blocs en sortie des moyens 13 de calcul. Cependant en utilisant de tels algorithmes dans des modes de fonctionnement particuliers, tels que 1 ' OFB ou "Output-feedback mode" ou le mode "counter", il est possible d'arriver au même résultat qu'un "stream cipher" .Alternatively, it is possible to use block cipher or "block" algorithms These algorithms do not normally make it possible to easily vary the length of the blocks at the output of the calculation means 13. However, by using such algorithms in particular operating modes, such as the OFB or output feedback mode "or" counter "mode, it is possible to achieve the same result as a" stream cipher ".
Les t*b bits générés par les moyens 13 de calcul sont ensuite assemblés par les moyens 14 de concaténation pour former le message N de données pseudo-aléatoire .The t * b bits generated by the calculation means 13 are then assembled by the concatenation means 14 to form the pseudo-random data message N.
Le message N est ensuite traité par le dispositif 4 de hachage . Pour cela un second dispositif 15 de "padding" bourre le message N par des éléments supplémentaires ΔN afin de compléter la longueur de message pour pouvoir la subdiviser en blocs de longueur voulue. Des moyens 16 de subdivision sont ainsi destinés à subdiviser le message complété N+ΔN. Les moyens 16 forment alors la séquence N'1,..., N'i,..., N'c de c blocs de longueur d bits.The message N is then processed by the hash device 4. For this purpose a second padding device 15 stuffs the message N with additional elements ΔN in order to complete the message length so that it can be subdivided into blocks of the desired length. Subdivision means 16 are thus intended to subdivide the completed message N + ΔN. The means 16 then form the sequence N'1, ..., N'i, ..., N'c of c blocks of length d bits.
Dans certains cas, c et t sont égaux ainsi que les longueurs b et d. Il n'est pas alors nécessaire de compléter la longueur du message pour son traitement par les moyens de compression 17. C'est le cas par exemple lorsqu'on combine un algorithme RC4, générant un message N multiple de 512 bits, avec une fonction de hachage SHA-I utilisant en entrée des séquences de blocs de 512 bits. Cependant, pour des raisons de coût et de simplicité, il est parfois opportun d'utiliser des dispositifs de compression 4 existants. Dans ce cas, les moyens 15 et 16 sont maintenus. Les moyens de compression 17 sont ici formés selon la structure de Merkle-Damgard. Cette structure réalise la compression sous la forme d'une chaîne d'opérations réalisées successivement par une fonction de compression f . En variante, il est possible de réaliser la compression sous la forme d'opérations réalisées en arbre.In some cases, c and t are equal as well as the lengths b and d. It is not then necessary to complete the length of the message for its processing by the compression means 17. This is the case for example when combining an algorithm RC4, generating a message N multiple of 512 bits, with a function SHA-I hash that uses 512-bit block sequences as input. However, for reasons of cost and simplicity, it is sometimes appropriate to use existing compression devices 4. In this case, the means 15 and 16 are maintained. The compression means 17 are here formed according to the Merkle-Damgard structure. This structure performs the compression in the form of a chain of operations successively performed by a compression function f. Alternatively, it is possible to perform the compression in the form of tree operations.
Dans la structure de Merkle-Damgard, la fonction de compression est répétée de manière itérative. L'étape i utilise deux éléments à savoir un bloc N'i de longueur d bits et une variable de chaîne, Vi-I de longueur h fixée. La sortie de la fonction de compression est la valeur suivante de la variable de chaîne, Vi de longueur h bits, tel que Vi=f (Vi-I , N ' i) . Ainsi la fonction de compression transforme une entrée de h+d bits en une sortie de longueur h bits. A la dernière étape, i=c et la dernière variable de chaîne sortant est Vc, avec Vc = f(...f(V0,N'l),N'2),...N'c) . On notera que la variable de chaîne initiale VO est dépendante de la fonction de compression f utilisée.In the Merkle-Damgard structure, the compression function is repeated iteratively. Step i uses two elements, namely a block N'i of length d bits and a string variable Vi-I of length h fixed. The output of the compression function is the next value of the string variable, Vi of length h bits, such that Vi = f (Vi-I, N 'i). Thus the compression function transforms an input of h + d bits into an output of length h bits. In the last step, i = c and the last outgoing string variable is Vc, with Vc = f (... f (V0, N'l), N'2), ... N'c). Note that the initial string variable VO is dependent on the compression function f used.
Finalement, des moyens 18 de détermination permettent de déterminer le troisième message H, noté également H(W(M)), en fonction de la dernière sortie Vc. Ainsi, H=φ (Vc) où φ est une fonction quelconque qui peut tout simplement être la fonction identité de sorte que H=Vc.Finally, determination means 18 make it possible to determine the third message H, also denoted by H (W (M)), as a function of the last output Vc. Thus, H = φ (Vc) where φ is any function that can simply be the identity function so that H = Vc.
Ainsi, le "pre-whitening" réalisé par le dispositif 5, permet de substituer le message M par un message N. Pour que le message N soit généré pseudo-aléatoirement, il faut que le "stream cipher" soit fort au niveau cryptographique. Le "stream cipher" doit donc respecter différentes conditions. Une de ces conditions, est que l'échantillon de sortie SC(CL) doit rester indiscernable, pour un attaquant, d'un échantillon dérivé d'une vraie source aléatoire. Une autre condition est qu'un attaquant ne doit avoir aucune chance de déterminer, en un temps raisonnable, un couple de clés CLl et CL2, tel que SC (CLl)=SC (CL2) . Une autre condition est que les moyens 13 ne doivent pas être inversibles. Ainsi, la connaissance de la séquence Nl,..., Ni,..., Nt ne permet pas aisément de retrouver une séquence Ml,..., Mi,..., Mt correspondante.Thus, the "pre-whitening" performed by the device 5 makes it possible to substitute the message M with a message N. In order for the message N to be generated pseudo-randomly, the "stream cipher" must be strong at the cryptographic level. The stream cipher must therefore respect different conditions. One of these conditions is that the sample of SC (CL) output must remain indistinguishable, for an attacker, from a sample derived from a real random source. Another condition is that an attacker must have no chance of determining, in a reasonable time, a pair of keys CL1 and CL2, such as SC (CL1) = SC (CL2). Another condition is that the means 13 must not be invertible. Thus, the knowledge of the sequence N1,..., Ni,..., Nt does not easily make it possible to find a sequence Ml,..., Mi,..., Corresponding Mt.
Ainsi, avec un "stream cipher" respectant ces conditions, les attaques sur les fonctions de compression f, sont contrées. En effet, l'attaquant ne peut manipuler aisément la structure du message N car le pré-traitement l'en empêche. Le "pre- whitening" améliore ainsi la résistance du dispositif 4 de hachage .Thus, with a "stream cipher" respecting these conditions, the attacks on the compression functions f are countered. Indeed, the attacker can not easily manipulate the structure of the message N because the pre-treatment prevents it. Pre-whitening thus improves the resistance of the chopper device 4.
Le dispositif 5 de pré-traitement permet, en outre, de renforcer la sécurité du dispositif 4 de hachage. Même si la fonction de hachage est fragile à certaines attaques, les moyens de calcul 13 évitent qu'un attaquant impose uns structure particulière de messages à l'entrée du dispositif 4. Le dispositif 1 de transformation est alors globalement résistant à la pré-image, à la seconde pré-image ou aux collisions alors que la fonction de hachage peut ne pas l'être. Le pré-traitement permet donc de rendre la fonction de hachage cryptographiquement plus sûre.The pre-processing device 5 furthermore makes it possible to reinforce the security of the chopper device 4. Even if the hash function is fragile to certain attacks, the calculation means 13 prevent an attacker imposing a particular message structure at the input of the device 4. The transformation device 1 is then generally resistant to the pre-image , the second pre-image or collisions while the hash function may not be. Preprocessing makes it possible to make the hash function cryptographically safer.
On notera que le mode de réalisation présenté ici permet d'utiliser, sans modifications, un dispositif de hachage utilisant une fonction de hachage existante. Il laisse, en effet, les opérations internes à la fonction de hachage inchangées. La mise en œuvre du dispositif de transformation, avec les dispositifs de hachage existants, est donc très simple.Note that the embodiment presented here allows to use, without modifications, a hash device using an existing hash function. It leaves, indeed, the internal operations to the hash function unchanged. The implementation of the transformation, with the existing hash devices, is therefore very simple.
On notera enfin que les fonctions de compression les plus utilisées sont par exemple SHA-I ou MD5.Finally, note that the most used compression functions are for example SHA-I or MD5.
La Fig.2 présente un dispositif 20 de transformation d'un premier message de données selon un second mode de réalisation de l'invention.Fig.2 shows a device 20 for transforming a first data message according to a second embodiment of the invention.
Ce mode de réalisation se distingue du précédent en ce que le dispositif de transformation 20 comprend un dispositif de hachage 24 dans lequel sont implémentés des moyens de calcul 23 pour la génération pseudo-aléatoire d'un second message N.This embodiment differs from the previous one in that the transformation device 20 comprises a hashing device 24 in which calculation means 23 are implemented for the pseudo-random generation of a second message N.
En effet, le dispositif de hachage 24 se compose, ici, de moyens de formation 22, de moyens de compression 27, des moyens de détermination 28.Indeed, the hashing device 24 consists, here, of forming means 22, compression means 27, determining means 28.
Des moyens 23 de calcul sont insérés entre les moyens 22 de formation et les moyens 27 de compression. Ces moyens constituent un pré-traitement ou "pre-whitening" pour les moyens 27 de compression. Le dispositif de génération pseudo-aléatoire 21, se réduit donc ici aux moyens de calcul 23.Calculation means 23 are inserted between the forming means 22 and the compression means 27. These means constitute a pre-treatment or "pre-whitening" for the compression means 27. The pseudo-random generating device 21 is therefore reduced here to the calculation means 23.
Un premier message M de données de longueur quelconque, est d'abord bourré par les moyens 25 puis subdivisé en une séquence Ml, ..., Mi..., Mc de c blocs de données de longueur k. Un deuxième message N, représenté par une séquence Nl, ...Ni, ..., Nc de c blocs de données de longueur b, est généré pseudo- aléatoirement par les moyens 23 de calcul. On notera que b est généralement supérieur à c.A first message M of any length data is first stuffed by the means 25 and then subdivided into a sequence Ml, ..., Mi ..., Mc of c data blocks of length k. A second message N, represented by a sequence N1,... Ni,..., Nc of c blocks of data of length b, is generated pseudo-randomly by the calculation means 23. Note that b is generally greater than c.
La séquence est utilisée, ensuite, par les moyens 27 de compression, pour constituer en sortie la variable de chaîne Vc. Les moyens 28 de détermination permettent, au final, de déterminer le troisième message H. La Fig.3 présente un dispositif 30 de transformation d'un premier message de données selon un troisième mode de réalisation de l'invention. Ce dispositif comprend un dispositif de hachage 34 dans lequel sont implémentés des moyens de calcul 33 pour la génération d'un second message N séquence en blocs Nl,..., Ni,..., Nc. Le dispositif de génération pseudoaléatoire 31 se réduit, ici, aux moyens 33 de calcul. Dans ce mode de réalisation, les moyens 33 reçoivent en entrée la séquence Nl,..., Ni, ...Nc. Cette séquence provient d'un premier message M bourré et subdivisé par les moyens 35 et 36 constituant des moyens de formation 32. Les moyens 33 reçoivent également à chaque itération de la fonction de compression une variable de chaîne.The sequence is then used by the compression means 27 to output the channel variable Vc. The means of determination finally make it possible to determine the third message H. Fig.3 shows a device 30 for transforming a first data message according to a third embodiment of the invention. This device comprises a hashing device 34 in which calculation means 33 are implemented for the generation of a second message N block sequence N1, ..., Ni, ..., Nc. The pseudo-random generation device 31 is reduced here to the calculation means 33. In this embodiment, the means 33 receive as input the sequence N1, ..., Ni, ... Nc. This sequence comes from a first message M stuffed and subdivided by the means 35 and 36 constituting training means 32. The means 33 also receive at each iteration of the compression function a string variable.
Le bloc Ni constituant la séquence pseudoaléatoire Nl,..., Ni,..., Nc provient alors d'une opération, associant en entrée le bloc Mi avec la variable Vi-I.The block Ni constituting the pseudo-random sequence N1,..., Ni,..., Nc then comes from an operation, associating as input the block Mi with the variable Vi-I.
L'utilisation de la variable de chaîne permet ainsi d'améliorer le caractère aléatoire de la séquence Nl,..., Ni,..., Nc générée.The use of the string variable thus makes it possible to improve the randomness of the sequence N1,..., Ni,..., Nc generated.
On notera que, le "stream cipher" adapte également la taille de chaque bloc Ni à la fonction de hachage utilisée dans les moyens 37 de compression.It will be noted that the "stream cipher" also adapts the size of each block Ni to the hash function used in the compression means 37.
La fig.4 présente un procédé de signature d'un premier message. Ce procédé utilise les étapes d'un procédé de transformation dudit premier message M afin de générer un message H de longueur déterminée.Fig.4 shows a method of signing a first message. This method uses the steps of a method of transforming said first message M to generate a message H of determined length.
Le procédé de transformation comporte ainsi une étape A de génération pseudo-aléatoire d'un deuxième message N de données à partir du premier message M. Cette étape modifie de manière non prévisible pour un attaquant la structure du message M. Il sera donc plus difficile, pour un attaquant, d'imposer une structure particulière au deuxième message N. Ceci améliore la résistance du dispositif de hachage . En variante, l'étape A permet de générer un deuxième message N de données de longueur plus grande que le premier message. Ceci augmente la complexité pour un attaquant d'imposer une structure particulière au deuxième message. On notera que l'étape de génération pseudoaléatoire utilise un algorithme de chiffrement par flot. Cet algorithme permet de générer des messages de données pseudo-aléatoires qui sont difficilement distinguables pour un attaquant. En outre, avec un tel algorithme un attaquant ne peut pas retrouver le premier message M à partir de la connaissance du second message N.The transformation method thus comprises a pseudo-random generation step A of a second data message N from the first message M. This step modifies in a non-predictable way for a attacking the message structure M. It will therefore be more difficult for an attacker to impose a particular structure on the second message N. This improves the resistance of the hash device. Alternatively, step A generates a second message N of data longer than the first message. This increases the complexity for an attacker to impose a particular structure on the second message. Note that the pseudo-random generation step uses a stream cipher algorithm. This algorithm makes it possible to generate pseudo-random data messages that are difficult to distinguish for an attacker. In addition, with such an algorithm an attacker can not find the first message M from the knowledge of the second message N.
Dans un mode de réalisation, l'étape A de génération pseudo-aléatoire est implémentée dans un dispositif de hachage.In one embodiment, pseudo-random generation step A is implemented in a hash device.
Le procédé de transformation comporte également une étape B de compression du deuxième message N en un troisième message H constituant l'empreinte du message M. Le procédé de signature comprend outre les étapes A et B, une étape de cryptographie C pour générer un quatrième message S ou signature. Cette étape est réalisée, par exemple, à l'aide d'une clé privée. Elle permet de garantir l'authenticité et l'intégrité du troisième message M.The transformation method also comprises a step B of compressing the second message N into a third message H constituting the fingerprint of the message M. The signature method further comprises steps A and B, a cryptography step C to generate a fourth message S or signature. This step is performed, for example, using a private key. It guarantees the authenticity and integrity of the third message M.
Le quatrième message S est ensuite assemblée avec le premier message M pour former le message signé M+S . Le procédé de transformation d'un premier message de données ainsi que le procédé de signature d'un premier message de données sont mises en œuvre par un programme d'ordinateur téléchargeable depuis un réseau de communication et/ou stocké sur un support lisible par ordinateur et/ou exécutable par un microprocesseur. Ce programme d'ordinateur comprend ainsi des instructions pour l'exécution des étapes desdits procédés. En variante, les différents procédés sont mises en œuvre de manière logique. The fourth message S is then assembled with the first message M to form the M + S signed message. The method of transforming a first data message and the method of signing a first data message are implemented by a computer program downloadable from a communication network and / or stored on a computer readable medium and / or executable by a microprocessor. This computer program thus comprises instructions for executing the steps of said methods. Alternatively, the different methods are implemented logically.

Claims

REVENDICATIONS
1. Procédé de transformation d'un premier message (M) de données de longueur quelconque en un troisième message (H) de données de longueur déterminée comprenant:A method of transforming a first message (M) of data of any length into a third message (H) of data of a determined length comprising:
- une étape de génération pseudo-aléatoire (A) d'un deuxième message (N) de données à partir du premier message (M), l'étape de génération pseudo- aléatoire (A) étant implémentée dans un dispositif de hachage (24; 34) ;a step of pseudo-random generation (A) of a second message (N) of data from the first message (M), the pseudo-random generation step (A) being implemented in a hash device (24); 34);
- une étape de compression (B) dudit deuxième message (N) en un troisième message (H) de données.a step of compressing (B) said second message (N) into a third message (H) of data.
2. Procédé de transformation selon la revendication précédente caractérisé en ce que l'étape de génération pseudo-aléatoire (A) permet de générer un deuxième message (N) de données de longueur plus grande que le premier message (M) .2. Transformation method according to the preceding claim characterized in that the pseudo-random generation step (A) generates a second message (N) data longer than the first message (M).
3. Procédé de transformation selon l'une quelconque des revendications précédentes caractérisé en ce que l'étape de génération pseudo-aléatoire (A) utilise un algorithme de chiffrement par flot.3. Transformation method according to any one of the preceding claims, characterized in that the pseudo-random generation step (A) uses a stream cipher algorithm.
4. Procédé de transformation selon l'une quelconque des revendications précédentes caractérisé en ce que l'étape de génération pseudo-aléatoire du deuxième message (N) de données se fait à partir d'une variable de chaîne (Vi) .4. Transformation method according to any one of the preceding claims, characterized in that the pseudo-random generation step of the second message (N) data is from a string variable (Vi).
5. Dispositif de transformation d'un premier message comprenant: - un dispositif de génération pseudo-aléatoire (5; 21; 31) d'un deuxième message (N) de données à partir du premier message (M) ;A device for transforming a first message comprising: a pseudo-random generation device (5; 21; 31) of a second data message (N) from the first message (M);
- un dispositif de hachage (24; 34) du deuxième message (N) destiné à générer un troisième messagea hash device (24; 34) of the second message (N) intended to generate a third message
(H) de données de longueur déterminée, le dispositif de génération pseudo-aléatoire (21; 31) étant implémenté dans le dispositif de hachage (24; 34) .(H) data of determined length, the pseudo-random generating device (21; 31) being implemented in the hash device (24; 34).
6. Dispositif de transformation selon la revendication précédente caractérisé en ce que le dispositif de génération pseudo-aléatoire (21; 31) permet de générer un deuxième message (N) de longueur plus grande que le premier message (M) .6. Transformation device according to the preceding claim characterized in that the pseudo-random generating device (21; 31) generates a second message (N) longer than the first message (M).
7. Dispositif de transformation selon l'une quelconque des revendications 5 à 6 caractérisé en ce que le dispositif de génération pseudo-aléatoire (21; 31) utilise un algorithme de chiffrement par flot.7. Transformation device according to any one of claims 5 to 6 characterized in that the pseudo-random generation device (21; 31) uses a stream cipher algorithm.
8. Dispositif de transformation selon l'une quelconque des revendications 6 à 7 caractérisé en ce que la génération pseudo-aléatoire du deuxième message (N) se fait à partir d'une variable de chaîne (Vi) .8. Transformation device according to any one of claims 6 to 7 characterized in that the pseudo-random generation of the second message (N) is from a string variable (Vi).
9. Procédé de signature d'un premier message de données comprenant: - une étape de génération pseudo-aléatoire (A) d'un deuxième message (N) de données à partir du premier message (M) de données;A method of signing a first data message comprising: a pseudo-random generation step (A) of a second data message (N) from the first data message (M);
- une étape de compression (B) dudit deuxième message (N) en un troisième message (H) de données; - une étape de cryptographie (C) dudit troisième message (H) pour générer un quatrième message (S) ; une étape d'assemblage (D) dudit quatrième message (S) avec le premier message de données (M) .a step of compressing (B) said second message (N) into a third message (H) of data; a cryptography step (C) of said third message (H) for generating a fourth message (S); an assembly step (D) of said fourth message (S) with the first data message (M).
10. Dispositif de signature d'un premier message (M) de données pour la mise en œuvre du procédé selon la revendication précédente.10. Device for signing a first message (M) data for the implementation of the method according to the preceding claim.
11. Programme d'ordinateur téléchargeable depuis un réseau de communication et/ou stocké sur un support lisible par ordinateur et/ou exécutable par un microprocesseur, caractérisé en ce qu'il comprend des instructions pour l'exécution des étapes du procédé de transformation d'un message (M) selon l'une quelconque des revendications 1 à 4. 11. Computer program downloadable from a communication network and / or stored on a computer-readable medium and / or executable by a microprocessor, characterized in that it comprises instructions for the execution of the steps of the process of transformation of the computer. a message (M) according to any one of claims 1 to 4.
PCT/FR2007/051943 2006-09-18 2007-09-14 Improvement of the resistance to cryptanalytic attacks of a hash function WO2008034998A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR0653802 2006-09-18
FR0653802 2006-09-18

Publications (1)

Publication Number Publication Date
WO2008034998A1 true WO2008034998A1 (en) 2008-03-27

Family

ID=37907560

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/FR2007/051943 WO2008034998A1 (en) 2006-09-18 2007-09-14 Improvement of the resistance to cryptanalytic attacks of a hash function

Country Status (1)

Country Link
WO (1) WO2008034998A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5892829A (en) * 1997-01-08 1999-04-06 Bell Communications Research, Inc. Method and apparatus for generating secure hash functions
WO2001011818A2 (en) * 1999-08-09 2001-02-15 Qualcomm Incorporated Method and apparatus for generating a message authentication code
WO2002101977A1 (en) * 2001-06-13 2002-12-19 Corrent Corporation Single-pass cryptographic processor and method
US20060005031A1 (en) * 2004-06-15 2006-01-05 Apostolopoulos John G Methods and systems for utilizing a single cryptographic integrity check to generate multiple cryptographic integrity check values for components of transcodable content

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5892829A (en) * 1997-01-08 1999-04-06 Bell Communications Research, Inc. Method and apparatus for generating secure hash functions
WO2001011818A2 (en) * 1999-08-09 2001-02-15 Qualcomm Incorporated Method and apparatus for generating a message authentication code
WO2002101977A1 (en) * 2001-06-13 2002-12-19 Corrent Corporation Single-pass cryptographic processor and method
US20060005031A1 (en) * 2004-06-15 2006-01-05 Apostolopoulos John G Methods and systems for utilizing a single cryptographic integrity check to generate multiple cryptographic integrity check values for components of transcodable content

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SZYDLO ET AL.: "COLLISION-RESISTANT USAGE OF MD5 AND SHA-1 VIA MESSAGE PREPROCESSING", TOPICS IN CRYPTOLOGY-CT-RSA 2006, 13 February 2006 (2006-02-13), BERLIN, pages 99 - 114, XP002429805 *

Similar Documents

Publication Publication Date Title
EP3211823B1 (en) Method for confidential execution of a program operating on data encrypted by means of homomorphic encryption
EP1757009B1 (en) Method and device for carrying out a cryptographic calculation
EP2215768B1 (en) Method and devices for protecting a microcircuit from attacks for obtaining secret data
Rasjid et al. A review of collisions in cryptographic hash function used in digital forensic tools
Dhany et al. Encryption and decryption using password based encryption, MD5, and DES
WO2014037657A1 (en) Protection against side channels
WO2002063822A1 (en) Secure method for secret key cryptographic calculation and component using said method
EP2638660B1 (en) Protection against passive sniffing
WO2016087520A1 (en) Method of encryption with dynamic diffusion and confusion layers
WO2012152607A1 (en) Device and method for generating keys with enhanced security for fully homomorphic encryption algorithm
EP3373509B1 (en) Method for electronically signing a document with a predetermined secret key
FR2926652A1 (en) COUNTER-MEASUREMENT METHOD AND DEVICES FOR ASYMMETRIC CRYPTOGRAPHY WITH SIGNATURE SCHEMA
FR2808948A1 (en) SYSTEM AND METHOD FOR UNIQUE AUTHENTICATION OF EACH REPRODUCTION OF A GROUP OF ELECTRONIC DOCUMENTS
EP2296307B1 (en) Cryptographic data processing method secured against side-channel attacks
FR2892583A1 (en) SECURE DATA TRANSMISSION METHOD
EP2336931B1 (en) Method for signature verification
WO2008034998A1 (en) Improvement of the resistance to cryptanalytic attacks of a hash function
WO2013024230A2 (en) Device and method for compressing public keys for a fully homomorphic encryption algorithm
EP1145473A2 (en) Method, system, device for proving the authenticity of an entity and/or the integrity and/or the authenticity of a message using specific prime factors
FR2976101A1 (en) METHOD FOR CRYPTOGRAPHIC DATA PROCESSING
EP3407537B1 (en) Method of electronically signing a document with a predetermined secret key
FR3035293A1 (en)
WO2008065308A1 (en) Data compression function of multiple lengths using single-lengths internal functions
FR3085093A1 (en) METHOD AND DEVICE FOR GENERATING PARAMETER (S) OF AN ASYMMETRIC CRYPTOGRAPHIC PROTOCOL FROM A BLOCKCHAIN, ENCRYPTION OR DECRYPTION METHOD AND APPARATUS, AND COMPUTER PROGRAM
Ajayi et al. Empirical evaluation of data hashing algorithms for password checks in PHP webapps using salt and pepper

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 07823838

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 07823838

Country of ref document: EP

Kind code of ref document: A1