FR2830641A1 - Method for raising an argument to an exponential power, for cryptography use, using a processor capable of processing words of sufficient length with an exponent coded in words of k bits with k greater than one - Google Patents

Method for raising an argument to an exponential power, for cryptography use, using a processor capable of processing words of sufficient length with an exponent coded in words of k bits with k greater than one Download PDF

Info

Publication number
FR2830641A1
FR2830641A1 FR0113075A FR0113075A FR2830641A1 FR 2830641 A1 FR2830641 A1 FR 2830641A1 FR 0113075 A FR0113075 A FR 0113075A FR 0113075 A FR0113075 A FR 0113075A FR 2830641 A1 FR2830641 A1 FR 2830641A1
Authority
FR
France
Prior art keywords
block
exponent
value
bits
bit
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
FR0113075A
Other languages
French (fr)
Other versions
FR2830641B1 (en
Inventor
Luc Vallee
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Orange SA
Original Assignee
France Telecom SA
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 SA filed Critical France Telecom SA
Priority to FR0113075A priority Critical patent/FR2830641B1/en
Priority to PCT/FR2002/003269 priority patent/WO2003042815A1/en
Publication of FR2830641A1 publication Critical patent/FR2830641A1/en
Application granted granted Critical
Publication of FR2830641B1 publication Critical patent/FR2830641B1/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/723Modular exponentiation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

Method for raising an argument to an exponential power within a finite group comprising an internal composition law, by use of a processor capable of processing words of length k expressed in bits, the exponent being coded in l words of k bits with l greater than or equal to 1. Independent claims are made for a device and computer program for raising an argument to an exponential power.

Description

<Desc/Clms Page number 1> <Desc / Clms Page number 1>

Procédé, dispositif et programme pour élever un argument à une puissance de grand exposant. Method, device and program for raising an argument to a power of great exponent.

Le domaine de l'invention est celui des procédés d'élévation à une puissance dans un monoïde fini au moyen d'un processeur capable de traiter des mots de longueur k exprimée en bits.  The field of the invention is that of methods of raising to a power in a finite monoid by means of a processor capable of processing words of length k expressed in bits.

On rappelle qu'un ensemble d'éléments a une structure de monoïde ou est nommé monoïde s'il existe pour cet ensemble une loi de composition interne associative ayant un élément neutre unique. Une loi de composition est interne si appliquée à deux éléments de l'ensemble, elle donne un élément de cet ensemble. La loi de composition interne appliquée à l'élément neutre et à un autre élément de l'ensemble donne à nouveau cet autre élément de l'ensemble. La loi de composition interne est associative si appliquée à n éléments, elle donne le même élément en étant appliquée au premier élément et à l'élément résultant de son application aux éléments suivants qu'en étant appliquée au dernier élément et à l'élément résultant de son application aux éléments précédents. De nombreux éléments du monde réel tels que des images, des signaux de communication, peuvent être traités numériquement par un processeur au moyen de mots informatiques qui codent ces éléments.  It is recalled that a set of elements has a monoid structure or is called monoid if there exists for this set a law of associative internal composition having a single neutral element. A composition law is internal if applied to two elements of the set, it gives an element of this set. The law of internal composition applied to the neutral element and to another element of the set gives again this other element of the set. The law of internal composition is associative if applied to n elements, it gives the same element being applied to the first element and the element resulting from its application to the following elements that being applied to the last element and the resulting element from its application to the previous elements. Many real world elements such as images, communication signals, can be digitally processed by a processor using computer words that encode these elements.

Par exemple, pour un ensemble d'images, une combinaison de deux images donne une image et une combinaison d'image blanche à une autre image donne à nouveau cette autre image. For example, for a set of images, a combination of two images gives one image and a combination of white image to another image gives that other image again.

On trouve parfois dans l'état de la technique la notion de groupe. Au sens de la technique à laquelle s'applique l'invention, un groupe est un monoïde particulier dans lequel tout élément x a un élément symétrique x'tel que la loi de composition interne appliquée à ces deux éléments, dans n'importe quel sens, donne comme résultat l'élément neutre.  The concept of group is sometimes found in the state of the art. In the sense of the technique to which the invention applies, a group is a particular monoid in which any element x has a symmetric element x 'such that the law of internal composition applied to these two elements, in any sense, gives as result the neutral element.

Un ensemble constitue un monoïde fini si son cardinal, c'est à dire la quantité de ses éléments, est exprimé par un nombre fini. Par exemple l'ensemble des entiers relatifs de l'intervalle fermé [O, N-1] où N est un nombre déterminé, muni d'une loi de composition interne telle que l'addition modulo N,  A set constitutes a finite monoid if its cardinal, ie the quantity of its elements, is expressed by a finite number. For example the set of relative integers of the closed interval [O, N-1] where N is a given number, provided with a law of internal composition such as the modulo N addition,

<Desc/Clms Page number 2><Desc / Clms Page number 2>

constitue un groupe fini qui est un monoïde fini. Cet ensemble muni d'une loi de composition interne telle que la multiplication modulo N, constitue un

Figure img00020001

ïde fi monoïde fini. is a finite group that is a finite monoid. This set provided with a law of internal composition such as multiplication modulo N, constitutes a
Figure img00020001

fi fined monoid.

On entend par élévation d'un argument x à une puissance d'exposant e dans un monoïde fini, l'application de la loi de composition interne à un nombre entier e d'éléments égaux chacun à l'argument x. L'exposant e est donc ici un nombre entier strictement positif.  We mean by raising an argument x to a power of exponent e in a finite monoid, applying the law of internal composition to an integer e of elements each equal to the argument x. The exponent e is therefore a strictly positive integer.

Par exemple, si la loi de composition interne est l'addition, l'élément résultant d'une élévation d'un argument x à la puissance d'exposant e, est égal à l'addition de e éléments égaux chacun à l'argument x.  For example, if the internal composition law is the addition, the element resulting from an elevation of an argument x to the exponent power e, is equal to the addition of e elements equal to the argument x.

Par exemple encore, si la loi de composition interne est multiplication, l'élément résultant d'une élévation d'un argument x à la puissance d'exposant e, est égal à la multiplication de e éléments égaux chacun à l'argument x.  For example again, if the law of internal composition is multiplication, the element resulting from an elevation of an argument x to the power of exponent e, is equal to the multiplication of e elements each equal to the argument x.

On entend par élévation au carré d'un argument x, son élévation à une puissance d'exposant 2. On considère qu'un premier élément est multiple d'un deuxième élément lorsqu'il existe un troisième élément tel que la loi de composition interne appliquée au deuxième et au troisième élément, donne le premier élément.  By squaring an argument x, we mean its elevation to a power of exponent 2. We consider that a first element is multiple of a second element when there exists a third element such as the law of internal composition applied to the second and third element, gives the first element.

De façon connue, la cryptographie utilise des monoïdes finis constitués d'ensembles d'entiers relatifs de l'intervalle fermé [0, N-1], munis de la multiplication modulo N comme loi de composition interne.  In a known manner, cryptography uses finite monoids consisting of sets of relative integers of the closed interval [0, N-1], provided with the modulo N multiplication as the internal composition law.

Knuth, D. E.-The art of computer programming, vol. 2 Seminumerical Algorithms-Addison Wesley, 1981, décrit un algorithme de calcul simple de type carré-multiplication. En notant lel la longueur de l'exposant exprimée en bits et w (e) le nombre de bits non nuls dans cet exposant, cet algorithme nécessite lel-1 carrés et w (e) multiplications dans le monoïde fini. Avec un processeur standard qui peut traiter des mots de k bits, le scrutation de chaque bit de l'exposant, conduit à des calculs avec décalages sur des mots de k bits pour mémoriser l'exposant. En moyenne, la quantité de multiplications dans le monoïde fini, est voisine de lel/2, et la quantité de décalages est voisine de lel (1-1/k).  Knuth, D. E. The Art of Computer Programming, Vol. 2 Seminumerical Algorithms-Addison Wesley, 1981, describes a simple computation algorithm of the square-multiplication type. Noting lel the length of the exponent expressed in bits and w (e) the number of non-zero bits in this exponent, this algorithm requires lel-1 squares and w (e) multiplications in the finite monoid. With a standard processor that can process k-bit words, scanning each bit of the exponent leads to calculations with offsets on k-bit words to memorize the exponent. On average, the quantity of multiplications in the finite monoid is close to lel / 2, and the amount of shifts is close to lel (1-1 / k).

<Desc/Clms Page number 3> <Desc / Clms Page number 3>

Lorsque l'exposant est grand de façon à sécuriser un traitement cryptographique, la quantité d'opérations effectuées par le processeur, ralentit considérablement le traitement cryptographique.  When the exponent is large in order to secure cryptographic processing, the amount of operations performed by the processor slows the cryptographic processing considerably.

Pour accélérer les calculs, Bergeron et al. - Efficient Computation of Addition Chains-Journal de théorie des nombres de Bordeaux, volume 6, (1994), 21-38, propose de calculer des données auxiliaires comme des chaînes d'additions. La recherche d'une bonne chaîne d'additions nécessite un temps de calcul élevé qui réduit l'avantage de l'accélération sur les calculs d'élévation à une puissance lorsque l'exposant change à chaque élévation de puissance.  To speed up the calculations, Bergeron et al. - Efficient Computation of Addition Chains - Journal of Bordeaux Number Theory, Volume 6, (1994), 21-38, proposes to compute auxiliary data such as addition strings. The search for a good chain of additions requires a high computation time which reduces the advantage of the acceleration on the elevation calculations to a power when the exponent changes with each power rise.

L'algorithme de type carré-multiplication connaît une amélioration selon Knuth qui consiste calculer des puissances modulaires de l'argument x avec de petits exposants impaires 1, 3,..., 2t-1, puis à scruter l'exposant par blocs de t bits. La valeur t=1 redonne la version non améliorée. Le coût des calculs est de lel carrés et, en moyenne, t+ (1-zut) lel/t multiplications dans un monoïde, plus la scrutation de l'exposant. Une minimisation du coût en nombre de carrés et de multiplications, conduit à des valeurs optimales pour t, fonction de la longueur de l'exposant et du rapport entre le coût d'un carré et celui d'une multiplication dans le monoïde. Dans le cas des monoïdes (Z/nZ *,.), les valeurs de t sont 5 pour lel=512, 6 pour le=768, 6 ou 7 pour le=1024, 7 pour le=2048. Ces tailles de blocs comparées avec la longueur k (8,16, 32,64) de mots standards, montrent que des manipulations complexes de bits au sein des mots et sur des mots différents, accompagnent une utilisation de valeurs optimales de t. Pour éviter des manipulations complexes de bits, pour simplifier le code et diminuer les risques d'erreurs, une solution qui consiste à utiliser une valeur sous optimale t=4, n'apporte pas entière satisfaction en terme de performances.  The square-multiplication algorithm knows an improvement according to Knuth, which consists of calculating modular powers of the argument x with small odd exponents 1, 3, ..., 2t-1, then examining the exponent in blocks of t bits. The value t = 1 restores the unimproved version. The cost of the computations is lel squares and, on average, t + (1-zut) lel / t multiplications in a monoid, plus the exponent scan. A minimization of the cost in number of squares and multiplications, leads to optimal values for t, function of the length of the exponent and the ratio between the cost of a square and that of a multiplication in the monoid. In the case of monoïdes (Z / nZ * ,.), the values of t are 5 for lel = 512, 6 for = 768, 6 or 7 for = 1024, 7 for = 2048. These sizes of blocks compared with the length k (8, 16, 32, 64) of standard words, show that complex manipulations of bits within words and on different words, accompany a use of optimal values of t. To avoid complex bit manipulations, to simplify the code and reduce the risk of errors, a solution that uses a sub-optimal value t = 4, does not provide complete satisfaction in terms of performance.

Pour remédier aux inconvénients précédemment mentionnés de l'état connu de la technique antérieure, l'invention a pour objets un procédé, un dispositif et un programme pour élever un argument à une puissance de grand exposant, remarquables par les points suivants.  In order to overcome the above-mentioned drawbacks of the state known in the prior art, the object of the invention is a method, a device and a program for raising an argument to a power of large exponent, remarkable for the following points.

<Desc/Clms Page number 4> <Desc / Clms Page number 4>

Le procédé pour élever un argument x à une puissance d'exposant e dans un monoïde fini, au moyen d'un processeur capable de traiter des mots de longueur k exprimée en bits, l'exposant e étant codé sur 1 mots de k bits avec 1 supérieur ou égal à 1, comprend deux phases.  The method for raising an argument x to an exponent power e in a finite monoid, by means of a processor capable of processing words of length k expressed in bits, the exponent e being encoded on 1 words of k bits with 1 greater than or equal to 1, comprises two phases.

Une première phase de génération de puissances de l'argument x avec

Figure img00040001

un exposant impair compris entre 1 et 2t-1 où t est un nombre inférieur à k, permet d'obtenir 2t-puissances de l'argument x avec des exposants impairs relativement petit en comparaison de l'exposant e. A first power generation phase of the argument x with
Figure img00040001

an odd exponent between 1 and 2t-1 where t is a number less than k, makes it possible to obtain 2t-powers of the argument x with relatively small odd exponents in comparison with the exponent e.

Une deuxième phase de traitement de chaque mot qui code l'exposant e dans un ordre allant du bit de poids fort jusqu'au bit de poids faible de l'exposant e, permet d'obtenir une valeur y dans un registre, après scrutation du dernier bloc comprenant les bits de poids les plus faibles pour coder l'exposant e, égale à l'argument x élevé à la puissance d'exposant e dans le monoïde fini.  A second processing phase of each word that encodes the exponent e in an order from the most significant bit to the least significant bit of the exponent e, makes it possible to obtain a value y in a register, after scanning the last block comprising the least significant bits for encoding the exponent e, equal to the argument x raised to the exponent power e in the finite monoid.

Dans la deuxième phase : - le processeur scrute le mot courant à traiter par blocs d'au plus t bits en allant des bits de poids forts vers et jusqu'au bit de poids le plus faible du mot courant ;

Figure img00040002

- pour un premier bloc scruté de premier mot tel qu'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de
1 pour le bit de poids faible du bloc, le processeur charge à partir du dit registre, une valeur y égale à unepuissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, effectue b élévations au carré de ladite valeur y et range le résultat ainsi obtenu comme nouvelle valeur y dans le registre ; - pour chaque bloc scruté suivant, le processeur effectue des élévations au carré de ladite valeur y, en quantité égale au nombre de bits du bloc scruté, et s'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, le processeur effectue une multiplication de la valeur y par une puissance In the second phase: the processor scans the current word to be processed in blocks of at most t bits, going from the most significant bits to and to the least significant bit of the current word;
Figure img00040002

for a first scrambled block of the first word as it exists in the scanned block a non-zero bit of the lowest weight with a rank b taken from
1 for the low-order bit of the block, the processor loads from said register, a value y equal to a power generated in the first phase whose exponent ca for value that encoded by the bit of rank b and the next rank bits to the most significant bit of the scanned block, b squaring said value y and storing the result thus obtained as a new value y in the register; for each following scrambled block, the processor squares said value y, in an amount equal to the number of bits of the scrambled block, and if there exists in the scrambled block a non-zero bit of least weight with a rank b taken from 1 for the least significant bit of the block, the processor performs a multiplication of the value y by a power

<Desc/Clms Page number 5><Desc / Clms Page number 5>

générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant d'effectuer les b dernière élévations au carré de ladite valeur y et de ranger le résultat ainsi obtenu dans ledit registre.  generated in the first phase whose exponent ca is the value encoded by the bit of rank b and the bits of subsequent ranks up to the most significant bit of the scanned block, before making the last b squared of said value y and storing the result thus obtained in said register.

Le procédé selon l'invention n'a pas besoin d'un microprocesseur spécialisé mais se contente avantageusement d'un processeur standard capable de traiter des mots de k bits. Contrairement à l'état connu de la technique antérieure, le procédé n'a pas besoin de recourir à des données auxiliaires. On remarque que la quantité totale d'élévations au carré, n'est fixée que par la quantité de bits qui codent l'exposant e. Elle est en particulier indépendante de la longueur k des mots que peut traiter le processeur et de la taille t de chaque bloc scrutée qui peut donc être variable. Il est ainsi possible de choisir des valeurs optimales de t. La quantité de multiplications est égale à la quantité de blocs non nuls qui composent l'ensemble des mots pour coder l'exposant e.  The method according to the invention does not need a specialized microprocessor but is advantageously content with a standard processor capable of processing k-bit words. Unlike the known state of the prior art, the method does not need to resort to auxiliary data. Note that the total amount of squared elevations is fixed only by the amount of bits that encode the exponent e. In particular, it is independent of the length k of the words that can be processed by the processor and the size t of each scanned block, which can therefore be variable. It is thus possible to choose optimal values of t. The quantity of multiplications is equal to the quantity of non-zero blocks that make up the set of words to code the exponent e.

De façon la plus simple, en début de deuxième phase, la valeur y est initialisée à 1 dans le registre et pour chaque bloc scruté à partir du premier, le processeur effectue des élévations au carré de ladite valeur y, en quantité égale au nombre de bits du bloc scruté, et s'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, le processeur effectue une multiplication de la valeur y par une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant d'effectuer les b dernière élévations au carré de ladite valeur y et de ranger le résultat ainsi obtenu dans le registre.  In the simplest way, at the beginning of the second phase, the value y is initialized to 1 in the register and for each block scanned from the first, the processor squares said value y, in an amount equal to the number of bits of the scanned block, and if there exists in the scanned block a nonzero bit of least weight with a rank b taken from 1 for the least significant bit of the block, the processor performs a multiplication of the value y by a power generated in the first phase whose exponent ca for value that encoded by the bit of rank b and the next rank bits to the most significant bit of the scrambled block, before making the last b squared of said value y and store the result thus obtained in the register.

Avantageusement lorsque la longueur de l'exposant e est inférieure à un nombre entier de mots, le bit non nul de poids le plus fort du premier mot étant de rang k'pris à partir de 1 pour le bit de poids le plus faible, le premier bloc scruté a pour bit de poids fort, le bit de rang k'dans le premier mot.  Advantageously, when the length of the exponent e is less than an integer number of words, the nonzero bit of the strongest weight of the first word being of rank k'pris from 1 for the least significant bit, the first block scanned has for most significant bit, the rank bit k'in the first word.

Ceci évite de scruter des blocs nuls en tête du premier mot pour lesquels des élévations au carré se feraient sur des valeurs unitaires.  This avoids scrutinizing null blocks at the top of the first word for which squared elevations would be done on unit values.

<Desc/Clms Page number 6> <Desc / Clms Page number 6>

La valeur t pouvant être choisie quelconque dans le procédé, la valeur t peut être optimisée pour accélérer l'élévation de puissance avec un minimum de ressources en réduisant le nombre d'opérations internes dans le monoïde fini. Chaque mot ou au moins chaque mot au delà du premier mot, est alors découpé en q blocs de taille t et, si k n'est pas un multiple de t, un bloc de taille réduite r inférieure à t.  Since the value t can be chosen arbitrarily in the process, the value t can be optimized to accelerate the power rise with a minimum of resources by reducing the number of internal operations in the finite monoid. Each word or at least each word beyond the first word, is then cut into q blocks of size t and, if k is not a multiple of t, a block of reduced size r less than t.

Avantageusement lorsque le premier mot contient k'bits de poids faible utiles pour coder l'exposant e, le premier mot est découpé en q'blocs de taille t et, si k'n'est pas un multiple de t, un bloc de taille réduite r'inférieure à t.  Advantageously, when the first word contains k'bits of low weight useful for encoding the exponent e, the first word is divided into q'blocks of size t and, if k 'is not a multiple of t, a block of size reduced to less than t.

La scrutation du bloc de taille réduite peut être faite après q scrutations de blocs de taille t.  The scan of the reduced size block can be done after q scans of blocks of size t.

Selon une première variante intéressante de l'invention, la valeur y est initialisée avec une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du premier bloc scruté non nul du premier mot.  According to a first advantageous variant of the invention, the value y is initialized with a power generated in the first phase whose exponent ca for value that encoded by the bit of rank b and the bits of subsequent ranks up to the most significant bit. the first non-zero scrutinized block of the first word.

Ceci permet d'éviter t-b élévations au carré d'une valeur unitaire de y pour la scrutation du premier bloc.  This makes it possible to avoid t-b squared by a unit value of y for scanning the first block.

Selon une seconde variante de l'invention, la scrutation d'un bloc commence par une scrutation de bloc de taille réduite sur les bits de poids fort du bloc jusqu'à trouver un bloc de taille réduite avec tous ses bits nuls et dès qu'un tel bloc est trouvé, la scrutation des blocs suivants s'il en existe, est continuée par bloc de taille t.  According to a second variant of the invention, the scanning of a block begins with a small size block scan on the most significant bits of the block until a small block is found with all its null bits and as soon as such a block is found, the scanning of the following blocks, if any, is continued by block of size t.

Ceci permet d'économiser une multiplication lorsque le bloc de taille réduite placé sur les poids faibles du mot est non nul alors qu'il est possible de cadrer un bloc de taille réduite avec tous ses bits à zéro de poids plus fort.  This saves a multiplication when the reduced size block placed on the low weight of the word is non-zero while it is possible to frame a block of reduced size with all its bits to zero weight more strongly.

Le dispositif pour élever un argument x à une puissance d'exposant e dans un monoïde fini, comprend un processeur capable de traiter des mots de longueur k exprimée en bits, un premier registre pour recevoir l'argument x, un deuxième registre de 1 mots de k bits avec 1 supérieur ou égal à 1 pour recevoir l'exposant e, un troisième registre pour produire l'argument x élevé à la  The device for raising an argument x to an exponent power e in a finite monoid comprises a processor capable of processing words of length k expressed in bits, a first register to receive the argument x, a second register of 1 words of k bits with 1 greater than or equal to 1 to receive the exponent e, a third register to produce the argument x high to the

<Desc/Clms Page number 7><Desc / Clms Page number 7>

puissance d'exposant e et une mémoire pour contenir des données et des instructions exécutables par le processeur.  exponent power e and a memory for holding data and instructions executable by the processor.

Plus particulièrement, le dispositif comprend :

Figure img00070001

- un quatrième registre pour contenir des puissances de l'argument x avec un exposant impair compris entre 1 et i-1 où t est un nombre inférieur à k contenu dans la mémoire ; - des instructions contenues dans la mémoire pour traiter chaque mot qui code l'exposant e dans un ordre allant du bit de poids fort jusqu'au bit de poids faible de l'exposant e, agencées pour commander le processeur de façon à ce qu'en exécution : - le processeur scrute le mot courant à traiter par blocs d'au plus t bits en allant des bits de poids forts vers et jusqu'au bit de poids le plus faible du mot courant ;
Figure img00070002

- pour un premier bloc scruté de premier mot tel qu'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de
1 pour le bit de poids faible du bloc, le processeur charge à partir du troisième registre, une valeur y égale à une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, effectue b élévations au carré de ladite valeur y et range le résultat ainsi obtenu comme nouvelle valeur y dans le troisième registre ; - pour chaque bloc scruté suivant, le processeur effectue des élévations au carré de ladite valeur y, en quantité égale au nombre de bits du bloc
Figure img00070003

scruté, et s'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, le processeur effectue une multiplication de la valeur y par une puissance contenue dans le troisième registre dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant d'effectuer les b dernière élévations au carré de ladite valeur y et de ranger le résultat ainsi obtenu dans le troisième registre ; More particularly, the device comprises:
Figure img00070001

a fourth register for containing powers of the argument x with an odd exponent between 1 and i-1 where t is a number less than k contained in the memory; instructions contained in the memory for processing each word that encodes the exponent e in an order from the most significant bit to the least significant bit of the exponent e, arranged to control the processor so that in execution: the processor scans the current word to be processed in blocks of at most t bits, going from the most significant bits to and to the least significant bit of the current word;
Figure img00070002

for a first scrambled block of the first word as it exists in the scanned block a non-zero bit of the lowest weight with a rank b taken from
1 for the low-order bit of the block, the processor loads from the third register, a value y equal to a power generated in the first phase whose exponent ca for value that encoded by the bit of rank b and the rank bits following to the most significant bit of the scanned block, b squaring said value y and storing the result thus obtained as a new value y in the third register; for each following scrambled block, the processor squares said value y, in an amount equal to the number of bits of the block
Figure img00070003

scanned, and if there exists in the scanned block a non-zero bit of the lowest weight with a rank b taken from 1 for the least significant bit of the block, the processor performs a multiplication of the value y by a power contained in the third register whose exponent ca is equal to that encoded by the bit of rank b and the bits of subsequent ranks to the most significant bit of the scrambled block, before making the last b squared of said value y and store the result thus obtained in the third register;

<Desc/Clms Page number 8><Desc / Clms Page number 8>

de sorte que la valeur y contenue dans le troisième registre après scrutation du dernier bloc comprenant les bits de poids les plus faible pour coder l'exposant e, est égale à l'argument x élevé à la puissance d'exposant e dans le monoïde fini.  so that the value y contained in the third register after scanning the last block comprising the least significant bits to code the exponent e, is equal to the argument x raised to the exponent power e in the finite monoid .

Le programme recevant d'un premier registre un argument x et d'un deuxième registre de 1 mots de k bits avec 1 supérieur ou égal à 1, k étant une longueur de mot exprimée en bits que peut traiter un processeur, un exposant e pour produire dans un troisième registre l'argument x élevé à une puissance d'exposant e, fait exécuter par le processeur : - dans une première phase, une génération de puissances de l'argument x avec un exposant impair compris entre 1 et 2t-1 où t est un nombre inférieur à k ; - dans une deuxième phase, un traitement de chaque mot qui code l'exposant e dans un ordre allant du bit de poids fort jusqu'au bit de poids faible de l'exposant e, tel que : - le processeur scrute le mot courant à traiter par blocs d'au plus t bits en allant des bits de poids forts vers et jusqu'au bit de poids le plus faible du mot courant ;

Figure img00080001

- pour un premier bloc scruté de premier mot tel qu'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de
1 pour le bit de poids faible du bloc, le processeur charge à partir du troisième registre, une valeur y égale à une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, effectue b élévations au carré de ladite valeur y et range le résultat ainsi obtenu comme nouvelle valeur y dans le troisième registre ; - pour chaque bloc scruté suivant, le processeur effectue des élévations au carré de ladite valeur y, en quantité égale au nombre de bits du bloc
Figure img00080002

scruté, et s'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, le processeur effectue une multiplication de la valeur y par une puissance The program receiving from a first register an argument x and a second register of 1 words of k bits with 1 greater than or equal to 1, k being a word length expressed in bits that can be processed by a processor, an exponent e for produce in a third register the argument x raised to a power of exponent e, made by the processor: - in a first phase, a power generation of the argument x with an odd exponent between 1 and 2t-1 where t is a number less than k; in a second phase, a processing of each word which encodes the exponent e in an order ranging from the most significant bit to the least significant bit of the exponent e, such that: the processor scans the current word at processing in blocks of at most t bits by going from the most significant bits to and from the least significant bit of the current word;
Figure img00080001

for a first scrambled block of the first word as it exists in the scanned block a non-zero bit of the lowest weight with a rank b taken from
1 for the low-order bit of the block, the processor loads from the third register, a value y equal to a power generated in the first phase whose exponent ca for value that encoded by the bit of rank b and the rank bits following to the most significant bit of the scanned block, b squaring said value y and storing the result thus obtained as a new value y in the third register; for each following scrambled block, the processor squares said value y, in an amount equal to the number of bits of the block
Figure img00080002

scanned, and if there exists in the scanned block a non-zero bit of the lowest weight with a rank b taken from 1 for the least significant bit of the block, the processor performs a multiplication of the value y by a power

<Desc/Clms Page number 9><Desc / Clms Page number 9>

générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant d'effectuer les b dernière élévations au carré de ladite valeur y et de ranger le résultat ainsi obtenu dans le troisième registre ; de sorte que la valeur y contenue dans le troisième registre après scrutation du dernier bloc comprenant les bits de poids les plus faible pour coder l'exposant e, est égale à l'argument x élevé à la puissance d'exposant e dans le monoïde fini.  generated in the first phase whose exponent ca is the value encoded by the bit of rank b and the bits of subsequent ranks up to the most significant bit of the scanned block, before making the last b squared of said value y and arrange the result thus obtained in the third register; so that the value y contained in the third register after scanning the last block comprising the least significant bits to code the exponent e, is equal to the argument x raised to the exponent power e in the finite monoid .

L'invention sera mieux comprise de la description d'un exemple de réalisation qui suit en référence aux dessins annexés dans les quels : - la figure 1 est un schéma de dispositif conforme à l'invention ; - la figure 2 montre des étapes de première phase de procédé selon l'invention ; - les figures 3 et 4 montrent des étapes de deuxième phase de procédé selon l'invention ; - les figures 5 à 7 montrent une première variante de deuxième phase de procédé selon l'invention ; - les figures 8 à 10 montrent une deuxième variante de deuxième phase de procédé selon l'invention.  The invention will be better understood from the description of an exemplary embodiment which follows with reference to the accompanying drawings in which: - Figure 1 is a device diagram according to the invention; FIG. 2 shows steps of the first phase of the method according to the invention; FIGS. 3 and 4 show steps of the second phase of the process according to the invention; FIGS. 5 to 7 show a first variant of a second process step according to the invention; - Figures 8 to 10 show a second variant of the second phase of the method according to the invention.

En référence à la figure 1, un dispositif 1 est agencé pour recevoir en entrée un nombre x et un nombre e et pour générer en sortie un nombre y égal à une puissance d'argument x et d'exposant e.  With reference to FIG. 1, a device 1 is arranged to receive as input a number x and a number e and to output a number y equal to a power of argument x and exponent e.

Le dispositif 1 comprend un processeur 2 standard prévu pour traiter des mots de longueur k bits en fonction d'instructions et de données contenues dans une mémoire 3. Des registres 4 et 5 sont prévus chacun respectivement pour contenir l'argument x et l'exposant e. Lorsque la longueur lel de l'exposant e exprimée en bits, est supérieure à k, le registre 5 est constitué de 1 mots de k bits de façon à ce que lel soit compris entre (1-1) k et Ik. Un registre 6 est prévu pour contenir la puissance y. Un registre 7 est prévu  The device 1 comprises a standard processor 2 designed to process words of length k bits according to instructions and data contained in a memory 3. Registers 4 and 5 are each provided respectively to contain the argument x and the exponent e. When the length lel of the exponent e expressed in bits, is greater than k, the register 5 consists of 1 words of k bits so that lel is between (1-1) k and Ik. A register 6 is provided to contain the power y. A register 7 is provided

<Desc/Clms Page number 10><Desc / Clms Page number 10>

pour contenir des puissances de l'argument x avec des petits exposants impairs.  to contain powers of the argument x with odd small exponents.

Le dispositif 1 permet de mettre en oeuvre le procédé décrit en référence aux figures suivantes, en faisant exécuter par le processeur 2, un programme constitué d'instructions et de données contenues dans la mémoire 3 pour effectuer ledit procédé.  The device 1 makes it possible to implement the method described with reference to the following figures, by executing by the processor 2, a program consisting of instructions and data contained in the memory 3 to carry out said method.

Dans une première phase du procédé en référence à la figure 2, le processeur 2 génère (2t-1) puissances de l'argument x, rangées chacune dans un mot du registre 7. Le nombre t est une donnée contenue dans la mémoire 3, de valeur inférieure à k.  In a first phase of the method with reference to FIG. 2, the processor 2 generates (2t-1) powers of the argument x, each row in a word of the register 7. The number t is a piece of data contained in the memory 3, of value less than k.

Dans une étape 8, un indice i de mot dans le registre 7, est initialisé à 1.  In a step 8, a word index i in register 7 is initialized to 1.

Dans une étape 9, une valeur x, de premier mot du registre 7, est initialisée à la valeur de l'argument x. In a step 9, a value x, of the first word of the register 7, is initialized to the value of the argument x.

Dans une étape 10, le processeur 2 calcule le carré xs de l'argument x qui est conservé dans un registre interne du processeur 2 ou en mémoire 3.  In a step 10, the processor 2 calculates the square xs of the argument x which is stored in an internal register of the processor 2 or in memory 3.

Dans une étape 11, le processeur 2 teste si la valeur courante de l'indice i est inférieure à 2t-2. Un résultat négatif à ce test termine la première phase du procédé. Un résultat positif à ce test active une succession d'étapes 12 à 14.  In a step 11, the processor 2 tests whether the current value of the index i is less than 2t-2. A negative result on this test completes the first phase of the process. A positive result in this test activates a succession of steps 12 to 14.

Dans l'étape 12, la valeur courante x, est chargée dans un registre interne z du processeur 2. Dans l'étape 13, l'indice courant i est augmenté de deux unités. Dans l'étape 14, le processeur 2 multiplie le contenu du registre interne z par le carré X2 et range la valeur xi obtenue, dans le mot du registre 7, d'indice i réactualisé en étape 13.  In step 12, the current value x is loaded into an internal register z of processor 2. In step 13, the current index i is increased by two units. In step 14, the processor 2 multiplies the contents of the internal register z by the square X2 and ranks the value xi obtained, in the word of the register 7, index i updated in step 13.

L'étape 14 est bouclée sur l'étape 11, ayant pour effet d'exécuter si t est supérieur à 1, les étapes 12 à 14 pour des valeurs de i en étape 11, allant de 1 à 2-3, i variant par incrément de 2. L'étape 14 est alors exécutée pour des valeurs de i allant de 3 à 2t-1. Selon la loi bien connue sur les intervalles, le nombre P d'exécutions de l'étape 14 est donné par la formule :
P = 1 + (2t-1-3)/2 C'est à dire :
Step 14 is looped on step 11, having the effect of executing if t is greater than 1, steps 12 to 14 for values of i in step 11, ranging from 1 to 2-3, i varying by increment of 2. Step 14 is then executed for values of i ranging from 3 to 2t-1. According to the well-known law on intervals, the number P of executions of step 14 is given by the formula:
P = 1 + (2t-1-3) / 2 That is to say:

<Desc/Clms Page number 11> <Desc / Clms Page number 11>

P = 2t-1~1
Dans la première phase, le processeur 2 a donc calculé un carré et P produits pour obtenir dans le registre 7, n puissances d'exposant impair de l'argument x : X1=X1, xs=x,..., Xn=x", avec n = 2t-1.
P = 2t-1 ~ 1
In the first phase, the processor 2 thus calculated a square and P products to obtain in the register 7, n odd exponent powers of the argument x: X1 = X1, xs = x, ..., Xn = x ", with n = 2t-1.

Dans une deuxième phase du procédé en référence aux figures 3 et 4, le processeur 2 effectue un calcul progressif de la puissance y en scrutant successivement chaque mot du registre 5 qui contient l'exposant e.  In a second phase of the method with reference to Figures 3 and 4, the processor 2 performs a progressive calculation of the power y by successively scanning each word of the register 5 which contains the exponent e.

Dans une étape 15, la valeur de puissance y est initialisée à 1 dans le registre 6. Ensuite, le processeur 2 itère une première boucle d'étapes 17 à 54, indexée par un indice Il variant d'une valeur 1 initialisée en étape 16 à la valeur 1 détectée en étape 54 qui termine la deuxième phase du procédé.  In a step 15, the power value y is initialized to 1 in the register 6. Then, the processor 2 iterates a first loop of steps 17 to 54, indexed by an index Il varying from a value 1 initialized in step 16 at the value 1 detected in step 54 which ends the second phase of the method.

Dans l'étape 53 qui précède l'étape 54, l'indice Il est augmenté d'une unité pour scruter le mot suivant du registre 5 ou terminer la deuxième phase si cet indice est supérieur à la longueur 1 de l'exposant e, exprimée en nombre de mots de k bits. In step 53 preceding step 54, the index Il is increased by one unit to scan the next word of the register 5 or to finish the second phase if this index is greater than the length 1 of the exponent e, expressed in number of words of k bits.

Le mot du registre 5 avec pour indice Il = 1 est celui qui contient les bits de poids les plus forts de l'exposant e. Ensuite, chaque mot d'indice supérieur contient des bits de poids plus faible jusqu'au mot d'indice 1 qui contient les bits de poids les plus faibles. Une longueur de l'exposant e égale à un nombre entier de mots de longueur k, représente un cas où le bit de poids le plus fort du premier mot du registre 5, est non nul. C'est sur ce cas simplifié que le procédé est expliqué dans un premier temps.  The word of the register 5 with the index Il = 1 is the one containing the strongest bits of the exponent e. Then, each upper index word contains bits of lower weight up to index word 1 which contains the least significant bits. A length of the exponent e equal to an integer number of words of length k represents a case where the most significant bit of the first word of the register 5 is non-zero. It is on this simplified case that the process is explained at first.

A l'intérieur de la première boucle, le processeur 2 itère une deuxième boucle d'étapes 18 à 35 pour scruter le mot courant d'indice)), par bloc de t bits. La valeur de t constituant une donnée de la mémoire 3, chaque mot de k bits contient une quantité q de blocs avec une longueur de t bits selon la formule : k = q. t + r où r est le reste de la division entière de k par t.  Within the first loop, the processor 2 iterates a second loop of steps 18 to 35 to scan the current word index)), by block of t bits. The value of t constituting a datum of the memory 3, each word of k bits contains a quantity q of blocks with a length of t bits according to the formula: k = q. t + r where r is the remainder of the integer division of k by t.

Lorsque le reste r est non nul, testé en étape 36, le processeur 2 exécute une séquence supplémentaire d'étapes 37 à 52 semblables aux  When the remainder r is non-zero, tested in step 36, the processor 2 executes an additional sequence of steps 37 to 52 similar to the

<Desc/Clms Page number 12><Desc / Clms Page number 12>

étapes 18 à 33 pour traiter un dernier bloc avec une longueur de r bits inférieure à t bits.  Steps 18 to 33 for processing a last block with a length of r bits less than t bits.

Dans une étape 17, un indice qq de deuxième boucle est initialisé à 1 pour être augmenté d'un incrément unitaire en étape 34 à chaque itération de la deuxième boucle, jusqu'à atteindre la valeur d'indice q du dernier bloc de t bits dont un dépassement détecté en étape 35 fait sortir de la deuxième boucle pour exécution des étapes suivantes. Comme les mots d'indice 11, les blocs d'indice qq à l'intérieur d'un mot, sont scrutés en commençant par le bloc qui contient les bits de poids les plus fort du mot et en continuant par les blocs qui contiennent les bits de poids de plus en plus faibles.  In a step 17, a second loop index qq is initialized to 1 to be increased by a unit increment in step 34 at each iteration of the second loop, until reaching the index value q of the last block of t bits. of which an overshoot detected in step 35 leaves the second loop for execution of the following steps. Like the words of index 11, the blocks of index qq inside a word, are scanned starting with the block which contains the most significant bits of the word and continuing with the blocks which contain the weight bits becoming weaker.

Dans l'étape 18, le bloc courant d'indice qq contient t bits qui codent une valeur a traitée par le processeur 2 dans sa scrutation de ce bloc.  In step 18, the current block of index qq contains t bits which encode a value processed by the processor 2 in its scan of this block.

Dans l'étape 19, le processeur 2 teste si la valeur a est nulle. Un résultat positif déclenche une séquence d'étapes 20 à 23. Un résultat négatif déclenche une séquence d'étapes 24 à 33. Chacune des séquences d'étapes 20 à 23 et 24 à 33 aboutit sur l'étape 34 pour traitement du bloc suivant.  In step 19, processor 2 tests whether the value a is zero. A positive result triggers a sequence of steps 20 to 23. A negative result triggers a sequence of steps 24 to 33. Each of the sequences of steps 20 to 23 and 24 to 33 ends on step 34 for processing the next block .

La séquence d'étapes 20 à 23 constitue une troisième boucle dans laquelle l'étape 21 est exécutée t fois par le processeur 2 avec un indice de boucle tt variant de 1 en étape 20 à t par augmentation d'un incrément unitaire à chaque exécution de l'étape 22 jusqu'à dépassement détecté en étape 23 qui fait sortir de la troisième boucle.  The sequence of steps 20 to 23 constitutes a third loop in which step 21 is performed t times by the processor 2 with a loop index tt ranging from 1 in step 20 to t by increasing a unit increment at each execution. from step 22 to overflow detected in step 23 which leaves the third loop.

Dans l'étape 21, le processeur 2 charge la valeur y du registre 6, l'élève au carré et range la nouvelle valeur y ainsi obtenue dans le registre 6. Ainsi, dans la séquence d'étapes 20 à 23, le processeur 2 exécute t élévations au carré de la valeur y du registre 6.  In step 21, the processor 2 loads the value y of the register 6, squaring it and arranges the new value y thus obtained in the register 6. Thus, in the sequence of steps 20 to 23, the processor 2 execute squarings of the y value of register 6.

Dans l'étape 24 pour laquelle la valeur a est non nulle, celle-ci est considérée comme étant le produit d'un nombre impair c par une puissance de
2 d'exposant b. L'exposant b est le rang du premier bit non nul en partant du bit de poids le plus faible dans le bloc courant. En effet, ce premier bit non nul avec la succession de bits nuls de poids plus faibles, codent une puissance de
2 d'exposant b. Ce premier bit non nul avec les bits de poids plus forts dans le
In step 24 for which the value a is non-zero, it is considered to be the product of an odd number c by a power of
2 of exhibitor b. The exponent b is the rank of the first non-zero bit starting from the least significant bit in the current block. Indeed, this first non-zero bit with the succession of zero bits of lower weight, encode a power of
2 of exhibitor b. This first non-zero bit with the most significant bits in the

<Desc/Clms Page number 13><Desc / Clms Page number 13>

bloc courant, codent le nombre impair c. Le nombre impair c et l'exposant b sont alors obtenus par simples masquages sur le bloc courant d'indice qq.  current block, code the odd number c. The odd number c and the exponent b are then obtained by simple masks on the current block of index qq.

La séquence d'étapes 24 à 33, comprend deux boucles. Dans une quatrième boucle, le processeur 2 exécute (t-b) fois l'étape 26 avec un indice de boucle tt variant de 1 en étape 25 à (t-b) par augmentation d'un incrément unitaire à chaque exécution de l'étape 27 jusqu'à dépassement détecté en étape 28 qui fait sortir de la quatrième boucle.  The sequence of steps 24 to 33 comprises two loops. In a fourth loop, processor 2 executes (tb) times step 26 with a loop index tt varying from 1 in step 25 to (tb) by increasing a unit increment each time step 27 is executed. overrun detected in step 28 which leaves the fourth loop.

Dans l'étape 26, le processeur 2 charge la valeur y du registre 6, l'élève au carré et range la nouvelle valeur y ainsi obtenue dans le registre 6. Ainsi, dans la séquence d'étapes 25 à 28, le processeur 2 exécute (t-b) élévations au carré de la valeur y du registre 6.  In step 26, the processor 2 loads the value y of the register 6, squaring it and arranges the new value y thus obtained in the register 6. Thus, in the sequence of steps 25 to 28, the processor 2 execute (tb) squares of the value y of the register 6.

Dans une cinquième boucle, le processeur 2 exécute b fois l'étape 31 avec un indice de boucle bb variant de 1 en étape 30, à b par augmentation d'un incrément unitaire à chaque exécution de l'étape 32 jusqu'à dépassement détecté en étape 33 qui fait sortir de la cinquième boucle.  In a fifth loop, the processor 2 executes b times the step 31 with a loop index bb varying from 1 to step 30, to b by increasing a unit increment at each execution of the step 32 until it is exceeded. in step 33 that gets out of the fifth loop.

Dans l'étape 31, le processeur 2 charge la valeur y du registre 6, l'élève au carré et range la nouvelle valeur y ainsi obtenue dans le registre 6. Ainsi, dans la séquence d'étapes 30 à 33, le processeur 2 exécute b élévations au carré de la valeur y du registre 6.  In step 31, the processor 2 loads the value y of the register 6, squaring it and arranges the new value y thus obtained in the register 6. Thus, in the sequence of steps 30 to 33, the processor 2 execute squarings of the y value of register 6.

Dans une étape 29 à la suite de l'étape 28 en sortie de la quatrième boucle et avant l'étape 30 en entrée de la cinquième boucle, le processeur 2 charge la valeur y du registre 6, la multiplie par la puissance xc d'exposant impair c obtenue dans la première phase, et range la nouvelle valeur y ainsi obtenue dans le registre 6.  In a step 29 following the step 28 at the output of the fourth loop and before the step 30 at the input of the fifth loop, the processor 2 loads the value y of the register 6, multiplies it by the power xc of odd exponent c obtained in the first phase, and ranks the new value y thus obtained in register 6.

On constate que l'enchaînement d'étapes précédemment décrit donne bien y comme étant une puissance de x d'exposant e.  It can be seen that the sequence of steps previously described gives y as a power of x of exponent e.

Dans le cas simplifié où nous nous plaçons pour décrire le procédé dans un premier temps, le bit de poids le plus fort du premier bloc scruté, est non nul. La première valeur de a pour qq =1, est donc non nulle et ce sont les étapes 24 à 33 qui sont exécutées pour ce bloc.  In the simplified case in which we set ourselves to describe the process in a first step, the most significant bit of the first block scanned is non-zero. The first value of a for qq = 1, is therefore non-zero and it is the steps 24 to 33 that are executed for this block.

<Desc/Clms Page number 14> <Desc / Clms Page number 14>

Pour ce premier bloc du premier mot, y initialisé à 1 en étape 15, reste à 1 par élévations successives au carré en étape 26 jusqu'à l'étape 28. En étape 29, XC est multiplié par 1. Dans les étapes 30 à 33, xc est élevé b fois au carré.  For this first block of the first word, y initialized at 1 in step 15, remains at 1 by successive elevations squared in step 26 to step 28. In step 29, XC is multiplied by 1. In steps 30 to 33, xc is high b times squared.

A la dernière itération de la cinquième boucle, on obtient : y = ( (XC) 2) b = xa
Pour un bloc d'indice qq, on sait que le bit de poids le plus faible, code une puissance de 2 dont l'exposant est la quantité de bits dans les blocs qui suivent ce bloc. C'est à dire que dans un cas particulier où tous les bits des blocs suivants seraient nuls, la valeur de l'exposant e pour ce seul bit est une puissance de 2 avec pour exposant la quantité de bits de poids plus faibles.
At the last iteration of the fifth loop, we get: y = ((XC) 2) b = xa
For a block of index qq, it is known that the least significant bit, codes a power of 2 whose exponent is the amount of bits in the blocks that follow this block. That is, in a particular case where all the bits of the following blocks would be zero, the value of the exponent e for that single bit is a power of 2 with the exponent of the amount of smaller bits of weight.

Lorsque une valeur y qui résulte des qq itérations précédentes de la deuxième boucle, est telle que y = xn, n est une valeur d'exposant codée sur qq blocs qui correspond à n*25 codée sur (qq+1) blocs avec tous les bits nuls dans le dernier bloc. Lorsque le dernier bloc d'indice qq+1 ajoute la valeur a aux (qq+1) blocs précédents, le nouvel exposant m codé sur (qq+1) blocs, est donné par la formule : m = n*2t + a
Lorsque a est nul pour le bloc d'indice qq+1, en étape 20, y = xn. En fin d'exécution de la troisième boucle : y = (xn)2**t C'est à dire y = xm.

Figure img00140001

b Lorsque a est égal à c*2b, pour le bloc d'indice qq+1, en étape 25, y = xn. En fin d'exécution de la quatrième boucle : y = (xn) 2** (t-b) Après exécution de l'étape 29 : y = (x") )
Figure img00140002

En fin d'exécution de la cinquième boucle : y = ( (x"r r' y = (xn) 2** (t-b) *2**b* (xC) 2**b y = (xn) 2**t* (xa) C'est à dire y = xm. When a value y which results from the previous qq iterations of the second loop, is such that y = xn, n is an exponent value coded on qq blocks which corresponds to n * 25 coded on (qq + 1) blocks with all the null bits in the last block. When the last block of index qq + 1 adds the value a to (qq + 1) previous blocks, the new exponent m coded on (qq + 1) blocks, is given by the formula: m = n * 2t + a
When a is zero for the block of index qq + 1, in step 20, y = xn. At the end of the third loop: y = (xn) 2 ** t That is y = xm.
Figure img00140001

b When a is equal to c * 2b, for the block of index qq + 1, in step 25, y = xn. At the end of execution of the fourth loop: y = (xn) 2 ** (tb) After execution of step 29: y = (x "))
Figure img00140002

At the end of the fifth loop: y = ((x "rr 'y = (xn) 2 ** (tb) * 2 ** b * (xC) 2 ** by = (xn) 2 ** t * (xa) That is, y = xm.

<Desc/Clms Page number 15> <Desc / Clms Page number 15>

Les propriétés expliquées ci-dessus sont vérifiées de proche en proche jusqu'au dernier bloc d'indice q de sorte qu'en terminant la deuxième boucle en étape 35, la valeur de y contenue dans le registre 6, est une puissance de x dont l'exposant est codé sur q blocs.  The properties explained above are verified step by step until the last block of index q so that by ending the second loop in step 35, the value of y contained in the register 6, is a power of x whose the exponent is coded on q blocks.

Lorsque l'indice courant qq dépasse q en étape 35, le procédé se poursuit tel que représenté en figure 4 liée par le repère A.  When the current index qq exceeds q in step 35, the process continues as shown in FIG. 4 linked by the reference A.

En étape 36, le processeur 2 teste si le reste r est nul. Un résultat positif indique que le mot contient un nombre entier de blocs de longueur t et que ce mot ne contient plus de bits au delà du bloc d'indice q. L'étape 53 est alors directement activée. Un résultat négatif indique que le mot ne contient pas un nombre entier de blocs de longueur t et que ce mot contient encore un bloc réduit d'indice q+1 avec r bits au delà du bloc d'indice q. L'étape 37 est alors activée.  In step 36, processor 2 tests whether the remainder r is zero. A positive result indicates that the word contains an integer number of blocks of length t and that this word contains no more bits beyond the block of index q. Step 53 is then directly activated. A negative result indicates that the word does not contain an integer number of blocks of length t and that this word still contains a reduced block of index q + 1 with r bits beyond the block of index q. Step 37 is then activated.

Dans l'étape 37, le bloc courant d'indice q+1 contient r bits qui codent une valeur a traitée par le processeur 2 dans sa scrutation de ce bloc.  In step 37, the current block of index q + 1 contains r bits which encode a value treated by the processor 2 in its scan of this block.

L'étape 38 identique à l'étape 19 active une sixième boucle si la valeur a est nulle et une séquence comprenant une septième et une huitième boucle si la valeur a est non nulle.  Step 38, identical to step 19, activates a sixth loop if the value a is zero and a sequence comprising a seventh and eighth loop if the value a is non-zero.

La sixième boucle est réalisée au moyen d'étapes 39 à 42 semblables aux étapes 20 à 23 à la seule différence près que le test de dépassement de t en étape 23 est remplacé par un test de dépassement de r en étape 42 de sorte que r élévations au carré de y sont effectuées lors d'exécutions de l'étape 40 par le processeur 2.  The sixth loop is carried out by means of steps 39 to 42 similar to steps 20 to 23 with the only difference that the overshoot test of step 23 is replaced by an overshoot test of r in step 42 so that Square squares of y are performed during executions of step 40 by the processor 2.

La septième boucle est précédée d'une étape 43 identique à l'étape 24.  The seventh loop is preceded by a step 43 identical to step 24.

La septième boucle est réalisée au moyen d'étapes 44 à 47 semblables aux étapes 25 à 28 à la seule différence près que le test de dépassement de t-b en étape 28 est remplacé par un test de dépassement de r-b en étape 47 de sorte que r-b élévations au carré de y sont effectuées lors d'exécutions de l'étape 45 par le processeur 2. The seventh loop is performed by steps 44 to 47 similar to steps 25 to 28 with the only difference that the tb overflow test in step 28 is replaced by a rb overflow test in step 47 so that rb Square squares of y are performed during executions of step 45 by the processor 2.

En sortie de septième boucle, une étape 48 identique à l'étape 29, précède l'entrée de huitième boucle.  At the output of the seventh loop, a step 48 identical to step 29 precedes the entry of the eighth loop.

<Desc/Clms Page number 16> <Desc / Clms Page number 16>

La huitième boucle est réalisée au moyen d'étapes 49 à 52 identiques aux étapes 30 à 33 de sorte que b élévations au carré de y sont effectuées lors d'exécutions de l'étape 50 par le processeur 2.  The eighth loop is performed by means of steps 49 to 52 identical to steps 30 to 33 so that squared elevations of y are performed during executions of step 50 by processor 2.

Les propriétés vérifiées sur le calcul de y pour les troisième, quatrième et cinquième boucles restent valables pour les sixième, septième et huitième boucle avec y égal à xi après traitement du dernier bloc d'indice q et y égal à xm après traitement du bloc d'indice q+1 qui contient seulement r bits.  The properties checked on the calculation of y for the third, fourth and fifth loops remain valid for the sixth, seventh and eighth loop with y equal to xi after treatment of the last block of index q and y equal to xm after treatment of the block of q + 1 which contains only r bits.

Dans l'étape 53 activée en sortie de sixième boucle, en sortie de huitième boucle ou directement ou directement après l'étape 36, l'indice courant Il de mot est augmenté d'un incrément unitaire de façon à terminer le procédé lorsque l'indice augmenté Il est détecté supérieur à 1 en étape 54.  In step 53 activated at the output of the sixth loop, at the output of the eighth loop or directly or directly after step 36, the current index Il of word is increased by a unit increment so as to terminate the process when the increased index It is detected greater than 1 in step 54.

Tant que l'indice Il testé en étape 54 ne dépasse pas l'indice 1 du dernier mot du registre 5, le procédé est continué par le repère B qui relie la figure 4 à la figure 3 pour réactiver l'étape 17 de façon à scruter le premier bloc du mot suivant.  As long as the index Il tested in step 54 does not exceed index 1 of the last word of register 5, the process is continued by reference B which connects FIG. 4 to FIG. 3 to reactivate step 17 so as to scrutinize the first block of the next word.

Les propriétés sur le calcul de y expliquée précédemment lors du passage d'un bloc au suivant à l'intérieur d'un mot, restent vérifiées lors du passage du dernier bloc d'un mot au premier bloc d'un mot suivant.  The properties on the calculation of previously explained therein when passing from one block to the next inside a word, remain checked during the passage of the last block of a word to the first block of a next word.

Ainsi, la valeur de y contenue dans le registre 6 est égale à la puissance de l'argument x avec l'exposant e codé dans les 1 mots du registre 5.  Thus, the value of y contained in the register 6 is equal to the power of the argument x with the exponent e coded in the 1 word of the register 5.

On remarque dans le procédé expliqué ci-dessus que le processeur effectue t élévations au carré à chaque exécution de la troisième boucle, t-b élévations au carré à chaque exécution de la quatrième boucle puis b élévations au carré à l'exécution de la cinquième boucle qui suit, de sorte que le processeur 2 effectue t élévations au carré pour chaque traitement de bloc de longueur t que a soit nul ou non. Simplement, le processeur 2 effectue une multiplication supplémentaire pour un bloc de valeur a non nulle.  Note in the process explained above that the processor does t squares at each execution of the third loop, tb squared at each execution of the fourth loop and squared b elevations at the execution of the fifth loop that follows, so that the processor 2 performs t squares for each block processing of length t that has either zero or not. Simply, the processor 2 performs an additional multiplication for a non-zero block of value a.

Dans le traitement d'un mot de q blocs, le processeur 2 effectue q fois t élévations au carré et au plus q multiplications par exécutions de l'étape 29, selon le nombre de blocs de valeur a non nulle. Si le mot contient de plus un  In processing a word of q blocks, the processor 2 performs q times t squares and at most q multiplications by executions of step 29, according to the number of non-zero blocks of value a. If the word contains more than one

<Desc/Clms Page number 17><Desc / Clms Page number 17>

bloc réduit de r bits, le processeur effectue encore r élévations au carré et éventuellement une multiplication par exécution de l'étape 48 si la valeur a de ce bloc est non nulle. Au total, pour traiter un mot de longueur k, le processeur 2 effectue qt+r élévations au carré, c'est à dire k élévations au carré et au plus q+1 multiplications. La longueur k est imposée par la longueur des mots que le processeur 2 est prévu pour traiter. La quantité d'élévations au carré égale à k, est indépendante de la valeur de t. Seule la quantité de multiplications est sensiblement inversement proportionnelle à t.  reduced block of r bits, the processor still r reas squares and possibly a multiplication by execution of step 48 if the value of this block is non-zero. In total, to process a word of length k, processor 2 performs qt + r squared, ie k squared elevations and at most q + 1 multiplications. The length k is imposed by the length of the words that the processor 2 is intended to process. The amount of squared elevations equal to k is independent of the value of t. Only the quantity of multiplications is substantially inversely proportional to t.

La probabilité d'avoir un bloc nul est de 0,5 pour t=1 et diminue considérablement lorsque t augmente. On pourrait penser avoir intérêt à prendre t proche de k pour réduire la quantité de multiplications. Par exemple t=k, ne nécessiterait au plus qu'une multiplication par mot. Cependant dans la première phase, le processeur doit calculer (P+1) produits en quantité égale à une puissance de 2 avec (t-1) pour exposant. La croissance exponentielle de la quantité de multiplications lorsque t approche k, amoindrit rapidement l'avantage de prendre une grande valeur de k en deuxième phase où la quantité de multiplications est seulement proportionnelle à la quantité de mots nécessaire pour coder l'exposant e et à la quantité de blocs dans chaque mot. Considérant ce qui vient d'être exposé, on comprend qu'il existe une valeur optimale de t comprise entre 1 et k pour que le processeur 2 effectue une quantité minimale de multiplications. Riche de l'enseignement qui vient d'être décrit, l'homme du métier peut aisément concevoir un programme d'optimisation en se fondant sur des considérations mathématiques qui ne font pas l'objet de la présente invention. Ce programme peut être préalablement exécuté sur un ordinateur indépendant, la valeur t calculée est alors mémorisée ou téléchargée dans la mémoire 3. Ce programme de calcul de t peut aussi résider dans la mémoire 3 de façon à optimiser la valeur de t en fonction de la longueur de chaque exposant e reçu.  The probability of having a null block is 0.5 for t = 1 and decreases considerably when t increases. One might think it better to take t close to k to reduce the quantity of multiplications. For example t = k, would require at most a multiplication per word. However in the first phase, the processor must calculate (P + 1) products in an amount equal to a power of 2 with (t-1) for exponent. The exponential growth of the quantity of multiplications as t approaches k, rapidly diminishes the advantage of taking a large value of k in the second phase where the quantity of multiplications is only proportional to the quantity of words necessary to code the exponent e and to the amount of blocks in each word. Considering what has just been explained, it is understood that there exists an optimum value of t between 1 and k for the processor 2 to perform a minimum quantity of multiplications. Rich in the teaching that has just been described, those skilled in the art can easily design an optimization program based on mathematical considerations that are not the subject of the present invention. This program can be previously executed on an independent computer, the calculated value t is then stored or downloaded into the memory 3. This calculation program t can also reside in the memory 3 so as to optimize the value of t according to the length of each exponent e received.

Le dispositif calcule la valeur optimale de t au moyen d'une inéquation transcendante paramétrée par k, t et d'un rapport a. La longueur k des mots manipulés par le processeur, est connue. Le rapport a entre le coût d'un carré  The device calculates the optimal value of t by means of a transcendental inequation parameterized by k, t and a ratio a. The length k of the words manipulated by the processor is known. The ratio is between the cost of a square

<Desc/Clms Page number 18><Desc / Clms Page number 18>

et celui d'une multiplication dans les monoïdes finis est connu, par exemple au moyen d'une mesure préalable. Il est donc possible d'établir une fois pour toutes, une table pour chaque monoïde fini, chaque table donnant la valeur optimale t pour une plage de longueurs lel d'exposant.  and that of a multiplication in the finite monoids is known, for example by means of a preliminary measurement. It is therefore possible to establish once and for all a table for each finite monoid, each table giving the optimum value t for a range of lengths l of exponent.

Le procédé est maintenant expliqué dans un deuxième temps sur un cas plus général où la longueur lel de l'exposante, n'est pas égale à un nombre entier de mots de longueur k. Le mot de poids fort, c'est à dire le premier mot du registre 5, contient alors une certaine quantité de bits de poids forts nuls avant un premier bit non nul qui avec les bits suivants jusqu'au bit de poids le plus faible de ce premier mot, constitue un ensemble de k'bits avec k' inférieur à k. Cet ensemble de k'bits est alors découpé en q'blocs de taille t et si besoin en un bloc supplémentaire de taille r'où q'et r'sont donnés par la division euclidienne : K'=q't+r'
La première itération de la première boucle est spécialement paramétrée pour Il = 1. Dans l'étape 35, le test sur un dépassement de q est remplacé par un test sur un dépassement de q', les étapes 17 à 34 restant identiques par ailleurs. Dans l'étape 36, c'est la valeur nulle de r'qui est testée.
The process is now explained in a second time on a more general case where the length lel of the exponent is not equal to an integer of words of length k. The most significant word, ie the first word of the register 5, then contains a certain amount of bits of zero significant weight before a first non-zero bit which with the following bits to the least significant bit of the this first word constitutes a set of k'bits with k 'less than k. This set of k'bits is then divided into q'blocks of size t and if need be into an additional block of size r'où q'and are given by the Euclidean division: K '= q't + r'
The first iteration of the first loop is specially parameterized for Il = 1. In step 35, the test on an overshoot of q is replaced by a test on an overshoot of q ', the steps 17 to 34 remaining identical elsewhere. In step 36, the zero value of r'qui is tested.

Dans l'étape 37, c'est la valeur a codée par le bloc d'indice q'+1 qui est considérée. Dans l'étape 42, le test sur un dépassement de r est remplacé par un test sur un dépassement de r'. Dans l'étape 47, le test sur un dépassement de (r-b) est remplacé par un test sur un dépassement de (r'-b). Les étapes 38 à 41,43 à 46 et 48 à 53, restent identiques par ailleurs. In step 37, it is the value a coded by the block of index q '+ 1 which is considered. In step 42, the test on exceeding r is replaced by a test on exceeding r '. In step 47, the test on exceeding (r-b) is replaced by a test on exceeding (r'-b). Steps 38 to 41,43 to 46 and 48 to 53, remain identical elsewhere.

Cette première itération particulière offre l'avantage de trouver une valeur non nulle de a à la première exécution de l'étape 19 et donc, de ne pas exécuter inutilement l'étape 21 dans laquelle le carré de y resterait trivialement à 1 pour des blocs de poids forts avec des bits nuls. Ainsi, le processeur 2 effectue k'élévations au carré pour le premier mot.  This first particular iteration has the advantage of finding a non-zero value of a at the first execution of step 19 and thus not to execute step 21 unnecessarily in which the square of it would remain trivially at 1 for blocks. heavy weights with null bits. Thus, processor 2 performs squaring for the first word.

Les itérations suivantes de la première boucle de 11=2 à 11=1, sont réalisées au moyen des étapes 17 à 54 telles qu'elles ont été décrites dans le  The following iterations of the first loop of 11 = 2 to 11 = 1 are performed by means of steps 17 to 54 as described in FIG.

<Desc/Clms Page number 19><Desc / Clms Page number 19>

cas simplifié, la totalité de chaque mot suivant jusqu'au mot de poids faible étant alors scruté par le processeur 2.  simplified case, the totality of each next word until the word of low weight being then scrutinized by the processor 2.

Ainsi, la quantité d'élévations au carré, reste égale à la longueur lel de l'exposant e avec : lei = k'+ (1-1) k
Le cas général couvre le cas simple avec implicitement k'=k, q'=q et r'=r.
Thus, the amount of squarings remains equal to the length lel of the exponent e with: lei = k '+ (1-1) k
The general case covers the simple case with implicitly k '= k, q' = q and r '= r.

C'est pourquoi les notations k', q'et r'seront maintenant utilisées en référence au mot de poids fort qui code l'exposant e, même dans le cas particulier où k' serait égal à k. This is why the notation k ', q' and will now be used with reference to the most significant word which encodes the exponent e, even in the particular case where k 'would be equal to k.

En référence à la figure 5, une première variante du procédé permet de réduire la quantité de carrés à une valeur inférieure à lel en remplaçant les étapes 15 et 16 par des étapes particulières pour le mot de poids fort du registre 5.  With reference to FIG. 5, a first variant of the method makes it possible to reduce the quantity of squares to a value less than lel by replacing steps 15 and 16 by particular steps for the most significant word of register 5.

La deuxième phase du procédé commence alors par une étape 55 dans laquelle l'indice Il de scrutation des mots du registre 5, est initialisé à 1 pour faire prendre en charge le mot de poids fort par le processeur.  The second phase of the process then begins with a step 55 in which the index 11 of the scanning words of the register 5, is initialized to 1 to make support the word of high weight by the processor.

Dans une étape 56, l'indice qq de scrutation de blocs dans le mot, est initialisé à 1 pour faire prendre en charge le premier bloc de poids fort non nul par le processeur.  In a step 56, the block scan index qq in the word is initialized to 1 to support the first non-zero high order block by the processor.

Dans une étape 57, le processeur 2 considère une valeur a comme étant celle codée par les bits de ce bloc non nul.  In a step 57, the processor 2 considers a value a as that encoded by the bits of this non-zero block.

Dans une étape 58, semblable à l'étape 24, cette valeur a est considérée comme étant le produit d'un nombre impair c par une puissance de 2 d'exposant b.  In a step 58, similar to step 24, this value a is considered to be the product of an odd number c by a power of 2 of exponent b.

Dans une étape 59, la valeur de y est directement initialisée à la valeur xc calculée en première phase comme étant la puissance de l'argument x d'exposant c.  In a step 59, the value of y is directly initialized to the value xc calculated in the first phase as being the power of the argument x of exponent c.

Ainsi, le processeur 2 effectue sa première élévation au carré sur une valeur de y différente de 1 dans une étape 61, itérée b fois au moyen d'un indice de boucle bb préalablement initialisé à 1 dans une étape 60, incrémenté dans une étape 62 avec test de dépassement dans une étape 63.  Thus, the processor 2 first squares on a value of y different from 1 in a step 61, iterated b times by means of a loop index bb previously initialized to 1 in a step 60, incremented in a step 62 with passing test in a step 63.

<Desc/Clms Page number 20> <Desc / Clms Page number 20>

Au sortir de la boucle réalisée par les étapes 60 à 63, une étape 64 teste si q'est nul.  At the end of the loop performed by steps 60 to 63, a step 64 tests whether it is zero.

Une réponse positive à ce test, signifie que la chaîne de bits du mot courant dont le bit de poids fort est non nul, a une longueur inférieure à t. Le premier bloc scruté est alors un bloc de taille réduite r'qui est aussi le dernier avant prise en charge du mot suivant. Le procédé continue par une étape 102 représentée en figure 7 tel que le lien de l'étape 64 vers l'étape 102 peut être suivi au moyen du repère C.  A positive response to this test means that the bit string of the current word whose most significant bit is non-zero has a length less than t. The first block scanned is then a small block r'qui is also the last before taking care of the next word. The process continues with a step 102 shown in FIG. 7 such that the link from step 64 to step 102 can be followed by means of the C mark.

Une réponse négative à ce test, signifie que la chaîne de bits du mot courant dont le bit de poids fort est non nul, a une longueur supérieure ou égale à t. Le premier bloc scruté est alors un bloc de taille réduite t qui peut éventuellement être suivi d'un autre bloc de taille t ou d'un bloc de taille réduite r', avant prise en charge du mot suivant. Une étape 65 incrémente l'indice courant de bloc dont le dépassement est testé dans une étape 66. Une réponse négative au test de l'étape 65, signifie qu'il existe un bloc suivant de taille t et le procédé continue par une étape 67 représentée en figure 6 tel que le lien de l'étape 66 vers l'étape 67 et visualisé par le repère D. Une réponse positive au test de l'étape 65, signifie qu'il n'existe pas de bloc suivant de taille t et le procédé continue par une étape 85 représentée en figure 7 tel que le lien de l'étape 66 vers l'étape 85 et visualisé par le repère E.  A negative response to this test means that the bit string of the current word whose most significant bit is non-zero, has a length greater than or equal to t. The first block scanned is then a block of reduced size t which may possibly be followed by another block of size t or a block of reduced size r ', before taking over the next word. A step 65 increments the block current index of which the overshoot is tested in a step 66. A negative test response of step 65 means that there is a next block of size t and the process continues with a step 67 represented in FIG. 6 such that the link from step 66 to step 67 and displayed by the reference D. A positive test response of step 65 means that there is no next block of size t and the method continues with a step 85 shown in FIG. 7 such as the link from step 66 to step 85 and visualized by reference E.

Ainsi, le processeur 2 évite des élévations au carré triviales de valeurs unitaires de y tel qu'il pouvait le faire pour le premier bloc traité (t-b) ou (r'-b) fois dans les étapes 26 ou 45. Le procédé est optimisé en ce que la quantité d'élévations au carré est réduite d'autant.  Thus, processor 2 avoids trivial squares of unit values of y such that it could do for the first processed block (tb) or (r'-b) times in steps 26 or 45. The process is optimized in that the amount of squared elevations is reduced accordingly.

Tant qu'il existe des blocs d'indice qq inférieur à q', détecté par une étape de test 84, des étapes 67 à 83 sont réitérées. Les étapes 67 à 83 sont semblables aux étapes 18 à 34.  As long as there are blocks of index qq less than q ', detected by a test step 84, steps 67 to 83 are repeated. Steps 67 to 83 are similar to steps 18 to 34.

Dans l'étape 67, le bloc courant est considéré comme codant une valeur a testée à zéro dans une étape 68.  In step 67, the current block is considered to encode a value tested at zero in a step 68.

Une réponse positive au test de l'étape 68 active une étape 70 itérée t fois selon un indice de boucle tt initialisé à 1 en étape 69 et incrémenté en  A positive response to the test of step 68 activates a step 70 iterated t times according to a loop index tt initialized at 1 in step 69 and incremented by

<Desc/Clms Page number 21><Desc / Clms Page number 21>

étape 71 jusqu'à dépassement détecté en étape 72. A chaque itération de l'étape 70, le processeur 2 effectue une élévation au carré de y.  step 71 to exceed detected in step 72. At each iteration of step 70, the processor 2 squars y.

Une réponse négative au test de l'étape 68 active une étape 73 identique à l'étape 24 précédemment décrite. Ensuite une étape 75 est itérée (t-b) fois selon un indice de boucle tt initialisé à 1 en étape 74 et incrémenté en étape 76 jusqu'à dépassement détecté en étape 77. A chaque itération de l'étape 70, le processeur 2 effectue une élévation au carré de y.  A negative response to the test of step 68 activates a step 73 identical to step 24 previously described. Then a step 75 is iterated (tb) times according to a loop index tt initialized to 1 in step 74 and incremented in step 76 until it is exceeded in step 77. At each iteration of step 70, the processor 2 performs a squaring of y.

Que a soit nul ou non nul, l'étape 70 ou respectivement 75, fait exécuter au processeur 2, une élévation au carré sur une valeur y qui constitue déjà une puissance de l'argument x, suite aux exécutions de l'étape 59 et 61 précédentes. Ceci évite de faire des élévations inutiles au carré de valeurs unitaires.  That is either zero or non-zero, step 70 or 75 respectively, causes processor 2 to execute squaring on a value y which is already a power of argument x, following the executions of step 59 and 61 previous. This avoids unnecessary squaring of unit values.

Les étapes 78 à 83 sont identiques aux étapes 29 à 35. Après incrémentation en étape 83 de l'indice de bloc qq, un dépassement de q'testé en étape 84, signifie que q'blocs de longueur t, ont été traités par le processeur 2 dans les étapes 57 à 66 puis 67 à 83 itérées (q'-1) fois. Une réponse positive au test de l'étape 84, active une étape 85 tel que visualisé par le lien E de la figure 6 à la figure 7. Chacune des étapes 85 à 102 de la figure 7 est identique à chacune des étapes 36 à 53 de la figure 4.  Steps 78 to 83 are identical to steps 29 to 35. After incrementing in step 83 the block index qq, exceeding q 'tested in step 84 means that q' blocks of length t have been processed by the processor 2 in steps 57 to 66 then 67 to 83 iterated (q'-1) times. A positive test response of step 84 activates a step 85 as viewed by the link E of FIG. 6 to FIG. 7. Each of steps 85 to 102 of FIG. 7 is identical to each of steps 36 to 53. of Figure 4.

Dans l'étape 102, l'indice de mot 11, est mis à la valeur 2 pour référencer le deuxième mot du registre 5. Une valeur de 1 supérieure à 2 provoque une réponse négative au test de l'étape 103 qui active l'étape 17 pour poursuivre la deuxième phase du procédé de façon identique à celle décrite précédemment en référence aux figures 3 et 4 pour les mots d'indice Il supérieur à 1. Le repère B visualise le lien de la figure 7 vers la figure 3.  In step 102, the word index 11 is set to 2 to reference the second word of the register 5. A value of 1 greater than 2 causes a negative response to the test of step 103 which activates the step 17 to continue the second phase of the method in the same manner as that described above with reference to FIGS. 3 and 4 for the words of index Il greater than 1. The reference B shows the link of FIG. 7 to FIG.

En référence à la figure 8, une deuxième variante du procédé effectue, lorsque r est non nul, un découpage du mot en q blocs de taille t et un bloc de taille réduite r de sorte que le bloc de taille réduite n'est pas systématiquement le dernier bloc du mot considéré.  With reference to FIG. 8, a second variant of the method performs, when r is non-zero, a division of the word into q blocks of size t and a block of reduced size r so that the block of reduced size is not systematically the last block of the word considered.

<Desc/Clms Page number 22> <Desc / Clms Page number 22>

Le procédé décrit en référence à la figure 3 est modifié en ce que le passage de l'étape 16 à l'étape 17, est dérouté vers une étape 104 tel que visualisé par le repère J sur la figure 8.  The method described with reference to FIG. 3 is modified in that the transition from step 16 to step 17 is diverted to a step 104 as visualized by the reference J in FIG. 8.

Dans l'étape 104, le processeur 2 teste si r est nul pour le mot courant.  In step 104, processor 2 tests whether r is zero for the current word.

Une réponse positive ramène au procédé non modifié tel que visualisé par le repère B. Une réponse négative active une étape 105. A positive response returns to the unmodified process as viewed by the B mark. A negative response activates a step 105.

Dans l'étape 105 et les suivante, un indice qq référence un rang de bit dans le mot d'indice courant Il, tel que qq=1 référence le bit de poids le plus fort, chaque valeur d'indice suivante référence un bit de poids plus faible que la précédente jusqu'à la valeur qq=k qui référence le bit de poids le plus faible.  In step 105 and the following, an index qq references a bit rank in the current index word Il, such that qq = 1 references the most significant bit, each subsequent index value references a bit of weight lower than the previous one up to the value qq = k which references the least significant bit.

Dans l'étape 105, l'indice qq est initialisé à 1 pour référencer le bit de poids fort. On comprendra que pour le mot de poids fort lorsque 11=1, l'indice qq peut être initialisé au rang du premier bit de poids fort non nul en remplaçant dans la suite k par k', q par q'et r par r'. In step 105, the index qq is initialized to 1 to reference the most significant bit. It will be understood that for the most significant word when 11 = 1, the index qq can be initialized to the rank of the first non-zero high order bit by replacing in the following k by k ', q by q' and r by r ' .

Dans une étape 106, le processeur applique un masque sur le mot courant pour interpréter une suite de r bits de rang qq à (qq+r-1) comme codant une valeur d.  In a step 106, the processor applies a mask on the current word to interpret a sequence of r bits of rank qq to (qq + r-1) as encoding a value d.

Une étape 107 consiste à tester une valeur nulle de d. Une réponse positive indique qu'un bloc de taille réduite r a été trouvé avec tous ses bits à zéro. Des étapes 108 à 113 sont alors activées pour effectuer r élévations au carré de y. Les étapes 108 à 111 sont identiques aux étapes 20 à 23. Une réponse négative indique qu'un bloc de taille réduite r n'a pas été trouvé avec tous ses bits à zéro. Une étape 114 est alors activée.  A step 107 consists in testing a zero value of d. A positive response indicates that a small block r has been found with all bits at zero. Steps 108 to 113 are then enabled to perform squarings of y. Steps 108 to 111 are the same as steps 20 to 23. A negative response indicates that a reduced size block r was not found with all of its bits set to zero. A step 114 is then activated.

Pour le cas où un bloc de taille réduite r a été trouvé, l'étape 112 augmente de r, l'indice qq pour se positionner sur le bit qui suit le bit de poids faible du bloc de taille réduite.  For the case where a block of reduced size r has been found, step 112 increases by r, the index qq to position itself on the bit which follows the least significant bit of the block of reduced size.

L'étape 113 teste si le nouvel indice courant qq est supérieur à k. Une réponse positive indique un dépassement qui fait se poursuivre le procédé par le repère H vers une étape 162 décrite ultérieurement en référence à la figure
10. Une réponse négative indique qu'il existe encore des bits de poids faibles dans le mot courant à la suite du bloc de taille réduite r. L'existence de bits de
Step 113 tests whether the new current index qq is greater than k. A positive response indicates an overshoot which causes the process to proceed with the H mark to a step 162 described later with reference to FIG.
10. A negative response indicates that there are still bits of low weight in the current word as a result of the reduced size block r. The existence of bits of

<Desc/Clms Page number 23><Desc / Clms Page number 23>

poids faible en quantité nécessairement multiple de t, fait se poursuivre le procédé par le repère F vers une étape 127 décrite ultérieurement en référence à la figure 9.  a small quantity in necessarily multiple quantity of t, the method is continued by the reference F to a step 127 described later with reference to FIG. 9.

Dans l'étape 114, le processeur applique un masque sur le mot courant pour interpréter une suite de t bits de rang qq à (qq+t-1) comme codant une valeur a. C'est à dire que lorsqu'une chaîne de r premiers bits de poids fort n'est pas détectée nulle en étape 107, un bloc de t bits est considéré dans les étapes 114 à 124.  In step 114, the processor applies a mask on the current word to interpret a sequence of t bits of rank qq to (qq + t-1) as encoding a value a. That is, when a string of r first high order bits is not detected zero in step 107, a block of t bits is considered in steps 114-124.

La valeur de a étant nécessairement non nulle du fait que les r bits de poids fort ne sont pas tous nuls, une succession d'étapes 115 à 124 identiques chacune respectivement aux étapes 24 à 33, suit l'étape 114. Comme dans le procédé décrit en référence à la figure 3, les étapes 115 à 124 ont pour fonction de faire exécuter au processeur 2, (t-b) élévations au carré suivies d'une multiplication par une puissance d'argument x obtenue en première phase suivie de b élévations au carré.  The value of a being necessarily non-zero because the r bits of high weight are not all zero, a succession of steps 115 to 124 identical respectively to steps 24 to 33, follows step 114. As in the method With reference to FIG. 3, steps 115 to 124 have the function of causing processor 2 (tb) squaring followed by multiplication by an argument power x obtained in first phase followed by b elevations. square.

Pour le cas où un bloc de taille réduite r n'a pas été trouvé, l'étape 125 augmente de t, l'indice qq pour se positionner sur le bit qui suit le bit de poids faible du bloc de taille t.  For the case where a block of reduced size r has not been found, step 125 increases by t, the index qq to position itself on the bit which follows the least significant bit of the block of size t.

L'étape 126 teste si le nouvel indice courant qq est supérieur à q. t. Une réponse positive indique un dépassement qui fait se poursuivre le procédé par le repère G vers une étape 145 décrite ultérieurement en référence à la figure 10. Une réponse négative indique qu'il existe encore des bits de poids faibles dans le mot courant à la suite du bloc de taille t courant. Après un passage dans l'étape 113, le procédé qui se poursuit selon les repères F et H, ne repasse plus par les étapes 106 à 126. A chaque passage dans l'étape 126, un nombre entier de blocs de t bits a été traité par le processeur 2. Si q blocs ont été traités au passage dans l'étape 125, qq est égal à q. t+1 dans l'étape 126. Tant que q blocs de taille t n'ont pas été traités, l'existence de bits de poids faible en quantité nécessairement supérieure à t, fait se poursuivre le procédé par bouclage sur l'étape 106.  Step 126 tests whether the new current index qq is greater than q. t. A positive response indicates an overshoot which causes the process to proceed by the G-mark to a step 145 described later with reference to Fig. 10. A negative response indicates that there are still low-order bits in the current word as a result of block size current t. After a passage in the step 113, the process which continues according to the marks F and H, no longer passes through the steps 106 to 126. At each passage in the step 126, an integer number of blocks of t bits has been processed by the processor 2. If q blocks have been processed in the passage in step 125, qq is equal to q. t + 1 in step 126. As long as q blocks of size t have not been processed, the existence of bits of low weight in quantities necessarily greater than t makes the loopback process on step 106 continue. .

<Desc/Clms Page number 24> <Desc / Clms Page number 24>

En référence à la figure 9, le procédé continue suivant le repère F.  With reference to FIG. 9, the process continues according to the reference F.

Lorsque l'indice qq testé en étape 113, n'est pas supérieur à k, il reste des bits de poids faible dans le mot courant d'indice Il. Comme l'étape 113 fait suite au traitement d'un bloc de taille réduite r, les bits de poids faible constituent nécessairement un nombre entier de blocs de taille t. When the index qq tested in step 113 is not greater than k, there remain bits of low weight in the current word of index Il. Since step 113 follows the processing of a reduced size block r, the least significant bits necessarily constitute an integer of blocks of size t.

Dans une étape 127, le processeur applique un masque sur le mot courant pour interpréter une suite de t bits de rang qq à (qq+t-1) comme codant une valeur a.  In a step 127, the processor applies a mask on the current word to interpret a sequence of t bits of rank qq to (qq + t-1) as encoding a value a.

Dans une étape 128, le processeur 2 teste si la valeur a est nulle comme dans l'étape 19. Une réponse positive active des étapes 129 à 132, chacune respectivement identique à chacune des étapes 20 à 23 pour effectuer t élévations au carré de y. Une réponse négative active des étapes 133 à 142, chacune respectivement identique à chacune des étapes 24 à 33 pour effectuer (t-b) élévations au carré de y, suivies d'une multiplication de y par une puissance de x obtenue en première phase, suivie de b élévations au carré de y.  In a step 128, the processor 2 tests whether the value a is zero as in step 19. A positive response activates steps 129 to 132, each respectively identical to each of the steps 20 to 23 to perform t squares of y. . A negative response activates steps 133 to 142, each respectively identical to each of steps 24 to 33 to perform (tb) square squares of y, followed by a multiplication of y by a power of x obtained in first phase, followed by b squared elevations of y.

A la suite des t élévations au carré selon les étapes 129 à 132 ou des t élévations au carré et de la multiplication selon les étapes 133 à 142, une étape 143 augmente de t, l'indice de rang de bit.  Following squares according to steps 129 to 132 or squares and multiplication according to steps 133 to 142, step 143 increases the bit rank index by t.

Dans une étape de test 144, une valeur de qq supérieur à k, indique que le traitement du mot d'indice courant Il est terminé. Une valeur de qq non supérieure à k, indique qu'il existe encore des blocs de longueur t à traiter dans le mot d'indice courant Il.  In a test step 144, a value of qq greater than k indicates that the processing of the current index word II is complete. A value of qq no greater than k indicates that there are still blocks of length t to be processed in the current index word II.

Une réponse négative au test de l'étape 144 boucle le procédé sur l'étape 127 pour traiter les blocs restants de façon identique à celle décrite en référence à la figure 3.  A negative test response of step 144 loops the process on step 127 to treat the remaining blocks identically to that described with reference to FIG.

Une réponse positive au test de l'étape 144 active l'étape 161 décrite en référence à la figure 10 tel que visualisé par le lien H de la figure 9 à la figure
10.
A positive response to the test of step 144 activates step 161 described with reference to FIG. 10 as viewed by link H of FIG. 9 in FIG.
10.

En référence à la figure 10, le repère G fait suite à une réponse positive au test de l'étape 126 qui signifie que q blocs de taille t ont été traités sans  With reference to FIG. 10, the reference G follows a positive test response of step 126 which means that q blocks of size t have been processed without

<Desc/Clms Page number 25><Desc / Clms Page number 25>

avoir trouvé de bloc de taille réduite r constitué de bits nuls. Il reste alors un bloc de taille réduite r.  found a block of reduced size r consisting of null bits. It remains then a block of reduced size r.

Dans une étape 145, le processeur applique un masque sur le mot courant pour interpréter une suite de t bits de rang qq à (qq+r-1) comme codant une valeur a pour traiter le bloc de taille réduite restant, de façon identique à celle décrite en référence à la figure 4, au moyen d'étapes 146 à 160, identiques chacune respectivement à chacune des étapes 38 à 52.  In a step 145, the processor applies a mask on the current word to interpret a sequence of t bits of rank qq to (qq + r-1) as coding a value a to process the block of reduced size remaining, identically to that described with reference to FIG. 4, by means of steps 146 to 160, identical each respectively to each of the steps 38 to 52.

Suite à une réponse positive au test de l'étape 144,150 ou 160, l'étape 161 augmente l'indice Il d'une unité pour référencer le mot suivant du registre 5 s'il existe. Si le nouvel indice Il testé en étape 162, est supérieur à la longueur 1 de l'exposant e exprimée en nombre de mots, le procédé est fini avec y dans le registre 6, ayant pour valeur la puissance de l'argument x d'exposant e. Sinon, l'étape 162 est bouclée sur l'étape 104 ou 105 pour traiter le mot suivant du registre 5 qui code l'exposant e.  Following a positive response to the test of step 144, 150 or 160, step 161 increases the index Il by one unit to reference the next word in register 5 if it exists. If the new index Il tested in step 162, is greater than the length 1 of the exponent e expressed in number of words, the process is finite with y in the register 6, having for value the power of the argument x d exhibitor e. Otherwise, step 162 is looped on step 104 or 105 to process the next word of the register 5 which encodes the exponent e.

Cette deuxième variante, en ne plaçant pas systématiquement le bloc de taille réduite r sur les bits de poids faible à la suite des q blocs de taille t, permet d'économiser une multiplication lorsqu'il existe un bloc de taille réduite r avec tous ses bits nuls avant un bloc de taille t. Cette deuxième variante a pour effet d'augmenter la probabilité d'apparition d'un bloc nul.  This second variant, by not systematically placing the reduced-size block r on the low-order bits following the q blocks of size t, makes it possible to save a multiplication when there is a small block r with all its null bits before a block of size t. This second variant has the effect of increasing the probability of appearance of a null block.

La deuxième variante du procédé peut être combinée à la première variante par passage direct de l'étape 115 à l'étape 120, suite et seulement suite à la première exécution de l'étape 114. En court-circuitant les étapes 116 à 119 pour la scrutation des t bits de poids fort de l'exposant e, on retrouve les avantages de la première variante expliquée en référence à la figure 5, à savoir ceux d'éviter de faire (t-b) premières élévations au carré triviales d'une valeur unitaire de y.  The second variant of the method can be combined with the first variant by direct passage from step 115 to step 120, following and only following the first execution of step 114. By short-circuiting steps 116 to 119 for the scan of the t high-order bits of the exponent e, we find the advantages of the first variant explained with reference to FIG. 5, namely those of avoiding making (tb) trivial first trivial squares of a value unitary of y.

Le procédé est par exemple mis en oeuvre au moyen du dispositif 1 décrit en référence à la figure 1 dans la mémoire 3 duquel réside un programme constitué d'instructions et de données qui codent en langage exécutable par le processeur 2, les étapes précédemment décrites.  The method is for example implemented by means of the device 1 described with reference to Figure 1 in the memory 3 which resides a program consisting of instructions and data that encode executable language by the processor 2, the previously described steps.

<Desc/Clms Page number 26> <Desc / Clms Page number 26>

On comprendra que les étapes telles que décrites en référence aux figures 2 à 10, l'ont été de cette manière pour faciliter la compréhension du procédé. Certaines étapes ou monoïdes d'étapes peuvent être réalisées au moyen de sous programmes judicieusement paramétrés et d'instructions standards d'un langage de programmation.  It will be understood that the steps as described with reference to Figures 2 to 10, have been in this manner to facilitate understanding of the method. Some steps or monoïdes of steps can be realized by means of appropriately parameterized sub-programs and standard instructions of a programming language.

Par exemple, les étapes 11 à 14 sont réalisables au moyen d'une instruction de boucle standard pour effectuer 2t-2 multiplications d'une valeur xi par un carré X2 pour générer une puissance x, +i.  For example, steps 11 to 14 are achievable by means of a standard loop instruction to perform 2t-2 multiplications of a value xi by a square X2 to generate a power x, + i.

Les étapes 20 à 23,39 à 42,69 à 72,88 à 91,108 à 111,129 à 132 ou 147 à 150 sont réalisables au moyen d'un même premier sous programme appelé par une première instruction suite à une réponse positive à un test de valeur nulle respectivement en étape 19,38, 68,87, 107,128 ou 146, paramétré par t, r ou r'selon le cas pour le test de retour de sous programme.  Steps 20 to 23, 39 to 42, 69 to 72, 88 to 91, 108 to 111, 129 to 132 or 147 to 150 are achievable by means of the same first subroutine called by a first instruction following a positive response to a test. zero value respectively in step 19, 38, 68, 87, 107, 128 or 146, parameterized by t, r or as appropriate for the subroutine return test.

Le premier sous programme comprend une instruction de boucle standard pour effectuer t, r ou r'élévations au carré selon la paramétrisation.  The first subroutine includes a standard loop instruction to perform t, r or squared according to the parameterization.

Ce même premier sous programme permet aussi de réaliser les étapes 25 à 28,44 à 47,74 à 77,93 à 96,116 à 119,134 à 137 ou 152 à 155 en étant appelé par une deuxième instruction en fin respectivement d'étape 24, 43,73, 92,115, 133 ou 151, paramétré par (t-b), (r-b) ou (r'-b) selon le cas pour le test de retour de sous programme.  This same first subroutine also makes it possible to carry out steps 25 to 28,44 to 47,74 to 77,93 to 96,116 to 119,134 to 137 or 152 to 155 by being called by a second instruction at the end of step 24, respectively. , 73, 92, 115, 133 or 151, parameterized by (tb), (rb) or (r'-b) as appropriate for the subroutine return test.

Ce même premier sous programme permet encore de réaliser les étapes 30 à 33,49 à 52,60 à 63,79 à 82,98 à 101,121 à 124,139 à 142 ou 157 à 160 en étant appelé par une troisième instruction en fin respectivement d'étape 29,48, 59,78, 97,120, 138 ou 156, paramétré par b pour le test de retour de sous programme.  This same first sub-program also makes it possible to carry out steps 30 to 33, 49 to 52, 60 to 63, 79 to 82, 98 to 101, 121 to 124, 139 to 142 or 157 to 160 by being called by a third instruction at the end respectively. step 29,48, 59,78, 97,120, 138 or 156, set by b for the subroutine return test.

Les étapes 24 à 33,43 à 52,73 à 82,92 à 101,133 à 142 ou 151 à 160 sont réalisables au moyen d'un même deuxième sous programme appelé par une quatrième instruction suite à une réponse négative au test de valeur nulle respectivement en étape 19,38, 68,87, 128 ou 146, paramétré par t, r ou r' selon le cas.  The steps 24 to 33,43 to 52,73 to 82,92 to 101,133 to 142 or 151 to 160 are feasible by means of the same second subroutine called by a fourth instruction following a negative response to the zero value test respectively in step 19, 38, 68, 87, 128 or 146, parameterized by t, r or r 'as the case may be.

<Desc/Clms Page number 27> <Desc / Clms Page number 27>

Le deuxième sous programme comprend au moins une cinquième instruction pour déterminer c et b en étape 24,43, 73,92 133 ou 151, suivie de la deuxième instruction pour appeler le premier sous programme, suivie d'une sixième instruction au retour de premier sous programme pour effectuer une multiplication selon l'étape 29,48, 78,97, 138 ou 156, suivie de la troisième instruction pour appeler le premier sous programme, suivie d'une septième instruction au retour de premier sous programme pour effectuer un retour au programme appelant.  The second subroutine includes at least one fifth instruction to determine c and b in step 24,43, 73,92 133 or 151, followed by the second instruction to call the first subroutine, followed by a sixth instruction to return first. sub-program to perform a multiplication according to step 29,48, 78,97, 138 or 156, followed by the third instruction to call the first subroutine, followed by a seventh return instruction of the first subroutine to perform a return to the calling program.

Ce même deuxième sous programme permet aussi de réaliser les étapes 115 à 124 en étant appelé par une huitième instruction en fin d'étape 114, paramétré part.  This same second sub-program also makes it possible to carry out steps 115 to 124 by being called by an eighth instruction at the end of step 114, parameterized by part.

L'homme du métier peut alors réaliser facilement un programme principal avec les appels de sous programmes adaptés, pour mettre en oeuvre le procédé décrit en référence aux figures 3 et 4,5 à 7 ou 8 à 10.  The person skilled in the art can then easily carry out a main program with the appropriate subroutine calls, to implement the method described with reference to FIGS. 3 and 4,5 to 7 or 8 to 10.

L'invention s'applique particulièrement aux procédés cryptographiques basés l'arithmétique modulaire.  The invention is particularly applicable to cryptographic methods based on modular arithmetic.

Le standard le plus courant, PKCS&num;1 définit une clé secrète RSA comme un ensemble de module et d'exposant, sans possibilité d'ajouter des données, considérées secrètes que le signataire pourrait exploiter dans un algorithme propriétaire, comme des chaînes d'additions. L'invention permet des calculs RSA accélérés en utilisant les seules données de la clé secrète, définies dans la norme. Une application directe est l'implantation d'un module de calcul cryptographique dans des navigateurs utilisant la structure de données définie dans la norme.  The most common standard, PKCS &num; 1 defines a RSA secret key as a set of module and exponent, without the possibility to add data, considered secret that the signer could exploit in a proprietary algorithm, such as additions chains. . The invention allows accelerated RSA calculations using the only secret key data defined in the standard. A direct application is the implementation of a cryptographic calculation module in browsers using the data structure defined in the standard.

Les algorithmes à clé publique basés sur le logarithme discret (El Gamal, DSA, Guillou-Quisquater) requièrent des élévations à la puissance, modulaires avec des exposants qui varient à chaque exécution du protocole. L'apport de données auxiliaires telles des chaînes d'additions, est écarté car trop coûteux et non réutilisable avec certitude. L'invention offre une accélération des calculs à coût réduit.  Public key algorithms based on the discrete logarithm (El Gamal, DSA, Guillou-Quisquater) require modular power elevations with exponents that vary with each execution of the protocol. The contribution of auxiliary data such as chains of additions, is discarded because too expensive and not reusable with certainty. The invention offers an acceleration of calculations at reduced cost.

<Desc/Clms Page number 28> <Desc / Clms Page number 28>

L'algorithme d'échange de clé de Diffie-Helmann nécessite deux élévations à la puissance, modulaires à chaque exécution. La sécurité de l'algorithme exige que les exposants changent à chaque exécution. L'invention est appliquée avantageusement pour ces calculs.  The Diffie-Helmann key exchange algorithm requires two power elevations, modular at each execution. The security of the algorithm requires exhibitors to change with each run. The invention is advantageously applied for these calculations.

Les algorithmes cryptographiques récents, basés sur les courbes elliptiques, utilisent des notations additives pour le monoïde fini : une addition remplace la multiplication, un doublement remplace le carré, une multiplication par un entier remplace l'élévation à la puissance et une initialisation à zéro remplace l'initialisation à 1. Cette modification formelle ne change rien à la portée de l'invention qui s'applique alors aux calculs y=e'x, avec e entier et x dans le monoïde fini.  Recent cryptographic algorithms, based on elliptic curves, use additive notations for the finite monoid: an addition replaces the multiplication, a doubling replaces the square, an integer multiplication replaces the elevation with the power, and a zero initialization replaces initialization to 1. This formal modification does not change the scope of the invention which then applies to the calculations y = éx, with e integer and x in the finite monoid.

L'invention s'applique également aux protocoles cryptographiques basé sur le logarithme discret dans les groupes de classes et aux protocoles utilisant les groupes de tresses.- The invention also applies to cryptographic protocols based on the discrete logarithm in class groups and protocols using groups of braids.

Claims (1)

- pour un premier bloc scruté de premier mot tel qu'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de REVENDICATIONS : 1. Procédé pour élever un argument x à une puissance d'exposant e dans un groupe fini comprenant une loi de composition interne, au moyen d'un processeur (2) capable de traiter des mots de longueur k exprimée en bits, l'exposant e étant codé sur 1 mots de k bits avec 1 supérieur ou égal à 1, caractérisé en ce qu'il comprend : - une première phase de génération de puissances de l'argument x avec un exposant impair compris entre 1 et 2t-1 où t est un nombre inférieur à k ; - une deuxième phase de traitement de chaque mot qui code l'exposant e dans un ordre allant du bit de poids fort jusqu'au bit de poids faible de l'exposant e, dans laquelle : - le processeur (2) scrute le mot courant à traiter par blocs d'au plus t bits - en allant des bits de poids forts vers et jusqu'au bit de poids le plus faible du mot courant ; 1 pour le bit de poids faible du bloc, le processeur (2) charge à partir d'un registre (6), une valeur y égale à une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, effectue b élévations au carré de ladite valeur y et range le résultat ainsi obtenu comme nouvelle valeur y dans le registre (6) ; - pour chaque bloc scruté suivant, le processeur (2) effectue des élévations au carré de ladite valeur y, en quantité égale au nombre de bits du bloc scruté, et s'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, le processeur (2) applique la loi de composition interne à la valeur y et à une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant d'effectuer les b dernières <Desc/Clms Page number 30> élévations au carré de ladite valeur y et de ranger le résultat ainsi obtenu dans le registre (6) ; de sorte que la valeur y contenue dans le registre (6) après scrutation du dernier bloc comprenant les bits de poids les plus faible pour coder l'exposant e, est égale à l'argument x élevé à la puissance d'exposant e dans le groupe fini. 2. Procédé pour élever un argument x à une puissance d'exposant e selon la revendication 1, caractérisé en ce que, le bit non nul de poids le plus fort du premier mot étant de rang k'pris à partir de 1 pour le bit de poids le plus faible, le premier bloc scruté a pour bit de poids fort, le bit de rang k'dans le premier mot. 3. Procédé pour élever un argument x à une puissance d'exposant e selon la revendication 1 ou 2, caractérisé en ce que le registre (6) est initialisé avec une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du premier bloc scruté non nul du premier mot. 4. Procédé pour élever un argument x à une puissance d'exposant e selon la revendication 1 ou 2, caractérisé en ce qu'en début de deuxième phase, la valeur y est initialisée dans le registre (6) avec un élément neutre de la loi de composition interne et en ce que pour chaque bloc scruté à partir du premier, le processeur (2) effectue des élévations au carré de ladite valeur y, en quantité égale au nombre de bits du bloc scruté, et s'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, le processeur (2) applique la loi de composition interne à la valeur y et à une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant <Desc/Clms Page number 31> d'effectuer les b dernière élévations au carré de ladite valeur y et de ranger le résultat ainsi obtenu dans le registre (6). 5. Procédé pour élever un argument x à une puissance d'exposant e selon l'une des revendications précédentes, caractérisé en ce qu'au moins chaque mot au delà du premier mot, est découpé en q blocs de taille t et, si k n'est pas un multiple de t, un bloc de taille réduite r inférieure à t. 6. Procédé pour élever un argument x à une puissance d'exposant e selon l'une des revendications 2 à 5, caractérisé en ce que le premier mot est découpé en q'blocs de taille t et, si k'n'est pas un multiple de t, un bloc de taille réduite r'inférieure à t. 7. Procédé pour élever un argument x à une puissance d'exposant e selon la revendication 5 ou 6, caractérisé en ce que pour chaque mot, la scrutation d'un bloc commence par une scrutation de bloc de taille réduite sur les bits de poids fort du bloc jusqu'à trouver un bloc de taille réduite avec tous ses bits nuls et dès qu'un tel bloc est trouvé, la scrutation des blocs suivants s'il en existe, est continuée par bloc de taille t. 8. Procédé pour élever un argument x à une puissance d'exposant e selon la revendication 5 ou 6, caractérisé en ce que pour chaque mot, la scrutation du bloc de taille réduite est faite après q scrutations de blocs de taille t. 9. Procédé pour élever un argument x à une puissance d'exposant e selon l'une des revendications précédentes, caractérisé en ce que le groupe fini est un ensemble d'entiers relatifs d'un intervalle fermé [0, N-1] et en ce que la loi de composition interne est la multiplication modulo N d'élément neutre unitaire. 10. Procédé pour élever un argument x à une puissance d'exposant e selon l'une des revendications 1 à 8, caractérisé en ce que le groupe fini est un <Desc/Clms Page number 32> ensemble d'entiers positifs ou nul de valeur absolue strictement inférieure à un nombre entier N et en ce que la loi de composition interne est l'addition modulo n d'élément neutre nul. - pour un premier bloc scruté de premier mot tel qu'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, le processeur (2) charge à partir d'un registre (6), une valeur y égale à une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, effectue b élévations au carré de ladite valeur y et range le résultat ainsi obtenu comme nouvelle valeur y dans le registre (6) ; 11. Dispositif pour élever un argument x à une puissance d'exposant e dans un groupe fini muni d'une loi de composition interne, comprenant un processeur (2) capable de traiter des mots de longueur k exprimée en bits, un registre (4) pour recevoir l'argument x, un registre (5) de 1 mots de k bits avec 1 supérieur ou égal à 1 pour recevoir l'exposant e, un registre (6) pour produire l'argument x élevé à la puissance d'exposant e et une mémoire (3) pour contenir des données et des instructions exécutables par le processeur (2), caractérisé en ce qu'il comprend : - un registre (7) pour contenir des puissances de l'argument x avec un exposant impair compris entre 1 et 2t-1 où t est un nombre inférieur à k contenu dans la mémoire (3) ; - des instructions contenues dans la mémoire (3) pour traiter chaque mot qui code l'exposant e dans un ordre allant du bit de poids fort jusqu'au bit de poids faible de l'exposant e, agencées pour commander le processeur (2) de façon à ce qu'en exécution : - le processeur (2) scrute le mot courant à traiter par blocs d'au plus t bits en allant des bits de poids forts vers et jusqu'au bit de poids le plus faible du mot courant ; <Desc/Clms Page number 33> fin | 12. Dispositif pour élever un argument x à une puissance d'exposant e selon la revendication 11, caractérisé en ce que la mémoire (3) contient au moins une instruction pour faire scruter par le processeur (2) le premier mot du registre (5) à partir du bit non nul de poids le plus fort de façon que ce bit étant de rang k'pris à partir de 1 pour le bit de poids le plus faible, seulement k'bits du premier mot sont traités. - pour chaque bloc scruté suivant, le processeur (2) effectue des élévations au carré de ladite valeur y, en quantité égale au nombre de bits du bloc scruté, et s'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, le processeur (2) applique la loi de composition interne à la valeur y et à une puissance contenue dans le registre (7) dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant d'effectuer les b dernière élévations au carré de ladite valeur y et de ranger le résultat ainsi obtenu dans le registre (6) ; de sorte que la valeur y contenue dans le registre (6) après scrutation du dernier bloc comprenant les bits de poids les plus faibles pour coder l'exposant e, est égale à l'argument x élevé à la puissance d'exposant e dans le groupe 13. Dispositif pour élever un argument x à une puissance d'exposant e selon la revendication 11 ou 12, caractérisé en ce que le registre (6) est initialisé avec une puissance contenue dans le registre (7) dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du premier bloc scruté non nul du premier mot. 14. Dispositif pour élever un argument x à une puissance d'exposant e selon la revendication 11 ou 12, caractérisé en ce que le registre (6) est initialisé à 1 et en ce que la mémoire (3) contient au moins une instruction pour <Desc/Clms Page number 34> faire effectuer par le processeur (2) des élévations au carré de ladite valeur y, en quantité égale au nombre de bits de chaque bloc scruté, et s'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, à faire appliquer par le processeur (2) la loi de composition interne à la valeur y et à une puissance contenue dans le registre (7) dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant d'effectuer les b dernière élévations au carré de ladite valeur y et de ranger le résultat ainsi obtenu dans le registre (6). 15. Dispositif pour élever un argument x à une puissance d'exposant e selon l'une des revendications 11 à 14, caractérisé en ce que la mémoire (3) contient au moins une instruction pour découper au moins chaque mot au delà du premier mot, en q blocs de taille t et, si k n'est pas un multiple de t, un bloc de taille réduite r inférieure à t. 16. Dispositif pour élever un argument x à une puissance d'exposant e selon l'une des revendications 12 à 15, caractérisé en ce que la mémoire (3) contient au moins une instruction pour découper le premier mot en q'blocs de taille t et, si k'n'est pas un multiple de t, un bloc de taille réduite r'inférieure à t. 17. Dispositif pour élever un argument x à une puissance d'exposant e selon la revendication 15 ou 16, caractérisé en ce que la mémoire (3) contient au moins une instruction pour commencer sur chaque mot, la scrutation d'un bloc par une scrutation de bloc de taille réduite sur les bits de poids fort du bloc jusqu'à trouver un bloc de taille réduite avec tous ses bits nuls et au moins une instruction pour continuer dès qu'un tel bloc est trouvé, la scrutation du ou des blocs suivants s'il en existe, par bloc de taille t. <Desc/Clms Page number 35> 18. Dispositif pour élever un argument x à une puissance d'exposant e selon la revendication 15 ou 16, caractérisé en ce que la mémoire (3) contient au moins une instruction pour scruter le bloc de taille réduite après scrutation de q blocs de taille t. - pour un premier bloc scruté de premier mot tel qu'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 19. Programme pour produire dans un registre (6) un argument x reçu d'un registre (4), élevé à une puissance d'exposant e reçu d'un registre (5) de 1 mots de k bits avec 1 supérieur ou égal à 1, k étant une longueur de mot exprimée en bits que peut traiter un processeur (2), caractérisé pour faire exécuter par le processeur (2) : - dans une première phase, une génération de puissances de l'argument x avec un exposant impair compris entre 1 et 2t-1 où t est un nombre inférieur à k ; - dans une deuxième phase, un traitement de chaque mot qui code l'exposant e dans un ordre allant du bit de poids fort jusqu'au bit de poids faible de l'exposant e, tel que : - le processeur (2) scrute le mot courant à traiter par blocs d'au plus t bits en allant des bits de poids forts vers et jusqu'au bit de poids le plus faible du mot courant ;for a first scrambled block of the first word as it exists in the scanned block a non-zero bit of the lowest weight with a rank b taken from CLAIMS: 1. Method for raising an argument x to a power of exponent e in a finite group comprising an internal composition law, by means of a processor (2) capable of processing words of length k expressed in bits, the exponent e being encoded on 1 k-bit words with 1 greater or equal to 1, characterized in that it comprises: a first power generation phase of the argument x with an odd exponent between 1 and 2t-1 where t is a number less than k; a second processing phase of each word which encodes the exponent e in an order ranging from the most significant bit to the least significant bit of the exponent e, in which: the processor (2) scans the current word to be processed in blocks of at most t bits - by going from the most significant bits to and from the least significant bit of the current word; 1 for the least significant bit of the block, the processor (2) loads from a register (6), a value y equal to a power generated in first phase whose exponent ca for value that encoded by the bit of rank b and the next rank bits up to the most significant bit of the scanned block, b squaring said value y and storing the result thus obtained as a new value y in the register (6); for each following scrambled block, the processor (2) squares said value y, in an amount equal to the number of bits of the scrambled block, and if there exists in the scruttered block a nonzero bit of the most significant weight. low with a rank b taken from 1 for the least significant bit of the block, the processor (2) applies the internal composition law to the value y and to a power generated in the first phase whose exponent ca to value that encoded by the bit of rank b and the next rank bits to the most significant bit of the scanned block, before performing the last bs of said value y and storing the result thus obtained in the register (6); so that the value y contained in the register (6) after scanning the last block comprising the least significant bits to code the exponent e, is equal to the argument x raised to the exponent power e in the finished group. 2. Method for raising an argument x to an exponent power e according to claim 1, characterized in that the nonzero bit of the largest weight of the first word is of rank k'pris from 1 for the bit of the lowest weight, the first block scanned has the most significant bit, the bit of rank k 'in the first word. 3. A method for raising an argument x to an exponent power e according to claim 1 or 2, characterized in that the register (6) is initialized with a power generated in the first phase whose exponent is equal to that encoded by the bit of rank b and the following bits of rank up to the most significant bit of the first non-zero scanned block of the first word. 4. A method for raising an argument x to an exponent power e according to claim 1 or 2, characterized in that at the beginning of the second phase, the value y is initialized in the register (6) with a neutral element of the internal composition law and in that for each block scanned from the first, the processor (2) squaring said value y, in an amount equal to the number of bits of the scanned block, and if it exists in the block scanned a non-zero bit of the lowest weight with a rank b taken from 1 for the least significant bit of the block, the processor (2) applies the internal composition law to the value y and to a power generated in first phase whose exponent ca for value the one coded by the bit of rank b and the bits of following ranks to the most significant bit of the scrambled block, before <Desc / Clms Page number 31> to perform the last b elevations squared of said value y and store the result thus obtained u in the register (6). 5. Method for raising an argument x to an exponent power e according to one of the preceding claims, characterized in that at least each word beyond the first word, is divided into q blocks of size t and, if k is not a multiple of t, a block of reduced size r less than t. 6. Method for raising an argument x to an exponent power e according to one of claims 2 to 5, characterized in that the first word is cut into q'blocks of size t and, if k 'is not a multiple of t, a block of reduced size r 'less than t. 7. A method for raising an argument x to an exponent power e according to claim 5 or 6, characterized in that for each word, the scan of a block starts with a reduced size block scan on the bits of weight strong block to find a block of reduced size with all its null bits and as soon as such a block is found, the scan of the following blocks if there exist, is continued by block size t. 8. A method for raising an argument x to an exponent power e according to claim 5 or 6, characterized in that for each word, the scan of the reduced size block is made after q scrutinizing blocks of size t. 9. A method for raising an argument x to an exponent power e according to one of the preceding claims, characterized in that the finite group is a set of relative integers of a closed interval [0, N-1] and in that the law of internal composition is the modulo N multiplication of unit neutral element. 10. A method for raising an argument x to an exponent power e according to one of claims 1 to 8, characterized in that the finite group is a set of positive integers or zero of absolute value strictly less than an integer N and in that the law of internal composition is the modulo addition of zero neutral element. for a first scrambled block of the first word as it exists in the scrubbed block a non-zero bit of least weight with a rank b taken from 1 for the least significant bit of the block, the processor (2) loads from a register (6), a value y equal to a power generated in the first phase whose exponent ca for value that encoded by the bit of rank b and the bits of following ranks to the most significant bit of the scanned block, performs squarings of said value y and arranges the result thus obtained as a new value y in the register (6); 11. A device for raising an argument x to an exponent power e in a finite group provided with an internal composition law, comprising a processor (2) capable of processing words of length k expressed in bits, a register (4 ) to receive the argument x, a register (5) of 1 words of k bits with 1 greater than or equal to 1 to receive the exponent e, a register (6) to produce the argument x raised to the power of exponent e and a memory (3) for containing data and instructions executable by the processor (2), characterized in that it comprises: - a register (7) for containing powers of the argument x with an odd exponent between 1 and 2t-1 where t is a number less than k contained in the memory (3); instructions contained in the memory (3) for processing each word which encodes the exponent e in an order ranging from the most significant bit to the least significant bit of the exponent e, arranged to control the processor (2) so that in execution: - the processor (2) scans the current word to be processed in blocks of at most t bits by going from the most significant bits to and to the least significant bit of the current word ; <Desc / Clms Page number 33> end | 12. Device for raising an argument x to an exponent power e according to claim 11, characterized in that the memory (3) contains at least one instruction to have the processor (2) scan the first word of the register (5). ) from the strongest non-zero bit so that this bit is of rank starting from 1 for the least significant bit, only k'bits of the first word are processed. for each following scrambled block, the processor (2) squares said value y, in an amount equal to the number of bits of the scrambled block, and if there exists in the scruttered block a nonzero bit of the most significant weight. weak with a rank b taken from 1 for the least significant bit of the block, the processor (2) applies the internal composition law to the value y and to a power contained in the register (7) whose exponent ca for value that coded by the bit of rank b and the next rank bits to the most significant bit of the scanned block, before making the last b squared of said value y and storing the result thus obtained in the register (6); so that the value y contained in the register (6) after scanning the last block comprising the least significant bits for coding the exponent e, is equal to the argument x raised to the exponent power e in the group 13. Device for raising an argument x to an exponent power e according to claim 11 or 12, characterized in that the register (6) is initialized with a power contained in the register (7) whose exponent ca for value that encoded by the bit of rank b and the next rank bits to the most significant bit of the first non-zero scanned block of the first word. Apparatus for raising an argument x to an exponent power e according to claim 11 or 12, characterized in that the register (6) is initialized to 1 and in that the memory (3) contains at least one instruction for <Desc / Clms Page number 34> make the processor (2) squaring said value y, in an amount equal to the number of bits of each block scanned, and if there exists in the scruted block a non-zero bit of least weight with a rank b taken from 1 for the least significant bit of the block, to be applied by the processor (2) the composition law internal to the value y and a power contained in the register ( 7) whose exponent is equal to that encoded by the bit of rank b and the next rank bits to the most significant bit of the scanned block, before making the last b squared of said value y and of arrange the result thus obtained in the register (6). 15. Device for raising an argument x to an exponent power e according to one of claims 11 to 14, characterized in that the memory (3) contains at least one instruction for cutting at least each word beyond the first word. , in q blocks of size t and, if k is not a multiple of t, a block of reduced size r less than t. 16. Device for raising an argument x to an exponent power e according to one of claims 12 to 15, characterized in that the memory (3) contains at least one instruction for cutting the first word into size blocks. t and, if k is not a multiple of t, a block of reduced size r 'less than t. 17. Apparatus for raising an argument x to an exponent power e according to claim 15 or 16, characterized in that the memory (3) contains at least one instruction to start on each word, the scanning of a block by a small size block scan on the most significant bits of the block until finding a small block with all its null bits and at least one instruction to continue as soon as such a block is found, the scan of the block or blocks following if it exists, by size block t. <Desc / Clms Page number 35> 18. Device for raising an argument x to an exponent power e according to Claim 15 or 16, characterized in that the memory (3) contains at least one instruction for scanning the block size reduced after scanning q blocks of size t. for a first scrambled block of the first word as it exists in the scrubbed block a non-zero bit of the lowest weight with a rank b taken from 19. Program for generating in a register (6) an argument x received a register (4), raised to an exponent power e received from a register (5) of 1 k-bit words with 1 greater than or equal to 1, k being a word length expressed in bits that can be processed a processor (2), characterized for executing by the processor (2): in a first phase, a power generation of the argument x with an odd exponent between 1 and 2t-1 where t is a number less than k; in a second phase, a processing of each word which encodes the exponent e in an order ranging from the most significant bit to the least significant bit of the exponent e, such that: the processor (2) scrutinizes the current word to be processed in blocks of at most t bits by going from the most significant bits to and from the least significant bit of the current word; 1 pour le bit de poids faible du bloc, le processeur (2) charge à partir du registre (6), une valeur y égale à unepuissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, effectue b élévations au carré de ladite valeur y et range le résultat ainsi obtenu comme nouvelle valeur y dans le registre (6) ; - pour chaque bloc scruté suivant, le processeur (2) effectue des élévations au carré de ladite valeur y, en quantité égale au nombre de bits du bloc scruté, et s'il existe dans le bloc scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids 1 for the least significant bit of the block, the processor (2) loads from the register (6), a value y equal to a power generated in the first phase whose exponent ca to value that encoded by the bit of rank b and the next rank bits up to the most significant bit of the scrambled block, b squaring said value y and storing the result thus obtained as a new value y in the register (6); for each following scrambled block, the processor (2) squares said value y, in an amount equal to the number of bits of the scrambled block, and if there exists in the scruttered block a nonzero bit of the most significant weight. low with a rank b taken from 1 for the weight bit <Desc/Clms Page number 36><Desc / Clms Page number 36> faible du bloc, le processeur (2) effectue une multiplication de la valeur y par une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant d'effectuer les b dernière élévations au carré de ladite valeur y et de ranger le résultat ainsi obtenu dans le registre (6) ; de sorte que la valeur y contenue dans le registre (6) après scrutation du dernier bloc comprenant les bits de poids les plus faible pour coder l'exposant e, est égale à l'argument x élevé à la puissance d'exposant e dans le groupe fini.  weak of the block, the processor (2) performs a multiplication of the value y by a power generated in the first phase whose exponent ca for value that encoded by the bit of rank b and the following bits of ranks up to the weight bit strong of the scanned block, before making the last b squared of said value y and storing the result thus obtained in the register (6); so that the value y contained in the register (6) after scanning the last block comprising the least significant bits to code the exponent e, is equal to the argument x raised to the exponent power e in the finished group. 20. Programme pour produire un argument x élevé à une puissance d'exposant e selon la revendication 19, caractérisé en ce qu'il est agencé pour scruter le premier bloc du premier mot à partir du bit non nul de poids le plus fort du premier mot de rang k'pris à partir de 1 pour le bit de poids le plus faible, de sorte que le premier bloc scruté a pour bit de poids fort, le bit de rang k'dans le premier mot. 20. Program for producing an argument x high at exponent power e according to claim 19, characterized in that it is arranged to scan the first block of the first word from the nonzero bit of the strongest weight of the first rank word k'pris from 1 for the least significant bit, so that the first block scrutinized has for most significant bit, the rank bit k'in the first word. 21. Programme pour produire un argument x élevé à une puissance d'exposant e selon la revendication 19 ou 20, caractérisé en ce qu'il est agencé pour initialiser le registre (6) avec une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du premier bloc scruté non nul du premier mot. 21. Program for producing an argument x high at exponent power e according to claim 19 or 20, characterized in that it is arranged to initialize the register (6) with a power generated in the first phase whose exponent ca for value that encoded by the bit of rank b and the next rank bits to the most significant bit of the first non-zero scanned block of the first word. 22. Programme pour produire un argument x élevé à une puissance d'exposant e selon la revendication 19 ou 20, caractérisé en ce qu'il est agencé pour initialiser en début de deuxième phase, la valeur y à 1 dans le registre (6) et en ce que pour chaque bloc scruté à partir du premier, le programme est agencé pour effectuer des élévations au carré de ladite valeur y, en quantité égale au nombre de bits du bloc scruté, et s'il existe dans le bloc 22. Program for producing an argument x raised to an exponent power e according to claim 19 or 20, characterized in that it is arranged to initialize at the beginning of the second phase, the value y to 1 in the register (6) and in that for each block scanned from the first, the program is arranged to squaring said value y, in an amount equal to the number of bits of the scanned block, and if it exists in the block <Desc/Clms Page number 37><Desc / Clms Page number 37> scruté un bit non nul de poids le plus faible avec un rang b pris à partir de 1 pour le bit de poids faible du bloc, pour effectuer une multiplication de la valeur y par une puissance générée en première phase dont l'exposant c a pour valeur celle codée par le bit de rang b et les bits de rangs suivants jusqu'au bit de poids fort du bloc scruté, avant d'effectuer les b dernière élévations au carré de ladite valeur y et pour ranger le résultat ainsi obtenu dans le registre (6).  scanned a non-zero bit of least weight with a rank b taken from 1 for the least significant bit of the block, to perform a multiplication of the value y by a power generated in first phase whose exponent ca for value the one coded by the bit of rank b and the bits of following ranks up to the most significant bit of the scrambled block, before making the last b squared of said value y and storing the result thus obtained in the register ( 6). 23. Programme pour produire un argument x élevé à une puissance d'exposant e selon l'une des revendications 19 à 22, caractérisé en ce qu'il est agencé pour découper au moins chaque mot au delà du premier mot, en q blocs de taille t et, si k n'est pas un multiple de t, en un bloc de taille réduite r inférieure à t. 23. Program for producing an argument x raised to an exponent power e according to one of claims 19 to 22, characterized in that it is arranged to cut at least each word beyond the first word, in q blocks of size t and, if k is not a multiple of t, into a block of reduced size r less than t. 24. Programme pour produire un argument x élevé à une puissance d'exposant e selon l'une des revendications 20 à 23, caractérisé en ce qu'il est agencé pour découper le premier mot en q'blocs de taille t et, si k'n'est pas un multiple de t, un bloc de taille réduite r'inférieure à t. 24. Program for producing an argument x raised to an exponent power e according to one of claims 20 to 23, characterized in that it is arranged to cut the first word into q'blocks of size t and, if k 'is not a multiple of t, a block of reduced size r' less than t. 25. Programme pour produire un argument x élevé à une puissance d'exposant e selon la revendication 23 ou 24, caractérisé en ce qu'il est agencé pour commencer pour chaque mot, la scrutation d'un bloc par une scrutation de bloc de taille réduite sur les bits de poids fort du bloc jusqu'à trouver un bloc de taille réduite avec tous ses bits nuls et dès qu'un tel bloc est trouvé, la scrutation des blocs suivants s'il en existe, pour continuer la scrutation par bloc de taille t. 25. Program for producing an argument x high at exponent power e according to claim 23 or 24, characterized in that it is arranged to start for each word, scanning a block by a size block scan reduced on the most significant bits of the block until finding a block of reduced size with all its null bits and as soon as such a block is found, the scanning of the following blocks if there exist, to continue the block scan of size t. 26. Programme pour produire un argument x élevé à une puissance d'exposant e selon la revendication 23 ou 24, caractérisé en ce qu'il est agencé pour scruter le bloc de taille réduite après q scrutations de blocs de taille t d'un mot.26. A program for producing an argument x high at an exponent power e according to claim 23 or 24, characterized in that it is arranged to scan the block of reduced size after q searches of blocks of size t of a word .
FR0113075A 2001-10-10 2001-10-10 METHOD, DEVICE AND PROGRAM FOR RAISING AN ARGUMENT AT A POWER OF A GREAT EXHIBITOR Expired - Fee Related FR2830641B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
FR0113075A FR2830641B1 (en) 2001-10-10 2001-10-10 METHOD, DEVICE AND PROGRAM FOR RAISING AN ARGUMENT AT A POWER OF A GREAT EXHIBITOR
PCT/FR2002/003269 WO2003042815A1 (en) 2001-10-10 2002-09-25 Method, device and programme for exponentiating an independent variable to the power of a high exponent

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
FR0113075A FR2830641B1 (en) 2001-10-10 2001-10-10 METHOD, DEVICE AND PROGRAM FOR RAISING AN ARGUMENT AT A POWER OF A GREAT EXHIBITOR

Publications (2)

Publication Number Publication Date
FR2830641A1 true FR2830641A1 (en) 2003-04-11
FR2830641B1 FR2830641B1 (en) 2004-01-30

Family

ID=8868155

Family Applications (1)

Application Number Title Priority Date Filing Date
FR0113075A Expired - Fee Related FR2830641B1 (en) 2001-10-10 2001-10-10 METHOD, DEVICE AND PROGRAM FOR RAISING AN ARGUMENT AT A POWER OF A GREAT EXHIBITOR

Country Status (2)

Country Link
FR (1) FR2830641B1 (en)
WO (1) WO2003042815A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5999627A (en) * 1995-01-07 1999-12-07 Samsung Electronics Co., Ltd. Method for exponentiation in a public-key cryptosystem

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5999627A (en) * 1995-01-07 1999-12-07 Samsung Electronics Co., Ltd. Method for exponentiation in a public-key cryptosystem

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HUI L C K ET AL: "FAST SQUARE-AND-MULTIPLY EXPONENTIATION FOR RSA", ELECTRONICS LETTERS, IEE STEVENAGE, GB, vol. 30, no. 17, 18 August 1994 (1994-08-18), pages 1396 - 1397, XP000476024, ISSN: 0013-5194 *
MENEZES ALFRED J ET AL: "Handbook of Cryptography", HANDBOOK OF APPLIED CRYPTOGRAPHY, CRC PRESS SERIES ON DISCRETE MATHEMATICES AND ITS APPLICATIONS, BOCA RATON, FL, CRC PRESS, US, 1997, pages 613 - 629, XP002188328, ISBN: 0-8493-8523-7 *

Also Published As

Publication number Publication date
FR2830641B1 (en) 2004-01-30
WO2003042815A1 (en) 2003-05-22

Similar Documents

Publication Publication Date Title
FR2788867A1 (en) Arithmetic method and implementation for cryptographic processing
JP5116770B2 (en) Module reduction using folding
EP1368747B1 (en) Method and device for reducing the time required to perform a product, multiplication and modular exponentiation calculation using the montgomery method
FR2681450A1 (en) ELECTRONIC COMPARATOR FOR SELECTING THE BIGGEST OF TWO BINARY CODE ENTRY VALUES.
FR2885711A1 (en) Polynomial modular reduction method for cryptographic application, involves generating random polynomial error value using random number generator and obtaining random polynomial quotient using error value
EP0511095B1 (en) Coding and decoding method and apparatus for a digital signal
FR2509888A1 (en) METHOD AND CIRCUIT FOR THE EXECUTION OF DIRECT AND INVERSE QUANTIFICATION BY VARIATION OF A REFERENCE PROGRESS STEP
FR2724741A1 (en) ELECTRONIC CIRCUIT FOR MODULAR CALCULATION IN A FINISHED BODY
FR3101980A1 (en) Processor
EP0237382B1 (en) Digital sampled signal cosine transforming device
EP1869545B1 (en) Montgomery modular multiplication device
FR2897964A1 (en) Software or hardware multiple word operands integer division calculation performing method for cryptographic processing system, involves obtaining reciprocal value of divisor by extracting number of most significant words of divisor
EP0476592A2 (en) Address generator for the data storage of a processor
FR2830641A1 (en) Method for raising an argument to an exponential power, for cryptography use, using a processor capable of processing words of sufficient length with an exponent coded in words of k bits with k greater than one
EP0778518B1 (en) Method of producing a parameter J0 associated with the implementation of modular operations according to the Montgomery method
EP3840282A1 (en) Cryptographic processing method, associated electronic device and computer program
FR2811442A1 (en) METHOD OF GENERATING AN ELECTRONIC KEY FROM A FIRST NUMBER INCLUDED IN A DETERMINED INTERVAL AND DEVICE FOR IMPLEMENTING THE METHOD
FR2969875A1 (en) METHOD AND SYSTEM FOR MULTI-MODAL MULTI-THRESHOLD AUTHENTICATION USING SECRET SHARING
FR2818765A1 (en) Modular multiplier for enciphering/deciphering data, comprises buffer memories to store Montgomery algorithm results and operands , multiplexors, multiplier, control unit, bistable circuits and adder
CA2359198C (en) Arithmetic unit for carrying out a cryptographic protocol
EP0927928A1 (en) Improved method of producing a parameter J0 associated with the implementation of modular operations according to the Montgomery method
FR2811168A1 (en) METHOD FOR CONVERTING THE BINARY REPRESENTATION OF A NUMBER IN A SIGNED BINARY REPRESENTATION
FR2864390A1 (en) Cryptographic process for e.g. message encryption and decryption, involves scanning bits of preset value from left to right in loop, and calculating and storing partial updated result equal to exponentiation in accumulator
EP3729719A1 (en) Electronic module and method for calculating a cryptographic quantity, and associated electronic device and method for processing a message and computer program
FR3123134A1 (en) DEVICE FOR THE EVALUATION OF POLYNOMIALS

Legal Events

Date Code Title Description
ST Notification of lapse

Effective date: 20120629