EP3803574A1 - Twiddle factor generating circuit for an ntt processor - Google Patents

Twiddle factor generating circuit for an ntt processor

Info

Publication number
EP3803574A1
EP3803574A1 EP19790625.8A EP19790625A EP3803574A1 EP 3803574 A1 EP3803574 A1 EP 3803574A1 EP 19790625 A EP19790625 A EP 19790625A EP 3803574 A1 EP3803574 A1 EP 3803574A1
Authority
EP
European Patent Office
Prior art keywords
cache memory
bank
modular
rotation
cache
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.)
Pending
Application number
EP19790625.8A
Other languages
German (de)
French (fr)
Inventor
Joël CATHEBRAS
Alexandre CARBON
Renaud Sirdey
Nicolas Ventroux
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.)
Commissariat a lEnergie Atomique et aux Energies Alternatives CEA
Original Assignee
Commissariat a lEnergie Atomique CEA
Commissariat a lEnergie Atomique et aux Energies Alternatives CEA
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 Commissariat a lEnergie Atomique CEA, Commissariat a lEnergie Atomique et aux Energies Alternatives CEA filed Critical Commissariat a lEnergie Atomique CEA
Publication of EP3803574A1 publication Critical patent/EP3803574A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/3001Arithmetic instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/141Discrete Fourier transforms
    • G06F17/142Fast Fourier transforms, e.g. using a Cooley-Tukey type algorithm
    • 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/722Modular multiplication
    • 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/724Finite field arithmetic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30036Instructions to perform operations on packed data, e.g. vector, tile or matrix operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units

Definitions

  • the present invention relates to the field of NTT (Number Theoretic Transform) processors. It finds particular application in cryptography on Euclidean network, in particular in homomorphic cryptography.
  • NTT Numberer Theoretic Transform
  • y is not necessarily a primitive root of GF (q), in other words its order is not necessarily equal to the order q - 1 of the multiplicative group of GF (q) but that the order N of y is necessarily a divisor of q - 1. If N and q are prime between them, there exists an inverse N 1 in the Galois field GF (q) and we can define the inverse integer transform or INTT (Inverse NTT) by: the inverses y nk existing to the extent that GF (q) is a field.
  • the NTT transform is used in RNS (Residue Number System) arithmetic in the context of cryptography on a Euclidean network where it makes it possible to considerably simplify the multiplication of polynomials of high degrees and large coefficients.
  • RNS Residue Number System
  • the set ⁇ p 0 , ..., is called RNS base.
  • the degrees of the polynomials are generally very high and the cryptoprocessors must be able to operate on a wide variety of finite bodies and unit roots, the required memory size is important.
  • a second approach consists in calculating the rotation factors on the fly in order to supply them to the processor responsible for calculating the NTT.
  • a general object of the present invention is to propose a circuit for generating rotation factors for an NTT processor which makes it possible to accelerate cryptographic calculations on a Euclidean network.
  • a more specific object of the present invention is to propose a circuit for generating rotation factors which can adapt to the processing rate of an NTT processor per stream, while requiring only few local memory resources and / or not presenting only a low latency of computation.
  • the present invention is defined by a circuit generating rotation factors on at least one finite body, for NTT processor by flow, said generating circuit being intended to generate at least a sequence of N rotation factors
  • At least one cache manager module comprising a cache memory and a local controller controlling the writing and reading in the cache memory
  • a bank of modular multipliers comprising a plurality of W modular multipliers operating in parallel, each modular multiplier performing a multiplication on said body of two operands originating from a word read from the cache memory;
  • the cache memory can also include an address pointer pointing to the address where to read the value of U 0 for the next calculation cycle, the values of U V ..U W being read from the first part and the word U 0 U V ..U W formed by the concatenation of these values being supplied to the bank of modular multipliers for the next calculation cycle.
  • the cache memory the central controller initializing the content of the cache memory with y 2 , y 2 ,., y 2 .
  • y 2 the content of the cache memory
  • the central controller initializing the content of the cache memory with y 2 , y 2 ,., y 2 .
  • a word is read from the cache memory to prepare a cycle
  • the word constituted by the results at the output of the bank of modular multipliers is stored following the content thus shifted.
  • each cache manager module comprising a cache memory and a local controller controlling the writing and reading in the corresponding cache memory
  • Each cache manager module can be provided at the input with a multiplexer controlled by the central controller, so as to transmit to the cache memory associated with the cache manager module, ie an initialization word, the G first rotation factors of the sequence corresponding, let W be the results of the modular multiplier bank.
  • Fig. 1 schematically represents a dependency graph for the generation of the rotation factors
  • Fig. 2 schematically represents a first example of overlapping of the graph of FIG. 1, corresponding to a first strategy for generating the rotation factors;
  • FIG. 3 schematically represents a second example of overlapping of the graph of FIG. 1, corresponding to a second strategy for generating the rotation factors;
  • Fig. 4 schematically represents the general architecture of a circuit for generating rotation factors according to a first embodiment of the invention
  • Fig. 5 schematically represents the general architecture of a bench of modular multipliers for the generation circuit of FIG. 4;
  • Fig. 6A schematically represents a first example of a bank of modular multipliers
  • Fig. 6B illustrates the strategy for generating the rotation factors using the modular multiplier bank of FIG. 6A
  • Fig. 6C schematically represents the scheduling of the calculations in the circuit for generating the rotation factors when the bank of modular multipliers is that of FIG. 6A;
  • Fig. 7A schematically represents a second example of a bench of modular multipliers
  • Fig. 7B illustrates the strategy for generating the rotation factors using the modular multiplier bank of FIG. 7A
  • Fig. 7C schematically represents the scheduling of the calculations in the circuit for generating the rotation factors when the bank of modular multipliers is that of FIG. 7A;
  • Fig. 8 schematically represents the general architecture of a circuit for generating rotation factors according to a second embodiment of the invention.
  • Fig. 9 schematically represents the scheduling of the calculations in the circuit for generating the rotation factors of FIG. 8.
  • the generation of the rotation factors can be represented using an oriented graph, called the dependency graph, in which each node represents a power y h , a power y being associated with as many nodes as there are ways to calculate it. from the previous nodes.
  • Each node of the graph, except the one representing the root y, is supposed to have an incoming degree (number of arcs ending at this node) less than or equal to 2, in other words each rotation factor y is generated from at most 2 previous factors only.
  • Fig. 1 illustrates the dependency graph for the generation of the first six elements of the series ⁇ y
  • n 0, ..., N -l ⁇ .
  • the arcs identify the parents of each node.
  • y 6 can be calculated in six different ways depending on the parents chosen.
  • the weight associated with each arc is that of the kinship factor.
  • a node can be the end of two arcs of weight 1 (for example y 6 is calculated as the product y i y 5 or y 2 y A from two distinct parent nodes) or of a single arc of weight 2 (for example y 6 is calculated as the product y 3 y 3 from a single parent node).
  • the dependency graph can be browsed in order to minimize the local memory requirements or the computation latency for the generation of the rotation factors.
  • Fig. 2 shows a first example of an overlap of the graph in FIG. 1, aimed at minimizing the memory resource requirements.
  • Fig. 3 represents a second example of an overlap of the graph of FIG. 1, aimed at minimizing the computing latency.
  • a rotation factor is generated as soon as the rotation factors of the parent nodes are available.
  • the strategy for generating the rotation factors corresponding to this graph overlap can be represented by the following recurrence relation:
  • the rotation factor generation circuit generates the series y h
  • the NTT processor performs a radix operation (similar to a radix operation in an FFT) relating to W input data.
  • FIG. 4 schematically represents the general architecture of a circuit for generating rotation factors according to a first embodiment of the invention.
  • the generation circuit 400 essentially comprises a cache manager module, 410, a bench of modular multipliers, 420, and a central controller, 430.
  • the cache manager module has a local controller, 411, a cache memory 412, an output register 415 to supply W rotation factors at each cycle as well as an intermediate output register 417 to supply, at the start of each cycle of operands from the cache memory on the bench of modular multipliers.
  • the cache manager module has the function of time the calculations of the series of rotation factors according to the recovery strategy of the dependency graph used.
  • the modular multiplier bank receives operands from the cache manager module at each cycle, namely powers y / stored in the cache memory, and deduces therefrom the rotation factors to be supplied for the current cycle.
  • the rotation factors thus calculated are supplied to the output register 415 and stored in the cache memory. More precisely, the results at the output of the modular multipliers are supplied to an intermediate input register 407 before being transmitted to the output register 415 and stored in the cache memory 412.
  • the G initial rotation factors y / 1 , ..., y / G are supplied to the cache manager module 410 via an input register 405.
  • the outputs of the input register and of the intermediate input register are multiplexed by the multiplexer 409.
  • This multiplexer controlled by the central controller 430, transmits the initial rotation factors to the input of the cache manager module during the initialization of a series of T cycles, then the rotation factors calculated by the bank of modular multipliers towards the input of the cache manager module at the start of each of the following T - 1 cycles of the series.
  • the central controller 430 generates a GenCtrl set of control signals consisting of the new _ set, compute and new _ data signals which control the local controller of the cache manager module.
  • the first control signal, new _ set is used to initialize the calculation manager every T cycles and in particular to reset the internal counters of the local controller. It also instructs the input multiplexer 409 to transmit to the cache manager module, the initial rotation factors ⁇ y i , ..., y ° J received on the input register 405.
  • the second control signal computes, commands the cache manager module to carry out a calculation cycle, that is to say to read the operands in the cache memory and supply them to the bank of modular multipliers 420.
  • the third control signal, new _ data indicates the local controller that he must take into account the new rotation factors calculated by the modular multiplier bank.
  • the local controller informs the central controller when it is ready to perform a new calculation using data availability information. More specifically, this availability information takes a high logical value when the cache 412 contains the rotation factors making it possible to calculate the following elements of the series and the central controller has not yet ordered these calculations by means of the computed signal.
  • the local controller comprises a first counter recording the number of rotation factors already generated, a second counter recording the number of rotation factors stored in the cache memory and a third counter recording the number of calculation cycles requested by the central controller from the last initialization (i.e. from the start of the series).
  • the local controller comprises a combinational logic circuit receiving the control signals from the central controller and supplying the control signals from the aforementioned counters, the availability information, the control signals from the cache memory as well as from the output register.
  • the output register control signal makes it possible to supply the W last rotation factors generated on the output bus.
  • the central controller is essentially composed of a combinational logic circuit and a shift register.
  • the depth of the shift register is determined according to the latency of the bank of modular multipliers (to perform the calculations) as well as the latency of the cache manager module (to update the output register and its intermediate output register) .
  • the shift register advances at each clock cycle.
  • the central controller receives as input a new _ input signal indicating that a new set of initial rotation factors y L is available on the input bus for a new series of rotation factor calculations ⁇ y '
  • n 0, ..., / V -lJ where y 'is a new root of the unit in ⁇ r .
  • the central controller also receives data _ available availability information from the cache manager module. From the new _input and data _ available signals the combinatorial logic circuit of the central controller generates the new _ set, compute and new _ data control signals for the next calculation cycle.
  • the combinational logic circuit updates the entry of the shift register at the start of each calculation cycle. At the output of the shift register, in other words after taking into account the respective latencies of the bank of modular multipliers, a valid signal is generated, indicating that a set of W rotation factors is available on the output bus.
  • Fig. 5 schematically represents the general architecture of a bench of modular multipliers for the generation circuit of FIG. 4.
  • It includes an interconnection matrix, 510, intended to receive the operands from the cache memory and to distribute them on the inputs of W modular multipliers operating in parallel, 520, designated by each modular multiplier MM w performing a modulo p multiplication of its two input operands to provide the result R w .
  • Fig. 6A schematically represents a first example of a bench of modular multipliers.
  • This implementation example corresponds to a strategy for minimizing the size of the cache memory of the cache manager module.
  • the interconnection matrix receives W + 1 operands and distributes them over the 2 W inputs of the modular multipliers.
  • R 1 U 0 U 2 mod p ...
  • R w - 1 U, IJ, V mod p (7)
  • the outputs of the modular multiplier bank are represented in 650 to 657, or more precisely the data at the output of the multiplexer 409 (insofar as 650 corresponds to the initialization state), for 8 successive calculation cycles.
  • the values appearing in the boxes in broken lines are those which are stored in a second part of the cache memory as explained below.
  • Fig. 6C schematically represents the scheduling of the calculations in the circuit for generating the rotation factors when the bank of modular multipliers is implemented as in FIG. 6A.
  • the operands U 0 , ..., U 4 are shown in 661 at the input of the battery of modular multipliers; in 662 and 663 a first part and a second part of the cache memory, denoted AGRS and AGR0; in 665 the results R 0 , ..., R 3 at the output of the bank of modular multipliers.
  • AGRS The size of AGRS is equal to W, that of AGR0 is equal to LatMM + 1. (it was assumed in the illustrated example that the modular multiplier bank had a LatMM latency of 3 clock cycles).
  • AGRS The memory locations of AGRS are denoted C 0 , ..., C 3 , those of AGR0 are denoted B 0 , ..., B 3 .
  • R 0 , ..., R 3 and in AGR0 in B 0 , ..., B 3 rotation factors, called reserve , defined as the LatMM + 1 first rotation factors y / of the series where i is a multiple of W.
  • reserve rotation factors
  • the operands U V ..., U 4 are read from the memory locations C 0 , ..., C 3 of AGRS and the operand U 0 is read from AGRO at the address given by the index Ind in 664. This index is generated by the local controller of the cache manager module.
  • Fig. 7A schematically represents a second example of a bench of modular multipliers. This implementation example corresponds to the earliest generation of the rotation factors.
  • the interconnection matrix receives here— +1 operands and distributes them over the 2 W
  • the bank of modular multipliers performs the following operations:
  • Fig. 7B illustrates the strategy for generating the rotation factors using the modular multiplier bank of FIG. 7A.
  • Fig. 7C schematically represents the scheduling of the calculations in the circuit for generating the rotation factors when the bank of modular multipliers is implemented as in FIG. 7A.
  • the calculation of the series of rotation factors ⁇ 1 , ..., ⁇ 32 ⁇ begins as before with the reception of the initial values y i,. ., y 4 .
  • the initial values ⁇ 2 , ..., ⁇ 4 J are stored (at time t 0 ) in cache memory at the locations C 0 , ..., C 2 .
  • the value y 4 remains stored, at location C 0 .
  • the results appearing at the output of the modular multiplier bank at the end of LatMM (at time i 5 ) are then .
  • the results R 0 , ..., R 3 are stored following C 0 at the locations C V .., C 4 for the preparation of the following calculations.
  • the results R O , ..., R 3 are stored following C 0 at the locations C V .., C 4 for the preparation of the following calculations.
  • the stored values are supplied to the battery of modular multipliers with
  • the size of the cache in the second example is -. Indeed, at
  • waiting times are present in the supply of the battery of modular multipliers, due to the latency LatMM and dependency relationships to respect in the dependency graph.
  • the result a jerky generation of rotation factors, at least the first elements of the series.
  • Fig. 8 schematically represents the general architecture of a circuit for generating rotation factors according to a second embodiment of the invention.
  • the circuit for generating the rotation factors here comprises a plurality L of cache manager modules 810O, ..., 810L-I, each having the structure of the cache manager module 410.
  • Each of these modules is associated with a finite body Z and has its local controller as well as its cache memory. At the output of each of these modules, there is an output bus and an intermediate output bus.
  • the output buses of the various cache management modules are multiplexed by a first output multiplexer 841 controlled by the central controller by means of a SEL _ output command.
  • the intermediate output buses of the various cache management modules are multiplexed by a second output multiplexer 842, controlled by the central controller by means of a SEL _ MMS command.
  • the circuit for generating rotation factors comprises a bank of modular multipliers, 820, and a central controller, 830.
  • the modular multiplier bank 820 is supplied with data via a common register, 850, at the output of the second output multiplexer. It also receives from the central controller a modulo t signal indicating to the modular multipliers in which body Z the multiplications must be carried out.
  • the rotation factors calculated by the modular multiplier bank are provided via the intermediate input register 807.
  • the respective outputs of the input register and of the intermediate input register are each distributed to all the calculation manager modules.
  • Each cache manager module, 81 (3 ⁇ 4, has as input an associated multiplexer, 809 ; controlled by the central controller 830.
  • the central controller can indicate to one of the calculation manager modules 810 ⁇ , to import the factors of initial rotation or rotation factors calculated by the bank of modular multipliers.
  • the central controller provides the control signals for the first and second output multiplexers 841, 843.
  • the central controller indicates this by means of the signal valid and precise by means of the signal num to which body Z this game belongs.
  • Fig. 9 schematically represents the scheduling of the calculations in the circuit for generating the rotation factors of FIG. 8.
  • the sets of initial values have been represented; in 920, the operands U 0 , U V U 2 at the input of the battery of modular multipliers; in 930 the results at the output of the modular multiplier bank and in 940 the output of the first output multiplexer.
  • the shaded boxes correspond to the insertion of a new set of initial values.
  • the elements of the different series are output as soon as they are generated.
  • the digital signal distinguishes them.
  • this signal could be used by an NTT processor by flow to separate NTTs on different bodies.

Abstract

The invention relates to a twiddle factor generating circuit (400) for an NTT processor. The circuit comprises a cache managing module (410), a bank of modular multipliers (420), and a central controller (430). The cache managing module comprises a local controller (411) and a cache memory (412) storing the operands used to compute future twiddle factors. The bank of modular multipliers comprises, at input, an interconnection matrix which distributes the operands to the inputs of the modular multipliers. The circuit can be configured to minimise the memory size of the cache and/or to reduce the computational latency of the sequence of twiddle factors. Finally, the generating circuit can comprise multiple computation managing modules which share the same bank of modular multipliers in order to generate sequences of twiddle factors over multiple finite fields.

Description

CIRCUIT DE GÉNÉRATION DE FACTEURS DE ROTATION POUR PROCESSEUR NTT  CIRCUIT FOR GENERATING ROTATION FACTORS FOR NTT PROCESSOR
DESCRIPTIONDESCRIPTION
DOMAINE TECHNIQUE TECHNICAL AREA
La présente invention concerne le domaine des processeurs NTT (Number Theoretic Transform). Elle trouve notamment application dans la cryptographie sur réseau euclidien, en particulier dans la cryptographie homomorphe. The present invention relates to the field of NTT (Number Theoretic Transform) processors. It finds particular application in cryptography on Euclidean network, in particular in homomorphic cryptography.
ÉTAT DE LA TECHNIQUE ANTÉRIEURE PRIOR STATE OF THE ART
La transformée en nombres entiers ou NTT (Number Theoretic Transform) est connue depuis les années 70 et a retrouvé récemment un intérêt dans les applications cryptographiques. The whole number transform or NTT (Number Theoretic Transform) has been known since the 1970s and has recently found an interest in cryptographic applications.
On rappelle qu'une transformée en nombres entiers est l'équivalent d'une transformée de Fourier dans un corps de Galois de caractéristique q, GF(q) , la racine Recall that a whole number transform is the equivalent of a Fourier transform in a Galois field of characteristic q, GF (q), the root
2p  2p
primitive d'une transformée de Fourier d'ordre N dans C , à savoir e N , étant remplacée par une racine N ème de l'unité du corps GF(q) . Ainsi, N est le plus petit entier n non nul tel que yh = 1. La transformée en nombres entiers d'une séquence a = a0,...,aN-l de N éléments de GF(q ) est définie par une séquence ue : où les opérations d'addition et de multiplication sont celles du corps GF(q ) . primitive of a Fourier transform of order N in C, namely e N , being replaced by a root N th of the unit of the body GF (q). Thus, N is the smallest non-zero integer n such that y h = 1. The integer transform of a sequence a = a 0 , ..., a Nl of N elements of GF (q) is defined by a eu sequence: where the operations of addition and multiplication are those of the body GF (q).
Il convient de noter que y n'est pas nécessairement une racine primitive de GF(q ) , autrement dit son ordre n'est pas nécessairement égal à l'ordre q - 1 du groupe multiplicatif de GF(q ) mais que l'ordre N de y est nécessairement un diviseur de q - 1. Si N et q sont premiers entre eux, il existe un inverse N 1 dans le corps de Galois GF(q ) et l'on peut définir la transformée en nombres entiers inverse ou INTT (Inverse NTT) par : les inverses y nk existant dans la mesure où GF(q ) est un corps. It should be noted that y is not necessarily a primitive root of GF (q), in other words its order is not necessarily equal to the order q - 1 of the multiplicative group of GF (q) but that the order N of y is necessarily a divisor of q - 1. If N and q are prime between them, there exists an inverse N 1 in the Galois field GF (q) and we can define the inverse integer transform or INTT (Inverse NTT) by: the inverses y nk existing to the extent that GF (q) is a field.
Par analogie avec la transformée de Fourier, les éléments yL et /~nk apparaissant dans l'expression (1) ou (2), sont dénommés facteurs de rotation. By analogy with the Fourier transform, the elements y L and / ~ nk appearing in expression (1) or (2), are called rotation factors.
De manière générale, la caractéristique q d'un corps est de la forme q = pm où p est un nombre premier et m est un entier non nul. Nous considérerons dans la suite les corps finis GF(q ) dont la caractéristique est un nombre premier p , dont on sait qu'ils sont isomorphes In general, the characteristic q of a body is of the form q = p m where p is a prime number and m is a non-zero integer. We will consider in the following finite fields GF (q) whose characteristic is a prime number p, which we know to be isomorphic
Une présentation générale de la NTT pourra être trouvée dans l'article de J.M. Pollard « The fast Fourier transform in a finite field » publié dans Mathematics of Computation, vol. 25, N° 114, avril 1971, pp. 365-374.  A general presentation of NTT can be found in the article by J.M. Pollard "The fast Fourier transform in a finite field" published in Mathematics of Computation, vol. 25, N ° 114, April 1971, pp. 365-374.
La transformée NTT est utilisée en arithmétique RNS (Residue Number System) dans le contexte de la cryptographie sur réseau euclidien où elle permet de simplifier considérablement la multiplication de polynômes de degrés élevés et de grands coefficients.  The NTT transform is used in RNS (Residue Number System) arithmetic in the context of cryptography on a Euclidean network where it makes it possible to considerably simplify the multiplication of polynomials of high degrees and large coefficients.
En effet, on sait que la multiplication de deux polynômes nécessite de calculer la convolution de la séquence des coefficients du premier polynôme avec la séquence des coefficients du second polynôme. En se plaçant dans l'espace dual, c'est-à-dire après NTT, la multiplication des polynômes ne nécessite plus qu'une simple multiplication un à un des coefficients des séquences transformées. Il suffit alors d'effectuer une INTT de la séquence résultante pour obtenir les coefficients de la séquence correspondant au produit des deux polynômes. Cette accélération du calcul polynomial peut s'appliquer à une représentation RNS Indeed, we know that the multiplication of two polynomials requires calculating the convolution of the sequence of the coefficients of the first polynomial with the sequence of the coefficients of the second polynomial. By placing themselves in dual space, that is to say after NTT, the multiplication of polynomials requires only a simple one-to-one multiplication of the coefficients of the transformed sequences. It then suffices to carry out an INTT of the resulting sequence to obtain the coefficients of the sequence corresponding to the product of the two polynomials. This acceleration of polynomial calculation can be applied to an RNS representation
N-l  N-l
des polynômes. Plus précisément, si l'on considère un polynôme f(x) = , on peut i= 0 polynomials. More precisely, if we consider a polynomial f (x) = , we can i = 0
N-l lui faire correspondre un ensemble L de polynômes où i= 0 Nl match it to a set L of polynomials where i = 0
= at mod p£ et p, , ! = 0,..., L -l sont des entiers premiers entre eux (et généralement premiers) choisis relativement petits. L'ensemble {p0,..., est dénommé base RNS. = a t mod p £ and p ,, ! = 0, ..., L -l are relatively small prime integers (and generally prime). The set {p 0 , ..., is called RNS base.
Cette représentation des coefficients et, par voie de conséquence, du polynôme associé, est une application immédiate du Théorème des Restes Chinois ou CRT (Chinese This representation of the coefficients and, consequently, of the associated polynomial, is an immediate application of the Theorem of Chinese Rests or CRT (Chinese
Remainders Theorem). On notera dans la suite et Theorem Remainders). We will note below and
N-l  N-l
Réciproquement, à une représentation RNS , ! = 0,.., L - l, on ï=0 Conversely, to an RNS representation ,! = 0, .., L - l, we ï = 0
N-l  N-l
peut associer un polynôme f = ICRT^f^° ...,f^L~^ défini par f(x) = aix où les coefficients cx{ = sont donnés par : can associate a polynomial f = ICRT ^ f ^ ° ..., f ^ L ~ ^ defined by f (x) = a i x where the coefficients cx { = are given by:
mod P (3)mod P (3)
L The
et où P = \\Pe est le produit des nombres premiers utilisés pour la décomposition RNS e=o and where P = \\ Pe is the product of the prime numbers used for the RNS decomposition e = o
des coefficients. coefficients.
N  NOT
Ainsi, la multiplication de deux polynômes de degré N , f(x) = et i=0Thus, the multiplication of two polynomials of degree N, f (x) = and i = 0
NNOT
être ramenée par représentation RNS et transformée NTT à N.L i=0 N- 1 N- 1 be brought back by RNS representation and transformed NTT to NL i = 0 N- 1 N- 1
multiplications des coefficients , k = 0,..., N - l i= 0 i= 0 multiplication of coefficients , k = 0, ..., N - li = 0 i = 0
dans l'espace dual où y( est une N ème racine de l'unité du corps Z et cé ^ sont des éléments de Z obtenus par décomposition des coefficients ai et bί dans la base RNS {pQ, ..., pL_^\ Il est ensuite possible de revenir à l'espace de départ au moyen d'une transformée inverse INTT de chaque séquence de coefficients Ck r> = Ak } Bk £) , in the dual space where y ( is an N th root of the unit of the body Z and cé ^ are elements of Z obtained by decomposition of the coefficients a i and b ί in the base RNS {p Q , ..., p L _ ^ \ It is then possible to return to the starting space by means of an inverse transform INTT of each sequence of coefficients C k r> = A k } B k £) ,
N-l k = 0, ..., N - 1 pour obtenir les coefficients en représentation RNS ÿf* = L ‘åcf w i=0 puis les coefficients du polynôme produit h(x) = f (x)g(x) par ICRT. Etant donné que le degré de h(x) est 2N , on peut considérer d'emblée des polynômes de degré N ' = 2N (et donc des racines N ' ème de l'unité) en bourrant de N zéros (zéro padding) les N coefficients de plus forts degrés de f(x) et g(x) . Moyennant cette convention, on peut rester dans le même espace pour le polynôme produit et les polynômes f(x) et g(x) à multiplier.  N-l k = 0, ..., N - 1 to obtain the coefficients in RNS representation ÿf * = L ‘åcf w i = 0 then the coefficients of the polynomial produced h (x) = f (x) g (x) by ICRT. Since the degree of h (x) is 2N, we can immediately consider polynomials of degree N '= 2N (and therefore roots N' th of the unit) by stuffing N zeros (zero padding) N coefficients of higher degrees of f (x) and g (x). With this convention, we can stay in the same space for the polynomial produced and the polynomials f (x) and g (x) to be multiplied.
On pourra trouver une description détaillée de l'application de la transformée NTT à la multiplication de polynômes en représentation CRT dans l'article de W. Dai et al. intitulé « Accelerating NTRU based homomorphic encryption using GPUs » publié dans Proc, of IEEE High Performance Extrême Computing Conférence (HPEC), 2014, 9-11 Sept. 2014.  A detailed description of the application of the NTT transform to the multiplication of polynomials in CRT representation can be found in the article by W. Dai et al. entitled “Accelerating NTRU based homomorphic encryption using GPUs” published in Proc, of IEEE High Performance Extrême Computing Conférence (HPEC), 2014, 9-11 Sept. 2014.
Une multiplication polynomiale utilisant une transformée NTT des coefficients de polynômes représentés dans une base RNS requiert de disposer des racines de l'unité yi des corps finis Z ainsi que de leurs puissances n = 0,..., N - 1 , tant pour le calcul de la transformée NTT des coefficients (en représentation RNS) des polynômes à multiplier que pour le calcul de la transformée INTT des coefficients (en représentation RNS) du polynôme produit dans l'espace dual. A polynomial multiplication using an NTT transform of the coefficients of polynomials represented in an RNS base requires having the roots of the unit y i of the finite fields Z as well as their powers n = 0, ..., N - 1, both for the calculation of the NTT transform of the coefficients (in RNS representation) of the polynomials to be multiplied and for the calculation of the INTT transform of the coefficients (in RNS representation) of the polynomial produced in dual space.
Une première approche consiste à stocker en mémoire les facteurs de rotation {We Y , n = O, . ., N - 1 , pour les corps finis Z , l = 0,..., L - l . Toutefois, étant donné que les degrés des polynômes sont généralement très élevés et que les cryptoprocesseurs doivent pouvoir opérer sur une grande variété de corps finis et de racines de l'unité, la taille mémoire requise est importante. A first approach consists in storing in memory the rotation factors {We Y, n = O,. ., N - 1, for finite fields Z, l = 0, ..., L - l. However, since the degrees of the polynomials are generally very high and the cryptoprocessors must be able to operate on a wide variety of finite bodies and unit roots, the required memory size is important.
Une seconde approche consiste à effectuer le calcul des facteurs de rotation à la volée pour les fournir au processeur chargé du calcul de la NTT.  A second approach consists in calculating the rotation factors on the fly in order to supply them to the processor responsible for calculating the NTT.
Un objet général de la présente invention est de proposer un circuit de génération de facteurs de rotation pour processeur NTT qui permette d'accélérer les calculs cryptographiques sur réseau euclidien. Un objet plus spécifique de la présente invention est de proposer un circuit de génération de facteurs de rotation qui puisse s'adapter au rythme de traitement d'un processeur NTT par flot, tout en ne requérant que peu de ressources mémoire locale et/ou ne présentant qu'une faible latence de calcul.  A general object of the present invention is to propose a circuit for generating rotation factors for an NTT processor which makes it possible to accelerate cryptographic calculations on a Euclidean network. A more specific object of the present invention is to propose a circuit for generating rotation factors which can adapt to the processing rate of an NTT processor per stream, while requiring only few local memory resources and / or not presenting only a low latency of computation.
EXPOSÉ DE L'INVENTION STATEMENT OF THE INVENTION
La présente invention est définie par un circuit générateur de facteurs de rotation sur au moins un corps fini, pour processeur NTT par flot, ledit circuit générateur étant destiné à générer au moins une séquence de N facteurs de rotation The present invention is defined by a circuit generating rotation factors on at least one finite body, for NTT processor by flow, said generating circuit being intended to generate at least a sequence of N rotation factors
où y est une racine de l'unité dans ce corps, ledit circuit comprenant where y is a root of unity in this body, said circuit comprising
au moins un module gestionnaire de cache comprenant une mémoire cache et un contrôleur local contrôlant l'écriture et la lecture dans la mémoire cache ;  at least one cache manager module comprising a cache memory and a local controller controlling the writing and reading in the cache memory;
un banc de multiplieurs modulaires comprenant une pluralité de W multiplieurs modulaires opérant en parallèle, chaque multiplieur modulaire effectuant une multiplication sur ledit corps de deux opérandes issus d'un mot lu de la mémoire cache ;  a bank of modular multipliers comprising a plurality of W modular multipliers operating in parallel, each modular multiplier performing a multiplication on said body of two operands originating from a word read from the cache memory;
un contrôleur central initialisant la mémoire cache avec les G premiers facteurs de rotation de la séquence et contrôlant le gestionnaire de cache de manière à fournir à chaque cycle de calcul d'une pluralité T = N / W de cycles de calcul, un mot lu de la mémoire cache au banc de multiplieurs modulaires, à écrire dans la mémoire cache, au terme de chaque cycle de calcul, hormis pour le dernier de ladite pluralité, un mot comprenant les W résultats en sortie desdits multiplieurs modulaires, et à fournir au terme de chaque cycle de calcul, en sortie du générateur, ces W résultats comme W facteurs de rotation consécutifs de ladite série. Selon un premier mode de réalisation, le le banc de W multiplieurs modulaires effectue respectivement les multiplications R0 = U0U1 mod p ; R1 = U0U2 mod p ; Rw-1 = UJJw moàp où U0U ..UW est le mot lu de la mémoire cache et Uw, w = 0,...,W sont les opérandes en entrée du banc des multiplieurs modulaires et Rw, w = 0 - 1 sont les W résultats en sortie de ces multiplieurs. a central controller initializing the cache memory with the G first factors of rotation of the sequence and controlling the cache manager so as to supply each calculation cycle with a plurality T = N / W of calculation cycles, a word read from the cache memory at the modular multiplier bank, to be written in the cache memory, at the end of each calculation cycle, except for the last of said plurality, a word comprising the W results at the output of said modular multipliers, and to be supplied at the end of each calculation cycle, at the output of the generator, these W results as W consecutive rotation factors of said series. According to a first embodiment, the bank of W modular multipliers performs respectively the multiplications R 0 = U 0 U 1 mod p; R 1 = U 0 U 2 mod p ; R w-1 = UJJ w moàp where U 0 U ..U W is the word read from the cache memory and U w , w = 0, ..., W are the operands at the input of the bank of modular multipliers and R w , w = 0 - 1 are the W results at the output of these multipliers.
La mémoire cache comprend avantageusement une première partie de taille W et une seconde partie de taille LatMM + 1 où LatMM est la latence du banc de multiplieurs modulaires, le contrôleur central initialisant le contenu de la première partie de la mémoire cache avec y1,y2,..,yn et la seconde partie avec y , le mot lu de la mémoire cache pour le premier cycle de calcul étant UJJV.JJW = yny1y2... /w . The cache memory advantageously comprises a first part of size W and a second part of size LatMM + 1 where LatMM is the latency of the bank of modular multipliers, the central controller initializing the content of the first part of the cache memory with y 1 , y 2 , .., y n and the second part with y, the word read from the cache memory for the first calculation cycle being UJJ V .JJ W = y n y 1 y 2 ... / w .
Dans ce cas, à chaque fois qu'un facteur de rotation calculé par le banc de multiplieurs modulaires est un multiple de W , une adresse dans la seconde partie de la mémoire cache est incrémentée et le facteur de rotation est stocké à l'adresse ainsi incrémentée.  In this case, each time a rotation factor calculated by the bank of modular multipliers is a multiple of W, an address in the second part of the cache memory is incremented and the rotation factor is stored at the address thus incremented.
La mémoire cache peut comprendre en outre un pointeur d'adresse pointant vers l'adresse où lire la valeur de U0 pour le prochain cycle de calcul, les valeurs de UV..UW étant lues de la première partie et le mot U0UV..UW formé par la concaténation de ces valeurs étant fourni au banc de multiplieurs modulaires pour le prochain cycle de calcul. The cache memory can also include an address pointer pointing to the address where to read the value of U 0 for the next calculation cycle, the values of U V ..U W being read from the first part and the word U 0 U V ..U W formed by the concatenation of these values being supplied to the bank of modular multipliers for the next calculation cycle.
Selon un second mode de réalisation, le banc de W multiplieurs modulaires effectue respectivement les multiplications R0 = U0U1 mod p ; R1 = U1U1 mod p ;According to a second embodiment, the bank of W modular multipliers performs respectively the multiplications R 0 = U 0 U 1 mod p; R 1 = U 1 U 1 mod p;
R1 = UJJ2 mod p ... ; Rw-l = UWUW mod p où uoun..uy est le mot lu de la mémoire cache R 1 = UJJ 2 mod p ...; R wl = U W U W mod p where u o u n .. u y is the word read from the cache memory
2 2 2 2 2 2
et Uw, w = 0,... sont les opérandes en entrée du banc des multiplieurs modulaires et and U w , w = 0, ... are the operands at the input of the bank of modular multipliers and
Rw, w = -1 sont les W résultats en sortie de ces multiplieurs. R w , w = -1 are the W results at the output of these multipliers.
Avantageusement, la mémoire cache , le contrôleur central initialisant le contenu de la mémoire cache avec y2 ,y2 , .,y 2 . Dans ce cas, après qu'un mot est lu de la mémoire cache pour préparer un cycle Advantageously, the cache memory, the central controller initializing the content of the cache memory with y 2 , y 2 ,., y 2 . In this case, after a word is read from the cache memory to prepare a cycle
de calcul, le contenu de cette mémoire est décalé de— et, qu'au terme du cycle de calcul, the content of this memory is shifted by— and that, at the end of the calculation cycle,
le mot constitué par les résultats en sortie du banc de multiplieurs modulaires est stocké à la suite du contenu ainsi décalé. the word constituted by the results at the output of the bank of modular multipliers is stored following the content thus shifted.
Avantageusement, quel que soit le mode de réalisation, ledit circuit générateur est destiné à générer une pluralité L de séquences de N facteurs de rotation où les éléments y, , l = 0,..., L - l sont des racines A/ ème de l'unité dans une pluralité L de corps fini, ledit circuit générateur comprenant : Advantageously, whatever the embodiment, said generator circuit is intended to generate a plurality L of sequences of N rotation factors where the elements y,, l = 0, ..., L - l are roots A / th of the unit in a plurality L of finite field, said generator circuit comprising:
une pluralité L de modules gestionnaires de cache, chaque module gestionnaire de cache comprenant une mémoire cache et un contrôleur local contrôlant l'écriture et la lecture dans la mémoire cache correspondante ;  a plurality L of cache manager modules, each cache manager module comprising a cache memory and a local controller controlling the writing and reading in the corresponding cache memory;
un banc de multiplieurs modulaires mutualisé entre les différents modules gestionnaires de cache ;  a bench of modular multipliers shared between the various cache management modules;
un contrôleur central initialisant tour à tour les L mémoires cache avec les G premiers facteurs de rotation de la séquence , et contrôlant chaque gestionnaire de cache de manière à fournir, pour chaque cycle de calcul d'une pluralité T = N /W de cycles de calcul, un mot lu de la mémoire cache au banc de multiplieurs modulaires, à écrire dans la mémoire cache associée à ce gestionnaire de cache, au terme de chaque cycle de calcul, hormis pour le dernier de ladite pluralité, un mot comprenant les W résultats en sortie du banc de multiplieurs modulaires, et à fournir au terme de chaque cycle de calcul, en sortie du générateur, ces W résultats comme un ensemble de W facteurs de rotation consécutifs de ladite séquence, les ensembles de W facteurs de rotation relatifs aux L séquences étant fournis de manière entrelacée. a central controller alternately initializing the L cache memories with the G first rotation factors of the sequence , and controlling each cache manager so as to provide, for each calculation cycle of a plurality T = N / W of calculation cycles, a word read from the cache memory to the bank of modular multipliers, to be written in the cache memory associated with this cache manager, at the end of each calculation cycle, except for the last of said plurality, a word comprising the W results at the output of the bank of modular multipliers, and to be supplied at the end of each calculation cycle, at output of the generator, these W results as a set of W consecutive rotation factors of the said sequence, the sets of W rotation factors relating to the L sequences being supplied in an interlaced manner.
Chaque module gestionnaire de cache peut être pourvu en entrée d'un multiplexeur contrôlé par le contrôleur central, de manière à transmettre à la mémoire cache associée au module gestionnaire de cache, soit un mot d'initialisation les G premiers facteurs de rotation de la séquence correspondante, soit W résultats du banc de multiplieurs modulaires. BRÈVE DESCRIPTION DES DESSINS Each cache manager module can be provided at the input with a multiplexer controlled by the central controller, so as to transmit to the cache memory associated with the cache manager module, ie an initialization word, the G first rotation factors of the sequence corresponding, let W be the results of the modular multiplier bank. BRIEF DESCRIPTION OF THE DRAWINGS
D'autres caractéristiques et avantages de l'invention apparaîtront à la lecture d'un mode de réalisation préférentiel de l'invention, décrit en référence aux figures jointes parmi lesquelles : Other characteristics and advantages of the invention will appear on reading a preferred embodiment of the invention, described with reference to the attached figures among which:
La Fig. 1 représente de manière schématique un graphe des dépendances pour la génération des facteurs de rotation ;  Fig. 1 schematically represents a dependency graph for the generation of the rotation factors;
La Fig. 2 représente de manière schématique un premier exemple de recouvrement du graphe de la Fig. 1, correspondant à une première stratégie de génération des facteurs de rotation ;  Fig. 2 schematically represents a first example of overlapping of the graph of FIG. 1, corresponding to a first strategy for generating the rotation factors;
La Fig. 3 représente de manière schématique un second exemple de recouvrement du graphe de la Fig. 1, correspondant à une seconde stratégie de génération des facteurs de rotation ;  Fig. 3 schematically represents a second example of overlapping of the graph of FIG. 1, corresponding to a second strategy for generating the rotation factors;
La Fig. 4 représente de manière schématique l'architecture générale d'un circuit de génération de facteurs de rotation selon un premier mode de réalisation de l'invention ;  Fig. 4 schematically represents the general architecture of a circuit for generating rotation factors according to a first embodiment of the invention;
La Fig. 5 représente de manière schématique l'architecture générale d'un banc de multiplieurs modulaires pour le circuit de génération de la Fig. 4 ;  Fig. 5 schematically represents the general architecture of a bench of modular multipliers for the generation circuit of FIG. 4;
La Fig. 6A représente de manière schématique un premier exemple de banc de multiplieurs modulaires ;  Fig. 6A schematically represents a first example of a bank of modular multipliers;
La Fig. 6B illustre la stratégie de génération des facteurs de rotation au moyen du banc de multiplieurs modulaires de la Fig. 6A ;  Fig. 6B illustrates the strategy for generating the rotation factors using the modular multiplier bank of FIG. 6A;
La Fig. 6C représente de manière schématique l'ordonnancement des calculs dans le circuit de génération des facteurs de rotation lorsque le banc de multiplieurs modulaires est celui de la Fig. 6A ;  Fig. 6C schematically represents the scheduling of the calculations in the circuit for generating the rotation factors when the bank of modular multipliers is that of FIG. 6A;
La Fig. 7A représente de manière schématique un second exemple de banc de multiplieurs modulaires ;  Fig. 7A schematically represents a second example of a bench of modular multipliers;
La Fig. 7B illustre la stratégie de génération des facteurs de rotation au moyen du banc de multiplieurs modulaires de la Fig. 7A ;  Fig. 7B illustrates the strategy for generating the rotation factors using the modular multiplier bank of FIG. 7A;
La Fig. 7C représente de manière schématique l'ordonnancement des calculs dans le circuit de génération des facteurs de rotation lorsque le banc de multiplieurs modulaires est celui de la Fig. 7A ; La Fig. 8 représente de manière schématique l'architecture générale d'un circuit de génération de facteurs de rotation selon un second mode de réalisation de l'invention ; Fig. 7C schematically represents the scheduling of the calculations in the circuit for generating the rotation factors when the bank of modular multipliers is that of FIG. 7A; Fig. 8 schematically represents the general architecture of a circuit for generating rotation factors according to a second embodiment of the invention;
La Fig. 9 représente de manière schématique l'ordonnancement des calculs dans le circuit de génération des facteurs de rotation de la Fig. 8.  Fig. 9 schematically represents the scheduling of the calculations in the circuit for generating the rotation factors of FIG. 8.
EXPOSÉ DÉTAILLÉ DE MODES DE RÉALISATION PARTICULIERS DETAILED PRESENTATION OF PARTICULAR EMBODIMENTS
Nous considérerons tout d'abord la génération de facteurs de rotation dans un corps fini, que l'on assimilera à Zp où p est un nombre premier, à un isomorphisme près et donc sans perte de généralité. Si y est une racine N ème de l'unité dans ce corps, le problème en question est de générer l'ensemble des éléments y \n = 0, ..., N -l} . Ces facteurs de rotation sont destinés à être fournis à un processeur NTT ou, de manière équivalente, à un processeur INTT, à une cadence prédéterminée. We will first consider the generation of rotation factors in a finite field, which we will assimilate to Z p where p is a prime number, to within an isomorphism and therefore without loss of generality. If y is a root N th of the unit in this body, the problem in question is to generate the set of elements y \ n = 0, ..., N -l}. These rotation factors are intended to be supplied to an NTT processor or, equivalently, to an INTT processor, at a predetermined rate.
La génération des facteurs de rotation peut être représentée à l'aide d'un graphe orienté, dit graphe des dépendances, dans lequel chaque nœud représente une puissance yh , une puissance y étant associée à autant de nœuds que de manières de la calculer à partir des nœuds précédents. Chaque nœud du graphe, hormis celui représentant la racine y , est supposé avoir un degré entrant (nombre d'arcs aboutissant à ce nœud) inférieur ou égal à 2, autrement dit chaque facteur de rotation y est généré à partir d'au plus 2 facteurs précédents seulement. The generation of the rotation factors can be represented using an oriented graph, called the dependency graph, in which each node represents a power y h , a power y being associated with as many nodes as there are ways to calculate it. from the previous nodes. Each node of the graph, except the one representing the root y, is supposed to have an incoming degree (number of arcs ending at this node) less than or equal to 2, in other words each rotation factor y is generated from at most 2 previous factors only.
La Fig. 1 illustre le graphe des dépendances pour la génération des six premiers éléments de la série { y | n = 0, ..., N -l} . Les arcs identifient les parents de chaque nœud. Fig. 1 illustrates the dependency graph for the generation of the first six elements of the series {y | n = 0, ..., N -l}. The arcs identify the parents of each node.
Ainsi, par exemple, y 6 peut être calculé de six manières différentes selon les parents choisis. Le poids associé à chaque arc est celui du facteur de parenté. Ainsi, un nœud peut être l'extrémité de deux arcs de poids 1 (par exemple y 6 est calculé comme le produit yiy 5 ou y2yA à partir de deux nœuds parents distincts) ou d'un seul arc de poids 2 (par exemple y 6 est calculé comme le produit y3y3 à partir d'un seul nœud parent). Le graphe des dépendances peut être parcouru de manière à minimiser les besoins en mémoire locale ou la latence de calcul pour la génération des facteurs de rotation. So, for example, y 6 can be calculated in six different ways depending on the parents chosen. The weight associated with each arc is that of the kinship factor. Thus, a node can be the end of two arcs of weight 1 (for example y 6 is calculated as the product y i y 5 or y 2 y A from two distinct parent nodes) or of a single arc of weight 2 (for example y 6 is calculated as the product y 3 y 3 from a single parent node). The dependency graph can be browsed in order to minimize the local memory requirements or the computation latency for the generation of the rotation factors.
La Fig. 2 représente un premier exemple un recouvrement du graphe de la Fig. 1, visant à minimiser les besoins en ressources mémoire. Fig. 2 shows a first example of an overlap of the graph in FIG. 1, aimed at minimizing the memory resource requirements.
Par recouvrement du graphe en question, on entend un sous-graphe dans lequel chaque nœud a pour parents des nœuds de ce sous-graphe et tel que chaque facteur de rotation de la série { yh | n = 0, ..., N -l} est représenté par un nœud de ce sous-graphe. By overlapping of the graph in question, we mean a subgraph in which each node has as parents the nodes of this subgraph and such that each rotation factor of the series {y h | n = 0, ..., N -l} is represented by a node of this subgraph.
Le recouvrement de graphe illustré en Fig. 1 correspond à une minimisation des ressources en mémoire locale pour la génération de la série { yh | n = 0,..., N -l} . En effet, dans ce cas, il suffit de garder en mémoire la racine de l'unité y et les facteurs de rotation se calculent au moyen de la relation de récurrence suivante : The graph overlap illustrated in Fig. 1 corresponds to a minimization of local memory resources for the generation of the series {y h | n = 0, ..., N -l}. Indeed, in this case, it suffices to keep in memory the root of the unit y and the rotation factors are calculated by means of the following recurrence relation:
On note toutefois que la latence de calcul correspondant à cette stratégie de génération est élevée dans la mesure où il faut attendre n étapes de récurrence avant de disposer du facteur de rotation y/1. It is noted however that the latency of computation corresponding to this generation strategy is high insofar as it is necessary to wait for n recurrence steps before having the rotation factor y / 1 .
La Fig. 3 représente un second exemple d'un recouvrement du graphe de la Fig. 1, visant à minimiser la latence de calcul. Fig. 3 represents a second example of an overlap of the graph of FIG. 1, aimed at minimizing the computing latency.
Ainsi, par exemple, comme illustré sur la Fig. 3, il n'est plus nécessaire d'attendre la génération de y5 pour calculer y/6. Un facteur de rotation est généré dès que les facteurs de rotation des nœuds parents sont disponibles. Thus, for example, as illustrated in FIG. 3, it is no longer necessary to wait for the generation of y 5 to calculate y / 6 . A rotation factor is generated as soon as the rotation factors of the parent nodes are available.
En revanche, cette stratégie de génération nécessite de pouvoir stocker des facteurs de rotation précédemment générés. Par exemple, il sera nécessaire de stocker y/3 pour la future génération de y/5 et y/6 pendant que l'on calcule y/4 = y2y2. La stratégie de génération des facteurs de rotation correspondant à ce recouvrement de graphe peut être représentée par la relation de récurrence suivante : However, this generation strategy requires the ability to store previously generated rotation factors. For example, it will be necessary to store y / 3 for the future generation of y / 5 and y / 6 while calculating y / 4 = y 2 y 2 . The strategy for generating the rotation factors corresponding to this graph overlap can be represented by the following recurrence relation:
R0 = l-, R1 = R 0 = l-, R 1 =
Dans les exemples précédents, on a supposé que l'on disposait au départ du seul facteur de rotation y . Toutefois, de manière générale, on pourra disposer de G facteurs de rotations initiaux, correspondant aux G premiers éléments de la série, soit In the previous examples, it was assumed that at the start there was only the rotation factor y. However, in general, we will be able to have G initial rotation factors, corresponding to the G first elements of the series, ie
Dans la suite, nous supposerons en outre que le circuit de génération de facteurs de rotation génère la série yh | n = 0, ..., N -l} sur plusieurs cycles, la totalité des facteurs de rotation de la série étant générée au bout de T = N /W cycles. A chaque cycle, le processeur NTT effectue une opération radix (similaire à une opération radix dans une FFT) portant sur W données d'entrée. In the following, we will further assume that the rotation factor generation circuit generates the series y h | n = 0, ..., N -l} over several cycles, all the rotation factors of the series being generated after T = N / W cycles. At each cycle, the NTT processor performs a radix operation (similar to a radix operation in an FFT) relating to W input data.
Nous supposerons enfin, pour des raisons de simplification de la présentation que G = W , autrement dit que l'on dispose d'autant de facteurs de rotation initiaux que la largeur du chemin de données , et que W et N sont des puissance de 2. La Fig. 4 représente de manière schématique l'architecture générale d'un circuit de génération de facteurs de rotation selon un premier mode de réalisation de l'invention.  We will finally suppose, for reasons of simplification of the presentation that G = W, in other words that we have as many initial rotation factors as the width of the data path, and that W and N are powers of 2 Fig. 4 schematically represents the general architecture of a circuit for generating rotation factors according to a first embodiment of the invention.
Le circuit de génération 400 comprend essentiellement un module gestionnaire de cache, 410, un banc de multiplieurs modulaires, 420, et un contrôleur central, 430.  The generation circuit 400 essentially comprises a cache manager module, 410, a bench of modular multipliers, 420, and a central controller, 430.
Le module gestionnaire de cache dispose d'un contrôleur local, 411, d'une mémoire cache 412, d'un registre de sortie 415 pour fournir W facteurs de rotation à chaque cycle ainsi que d'un registre de sortie intermédiaire 417 pour fournir, à chaque début de cycle des opérandes issus de la mémoire cache au banc de multiplieurs modulaires. De manière générale, le module gestionnaire de cache a pour fonction de cadencer les calculs de la série de facteurs de rotation selon la stratégie de recouvrement du graphe de dépendances retenue. The cache manager module has a local controller, 411, a cache memory 412, an output register 415 to supply W rotation factors at each cycle as well as an intermediate output register 417 to supply, at the start of each cycle of operands from the cache memory on the bench of modular multipliers. Generally, the cache manager module has the function of time the calculations of the series of rotation factors according to the recovery strategy of the dependency graph used.
Le banc de multiplieurs modulaires reçoit à chaque cycle des opérandes du module gestionnaire de cache, à savoir des puissances y/ stockées dans la mémoire cache, et en déduit les facteurs de rotation à fournir pour le cycle courant. Les facteurs de rotation ainsi calculés sont fournis au registre de sortie 415 et stockés dans la mémoire cache. Plus précisément, les résultats en sortie des multiplicateurs modulaires sont fournis à un registre d'entrée intermédiaire 407 avant d'être transmis au registre de sortie 415 et stockés dans la mémoire cache 412.  The modular multiplier bank receives operands from the cache manager module at each cycle, namely powers y / stored in the cache memory, and deduces therefrom the rotation factors to be supplied for the current cycle. The rotation factors thus calculated are supplied to the output register 415 and stored in the cache memory. More precisely, the results at the output of the modular multipliers are supplied to an intermediate input register 407 before being transmitted to the output register 415 and stored in the cache memory 412.
Au début de chaque séquence de T cycles, les G facteurs de rotation initiaux y/1 ,..., y/G sont fournis au module gestionnaire de cache 410 via un registre d'entrée 405.At the start of each sequence of T cycles, the G initial rotation factors y / 1 , ..., y / G are supplied to the cache manager module 410 via an input register 405.
Les sorties du registre d'entrée et du registre d'entrée intermédiaire sont multiplexées par le multiplexeur 409. Ce multiplexeur, piloté par le contrôleur central 430, transmet les facteurs de rotation initiaux vers l'entrée du module gestionnaire de cache lors de l'initialisation d'une série de T cycles, puis les facteurs de rotation calculés par le banc de multiplieurs modulaires vers l'entrée du module gestionnaire de cache au début de chacun des T - 1 cycles suivants de la série. The outputs of the input register and of the intermediate input register are multiplexed by the multiplexer 409. This multiplexer, controlled by the central controller 430, transmits the initial rotation factors to the input of the cache manager module during the initialization of a series of T cycles, then the rotation factors calculated by the bank of modular multipliers towards the input of the cache manager module at the start of each of the following T - 1 cycles of the series.
Le contrôleur central 430 génère un ensemble GenCtrl de signaux de contrôle constitué composé des signaux new _ set , compute et new _ data qui pilotent le contrôleur local du module gestionnaire de cache. Le premier signal de contrôle, new _ set , sert à initialiser le gestionnaire de calcul tous les T cycles et en particulier de remettre à zéro les compteurs internes du contrôleur local. Il ordonne également au multiplexeur d'entrée 409 de transmettre au module gestionnaire de cache, les facteurs de rotation initiaux { yi,..., y° J reçus sur le registre d'entrée 405. Le second signal de contrôle, compute , commande au module gestionnaire de cache d'effectuer un cycle de calcul, c'est- à-dire de lire les opérandes dans la mémoire cache et les fournir au banc de multiplieurs modulaires 420. Le troisième signal de contrôle, new _ data , indique au contrôleur local qu'il doit prendre en considération les nouveaux facteurs de rotation calculés par le banc de multiplieurs modulaires. En retour, le contrôleur local informe le contrôleur central lorsqu'il est prêt à effectuer un nouveau calcul au moyen d'une information de disponibilité data _ available . Plus précisément, cette information de disponibilité prend une valeur logique haute lorsque le cache 412 contient les facteurs de rotation permettant de calculer les éléments suivants de la série et que le contrôleur central n'a pas encore commandité ces calculs au moyen du signal compute . The central controller 430 generates a GenCtrl set of control signals consisting of the new _ set, compute and new _ data signals which control the local controller of the cache manager module. The first control signal, new _ set, is used to initialize the calculation manager every T cycles and in particular to reset the internal counters of the local controller. It also instructs the input multiplexer 409 to transmit to the cache manager module, the initial rotation factors {y i , ..., y ° J received on the input register 405. The second control signal, computes, commands the cache manager module to carry out a calculation cycle, that is to say to read the operands in the cache memory and supply them to the bank of modular multipliers 420. The third control signal, new _ data, indicates the local controller that he must take into account the new rotation factors calculated by the modular multiplier bank. In return, the local controller informs the central controller when it is ready to perform a new calculation using data availability information. More specifically, this availability information takes a high logical value when the cache 412 contains the rotation factors making it possible to calculate the following elements of the series and the central controller has not yet ordered these calculations by means of the computed signal.
Le contrôleur local comprend un premier compteur comptabilisant le nombre de facteurs de rotation déjà générés, un second compteur comptabilisant le nombre de facteurs de rotation stockés dans la mémoire cache et un troisième compteur comptabilisant le nombre de cycles de calcul demandés par le contrôleur central depuis la dernière initialisation (c'est-à-dire depuis le début de la série). Le contrôleur local comprend un circuit de logique combinatoire recevant les signaux de contrôle du contrôleur central et fournissant les signaux de contrôle des compteurs précités, l'information de disponibilité, les signaux de contrôle de la mémoire cache ainsi que celui du registre de sortie. Le signal de contrôle du registre de sortie permet de fournir sur le bus de sortie les W derniers facteurs de rotation générés.  The local controller comprises a first counter recording the number of rotation factors already generated, a second counter recording the number of rotation factors stored in the cache memory and a third counter recording the number of calculation cycles requested by the central controller from the last initialization (i.e. from the start of the series). The local controller comprises a combinational logic circuit receiving the control signals from the central controller and supplying the control signals from the aforementioned counters, the availability information, the control signals from the cache memory as well as from the output register. The output register control signal makes it possible to supply the W last rotation factors generated on the output bus.
Le contrôleur central est essentiellement composé d'un circuit de logique combinatoire et d'un registre à décalage. La profondeur du registre à décalage est déterminée en fonction de la latence du banc de multiplieurs modulaires (pour effectuer les calculs) ainsi que de la latence du module gestionnaire de cache (pour mettre à jour le registre de sortie et son registre de sortie intermédiaire). Le registre à décalage avance à chaque cycle d'horloge.  The central controller is essentially composed of a combinational logic circuit and a shift register. The depth of the shift register is determined according to the latency of the bank of modular multipliers (to perform the calculations) as well as the latency of the cache manager module (to update the output register and its intermediate output register) . The shift register advances at each clock cycle.
Le contrôleur central reçoit en entrée un signal new _ input lui indiquant qu'un nouvel ensemble de facteurs de rotation initiaux yL est disponible sur le bus d'entrée pour une nouvelle série de calculs de facteurs de rotation { y' | n = 0, ..., /V -lJ où y' est une nouvelle racine de l'unité dans Έr . Comme on l'a vu plus haut le contrôleur central reçoit également du module gestionnaire de cache l'information de disponibilité data _ available . A partir des signaux new _input et data _ available le circuit de logique combinatoire du contrôleur central génère les signaux de contrôle new _ set , compute et new _ data pour le prochain cycle de calcul. En outre, le circuit de logique combinatoire met à jour l'entrée du registre à décalage à chaque début de cycle de calcul. En sortie du registre à décalage, autrement dit après avoir pris en compte les latences respectives du banc de multiplieurs modulaires, un signal valid est généré, indiquant qu'un jeu de W facteurs de rotation est disponible sur le bus de sortie. The central controller receives as input a new _ input signal indicating that a new set of initial rotation factors y L is available on the input bus for a new series of rotation factor calculations {y '| n = 0, ..., / V -lJ where y 'is a new root of the unit in Έ r . As seen above, the central controller also receives data _ available availability information from the cache manager module. From the new _input and data _ available signals the combinatorial logic circuit of the central controller generates the new _ set, compute and new _ data control signals for the next calculation cycle. In addition, the combinational logic circuit updates the entry of the shift register at the start of each calculation cycle. At the output of the shift register, in other words after taking into account the respective latencies of the bank of modular multipliers, a valid signal is generated, indicating that a set of W rotation factors is available on the output bus.
La Fig. 5 représente de manière schématique l'architecture générale d'un banc de multiplieurs modulaires pour le circuit de génération de la Fig. 4. Fig. 5 schematically represents the general architecture of a bench of modular multipliers for the generation circuit of FIG. 4.
Elle comprend une matrice d'interconnexion, 510, destinée à recevoir les opérandes issus de la mémoire cache et à les distribuer sur les entrées de W multiplieurs modulaires opérant en parallèle, 520, désignés par chaque multiplieur modulaire MMw effectuant une multiplication modulo p de ses deux opérandes d'entrée pour fournir le résultat Rw . It includes an interconnection matrix, 510, intended to receive the operands from the cache memory and to distribute them on the inputs of W modular multipliers operating in parallel, 520, designated by each modular multiplier MM w performing a modulo p multiplication of its two input operands to provide the result R w .
La Fig. 6A représente de manière schématique un premier exemple de banc de multiplieurs modulaires. Fig. 6A schematically represents a first example of a bench of modular multipliers.
Cet exemple d'implémentation correspond à une stratégie de minimisation de la taille de la mémoire cache du module gestionnaire de cache. La matrice d'interconnexion reçoit W + 1 opérandes et les distribue sur les 2 W entrées des multiplieurs modulaires.  This implementation example corresponds to a strategy for minimizing the size of the cache memory of the cache manager module. The interconnection matrix receives W + 1 operands and distributes them over the 2 W inputs of the modular multipliers.
Dans cet exemple G = W = 4 et les opérandes sont notés U0,...,U4 . Les multiplieurs modulaires MM0,...,MM3 effectuent les calculs suivants : In this example G = W = 4 and the operands are noted U 0 , ..., U 4 . The modular multipliers MM 0 , ..., MM 3 perform the following calculations:
R0 = U0U1 mod p R 0 = U 0 U 1 mod p
R1 = U0U2 mod p R 1 = U 0 U 2 mod p
R2 = U0U3 mod p R 2 = U 0 U 3 mod p
R3 = U0U4 mod p (6) R 3 = U 0 U 4 mod p (6)
De manière générale, selon la stratégie de minimisation de la taille du cache, le banc de multiplieurs modulaires effectue les opérations suivantes : R0 = U0U1 mod p Generally, according to the cache size minimization strategy, the modular multiplier bank performs the following operations: R 0 = U 0 U 1 mod p
R1 = U0U2 mod p ... R 1 = U 0 U 2 mod p ...
Rw- 1 = U,IJ,V mod p (7) R w - 1 = U, IJ, V mod p (7)
La Fig. 6B illustre la stratégie de génération des facteurs de rotation au moyen du banc de multiplieurs de la Fig. 6A pour N = 32 et une latence du banc de multiplieurs modulaires LatMM = 3 . On rappelle que dans l'exemple de la Fig. 6A , G = W = 4 . Fig. 6B illustrates the strategy for generating the rotation factors by means of the multiplier bank of FIG. 6A for N = 32 and a latency of the bench of modular multipliers LatMM = 3. It will be recalled that in the example of FIG. 6A, G = W = 4.
On a représenté en 650 à 657 les sorties du banc de multiplieurs modulaires ou plus précisément les données en sortie du multiplexeur 409 (dans la mesure où 650 correspond à l'état d'initialisation), pour 8 cycles de calcul successifs. Les valeurs figurant dans les cases en trait discontinu sont celles qui sont stockées dans une seconde partie de la mémoire cache comme expliqué ci-après.  The outputs of the modular multiplier bank are represented in 650 to 657, or more precisely the data at the output of the multiplexer 409 (insofar as 650 corresponds to the initialization state), for 8 successive calculation cycles. The values appearing in the boxes in broken lines are those which are stored in a second part of the cache memory as explained below.
La Fig. 6C représente de manière schématique l'ordonnancement des calculs dans le circuit de génération des facteurs de rotation lorsque le banc de multiplieurs modulaires est implémenté comme en Fig. 6A. Fig. 6C schematically represents the scheduling of the calculations in the circuit for generating the rotation factors when the bank of modular multipliers is implemented as in FIG. 6A.
On a représenté en 661, les opérandes U0,...,U4 en entrée de la batterie des multiplieurs modulaires ; en 662 et 663 une première partie et une seconde partie de la mémoire cache, notées AGRS et AGR0 ; en 665 les résultats R0,...,R3 en sortie du banc de multiplieurs modulaires. The operands U 0 , ..., U 4 are shown in 661 at the input of the battery of modular multipliers; in 662 and 663 a first part and a second part of the cache memory, denoted AGRS and AGR0; in 665 the results R 0 , ..., R 3 at the output of the bank of modular multipliers.
La taille de AGRS est égale à W , celle de AGR0 est égale à LatMM + 1 . (on a supposé dans l'exemple illustré que le banc de multiplieurs modulaires présentait une latence LatMM de 3 cycles d'horloge).  The size of AGRS is equal to W, that of AGR0 is equal to LatMM + 1. (it was assumed in the illustrated example that the modular multiplier bank had a LatMM latency of 3 clock cycles).
Les emplacements mémoire de AGRS sont notés C0,..., C3 , ceux de AGR0 sont notés B0,..., B3. On stocke dans AGRS en C0,..., C3 les derniers résultats fournis par R0, ...,R3 et dans AGR0 en B0,..., B3, des facteurs de rotation, dits de réserve, définis comme les LatMM + 1 premiers facteurs de rotation y/ de la série où i est un multiple de W . Pour des raisons de clarté, les exposants i ont été représentés en lieu et place des facteurs de rotation correspondants y/ . The memory locations of AGRS are denoted C 0 , ..., C 3 , those of AGR0 are denoted B 0 , ..., B 3 . We store in AGRS in C 0 , ..., C 3 the last results provided by R 0 , ..., R 3 and in AGR0 in B 0 , ..., B 3 , rotation factors, called reserve , defined as the LatMM + 1 first rotation factors y / of the series where i is a multiple of W. For reasons of clarity, the exhibitors i have been represented in place of the corresponding rotation factors y /.
Les opérandes UV...,U4 sont lus des emplacements mémoire C0,...,C3 de AGRS et l'opérande U0 est lu de AGRO à l'adresse donnée par l'index Ind en 664. Cet index est généré par le contrôleur local du module gestionnaire de cache. The operands U V ..., U 4 are read from the memory locations C 0 , ..., C 3 of AGRS and the operand U 0 is read from AGRO at the address given by the index Ind in 664. This index is generated by the local controller of the cache manager module.
Le calcul de la série des facteurs de rotation {^1,...,^32} débute avec la réception des valeurs initiales {^1,...,^4} . Ces valeurs initiales sont stockées (au temps t0 ) en mémoire cache aux emplacements C0,..., C3 . La valeur initiale yf étant un facteur de rotation de réserve, elle est en outre stockée en B0 . Les valeurs stockées dans la mémoire cache sont fournies au banc de multiplieurs modulaires avec U0 = = y/4 , The calculation of the series of rotation factors {^ 1 , ..., ^ 32 } begins with the reception of the initial values {^ 1 , ..., ^ 4 }. These initial values are stored (at time t 0 ) in cache memory at the locations C 0 , ..., C 3 . The initial value yf being a reserve rotation factor, it is also stored at B 0 . The values stored in the cache memory are supplied to the bank of modular multipliers with U 0 = = y / 4 ,
Les résultats apparaissant en sortie du banc de multiplieurs modulaires au bout de LatMM cycles d'horloge (au temps t3) sont alors R0 = y5 , R1 = y6 , R2 = y/1 , R3 = y% . Ces résultats sont ensuite stockés (au temps t4 ) aux emplacements C0,..., C3 de AGRS et y étant un facteur de rotation de réserve est stocké à l'emplacement Bl . Les opérandes UV...,U4 sont lus des emplacements mémoire C0,...,C3 de AGRS et l'opérante U0 est lu de AGRO à l'adresse donnée par l'index Ind , soit de fij , soit : U0 = (B1 ) = y/& , The results appearing at the output of the modular multiplier bank at the end of LatMM clock cycles (at time t 3 ) are then R 0 = y 5 , R 1 = y 6 , R 2 = y / 1 , R 3 = y % . These results are then stored (at time t 4 ) at locations C 0 , ..., C 3 of AGRS and there being a reserve rotation factor is stored at location B l . The operands U V ..., U 4 are read from the memory locations C 0 , ..., C 3 of AGRS and the operant U 0 is read from AGRO at the address given by the index Ind, ie from fi j , that is: U 0 = (B 1 ) = y / & ,
Les résultats apparaissant en sortie du banc de multiplieurs modulaires au bout de LatMM cycles d'horloge (au temps ί8 ) sont alors R0 = y9 , R1 = yiV> , R2 = y , R3 = yh . Le processus se poursuit jusqu'à la génération de la dernière série de W facteurs de rotation en t14, soit The results appearing at the output of the bench of modular multipliers at the end of LatMM clock cycles (at time ί 8 ) are then R 0 = y 9 , R 1 = y iV> , R 2 = y, R 3 = y h . The process continues until the generation of the last series of W rotation factors at t 14 , i.e.
La Fig. 7A représente de manière schématique un second exemple de banc de multiplieurs modulaires. Cet exemple d'implémentation correspond à une génération au plus tôt des facteurs de rotation. Fig. 7A schematically represents a second example of a bench of modular multipliers. This implementation example corresponds to the earliest generation of the rotation factors.
W  W
La matrice d'interconnexion reçoit ici— +1 opérandes et les distribue sur les 2 W The interconnection matrix receives here— +1 operands and distributes them over the 2 W
entrées des multiplieurs modulaires. inputs of modular multipliers.
Dans cet exemple G = W = 4 et les opérandes dont notés U0,UVU2 . Les multiplieurs modulaires MM0,...,MM3 effectuent les calculs suivants : In this example G = W = 4 and the operands of which noted U 0 , U V U 2 . The modular multipliers MM 0 , ..., MM 3 perform the following calculations:
R0 = U0U1 mod p R 0 = U 0 U 1 mod p
R1 = U1U1 mod p R 1 = U 1 U 1 mod p
R1 = U 1U2 mod p R 1 = U 1 U 2 mod p
R3 = U2U2 mod p (8) R 3 = U 2 U 2 mod p (8)
De manière générale, selon la stratégie de minimisation de la latence de calcul, le banc de multiplieurs modulaires effectue les opérations suivantes : Generally, according to the strategy of minimization of the computing latency, the bank of modular multipliers performs the following operations:
R0 = U0U1 mod p R 0 = U 0 U 1 mod p
R1 = U1U1 mod p R 1 = U 1 U 1 mod p
R1 = UlU2 mod p ... mod p (9)R 1 = U l U 2 mod p ... mod p (9)
La Fig. 7B illustre la stratégie de génération des facteurs de rotation au moyen du banc de multiplieurs modulaires de la Fig. 7A. Fig. 7B illustrates the strategy for generating the rotation factors using the modular multiplier bank of FIG. 7A.
On a représenté en 750 à 757 les sorties du banc de multiplieurs modulaires ou plus précisément les données en sortie du multiplexeur 409 (dans la mesure où 750 correspond à l'état d'initialisation), pour 8 cycles de calcul successifs. La Fig. 7C représente de manière schématique l'ordonnancement des calculs dans le circuit de génération des facteurs de rotation lorsque le banc de multiplieurs modulaires est implémenté comme en Fig. 7A. The outputs of the modular multiplier bank, or more precisely the data at the output of the multiplexer 409 (in so far as 750 corresponds to the initialization state), have been shown in 750 to 757, for 8 successive calculation cycles. Fig. 7C schematically represents the scheduling of the calculations in the circuit for generating the rotation factors when the bank of modular multipliers is implemented as in FIG. 7A.
On a représenté en 761, les opérandes U0,UVU2 en entrée de la batterie des multiplieurs modulaires ; en 763 les emplacements de la mémoire cache C0,..., C5 ; en 765 les résultats R0,...,R3 en sortie du banc de multiplieurs modulaires. On a supposé ici que la latence du banc de multiplieurs modulaires était de LatMM = 5 cycles d'horloge. In 761, the operands U 0 , U V U 2 have been shown at the input of the battery of modular multipliers; in 763 the locations of the cache memory C 0 , ..., C 5 ; in 765 the results R 0 , ..., R 3 at the output of the bank of modular multipliers. It was assumed here that the latency of the bank of modular multipliers was LatMM = 5 clock cycles.
Le calcul de la série des facteurs de rotation {^1, ..., ^32} débute comme précédemment avec la réception des valeurs initiales yi , . ., y4 . Les valeurs initiales {^2, ..., ^4J sont stockées (au temps t0 ) en mémoire cache aux emplacements C0,..., C2 . The calculation of the series of rotation factors {^ 1 , ..., ^ 32 } begins as before with the reception of the initial values y i,. ., y 4 . The initial values {^ 2 , ..., ^ 4 J are stored (at time t 0 ) in cache memory at the locations C 0 , ..., C 2 .
Les valeurs stockées dans la mémoire cache sont fournies au banc de multiplieurs modulaires avec UQ = (CQ ) = /2 , U1 = (C1 ) = y/i , U2 = (C2 ) = /4. Une fois ces valeurs fournies, le contenu de la mémoire est décalé de 2 emplacements au coup d'horloge suivant (au temps i . Ainsi, dans le cas présent, après décalage, seule la valeur y4 reste stockée, à l'emplacement C0 . The values stored in the cache memory are supplied to the bank of modular multipliers with U Q = (C Q ) = / 2 , U 1 = (C 1 ) = y / i , U 2 = (C 2 ) = / 4 . Once these values have been supplied, the content of the memory is shifted by 2 locations at the next clock stroke (at time i. Thus, in the present case, after shift, only the value y 4 remains stored, at location C 0 .
Les résultats apparaissant en sortie du banc de multiplieurs modulaires au bout de LatMM (au temps i5 ) sont alors . Les résultats R0, ...,R3 sont stockés à la suite de C0 aux emplacements CV .., C4 pour la préparation des calculs suivants. The results appearing at the output of the modular multiplier bank at the end of LatMM (at time i 5 ) are then . The results R 0 , ..., R 3 are stored following C 0 at the locations C V .., C 4 for the preparation of the following calculations.
Les valeurs stockées en C0, CV C2 sont ensuite fournies (au temps t7 ) au banc de multiplieurs modulaires, à savoir : U0 = = /6 . Une fois ces valeurs fournies, le contenu de la mémoire cache est à nouveau décalé de deux emplacements. Ainsi, seules restent stockées dans le cache les valeurs y6 , yΊ , y* . The values stored in C 0 , C V C 2 are then supplied (at time t 7 ) to the bank of modular multipliers, namely: U 0 = = / 6 . Once these values are provided, the content of the cache memory is again shifted by two locations. Thus, only the values y 6 , y Ί , y * remain stored in the cache.
Au temps i8, les valeurs stockées dans la mémoire cache sont fournies au banc de multiplieurs modulaires avec UQ = (CQ ) = /6 , = y , puis le contenu de la mémoire cache est à nouveau décalé de deux emplacements : seule la valeur y* reste stockée en C0. At time i 8 , the values stored in the cache memory are supplied to the bank of modular multipliers with U Q = (C Q ) = / 6 , = y, then the content of the cache memory is again shifted by two locations: only the value y * remains stored in C 0 .
Les résultats apparaissant en sortie du banc de multiplieurs modulaires au temps i12 sont alors R0 = y9 , Rl = y ° , R2 = 1 , R3 = ygi . Les résultats RO,...,R3 sont stockés à la suite de C0 aux emplacements CV .., C4 pour la préparation des calculs suivants. Au temps i13 , les valeurs stockées sont fournies à la batterie de de multiplieurs modulaires avec The results appearing at the output of the bank of modular multipliers at time i 12 are then R 0 = y 9 , R l = y °, R 2 = 1 , R 3 = y gi . The results R O , ..., R 3 are stored following C 0 at the locations C V .., C 4 for the preparation of the following calculations. At time i 13 , the stored values are supplied to the battery of modular multipliers with
Le processus se poursuit selon la même logique jusqu'au temps t20 où le banc de multiplieurs modulaires fournit les derniers W facteurs de rotation . The process continues according to the same logic until time t 20 when the bank of modular multipliers provides the last W rotation factors .
Dans le cas présent, toutes choses étant égales par ailleurs, le calcul de la série complète {^1, ..., ^32} est aussi rapide dans le premier exemple que dans le second. En effet, dans le premier exemple si la latence avait été LatMM = 5 , le calcul aurait également été terminé qu'au temps t20 . Cependant, de manière générale avec un recouvrement de graphe de dépendance du type de la Fig. 7B, le calcul de la série complète des facteurs de In the present case, all other things being equal, the computation of the complete series {^ 1 , ..., ^ 32 } is as fast in the first example as in the second. Indeed, in the first example if the latency had been LatMM = 5, the calculation would also have been completed only at time t 20 . However, generally speaking with a dependency graph overlap of the type of FIG. 7B, the calculation of the complete series of factors
N  NOT
rotation est plus rapide (plus précisément la cadence— ) que pour un recouvrement de rotation is faster (more precisely the cadence—) than for an overlap of
type de la Fig. 6B. type of Fig. 6B.
N -W  N -W
La taille de la mémoire cache dans le second exemple est de - . En effet, à The size of the cache in the second example is -. Indeed, at
N W  N W
chacun des - 1 calculs, on écrit W facteurs de rotation et on en élimine— , la taille each of the - 1 calculations, one writes W factors of rotation and one eliminates some -, the size
W 2  W 2
( N ) W  (N) W
mémoire nécessaire pour ne pas écraser des données utiles est - 1 — . Pour des memory required not to overwrite payload is - 1 -. For some
[ W 2  [W 2
valeurs élevées du degré N , on vérifie que la taille mémoire requise dans le premier exemple (W + LatMM + 1 ) est bien inférieure à celle requise dans le second exemple. high values of degree N, it is checked that the memory size required in the first example (W + LatMM + 1) is much less than that required in the second example.
Dans les deux exemples d'implémentation décrits plus haut, on remarque que des temps d'attente (ou « bulles », par exemple en 670 ou 770) sont présents dans l'alimentation de la batterie des multiplieurs modulaires, en raison de la latence LatMM et des relations de dépendance à respecter dans le graphe des dépendances. Il en résulte une génération saccadée des facteurs de rotation, à tout le moins des premiers éléments de la série. In the two implementation examples described above, we note that waiting times (or “bubbles”, for example in 670 or 770) are present in the supply of the battery of modular multipliers, due to the latency LatMM and dependency relationships to respect in the dependency graph. The result a jerky generation of rotation factors, at least the first elements of the series.
Ces temps d'attente peuvent être mis à profit dans un second mode de réalisation de l'invention pour calculer des facteurs de rotation sur une pluralité de corps finis Z , l = 0, ..., L - l dans un contexte de transformées NTT en arithmétique RNS.  These waiting times can be used in a second embodiment of the invention to calculate rotation factors on a plurality of finite fields Z, l = 0, ..., L - l in a context of transforms NTT in RNS arithmetic.
La Fig. 8 représente de manière schématique l'architecture générale d'un circuit de génération de facteurs de rotation selon un second mode de réalisation de l'invention. Fig. 8 schematically represents the general architecture of a circuit for generating rotation factors according to a second embodiment of the invention.
A la différence du premier mode de réalisation, le circuit de génération des facteurs de rotation comprend ici une pluralité L de modules gestionnaires de cache 810O, ...,810L-I, ayant chacun la structure du module gestionnaire de cache 410. Chacun de ces modules est associé à un corps fini Z et dispose de son contrôleur local ainsi que de sa mémoire cache. En sortie de chacun de ces modules, on retrouve un bus de sortie et un bus de sortie intermédiaire.  Unlike the first embodiment, the circuit for generating the rotation factors here comprises a plurality L of cache manager modules 810O, ..., 810L-I, each having the structure of the cache manager module 410. Each of these modules is associated with a finite body Z and has its local controller as well as its cache memory. At the output of each of these modules, there is an output bus and an intermediate output bus.
Les bus de sortie des différents modules gestionnaires de cache sont multiplexés par un premier multiplexeur de sortie 841 contrôlé par le contrôleur central au moyen d'une commande SEL _ output . De même, les bus de sortie intermédiaire des différents modules gestionnaires de cache sont multiplexés par un second multiplexeur de sortie 842, contrôlé par le contrôleur central au moyen d'une commande SEL _ MMS .  The output buses of the various cache management modules are multiplexed by a first output multiplexer 841 controlled by the central controller by means of a SEL _ output command. Likewise, the intermediate output buses of the various cache management modules are multiplexed by a second output multiplexer 842, controlled by the central controller by means of a SEL _ MMS command.
Comme dans le premier mode de réalisation, le circuit de génération de facteurs de rotation comprend un banc de multiplieurs modulaires, 820, et un contrôleur central, 830.  As in the first embodiment, the circuit for generating rotation factors comprises a bank of modular multipliers, 820, and a central controller, 830.
Le banc de multiplieurs modulaires 820 est alimenté en données via un registre commun, 850, en sortie du second multiplexeur de sortie. Il reçoit également du contrôleur central un signal modulot indiquant aux multiplieurs modulaires dans quel corps Z les multiplications doivent être effectuées. The modular multiplier bank 820 is supplied with data via a common register, 850, at the output of the second output multiplexer. It also receives from the central controller a modulo t signal indicating to the modular multipliers in which body Z the multiplications must be carried out.
Les facteurs de rotation initiaux sont fournis tour à tour aux modules gestionnaires de calcul, 810 ; l = 0,..., L - l , via le registre d'entrée 805. Les facteurs de rotation calculés par le banc de multiplieurs modulaires sont fournis quant à eux via le registre d'entrée intermédiaire 807. Les sorties respectives du registre d'entrée et du registre d'entrée intermédiaire sont chacune distribuées à tous les modules gestionnaires de calcul. Chaque module gestionnaire de cache, 81(¾, possède en entrée un multiplexeur associé, 809 ; commandé par le contrôleur central 830. Ainsi le contrôleur central peut indiquer à l'un des modules gestionnaires de calcul 810^, d'importer les facteurs de rotation initiaux ou bien des facteurs de rotation calculés par le banc de multiplieurs modulaires. Initial rotation factors are supplied in turn to the calculation manager modules, 810 ; l = 0, ..., L - l, via the input register 805. The rotation factors calculated by the modular multiplier bank are provided via the intermediate input register 807. The respective outputs of the input register and of the intermediate input register are each distributed to all the calculation manager modules. Each cache manager module, 81 (¾, has as input an associated multiplexer, 809 ; controlled by the central controller 830. Thus the central controller can indicate to one of the calculation manager modules 810 ^, to import the factors of initial rotation or rotation factors calculated by the bank of modular multipliers.
Le contrôleur central comprend un circuit de logique combinatoire et deux registres à décalage permettant respectivement de générer les signaux de contrôle des L modules gestionnaires de cache, 810 ; l = 0,..., L - l , et de propager : le signal de contrôle du multiplexeur de sortie 841, SEL_MMS , le signal de contrôle du multiplexeur de sortie intermédiaire 843, SEL _ output , ainsi que les signaux de validité, valid , et de provenance, num , décrits plus loin. Plus précisément, le contrôleur central reçoit en entrée un signal new _ input lui indiquant qu'un nouvel ensemble de facteurs de rotation initiaux est disponible sur le bus d'entrée pour une nouvelle série de calculs de facteurs de rotation. Il reçoit également des modules gestionnaires de calcul les informations de disponibilité data _ available _ l , l = 0, ..., L - l , lui indiquant quels sont les modules disponibles pour un nouveau calcul. A partir des signaux new _ input et data _ available _ £ , £ = 0,..., L- l, le circuit de logique combinatoire du contrôleur central génère l'ensemble GenCtrle des signaux de contrôle new_ set _£ , compute _ £ et new _ data _ £ , ! = 0,..., L - l pour le prochain cycle de calcul. Comme nous le verrons plus loin, le contrôleur central peut donner une priorité moins élevée aux calculs les plus avancés. Autrement dit, plus une série est avancée, plus faible sera sa priorité attribuée et plus tardivement le signal compute _ l correspondant sera mis à jour. The central controller comprises a combinational logic circuit and two shift registers making it possible respectively to generate the control signals of the L cache manager modules, 810 ; l = 0, ..., L - l, and to propagate: the control signal of the output multiplexer 841, SEL_MMS, the control signal of the intermediate output multiplexer 843, SEL _ output, as well as the validity signals, valid, and provenance, num, described below. More precisely, the central controller receives as input a new _ input signal indicating to it that a new set of initial rotation factors is available on the input bus for a new series of calculations of rotation factors. It also receives from the calculation manager modules the availability information data _ available _ l, l = 0, ..., L - l, indicating to it which modules are available for a new calculation. From the signals new _ input and data _ available _ £, £ = 0, ..., L- l, the combinatorial logic circuit of the central controller generates the GenCtrl set e of the control signals new_ set _ £, compute _ £ and new _ data _ £,! = 0, ..., L - l for the next calculation cycle. As we will see later, the central controller can give a lower priority to the most advanced calculations. In other words, the more a series is advanced, the lower will be its priority assigned and later the corresponding computed signal will be updated.
En sortie, le contrôleur central fournit les signaux de contrôle pour les premier et second multiplexeurs de sortie 841, 843. Lorsqu'un jeu de W facteurs de rotation est disponible sur le bus de sortie, le contrôleur central l'indique au moyen du signal valid et précise au moyen du signal num à quel corps Z appartient ce jeu. La Fig. 9 représente de manière schématique l'ordonnancement des calculs dans le circuit de génération des facteurs de rotation de la Fig. 8. At output, the central controller provides the control signals for the first and second output multiplexers 841, 843. When a set of W rotation factors is available on the output bus, the central controller indicates this by means of the signal valid and precise by means of the signal num to which body Z this game belongs. Fig. 9 schematically represents the scheduling of the calculations in the circuit for generating the rotation factors of FIG. 8.
Sans préjudice de généralisation, le second mode de réalisation sera décrit pour une stratégie de calcul au plus tôt. L'homme du métier comprendra cependant qu'il pourra trouver également à s'appliquer lorsque l'on souhaite minimiser la taille mémoire du cache.  Without prejudice to generalization, the second embodiment will be described for a calculation strategy as soon as possible. Those skilled in the art will however understand that they may also find application when it is desired to minimize the memory size of the cache.
On a supposé dans l'exemple d'ordonnancement illustré en Fig. 9 que N = 32 , G = W = 4 et donc T = 8 . Autrement dit, un nouveau jeu de valeurs initiales est fourni au générateur de facteurs de rotation tous les G = 8 cycles. On a supposé ici que la latence du banc de multiplieurs modulaires était de LatMM = 5 cycles d'horloge comme en Fig. 7C. It has been assumed in the scheduling example illustrated in FIG. 9 that N = 32, G = W = 4 and therefore T = 8. In other words, a new set of initial values is supplied to the rotation factor generator every G = 8 cycles. It has been assumed here that the latency of the bank of modular multipliers was LatMM = 5 clock cycles as in FIG. 7C.
On a représenté en 910, les jeux de valeurs initiales ; en 920, les opérandes U0,UVU2 en entrée de la batterie des multiplieurs modulaires ; en 930 les résultats en sortie du banc de multiplieurs modulaires et en 940 la sortie du premier multiplexeur de sortie. Les cases en grisé correspondent à l'insertion d'un nouveau jeu de valeurs initiales. In 910, the sets of initial values have been represented; in 920, the operands U 0 , U V U 2 at the input of the battery of modular multipliers; in 930 the results at the output of the modular multiplier bank and in 940 the output of the first output multiplexer. The shaded boxes correspond to the insertion of a new set of initial values.
Par souci de simplification, le contenu des mémoires cache n'a pas été représenté. On observe qu'après l'arrivée de plusieurs jeux (ici 3), les multiplieurs modulaires sont saturés en données. L'ordonnancement des différentes séries respecte bien le débit de T = 8 cycles de calcul entre les jeux initiaux, au prix d'une légère latence supplémentaire pour la génération de la première série (4 cycles d'horloge supplémentaires correspondant à l'insertion des 2 séries de valeurs initiales suivantes).  For the sake of simplification, the content of the cache memories has not been shown. We observe that after the arrival of several sets (here 3), the modular multipliers are saturated in data. The scheduling of the different series respects the bit rate of T = 8 calculation cycles between the initial sets, at the cost of a slight additional latency for the generation of the first series (4 additional clock cycles corresponding to the insertion of the 2 series of following initial values).
Enfin, les éléments des différentes séries sont fournis en sortie dès qu'ils sont générés. Le signal num permet de les distinguer. En particulier ce signal pourra être utilisé par un processeur NTT par flot pour séparer des NTT sur différents corps.  Finally, the elements of the different series are output as soon as they are generated. The digital signal distinguishes them. In particular, this signal could be used by an NTT processor by flow to separate NTTs on different bodies.

Claims

REVENDICATIONS
1. Circuit générateur de facteurs de rotation (400) sur au moins un corps fini (Z ) pour processeur NTT par flot, ledit circuit générateur étant destiné à générer au moins une séquence de N facteurs de rotation où y est une racine de l'unité dans ce corps, caractérisé en ce qu'il comprend : 1. Circuit generator of rotation factors (400) on at least one finite body (Z) for NTT processor per flow, said generator circuit being intended to generate at least a sequence of N rotation factors where y is a root of unity in this body, characterized in that it includes:
au moins un module gestionnaire de cache (410, 810O,..,810L) comprenant une mémoire cache (411) et un contrôleur local (412) contrôlant l'écriture et la lecture dans la mémoire cache ; at least one cache manager module (410, 810 O , .., 810 L ) comprising a cache memory (411) and a local controller (412) controlling the writing and reading in the cache memory;
un banc de multiplieurs modulaires (420, 820) comprenant une pluralité de W multiplieurs modulaires (520) opérant en parallèle, chaque multiplieur modulaire effectuant une multiplication sur ledit corps de deux opérandes issus d'un mot lu de la mémoire cache ;  a bank of modular multipliers (420, 820) comprising a plurality of W modular multipliers (520) operating in parallel, each modular multiplier performing a multiplication on said body of two operands originating from a word read from the cache memory;
un contrôleur central (430, 830) initialisant la mémoire cache avec les G premiers facteurs de rotation de la séquence et contrôlant le gestionnaire de cache de manière à fournir à chaque cycle de calcul d'une pluralité T = N /W de cycles de calcul, un mot lu de la mémoire cache au banc de multiplieurs modulaires, à écrire dans la mémoire cache, au terme de chaque cycle de calcul, hormis pour le dernier de ladite pluralité, un mot comprenant les W résultats en sortie desdits multiplieurs modulaires, et à fournir au terme de chaque cycle de calcul, en sortie du générateur, ces W résultats comme W facteurs de rotation consécutifs de ladite série.  a central controller (430, 830) initializing the cache memory with the G first factors of rotation of the sequence and controlling the cache manager so as to provide each calculation cycle with a plurality T = N / W of calculation cycles , a word read from the cache memory in the modular multiplier bank, to be written in the cache memory, at the end of each calculation cycle, except for the last of said plurality, a word comprising the W results at the output of said modular multipliers, and to provide at the end of each calculation cycle, at the output of the generator, these W results as W consecutive rotation factors of said series.
2. Circuit générateur de facteurs de rotation selon la revendication 1, caractérisé en ce que le banc de W multiplieurs modulaires effectue respectivement les multiplications R0 = U0U1 mod p ; R1 = U0U2 mod p ; Rw-l = UJJw moô.p où U0UV..UW est le mot lu de la mémoire cache et Uw, w = 0,...,W sont les opérandes en entrée du banc des multiplieurs modulaires et Rw, w = 0,...,W - 1 sont les W résultats en sortie de ces multiplieurs. 2. A rotation factor generator circuit according to claim 1, characterized in that the bank of W modular multipliers performs respectively the multiplications R 0 = U 0 U 1 mod p; R 1 = U 0 U 2 mod p; R wl = UJJ w moô.p where U 0 U V ..U W is the word read from the cache memory and U w , w = 0, ..., W are the operands at the input of the bank of modular multipliers and R w , w = 0, ..., W - 1 are the W results at the output of these multipliers.
3. Circuit générateur de facteurs de rotation selon la revendication 2, caractérisé en ce que la mémoire cache comprend une première partie de taille W et une seconde partie de taille LatMM + 1 où LatMM est la latence du banc de multiplieurs modulaires, le contrôleur central initialisant le contenu de la première partie de la mémoire cache avec y y2,..,yp et la seconde partie avec yy , le mot lu de la mémoire cache pour le premier cycle de calcul étant UJJV.UW = ynyiy2...yn . 3. rotation factor generator circuit according to claim 2, characterized in that the cache memory comprises a first part of size W and a second part of size LatMM + 1 where LatMM is the latency of the bank of modular multipliers, the central controller initializing the content of the first part of the cache memory with yy 2 , .., y p and the second part with y y , the word read from the cache memory for the first calculation cycle being UJJ V .U W = y n y i y 2 ... y n .
4. Circuit générateur de facteurs de rotation selon la revendication 3, caractérisé en ce qu'à chaque fois qu'un facteur de rotation calculé par le banc de multiplieurs modulaires est un multiple de W , une adresse dans la seconde partie de la mémoire cache est incrémentée et le facteur de rotation est stocké à l'adresse ainsi incrémentée. 4. A rotation factor generator circuit according to claim 3, characterized in that each time a rotation factor calculated by the bank of modular multipliers is a multiple of W, an address in the second part of the cache memory is incremented and the rotation factor is stored at the address thus incremented.
5. Circuit générateur de facteurs de rotation selon la revendication 4, caractérisé en ce que la mémoire cache comprend en outre un pointeur d'adresse ( Ind ) pointant vers l'adresse où lire la valeur de U0 pour le prochain cycle de calcul, les valeurs de UV..UW étant lues de la première partie et le mot U0U1...UW formé par la concaténation de ces valeurs étant fourni au banc de multiplieurs modulaires pour le prochain cycle de calcul. 5. A rotation factor generator circuit according to claim 4, characterized in that the cache memory further comprises an address pointer (Ind) pointing to the address where to read the value of U 0 for the next calculation cycle, the values of U V ..U W being read from the first part and the word U 0 U 1 ... U W formed by the concatenation of these values being supplied to the bank of modular multipliers for the next calculation cycle.
6. Circuit générateur de facteurs de rotation selon la revendication 1, caractérisé en ce que le banc de W multiplieurs modulaires effectue respectivement les multiplications R0 = U0U1 mod p ; R1 = U1U1 mod p ; R1 = U1U2 modp ... ; 6. A rotation factor generator circuit according to claim 1, characterized in that the bank of W modular multipliers performs respectively the multiplications R 0 = U 0 U 1 mod p; R 1 = U 1 U 1 mod p; R 1 = U 1 U 2 modp ...;
W_ W_
Rw_ i = UWUW mod p où est le mot lu de la mémoire cache et Uw, w = 0, R w _ i = U W U W mod p where is the word read from the cache memory and U w , w = 0,
2 2 2 2 sont les opérandes en entrée du banc des multiplieurs modulaires et Rw, w = 0 ,...,W - 1 sont les W résultats en sortie de ces multiplieurs. 2 2 2 2 are the operands at the input of the bank of modular multipliers and R w , w = 0, ..., W - 1 are the W results at the output of these multipliers.
7. Circuit générateur de facteurs de rotation selon la revendication 6, 7. A rotation factor generator circuit according to claim 6,
( N y  (N y
caractérisé en ce que la taille de la mémoire cache est - 1 — , le contrôleur central characterized in that the size of the cache memory is - 1 -, the central controller
[ W J 2 initialisant le contenu de la mémoire cache avec y2 ,y3 ,..,y 2 . [WJ 2 initializing the content of the cache memory with y 2 , y 3 , .., y 2 .
8. Circuit générateur de facteurs de rotation selon la revendication 7, caractérisé en ce qu'après qu'un mot soit lu de la mémoire cache pour préparer un cycle 8. Circuit generator of rotation factors according to claim 7, characterized in that after a word is read from the cache memory to prepare a cycle
W  W
de calcul, le contenu de cette mémoire est décalé de— et, qu'au terme du cycle de calcul, the content of this memory is shifted by— and that, at the end of the calculation cycle,
le mot constitué par les résultats en sortie du banc de multiplieurs modulaires est stocké à la suite du contenu ainsi décalé. the word constituted by the results at the output of the modular multiplier bank is stored following the content thus shifted.
9. Circuit générateur de facteurs de rotation selon l'une de revendications précédentes, caractérisé en ce que ledit circuit générateur est destiné à générer une pluralité L de séquences de N facteurs de rotation où les éléments yi 9. Rotation factor generator circuit according to one of the preceding claims, characterized in that said generator circuit is intended to generate a plurality L of sequences of N rotation factors where the elements y i
, ! = 0,..., L- l sont des racines N ème de l'unité dans une pluralité L de corps finis ( Z , 1 = 0,..., L -l ), ledit circuit générateur comprenant : ,! = 0, ..., L- l are roots N th of the unit in a plurality L of finite fields (Z, 1 = 0, ..., L -l), said generator circuit comprising:
une pluralité L de modules gestionnaires de cache (810O, ..,810L), chaque module gestionnaire de cache ( 810 comprenant une mémoire cache et un contrôleur local contrôlant l'écriture et la lecture dans la mémoire cache correspondante ;  a plurality L of cache manager modules (810O, .., 810L), each cache manager module (810 comprising a cache memory and a local controller controlling the writing and reading in the corresponding cache memory;
un banc de multiplieurs modulaires (820) mutualisé entre les différents modules gestionnaires de cache ;  a bench of modular multipliers (820) shared between the various cache management modules;
un contrôleur central (830) initialisant tour à tour les L mémoires cache avec les G premiers facteurs de rotation de la séquence , et contrôlant chaque gestionnaire de cache de manière à fournir, pour chaque cycle de calcul d'une pluralité T = N /W de cycles de calcul, un mot lu de la mémoire cache au banc de multiplieurs modulaires, à écrire dans la mémoire cache associée à ce gestionnaire de cache, au terme de chaque cycle de calcul, hormis pour le dernier de ladite pluralité, un mot comprenant les W résultats en sortie du banc de multiplieurs modulaires, et à fournir au terme de chaque cycle de calcul, en sortie du générateur, ces W résultats comme un ensemble de W facteurs de rotation consécutifs de ladite séquence, les ensembles de W facteurs de rotation relatifs aux L séquences étant fournis de manière entrelacée. a central controller (830) initializing in turn the L cache memories with the G first rotation factors of the sequence , and controlling each cache manager so as to provide, for each calculation cycle of a plurality T = N / W of calculation cycles, a word read from the cache memory to the bank of modular multipliers, to be written in the cache memory associated with this cache manager, at the end of each calculation cycle, except for the last of said plurality, a word comprising the W results at the output of the modular multiplier bank, and to be supplied at the end of each calculation cycle, at the output of the generator, these W results as a set of W consecutive rotation factors of said sequence, the sets of W factors of rotation relating to the L sequences being supplied in an interlaced manner.
10. Circuit générateur de facteurs de rotation selon la revendication 9, caractérisé en ce que chaque module gestionnaire de cache est pourvu en entrée d'un multiplexeur contrôlé par le contrôleur central, de manière à transmettre à la mémoire cache associée au module gestionnaire de cache, soit un mot d'initialisation les G premiers facteurs de rotation de la séquence correspondante, soit W résultats du banc de multiplieurs modulaires. 10. A rotation factor generator circuit according to claim 9, characterized in that each cache manager module is provided at the input with a multiplexer controlled by the central controller, so as to transmit to the cache memory associated with the cache manager module , either an initialization word for the G first rotation factors of the corresponding sequence, or W results from the bank of modular multipliers.
EP19790625.8A 2018-07-10 2019-07-09 Twiddle factor generating circuit for an ntt processor Pending EP3803574A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FR1856340A FR3083885B1 (en) 2018-07-10 2018-07-10 ROTATION FACTOR GENERATION CIRCUIT FOR NTT PROCESSOR
PCT/FR2019/051696 WO2020012104A1 (en) 2018-07-10 2019-07-09 Twiddle factor generating circuit for an ntt processor

Publications (1)

Publication Number Publication Date
EP3803574A1 true EP3803574A1 (en) 2021-04-14

Family

ID=67262343

Family Applications (1)

Application Number Title Priority Date Filing Date
EP19790625.8A Pending EP3803574A1 (en) 2018-07-10 2019-07-09 Twiddle factor generating circuit for an ntt processor

Country Status (4)

Country Link
US (1) US20210334334A1 (en)
EP (1) EP3803574A1 (en)
FR (1) FR3083885B1 (en)
WO (1) WO2020012104A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IT202000016393A1 (en) 2020-07-07 2022-01-07 St Microelectronics Srl DIGITAL SIGNAL PROCESSING CIRCUIT AND CORRESPONDING OPERATING PROCEDURE
CN112464296B (en) * 2020-12-18 2022-09-23 合肥工业大学 Large integer multiplier hardware circuit for homomorphic encryption technology
CN116186473A (en) * 2021-11-26 2023-05-30 华为技术有限公司 Data conversion method, device and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2842051B1 (en) * 2002-04-30 2005-02-18 Oberthur Card Syst Sa METHOD OF CRYPTOGRAPHY INCLUDING THE CALCULATION OF A MODULAR MULTIPLICATION WITHIN THE MEANING OF MONTGOMERY AND CORRESPONDING ELECTRONIC ENTITY
US8527570B1 (en) * 2009-08-12 2013-09-03 Marvell International Ltd. Low cost and high speed architecture of montgomery multiplier
US20170329711A1 (en) * 2016-05-13 2017-11-16 Intel Corporation Interleaved cache controllers with shared metadata and related devices and systems
WO2019053486A1 (en) * 2017-04-11 2019-03-21 The Governing Council Of The University Of Toronto A homomorphic processing unit (hpu) for accelerating secure computations under homomorphic encryption

Also Published As

Publication number Publication date
FR3083885A1 (en) 2020-01-17
WO2020012104A1 (en) 2020-01-16
FR3083885B1 (en) 2020-10-02
US20210334334A1 (en) 2021-10-28

Similar Documents

Publication Publication Date Title
WO2020012104A1 (en) Twiddle factor generating circuit for an ntt processor
EP2490144B1 (en) Programmable cryptography integrated circuit
EP0853275A1 (en) Modular arithmetic coprocessor comprising two multiplying circuits operating in parallel
EP3803636B1 (en) Ntt processor including a plurality of memory banks
EP3084588B1 (en) Signal processing module, especially for a neural network and a neuronal circuit
FR2868628A1 (en) RANDOM NUMBER GENERATOR AND METHOD FOR PRODUCING RANDOM NUMBERS
FR3078464A1 (en) METHOD AND CIRCUIT FOR IMPLEMENTING A SUBSTITUTION TABLE
EP2012214B1 (en) Method and device for digitally generating a frequency
FR2851348A1 (en) MONTGOMERY MODULAR MULTIPLIER AND CORRESPONDING MULTIPLICATION METHOD
FR2860892A1 (en) Pseudo-random number generator for encryption or decryption device, has combination unit including final processing stage combining intermediate processing sequence from intermediate processing stage, with sub-groups of sequences
FR2724741A1 (en) ELECTRONIC CIRCUIT FOR MODULAR CALCULATION IN A FINISHED BODY
EP0793165B1 (en) Modular arithmetic coprocessor for fast execution of non-modular operations
EP0939362A1 (en) Modular arithmetic coprocessor for fast execution of non-modular operations
EP0043745B1 (en) Digital data processing and memorising system, especially for a tomodensitometer
EP0947913B1 (en) Improved method of implementing integer division
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
EP0927928A1 (en) Improved method of producing a parameter J0 associated with the implementation of modular operations according to the Montgomery method
FR2951835A1 (en) DEVICE FOR CORRECTING SET SIGNALS AND GRADIENT GENERATION SYSTEM COMPRISING SUCH A DEVICE
CA2359198C (en) Arithmetic unit for carrying out a cryptographic protocol
EP0489885A1 (en) Neurocomputing system
EP4206938A1 (en) Direct data transfer system
EP4206939A1 (en) Direct data transfer system
EP0461030A1 (en) Vector processing circuit and method
EP4242855A1 (en) Address generator for a computer having a single instruction multiple data architecture
EP4226256A1 (en) Method and device for processing data to be supplied as input for a first shift register of a systolic neural electronic circuit

Legal Events

Date Code Title Description
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: UNKNOWN

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE

PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE

17P Request for examination filed

Effective date: 20210106

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

AX Request for extension of the european patent

Extension state: BA ME

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: EXAMINATION IS IN PROGRESS

DAV Request for validation of the european patent (deleted)
DAX Request for extension of the european patent (deleted)
17Q First examination report despatched

Effective date: 20210929

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN