Die
vorliegende Erfindung bezieht sich auf eine Vorrichtung und ein
Verfahren zur Ermitteln, ob eine Testzahl eine Primzahl ist, wie
sie beispielsweise für
ein elektronisches Verschlüsselungsverfahren
notwendig ist. Insbesondere bezieht sich die vorliegende Erfindung
auf eine Vorrichtung und ein Verfahren, die den Prozess der Primzahlenermittlung
deutlich beschleunigen.The
The present invention relates to a device and a
A method of determining if a test number is a prime number, such as
for example for
an electronic encryption method
necessary is. In particular, the present invention relates
to a device and a procedure that determines the process of primesetting
accelerate significantly.
Für die elektronische
Signaturerstellung wird weltweit fast ausschließlich der RSA-Algorithmus verwendet
(Rivest, Shamir, Adleman, 1978). Dieser (asymmetrische) RSA-Verschlüsselungsalgorithmus
verwendet einen öffentlichen
und einen geheimen Schlüssel,
wobei der geheime Schlüssel
beim RSA-Algorithmus aus zwei großen Primzahlen besteht. Die
Primzahlen sind zur Zeit 512 bis 1024 Bit groß. Der öffentliche RSA-Schlüssel besteht
aus dem Produkt der beiden Primzahlen und ist daher doppelt so lang,
d. h. hat zur Zeit zwischen 1024 und 2048 Bit. Aus Sicherheitsgründen müssen die
dem RSA-Schlüssel
zugrundeliegenden Primzahlen im Chip selbst generiert werden.For the electronic
Signature creation almost exclusively uses the RSA algorithm worldwide
(Rivest, Shamir, Adleman, 1978). This (asymmetric) RSA encryption algorithm
uses a public
and a secret key,
being the secret key
The RSA algorithm consists of two large primes. The
Prime numbers are currently 512 to 1024 bits in size. The public RSA key exists
from the product of the two primes and is therefore twice as long
d. H. currently has between 1024 and 2048 bits. For security reasons, the
the RSA key
underlying primes are generated in the chip itself.
Das
Grundprinzip aller bislang bekannten Verfahren zur Generierung großer Primzahlen
besteht darin, dass man gewisse Kandidatenzahlen einem sogenannten
probabilistischen Primzahltest unterzieht. Hierfür kann der Miller-Rabin-Test
aus dem Jahr 1976 verwendet werden, der auch „starker" Pseudo-Primzahltest genannt wird. Der Rechenaufwand
beim Miller-Rabin-Test
ist in etwa gleich hoch wie beim Fermat-Test, jedoch hat der Miller-Rabin-Test
eine höhere
Aussagekraft.The
Basic principle of all previously known methods for generating large primes
is that you have a certain number of candidates a so-called
subject to probabilistic primality test. For this, the Miller-Rabin test
from the year 1976, which is also called a "strong" pseudo-primality test
at the Miller-Rabin test
is about the same as the Fermat test, but has the Miller-Rabin test
a higher one
Expressiveness.
Wenn
die zu testende Zahl den Miller-Rabin-Test besteht, wird der Test
noch einige wenige Male (etwa 2 bis 5 mal, das hängt ab von der Größe der zu
testenden Zahl) mit einem geänderten Parameter
wiederholt, der sogenannten Basis b. Wenn die Zahl auch diese Kontrolltests
besteht, darf man annehmen, dass es sich bei der Zahl um eine echte
Primzahl handelt. Primzahlen der geforderten Größe von 512 bis 1024 Bits sind aber
relativ dünn
gesät.
Aus dem Primzahlsatz weiß man,
dass der Anteil der Primzahlen dieser Bitlänge unter den gesamten ganzen
Zahlen dieser Bitlänge
im unteren Promille-Bereich liegt (1,4–3 Promille). würde man Zahlen
der gewünschten
Bitlänge
frei wählen
und sofort dem Miller-Rabin-Test unterziehen, dann würde man im
Durchschnitt mehrere 100 Miller-Rabin-Tests durchführen müssen bis
man endlich eine erste Primzahl gefunden hätte.If
the number to be tested passes the Miller-Rabin test becomes the test
a few more times (about 2 to 5 times, that depends on the size of the
testing number) with a changed parameter
repeated, the so-called basis b. If the number includes these control tests
exists, one may assume that the number is a real one
Prime number. However, primes of the required size of 512 to 1024 bits are
relatively thin
sown.
From the prime number theorem knows
that the proportion of primes this bit length among the whole
Numbers of this bit length
in the lower per mil range lies (1.4-3 per thousand). you would pay
the desired
bit length
choose freely
and immediately undergo the Miller-Rabin test, then you would in the
Average several 100 Miller-Rabin tests must be done until
you finally found a first prime.
Um
die Trefferwahrscheinlichkeit zu erhöhen, werden die Kandidatenzahlen
deshalb in allen gängigen Verfahren
vorbehandelt. Dabei werden jene Kandidatenzahlen, die kleine Primfaktoren
enthalten, ausgesiebt. Wenn man alle Zahlen ausscheidet, die durch
die ersten n Primzahlen teilbar sind, dann erhöht sich dadurch die Trefferwahrscheinlichkeit
um einen Faktor F(n), der um so größer wird, je größer n ist,
der mit wachsendem n aber immer langsamer ansteigt. Für n = 100
beträgt
dieser Faktor etwa 11,3. Für
n = 1000 beträgt
der Faktor etwa 16,0. Für
n = 5000 beträgt
der Faktor etwa 19,2. Für
n = 10.000 beträgt
der Faktor ca. 20,6. Für
n = 20.000 beträgt
der Faktor ca. 22.Around
to increase the hit probability, the candidate numbers become
therefore in all common procedures
pretreated. In the process, those candidate numbers that are small prime factors become
contained, screened. If you eliminate all the numbers by
the first n primes are divisible, then increases the hit probability
by a factor F (n), which becomes greater, the greater n,
which increases with increasing n but slower and slower. For n = 100
is
this factor is about 11.3. For
n = 1000
the factor is about 16.0. For
n = 5000
the factor is about 19.2. For
n = 10,000
the factor about 20.6. For
n = 20,000
the factor about 22.
Bei
den bisher bekannten Verfahren zur Primzahlgenerierung werden die
Zahlen zunächst
einem Siebverfahren unterworfen. Die Zahlen, die nach dem Siebverfahren übrig bleiben,
werden dann dem Miller-Rabin-Test ausgesetzt.at
The previously known methods for generating prime numbers are the
Numbers first
subjected to a sieving process. The numbers left after the sieving process
are then exposed to the Miller-Rabin test.
Der
Nachteil bei dieser Vorgehensweise besteht darin, dass zunächst für eine ausreichend
hohe Trefferwahrscheinlichkeit des Testverfahrens ein Siebprozess
für eine
hohe Anzahl n der ersten Primzahlen auszuführen ist, was numerisch intensiv
ist. Hierbei ergibt sich das folgende Dilemma dass je mehr gesiebt
wird, desto weniger getestet werden muss, dass zugleich aber auch
um so mehr Zeit für
den Siebprozess verloren geht, je mehr gesiebt wird. Dies resultiert
in einer ineffizienten Ausnutzung der zur Verfügung stehenden Rechenkapazität, da beispielsweise
eine Hardwarestruktur die insbesondere zum Durchführen des
Testverfahrens ausgelegt ist (wie beispielsweise ein kryptographischer
Coprozessor) während
dem Siebverfahren (das beispielsweise in einem Hauptprozessor ausgeführt wird)
nicht aktiv eingesetzt werden kann.Of the
Disadvantage of this procedure is that initially sufficient for one
high probability of the test method a screening process
for one
high number n of the first primes to be executed, which is numerically intensive
is. This results in the following dilemma that the more sieved
the less it has to be tested, but at the same time
the more time for
the sieving process is lost the more sieved. This results
in an inefficient use of the available computing capacity, for example
a hardware structure in particular for performing the
Test method is designed (such as a cryptographic
Coprocessor) during
the screening process (which, for example, is carried out in a main processor)
can not be actively used.
Die
US 2002/0186837 A1 zeigt ein Verfahren zum parallelen Suchen einer
Mehrzahl von Primzahlen.The
US 2002/0186837 A1 shows a method for searching in parallel
Plurality of primes.
Hiervon
ausgehend liegt der vorliegenden Erfindung die Aufgabe zugrunde,
eine Möglichkeit
zu schaffen, um Primzahlen schneller und numerisch effektiver ermitteln
zu können.Of these,
The present invention is based on the object,
a possibility
to create primes faster and numerically more effective
to be able to.
Diese
Aufgabe wird durch eine Vorrichtung gemäß Anspruch 1 und ein Verfahren
gemäß Anspruch
18 gelöst.These
The object is achieved by a device according to claim 1 and a method
according to claim
18 solved.
Der
vorliegenden Erfindung liegt die Erkenntnis zugrunde, dass eine
Testzahl (Aktuell-Testzahl) mit einem ersten Primzahlüberprüfungsalgorithmus überprüft werden
kann und währenddessen
die Testzahl zugleich mit einem zweiten Primzahlüberprüfungsalgorithmus auf Primalität getestet
werden kann. Das Erkennen der Testzahl als NICHT-Primzahl (d.h.
als Zahl, die keine Primzahl ist) kann dabei durch den ersten Primzahlüberprüfungsalgorithmus
oder den zweiten Primzahlüberprüfungsalgorithmus
erfolgen.Of the
The present invention is based on the finding that a
Test number (actual test number) are checked with a first primal check algorithm
can and while
tested the test number for primality with a second prime checking algorithm
can be. Recognition of the test number as NOT prime (i.e.
as a number which is not a prime) can be determined by the first prime-checking algorithm
or the second prime verify algorithm
respectively.
Gegenüber den
Ansätzen
gemäß dem Stand
der Technik ist es im erfindungsgemäßen Ansatz daher nicht notwendig,
eine Testzahl zunächst
durch einen ersten Primzahlüberprüfungsalgorithmus
bis zu einem Erreichen eines vorbestimmten Abbruchkriteriums zu überprüfen, hiernach
das Überprüfen mit
dem ersten Primzahlüberprüfungsalgorithmus
zu beenden und anschließend
die Testzahl mit dem zweiten Primzahlüberprüfungsalgorithmus zu testen.
Vielmehr bietet der erfindungsgemäße Ansatz den Vorteil, die
Testzahl mit dem ersten Primzahlüberprüfungsalgorithmus
zu überprüfen, während zugleich
das Testen der Testzahl mit dem zweiten Primzahlüberprüfungsalgorithmus ausge führt werden
kann. Bereits bei dem Ermitteln eines negativen Ergebnisses durch
einen der beiden Primzahlüberprüfungsalgorithmen
ist dann erkennbar, dass die Testzahl keine Primzahl ist. Es ist
somit beispielsweise nicht notwendig, das Ergebnis des zweiten Primzahlüberprüfungsalgorithmus
abzuwarten. Von besonderem Interesse ist jedoch der Fall, dass die
Testzahl eine Primzahl ist, oder mit einer vorbestimmten Wahrscheinlichkeit
eine Primzahl ist. In diesem Fall wird beispielsweise bereits durch
den zweiten Primzahlüberprüfungsalgorithmus
ein positives Ergebnis geliefert, wenn der erste Primzahlüberprüfungsalgorithmus
noch arbeitet. Auf ein weiteres Überprüfen der
Testzahl mit dem ersten Primzahlüberprüfungsalgorithmus
kann in diesem Fall verzichtet werden, wodurch sich Rechenzeit einsparen lässt. Durch
ein derartiges vorteilhaftes paralleles Ausführen des ersten und zweiten
Primzahlüberprüfungsalgorithmus
kann gegenüber
den herkömmlichen
Ansätzen
daher wesentlich schneller festgestellt werden, ob eine Testzahl
eine Primzahl ist.Compared to the
approaches
according to the state
It is therefore not necessary in the inventive approach to
a test number first
by a first prime checking algorithm
until reaching a predetermined termination criterion, hereinafter
checking with
the first prime verify algorithm
to finish and then
test the test number with the second prime verify algorithm.
Rather, the inventive approach offers the advantage that
Test number with the first prime check algorithm
check while at the same time
testing the test count with the second prime verify algorithm
can. Already in the determination of a negative result by
one of the two prime verify algorithms
then it can be seen that the test number is not a prime number. It is
thus, for example, not necessary, the result of the second prime check algorithm
to be seen. Of particular interest, however, is the case that the
Test number is a prime number, or with a predetermined probability
is a prime number. In this case, for example, already by
the second prime verify algorithm
delivered a positive result when the first prime verify algorithm
still working. On another review of the
Test number with the first prime check algorithm
can be omitted in this case, which can save computing time. By
such advantageous parallel execution of the first and second
Prime verification algorithm
can be opposite
the conventional one
approaches
Therefore, it can be found much faster if a test number
is a prime number.
Typischerweise
ist der erste Primzahlüberprüfungsalgorithmus
ein deterministischer Primzahlüberprüfungsalgorithmus,
während
der zweite Primzahlüberprüfungsalgorithmus
ein probabilistischer Primzahlüberprüfungsalgorithmus
(beispielsweise ein Miller-Rabin-Test) ist.typically,
is the first prime-checking algorithm
a deterministic prime number checking algorithm,
while
the second prime verify algorithm
a probabilistic prime number checking algorithm
(for example, a Miller-Rabin test).
Durch
den erfindungsgemäßen Ansatz
ist es nunmehr möglich,
eine Testzahl mit Hilfe eines probabilistischen Primzahlüberprüfungsalgorithmus
zu testen, während
zugleich die Testzahl durch den ersten Primzahlüberprüfungsalgorithmus (d.h. den
deterministischen Primzahlüberprüfungsalgorithmus) überprüft wird. Wird
durch den ersten Primzahlüberprüfungsalgorithmus
ermittelt, dass die Testzahl keine Primzahl ist, kann somit bereits
ein negatives Ergebnis geliefert werden, während der zweite Primzahlüberprüfungsalgorithmus das
Testen der Testzahl beispielsweise noch nicht beendet hat. Hierdurch
ergibt sich der Vorteil, dass das Testen der Testzahl mit dem zweiten
Primzahlüberprüfungsalgorithmus
abgebrochen wird, wenn durch den ersten Primzahlüberprüfungsalgorithmus bereits festgestellt
wurde, dass die Testzahl keine Primzahl ist.By
the approach according to the invention
is it now possible
a test number using a probabilistic prime number checking algorithm
to test while
at the same time the test number by the first prime check algorithm (i.e.
deterministic prime number checking algorithm). Becomes
through the first prime checking algorithm
determines that the test number is not a prime number, thus already
a negative result, while the second prime verify algorithm is the
Testing the test count, for example, has not finished yet. hereby
there is the advantage that testing the test number with the second
Prime verification algorithm
is aborted if already detected by the first primal-checking algorithm
was that the test number is not prime.
Das
Abbrechen des zweiten Primzahlüberprüfungsalgorithmus
bietet somit den Vorteil einer Steigerung der numerischen Effizienz
durch eine Vermeidung von unnötigen
Rechenoperationen.The
Cancel the second prime checking algorithm
thus offers the advantage of increasing numerical efficiency
by avoiding unnecessary
Calculations.
Weiterhin
kann in einer bevorzugten Ausführungsform
des erfindungsgemäßen Ansatzes
sichergestellt werden, dass die durch den zweiten (probabilistischen)
Primzahlüberprüfungsalgorithmus
als Primzahl erkannte Testzahl tatsächlich teilerfremd zu einer
vordefinierten Anzahl von Primzahlen ist. Dies resultiert aus der
Tatsache, dass die Testzahl durch den vorzugsweise deterministischen
ersten Primzahlüberprüfungsalgorithmus
auf Teilerfreiheit zu einer Anzahl von vordefinierten Primzahlen überprüft wird,
während
der vorzugsweise probabilistische zweite Primzahlüberprüfungsalgorithmus
arbeitet. Wäre
die Testzahl nicht teilerfremd zu einer der vordefinierten Primzahlen,
würde der
erste Primzahlüberprüfungsalgorithmus
ein negatives Ergebnis ausgeben wodurch vorzugsweise der zweite
Primzahlüberprüfungsalgorithmus
abgebrochen wird.Farther
can in a preferred embodiment
the approach of the invention
ensure that the second (probabilistic)
Prime verification algorithm
indeed, the number of tests recognized as primes is a prime one
predefined number of primes. This results from the
Fact that the test number is determined by the preferably deterministic
first prime verify algorithm
is checked for divisor freedom to a number of predefined primes,
while
the preferably probabilistic second prime-checking algorithm
is working. Would
the test number is not prime to any of the predefined primes,
would the
first prime checking algorithm
output a negative result, preferably the second
Prime verification algorithm
is canceled.
In
herkömmlichen
Ansätzen
wird eine hohe Sicherheit für
ein Bestehen der Testzahl des zweiten Primzahlüberprüfungsalgorithmus dadurch erreicht,
dass die Testzahl im ersten Primzahlüberprüfungsalgorithmus mit einer
großen
Anzahl von zu testenden Primzahlen überprüft wird. Demgegenüber kann
in einem bevorzugten Ausführungsbeispiel
des erfindungsgemäßen Ansatzes
die Testzahl im ersten Primzahlüberprüfungsalgorithmus
mit einer geringeren Anzahl von Primzahlen überprüft werden, da für den Fall,
dass eine Primzahl ein Teiler der Testzahl ist, der parallel zum
ersten Primzahlüberprüfungsalgorithmus
ausgeführte
zweite Primzahlüberprüfungsalgorithmus
abgebrochen und mit einer neuen Testzahl wieder gestartet werden
kann. Der durch den erfindungsgemäßen Ansatz erreichte Zeitvorteil,
wenn die Testzahl eine Primzahl ist, lässt sich so mit aufrechterhalten.
Als weiterer Vorteil des erfindungsgemäßen Ansatzes lässt sich
somit nennen, dass in einem bevorzugten Ausführungsbeispiel des erfindungsgemäßen Ansatzes
die Testzahl gegenüber
den herkömmlichen
Ansätzen,
durch eine geringere Anzahl von Primzahlen mit dem ersten Primzahlüberprüfungsalgorithmus zu überprüfen ist,
bevor der zweite Primzahlüberprüfungsalgorithmus
gestartet wird.In conventional approaches, a high certainty of passing the test number of the second prime check algorithm is achieved by checking the test number in the first prime check algorithm with a large number of primes to be tested. In contrast, in a preferred embodiment of the approach according to the invention, the test number in the first primes check algorithm can be checked with a smaller number of primes since, in the case where a prime is a divisor of the test number, the second prime check algorithm executed in parallel to the first primes check algorithm is aborted and replaced with a new one Test number can be restarted. The time advantage achieved by the approach according to the invention, if the test number is a prime number, can thus also be considered get right. As a further advantage of the approach according to the invention, it can thus be mentioned that in a preferred embodiment of the approach according to the invention, the test number must be checked against the conventional approaches by a smaller number of primes with the first prime-number checking algorithm before the second prime-number checking algorithm is started.
Vorzugsweise
kann der erfindungsgemäße Ansatz
in einem Multi-Prozessor-System
implementiert werden. Insbesondere kann das Multi-Prozessor-System
einen kryptographischen Coprozessor aufweisen, der speziell zur
numerisch effizienten Ausführung
von kryptographischen Rechenschritten ausgelegt ist. In einer vorteilhaften
Ausführung
des erfindungsgemäßen Ansatzes
wird der zweite Primzahlüberprüfungsalgorithmus
(der beispielsweise ein numerisch aufwendiger probabilistischer
Primzahlüberprüfungsalgorithmus
ist) in dem Coprozessor ausgeführt,
während
der erste Primzahlüberprüfungsalgorithmus
in einem Hauptprozessor des Multi-Prozessor-Systems ausgeführt wird.
Eine derartige Ausführung
des erfindungsgemäßen Ansatzes bietet
den Vorteil, dass das zur Verfügung
stehende Multi-Prozessor-System
effizient ausgenutzt wird. Dies resultiert aus der Tatsache, dass
der erste Primzahlüberprüfungsalgorithmus
im Hauptprozessor ausgeführt wird,
während
zugleich der zweite Primzahlüberprüfungsalgorithmus
im Coprozessor ausgeführt
wird.Preferably
can the approach of the invention
in a multi-processor system
be implemented. In particular, the multi-processor system
have a cryptographic coprocessor, especially for
numerically efficient execution
is designed by cryptographic computation steps. In an advantageous
execution
the approach of the invention
becomes the second prime verify algorithm
(For example, a numerically complex probabilistic
Prime verification algorithm
is executed) in the coprocessor,
while
the first prime checking algorithm
is executed in a main processor of the multi-processor system.
Such an embodiment
offers the approach of the invention
the advantage that that is available
standing multi-processor system
is efficiently exploited. This results from the fact that
the first prime checking algorithm
running in the main processor,
while
at the same time the second prime-checking algorithm
executed in the coprocessor
becomes.
Bevorzugte
Ausführungsbeispiele
der vorliegenden Erfindung werden nachfolgend anhand der beiliegenden
Zeichnungen näher
erläutert.
Es zeigen:preferred
embodiments
The present invention will be described below with reference to the accompanying
Drawings closer
explained.
Show it:
1 ein
Blockschaltbild einer Vorrichtung zur Generierung von Primzahlen; 1 a block diagram of a device for generating primes;
2 ein
Blockschaltbild einer Einrichtung zum Ermitteln, ob eine Testzahl
eine Primzahl ist oder ob mit einer vorbestimmten Wahrscheinlichkeit
gesagt werden kann, dass die Testzahl eine Primzahl ist gemäß 1; 2 a block diagram of means for determining whether a test number is a prime number or whether it can be said with a predetermined probability that the test number is a prime number according to 1 ;
3 ein
Blockschaltbild einer Einrichtung zum Überprüfen einer Aktuell-Testzahl
oder zum Bereitstellen einer Zukunftstestzahl gemäß 2; 3 a block diagram of means for checking a current test number or for providing a future test number according to 2 ;
4 ein
Blockschaltbild einer Einrichtung zum Überprüfen einer Aktuell-Testzahl
gemäß 3; 4 a block diagram of means for checking a current test number according to 3 ;
5 ein
Blockschaltbild einer Einrichtung zum Prüfen der Aktuell-Testzahl auf
Teilerfreiheit in Bezug auf Primzahlen bj gemäß 4; 5 a block diagram of means for checking the current test number for divisional freedom with respect to primes b j according to 4 ;
6 ein
Blockschaltbild einer Einrichtung zum Bereitstellen einer Zukunftstestzahl
gemäß 3; 6 a block diagram of a device for providing a future test number according to 3 ;
7 ein
Blockschaltbild einer Einrichtung zum Auswählen einer Zukunftstestzahl
aus einer Ausgangszahlenfolge gemäß 6; 7 a block diagram of a device for selecting a future test number from an output number sequence according to 6 ;
8 eine
tabellarische Darstellung von Zwischenergebnissen eines Verfahrens
zum Bereitstellen einer Zukunftstestzahl; 8th a tabular representation of intermediate results of a method for providing a future test number;
9 eine
tabellarische Darstellung der Anzahl von Miller-Rabin-Tests in Abhängigkeit
einer Vorverarbeitung der durch den Miller-Rabin-Test zu testenden
Testzahl; 9 a tabular representation of the number of Miller-Rabin tests depending on pre-processing of the test number to be tested by the Miller-Rabin test;
10 eine
tabellarische Darstellung der ersten 56 aufeinanderfolgenden Primzahlen;
und 10 a tabular representation of the first 56 consecutive primes; and
11A-11D ein Flussdiagramm eines
bevorzugten Ausführungsbeispiels
des erfindungsgemäßen Verfahrens,
das in mehreren Teildiagrammen dargestellt ist. 11A - 11D a flowchart of a preferred embodiment of the method according to the invention, which is shown in several sub-diagrams.
1 zeigt
ein bevorzugtes Ausführungsbeispiel
einer Vorrichtung 100 zum Ermitteln von Primzahlen. Die
Vorrichtung 100 umfasst hierbei eine Einrichtung 102 zum
Bestimmen einer Ausgangszahl AZ, die einen Ausgang aufweist, über den
die Ausgangszahl AZ ausgebbar ist. Ferner umfasst die Vorrichtung 100 eine
Einrichtung 104 zum Ermitteln, ob eine Testzahl TZ eine
Primzahl PZ ist oder mit einer vorbestimmten Wahrscheinlichkeit
gesagt werden kann, dass die Testzahl eine Primzahl ist. Die Einrichtung 104 zum
Ermitteln weist einen Eingang und einen Ausgang auf, wobei der Einrichtung 104 zum
Ermitteln über
den Eingang die Ausgangszahl AZ der Einrichtung 102 zum
Bestimmen einer Ausgangszahl AZ zuführbar ist. Vorzugsweise ist die
Einrichtung 104 zum Ermitteln ausgebildet, um über den
Ausgang PZout eine ermittelte Primzahl auszugeben. 1 shows a preferred embodiment of a device 100 to find prime numbers. The device 100 this includes a device 102 for determining an output number AZ having an output over which the output number AZ can be output. Furthermore, the device comprises 100 An institution 104 for determining whether a test number TZ is a prime number PZ or it can be said with a predetermined probability that the test number is a prime number. The device 104 for determining has an input and an output, wherein the device 104 for determining via input the initial number AZ of the device 102 for determining an initial number AZ can be supplied. Preferably, the device is 104 designed for determining to output a determined prime number via the output PZout.
Um
eine Ausgangszahl AZ zu bestimmen, umfasst die Einrichtung 102 zum
Bestimmen einer Ausgangszahl beispielsweise einen Zufallszahlengenerator,
durch den eine Zufallszahl erzeugbar ist, die als Ausgangszahl AZ über den
Ausgang der Einrichtung 102 ausgebbar ist. Die Einrichtung 104 zum
Ermitteln empfängt
die von der Einrichtung 102 zum Bestimmen ausgegebene Ausgangszahl
AZ und verarbeitet diese Ausgangszahl AZ mit einem nachfolgend beschriebenen
Algorithmus, so dass eine Primzahl oder eine Zahl, die mit einer
vorbestimmten Wahrscheinlichkeit eine Primzahl ist, ermittelt wird,
die über
den Ausgang PZout der Einrichtung 104 zum Ermitteln ausgegeben
wird. Um die an dem Ausgang PZout der Einrichtung 104 zum
Ermitteln ausgegebene Zahl zu ermitteln, wird durch die Einrichtung 104 zum
Ermitteln die empfangene Ausgangszahl AZ in eine Testzahl TZ umgewandelt,
wie nachfolgend detaillierter beschrieben wird.To determine an initial number AZ, the device comprises 102 for determining an output number, for example a random number generator, by which a random number can be generated, which is the output number AZ via the output of the device 102 is dispensable. The device 104 the device receives the information to determine 102 output number AZ output for determining, and processes this output number AZ with an algorithm described below such that a prime number or a number, which is a prime number with a predetermined probability, is determined via the output PZout of the device 104 is issued for determining. To the at the output PZout of the device 104 The number issued to determine will be determined by the institution 104 to determine the received output number AZ is converted into a test number TZ, as described in more detail below.
2 zeigt
ein detaillierteres Blockschaltbild der in 1 dargestellten
Einrichtung 104 zum Ermitteln, ob eine Testzahl eine Primzahl
ist oder mit einer vorbestimmten Wahrscheinlichkeit gesagt werden
kann, dass die Testzahl eine Primzahl ist. Die Einrichtung 104 zum
Ermitteln umfasst eine Einrichtung 202 zum Überprüfen einer
Aktuell-Testzahl oder zum Bereitstellen einer Zukunftstestzahl,
eine Einrichtung 204 zum Testen sowie eine Einrichtung 206 zum
Erkennen. Die Einrichtung 202 zum Überprüfen einer Aktuell-Testzahl
oder zum Bereitstellen einer Zukunftstestzahl umfasst einen ersten
Eingang zum Empfangen der extern zuführbaren Ausgangszahl AZ, einen
zweiten Eingang zum Empfangen eines ersten Haltesignals STOP1, das
von der Einrichtung 206 zum Erkennen ausgebbar ist, einen
ersten Ausgang zum Ausgeben einer zu testenden Zahl (Testzahl TZ)
sowie einen zweiten Ausgang zum Ausgeben eines ersten Statussignals
PZ1. Die Einrichtung 204 zum Testen umfasst einen ersten
Eingang zum Empfangen der von der Einrichtung 202 zum Überprüfen oder
Bereitstellen ausgegebenen Testzahl TZ, einen zweiten Eingang zum
Empfangen des von der Einrichtung 202 zum Überprüfen oder
zum Bereitstellen ausgegebenen ersten Statussignals PZ1, einen dritten
Eingang zum Empfangen eines zweiten Haltesignals STOP2 von der Einrichtung 206 zum
Erkennen sowie einen Ausgang zum Ausgeben eines zweiten Statussignals
PZ2. Die Einrichtung 206 zum Erkennen umfasst einen ersten
Eingang zum Empfangen des von der Einrichtung 202 zum Überprüfen oder
zum Bereitstellen ausgegebenen ersten Statussignals PZ1, einen zweiten
Eingang zum Empfangen der von der Einrichtung 202 zum Überprüfen oder
Bereitstellen ausgegebenen Testzahl TZ, einen dritten Eingang zum
Empfangen des von der Einrichtung 204 zum Testen ausgegebenen
zweiten Statussignals PZ2, einen ersten Ausgang zum Ausgeben des
ersten Haltesignals STOP1 an die Einrichtung 202 zum Überprüfen oder
zum Bereitstellen, einen zweiten Ausgang zum Ausgeben der ermittelten
Primzahl sowie einen dritten Ausgang zum Ausgeben des zweiten Haltesignals STOP2
an die Einrichtung 204 zum Testen. Der zweite Ausgang der
Einrichtung 206 zum Erkennen ist ferner mit dem externen
Ausgang PZout der Einrichtung 104 zum Ermitteln verbunden. 2 shows a more detailed block diagram of the in 1 illustrated device 104 for determining whether a test number is a prime number or it can be said with a predetermined probability that the test number is a prime number. The device 104 for determining includes a device 202 to verify a current test count or to provide a future test, a facility 204 for testing as well as a facility 206 To recognize. The device 202 for checking a current test number or for providing a future test number comprises a first input for receiving the externally-supplied output number AZ, a second input for receiving a first stop signal STOP1 from the device 206 for outputting can be output, a first output for outputting a number to be tested (test number TZ) and a second output for outputting a first status signal PZ1. The device 204 for testing includes a first input for receiving the from the device 202 for checking or providing issued test number TZ, a second input for receiving the from the device 202 for checking or providing issued first status signal PZ1, a third input for receiving a second stop signal STOP2 from the device 206 for detecting and an output for outputting a second status signal PZ2. The device 206 for detecting comprises a first input for receiving the from the device 202 for checking or providing issued first status signal PZ1, a second input for receiving the from the device 202 for checking or providing issued test number TZ, a third input for receiving the from the device 204 for testing issued second status signal PZ2, a first output for outputting the first stop signal STOP1 to the device 202 for checking or providing, a second output for outputting the determined prime number and a third output for outputting the second stop signal STOP2 to the device 204 to test. The second exit of the facility 206 to detect is further to the external output PZout of the device 104 connected to the determination.
Um
eine Primzahl zu ermitteln, wird zunächst in der Einrichtung 202 zum Überprüfen oder
zum Bereitstellen aus der empfangenen Ausgangszahl AZ durch den
nachfolgend detaillierter beschriebenen Algorithmus eine Aktuell-Testzahl
in eine Zukunftstestzahl umgewandelt und vorzugsweise durch einen
deterministischen ersten Primzahlüberprüfungsalgorithmus überprüft. Bei
Vorliegen einer nachfolgend näher
spezifizierten Bedingung kann die Aktuell-Testzahl über den
ersten Ausgang als Testzahl TZ an die Einrichtung 204 zum Testen übermittelt
werden. Ferner wird in der Einrichtung 204 zum Testen vorzugsweise
ein Miller-Rabin-Test mit der Testzahl TZ durch das von der Einrichtung 202 zum Überprüfen oder
zum Bereitstellen ausgegebene erste Statussignal PZ1 gestartet.
Das Ergebnis des Miller-Rabin-Tests kann von der Einrichtung 204 zum
Testen über
dessen Ausgang, d. h. als zweites Statussignal PZ2, an die Einrichtung 206 zum
Erkennen übertragen werden.To determine a prime number, first in the facility 202 for checking or providing from the received initial number AZ by the algorithm described in more detail below a current test number is converted into a future test number and preferably checked by a deterministic first prime number checking algorithm. In the presence of a condition specified in more detail below, the current test number can be transmitted via the first output as a test number TZ to the device 204 for testing. Further, in the facility 204 for testing, preferably a Miller-Rabin test with the test number TZ by the device 202 for checking or for providing issued first status signal PZ1 started. The result of the Miller-Rabin test may be from the institution 204 for testing via its output, ie as a second status signal PZ2, to the device 206 to be transmitted for recognition.
Ansprechend
auf das erste Statussignal PZ1 oder das zweite Statussignal PZ2
unterbricht die Einrichtung 206 zum Erkennen entweder über das
zweite Haltesignal STOP2 eine Signalverarbeitung in der Einrichtung 204 zum
Testen, über
das erste Haltesignal STOP1 eine Signalverarbeitung in der Einrichtung 202 zum Überprüfen oder
zum Bereitstellen oder gibt ansprechend auf das zweite Statussignal
PZ2 die Testzahl TZ als ermittelte Primzahl über den externen Ausgang PZout
aus, für
die durch die Einrichtung 204 zum Testen der Einrichtung 206 zum
Erkennen übermittelt
wurde, dass die Testzahl TZ als Primzahl anzusehen ist.In response to the first status signal PZ1 or the second status signal PZ2, the device interrupts 206 for detecting either via the second stop signal STOP2 signal processing in the device 204 for testing, via the first stop signal STOP1 signal processing in the device 202 for checking or providing or, in response to the second status signal PZ2, outputting the test number TZ as a determined prime number via the external output PZout, for the device through which 204 for testing the device 206 was transmitted to recognize that the test number TZ is to be regarded as a prime number.
3 zeigt
ein detaillierteres Blockschaltbild der in 2 dargestellten
Einrichtung 202 zum Überprüfen oder
zum Bereitstellen. Die Einrichtung 202 zum Überprüfen oder
zum Bereitstellen umfasst demgemäß eine Einrichtung 302 zum Überprüfen einer
Aktuell-Testzahl sowie eine Einrichtung 304 zum Bereitstellen
einer Zukunftstestzahl. Die Einrichtung 302 zum Überprüfen einer
Aktuell-Testzahl umfasst einen ersten Eingang zum Empfangen der
Ausgangszahl AZ, einen zweiten Eingang zum Empfangen einer durch
die Einrichtung 304 zum Bereitstellen einer Zukunftstestzahl
ausgegebenen Zukunftstestzahl ZTZ und einen dritten Eingang zum
Empfangen des ersten Haltesig nals STOP1. Ferner umfasst die Einrichtung 302 zum Überprüfen einer Aktuell-Testzahl
einen ersten Ausgang zum Ausgeben der Aktuell-Testzahl als Testzahl
TZ, einen zweiten Ausgang zum Ausgeben des ersten Statussignals
PZ1, einen dritten Ausgang zum Ausgeben einer Primzahl pi sowie einen vierten Ausgang zum Ausgeben
einer Variable αi. Die Einrichtung 304 zum Bereitstellen
der Zukunftstestzahl umfasst einen ersten Eingang zum Empfangen
der Ausgangszahl AZ, einen zweiten Eingang zum Empfangen des ersten
Haltesignals STOP1, einen dritten Eingang zum Empfangen der von
der Einrichtung 302 zum Überprüfen einer Aktuell-Testzahl
ausgegebenen Primzahl pi sowie einen vierten
Eingang zum Empfangen der von der Einrichtung 302 zum Überprüfen einer
Aktuell-Testzahl ausgegebenen Variable αi. Ferner
umfasst die Einrichtung 304 zum Bereitstellen der Zukunftstestzahl
einen Ausgang zum Ausgeben der bereitgestellten Zukunftstestzahl
ZTZ. 3 shows a more detailed block diagram of the in 2 illustrated device 202 to check or to deploy. The device 202 for checking or providing accordingly comprises means 302 for checking a current test number and a device 304 to provide a future test number. The device 302 for checking a current test number comprises a first input for receiving the output number AZ, a second input for receiving one by the device 304 for providing a future test number output future test number ZTZ and a third input for receiving the first Haltesig nals STOP1. Furthermore, the device includes 302 for checking a current test number, a first output for outputting the current test number as a test number TZ, a second output for outputting the first status signal PZ1, a third output for outputting a prime number p i and a fourth output for outputting a variable α i . The device 304 for providing the future test number comprises a first input for receiving the output number AZ, a second input for receiving the first stop signal STOP1, a third input for receiving the output from the device 302 for checking a current test number output prime number p i and a fourth input for receiving the from the device 302 for checking a current test number output variable α i . Furthermore, the device includes 304 for providing the future test number, an output for outputting the provided future test number ZTZ.
Die
Einrichtung 302 zum Überprüfen einer
Aktuell-Testzahl wandelt die Ausgangszahl AZ oder die Zukunftstestzahl
ZTZ gemäß dem nachfolgend
näher beschriebenen
Algorithmus in die Aktuell-Testzahl um und überprüft die Aktuell-Testzahl ebenfalls
gemäß dem nachfolgend
näher beschriebenen
Algorithmus, wobei die bei dem Überprüfen ermittelte
Primzahl pi und die Variable αi über den
dritten bzw. vierten Ausgang der Einrichtung 302 zum Überprüfen einer
Aktuell-Testzahl ausgegeben werden. In den 1 bis 7 wird
das Wort „Primzahl" auch abgekürzt mit „PZ" sowie das Wort „Testzahl" mit „TZ" gekennzeichnet. Über den
ersten Ausgang wird, wie beschrieben, die Aktuell-Testzahl als Testzahl
TZ ausgegeben. Über
den zweiten Ausgang wird, wie ebenfalls beschrieben, das erste Statussignal
PZ1 ausgegeben, das beispielsweise ein dreistufiges Signal ist, über das
mitteilbar ist, ob die Testzahl keine Primzahl ist (PZ1 = –1), ob
ungewiss ist, ob die Testzahl TZ eine Primzahl ist (PZ1 = 0) oder
ob die Testzahl teilerfremd zu einer vorgegebenen Menge von Primzahlen
ist (PZ1 = 1). Ferner wird durch die Einrichtung 304 zum
Bereitstellen einer Zukunftstestzahl aus der empfangenen Ausgangszahl
AZ unter Ver wendung der Primzahl pi und
der Variable αi mit dem nachfolgend näher beschriebenen Algorithmus
eine neue Zahl ermittelt und diese neue Zahl über den Ausgang der Einrichtung 304 zum
Bereitstellen einer Zukunftstestzahl als Zukunftstestzahl ZTZ ausgegeben.
Das erste Haltesignal STOP1 ermöglicht
ein Abbrechen einer Signalverarbeitung in der Einrichtung 302 zum Überprüfen einer
Aktuell-Testzahl sowie der Einrichtung 304 zum Bereitstellen
einer Zukunftstestzahl.The device 302 For checking a current test number, the output number AZ or the future test number ZTZ converts into the current test number according to the algorithm described in more detail below and also checks the current test number according to the algorithm described in more detail below, wherein the prime number p i and the variable α i over the third and fourth output of the device 302 for checking a current test number. In the 1 to 7 the word "prime number" is also abbreviated to "PZ" and the word "test number" to "TZ". As described, the current test number is output as the test number TZ via the first output. As also described, the first status signal PZ1 is output via the second output, which is, for example, a three-level signal which can be used to tell whether the test number is not a prime number (PZ1 = -1), whether it is uncertain whether the test number TZ is a Prime is (PZ1 = 0) or whether the test number is prime to a given set of primes (PZ1 = 1). Furthermore, by the device 304 to provide a future test number from the received output number AZ using the prime number p i and the variable α i with the algorithm described in more detail below a new number is determined and this new number via the output of the device 304 to provide a future test number as the future test number ZTZ. The first stop signal STOP1 enables a cancellation of signal processing in the device 302 for checking a current test number and the device 304 to provide a future test number.
4 zeigt
eine detailliertere Darstellung der in 3 dargestellten
Einrichtung 302 zum Überprüfen einer
Aktuell-Testzahl.
Die Einrichtung 302 zum Überprüfen einer Aktuell-Testzahl umfasst
eine Einrichtung 402 zum Bestimmen einer Aktuell-Testzahl,
eine Einrichtung 404 zum Bereitstellen von (vorzugsweise
mehreren) Primzahlen pj sowie eine Einrichtung 406 zum
Prüfen
der Aktuell-Testzahl auf Teilerfreiheit in Bezug auf die Primzahlen
pj. Die Einrichtung 402 zum Bestimmen
einer Aktuell-Testzahl umfasst einen ersten Eingang zum Empfangen
der Ausgangszahl AZ, einen zweiten Eingang zum Empfangen der Zukunftstestzahl
ZTZ, einen dritten Eingang zum Empfangen des ersten Statussignals
PZ1 sowie einen Ausgang zum Ausgeben der Aktuell-Testzahl als Testzahl
TZ. Die Einrichtung 404 zum Bereitstellen der Primzahlen
pj umfasst einen ersten Eingang zum Empfangen
des ersten Statussignals PZ1, einen zweiten Eingang zum Empfangen
des ersten Haltesignals STOP1 sowie einen Ausgang zum Ausgeben von
Primzahlen pj. Die Einrichtung 406 zum
Prüfen der
Aktuell-Testzahl auf Teilerfreiheit in Bezug auf die Primzahlen
pj umfasst einen ersten Eingang zum Empfangen
der Testzahl TZ von der Einrichtung 402 zum Bestimmen einer
Aktuell-Testzahl, einen zweiten Eingang zum Empfangen von Primzahlen
pj von der Einrichtung 404 zum
Bereitstellen von Primzahlen pj, einen dritten Eingang
zum Empfangen des ersten Haltesignals STOP1, einen ersten Ausgang
zum Ausgeben des ersten Statussignals PZ1, einen zweiten Ausgang
zum Ausgeben von einzelnen Primzahlen pi sowie
einen dritten Ausgang zum Ausgeben der Variablen αi. 4 shows a more detailed representation of in 3 illustrated device 302 to check a current test number. The device 302 for checking a current test number includes a device 402 for determining a current test number, means 404 for providing (preferably a plurality of) primes p j and means 406 for checking the current test number for divisional freedom with respect to the primes p j . The device 402 for determining a current test number comprises a first input for receiving the output number AZ, a second input for receiving the future test value ZTZ, a third input for receiving the first status signal PZ1 and an output for outputting the current test number as a test number TZ. The device 404 for providing the primes p j comprises a first input for receiving the first status signal PZ1, a second input for receiving the first stop signal STOP1 and an output for outputting primes p j . The device 406 for checking the current test number for divisional freedom with respect to the primes p j comprises a first input for receiving the test number TZ from the device 402 for determining a current test number, a second input for receiving primes p j from the device 404 for providing primes p j , a third input for receiving the first stop signal STOP1, a first output for outputting the first status signal PZ1, a second output for outputting individual primes p i and a third output for outputting the variables α i .
Durch
die Einrichtung 402 zum Bestimmen einer Aktuell-Testzahl wird zunächst die
Ausgangszahl AZ als Aktuell-Testzahl
bestimmt, wobei nach einem erstmaligen Auftreten eines Wertes des
ersten Statussignals PZ1, der angibt, dass die Testzahl keine Primzahl
ist (d.h. PZ1 = –1)
im folgenden allein die Zukunftstestzahl ZTZ als Aktuell-Testzahl
bestimmt wird. Durch die Einrichtung 404 zum Bereitstellen
von Primzahlen pj wird eine in dem nachfolgend
näher beschriebenen
Algorithmus vordefinierte Anzahl von Primzahlen pj bereitgestellt.
Dies kann beispielsweise durch einen Algorithmus erfolgen, der als „Sieb des
Eratosthenes" bezeichnet wird.
Hierbei wird ansprechend auf einen positiven Wert des ersten Statussignals
PZ1 (PZ1 = 1), d.h. einer Mitteilung, dass die Testzahl teilerfremd
zu den Primzahlen pj ist, ein neuer Satz
von Primzahlen pj gemäß dem nachfolgend beschriebenen
Algorithmus bereitgestellt. Die Einrichtung 406 zum Prüfen der
Aktuell-Testzahl auf Teilerfreiheit in Bezug auf die Primzahlen
pj prüft,
ob die Aktuell-Testzahl TZ ganzzahlig durch jede einzelne Primzahl
pi der Primzahlen pj teilbar
ist. Die während
dem Prüfen
mit dem nachfolgend beschriebenen Algorithmus erhaltene Primzahl
pi und die Variable αi werden über den
zweiten und dritten Ausgang der Einrichtung 406 zum Prüfen der
Aktuell-Testzahl auf Teilerfreiheit in Bezug auf die Primzahlen
pj ausgegeben. Ausgehend von einem Initialzustand
des ersten Statussignals PZ1 der einen „unbestimmten" Zustand kennzeichnet
(d. h. PZ1 = 0) wird das erste Statussignal PZ1 auf einen negativen
Wert gesetzt (d.h. PZ1 = –1),
wenn die Aktuell-Testzahl ganzzahlig durch eine der Primzahlen pj teilbar. Ist die Aktuell-Testzahl durch
keine der Primzahlen pj ganzzahlig teilbar,
wird das erste Statussignal PZ1 auf den positiven Zustand (d. h.
PZ1 = 1) gesetzt, wodurch in der Einrichtung 404 zum Bereitstellen
von Primzahlen pj ein neuer Satz von Primzahlen
gemäß dem nachfolgend
beschriebenen Algorithmus bereitgestellt wird. Empfängt die
Einrichtung 406 zum Prüfen
der Aktuell-Testzahl auf Teilerfreiheit in Bezug auf die Primzahlen
pj einen neuen Satz von Primzahlen pj oder eine neue Testzahl TZ wird der Zustand
des ersten Statussignals PZ1 auf den „unbestimmten" Zustand (d. h. PZ1 =
0) zurückgesetzt.
Durch das Haltesignal STOP1 lässt
sich eine Signalverarbeitung der Einrichtung 404 zum Bereitstellen
von Primzahlen pj sowie der Einrichtung 406 zum
Prüfen
der Aktuell-Testzahl
auf Teilerfreiheit in Bezug auf die Primzahlen pj anhalten.By the device 402 for determining a current test number, the initial number AZ is first determined as the current test number, after a first occurrence of a value of the first status signal PZ1, which indicates that the test number is not a prime number (ie PZ1 = -1) in the following only the future test number ZTZ is determined as current test number. By the device 404 In order to provide primes p j , a number of primes p j predefined in the algorithm described in detail below is provided. This can for example be carried out by an algorithm which is referred to as "sieve of Eratosthenes". Here, in response to a positive value of the first status signal PZ1 (PZ1 = 1), that is a notification that the test number is relatively prime to the prime numbers p j, a new set of primes p j is provided according to the algorithm described below 406 For checking the current test number for divisional freedom with respect to the primes p j, it is checked whether the current test number TZ is integer-divisible by every single prime number p i of the primes p j . The prime number p i obtained during testing with the algorithm described below and the variable α i are passed through the second and third outputs of the device 406 for checking the current test number for divisor freedom with respect to the primes p j . Starting from an initial state of the first status signal PZ1 which indicates an "unspecified" state (ie PZ1 = 0), the first status signal PZ1 is set to a negative value (ie PZ1 = -1) if the current test number is integer by one of the primes p j is divisible. Currently the test number by any of the primes p j divisible, the first status signal PZ1 (ie PZ1 = 1) to the positive state is set, whereby the device 404 to provide primes p j a new set of primes according to the provided below algorithm. Receives the device 406 For checking the current test number for divisional freedom with respect to the prime numbers p j, a new set of primes p j or a new test number TZ, the state of the first status signal PZ1 is reset to the "indeterminate" state (ie PZ1 = 0) Hold signal STOP1 can be a signal processing of the device 404 for providing primes p j and the device 406 to check the current test number for divisor freedom with respect to the prime numbers p j .
Die 5 zeigt
ein detaillierteres Blockschaltbild der in 4 dargestellten
Einrichtung 406 zum Prüfen
der Aktuell-Testzahl
auf Teilerfreiheit in Bezug auf die Primzahlen pj.
Die Einrichtung 406 zum Prüfen der Aktuell-Testzahl auf
Teilerfreiheit in Bezug auf die Primzahlen pj umfasst
eine Einrichtung 502 zum Auswählen einer Anzahl von Primzahlen
pi aus den Primzahlen pj,
eine Einrichtung 504 zum Bestimmen eines Produktes q aus
den ausgewählten
Primzahlen pi, eine Einrichtung 506 zum
Reduzieren einer Testzahl unter Verwendung des Produktes q, um eine
Variable β zu
erhalten, eine Einrichtung 508 zum Reduzieren von β unter Verwendung
eine der Primzahlen pi, um eine Variable αi zu
erhalten, eine Einrichtung 510 zum Prüfen, ob pi ein
Teiler der Testzahl TZ ist unter Verwendung von αi und
eine Einrichtung 512 zum Zählen. Die Einrichtung 502 zum Auswählen einer
Anzahl von Primzahlen pi aus den Primzahlen
pj umfasst einen ersten Eingang zum Empfangen
der Primzahlen pj, einen zweiten Eingang
zum Empfangen des ersten Haltesignals STOP1 sowie einen dritten
Eingang zum Empfangen eines Zählsignals 514 von
der Einrichtung 512 zum Zählen sowie einen Ausgang zum
Ausgeben der ausgewählten
Anzahl von Primzahlen pi der mit dem zweiten
Ausgang der Einrichtung 406 zum Prüfen der Aktuell-Testzahl auf
Teilerfreiheit in Bezug auf die Primzahlen pj verbunden
ist. Die Einrichtung 504 zum Bestimmen eines Produktes
q aus den ausgewählten
Primzahlen pi umfasst einen ersten Eingang
zum Empfangen der ausgewählten
Primzahlen pi, einen zweiten Eingang zum
Empfangen des ersten Haltesignals STOP1 sowie einen Ausgang zum
Ausgeben des bestimmten Produktes q. Die Einrichtung 506 zum
Reduzieren der Testzahl TZ unter Verwendung des Produktes q, um
eine Variable β zu
erhalten umfasst einen ersten Eingang zum Emp fangen der extern zuführbaren
Testzahl TZ, einen zweiten Eingang zum Empfangen des Produktes q,
einen dritten Eingang zum Empfangen des ersten Haltesignals STOP1
und einen Ausgang zum Ausgeben der durch den nachfolgend beschriebenen
Algorithmus erhaltenen Variablen β.
Die Einrichtung 508 zum Reduzieren von β unter Verwendung der Primzahlen
pi, um eine Variable αi zu
erhalten umfasst einen ersten Eingang zum Empfangen der ausgewählten Primzahlen
pi, einen zweiten Eingang zum Empfangen
der Variable ß,
einen dritten Eingang zum Empfangen des ersten Haltesignals STOP1
sowie einen Ausgang zum Ausgeben der durch den nachfolgend beschriebenen
Algorithmus erhaltenen Variable αi. Der Ausgang der Einrichtung 508 zum
Reduzieren von β unter
Verwendung der Primzahlen pi ist ferner
mit dem dritten Ausgang der Einrichtung 406 zum Prüfen der
Aktuell-Testzahl auf Teilerfreiheit in Bezug auf die Primzahlen
pj verbunden. Die Einrichtung 510 zum
Prüfen,
ob pi ein Teiler der Testzahl TZ ist unter
Verwendung von αi umfasst einen ersten Eingang zum Empfangen
der Variable αi, einen zweiten Eingang zum Empfangen des
ersten Haltesignals STOP1 sowie einen Ausgang zum Ausgeben des ersten
Statussignals PZ1, wobei der Ausgang der Einrichtung 510 zum
Prüfen,
ob pi ein Teiler der Testzahl TZ ist mit
dem ersten Ausgang der Einrichtung 406 zum Prüfen der
Aktuell-Testzahl auf Teilerfreiheit in Bezug auf die Primzahlen
pj verbunden ist. Die Einrichtung 512 zum
Zählen
umfasst einen ersten Eingang zum Empfangen der Variablen αi,
einen zweiten Eingang zum Empfangen des ersten Haltesignals STOP1,
einen dritten Eingang zum Empfangen des ersten Statussignals PZ1
sowie einen Ausgang zum Ausgeben des Zählsignals 514.The 5 shows a more detailed block diagram of the in 4 illustrated device 406 for checking the current test number for divisional freedom with respect to the primes p j . The device 406 for checking the current test number for divisional freedom with respect to the primes p j comprises means 502 for selecting a number of primes p i from the primes p j , means 504 for determining a product q from the selected prime numbers p i , a device 506 for reducing a test number using the product q to obtain a variable β, means 508 for reducing β using one of the prime numbers p i to obtain a variable α i , means 510 for checking whether p i is a divisor of the test number TZ using α i and a device 512 to count. The device 502 for selecting a number of primes p i from the primes p j comprises a first input for receiving the primes p j , a second input for receiving the first stop signal STOP 1, and a third input for receiving a count signal 514 from the institution 512 for counting and an output for outputting the selected number of primes p i to the second output of the device 406 for checking the current test number for divisor freedom with respect to the primes p j . The device 504 for determining a product q from the selected primes p i comprises a first input for receiving the selected primes p i , a second input for receiving the first stop signal STOP 1 and an output for outputting the particular product q. The device 506 for reducing the test number TZ using the product q to obtain a variable β comprises a first input for receiving the externally-supplied test number TZ, a second input for receiving the product q, a third input for receiving the first stop signal STOP1 and a Output for outputting the variable β obtained by the algorithm described below. The device 508 for reducing β using the primes p i to obtain a variable α i comprises a first input for receiving the selected primes p i , a second input for receiving the variable β, a third input for receiving the first stop signal STOP 1, and a Output for outputting the variable α i obtained by the algorithm described below. The exit of the facility 508 for reducing β using the prime numbers p i is further connected to the third output of the device 406 for checking the current test number for divisor freedom with respect to the primes p j . The device 510 for checking whether p i is a divisor of the test number TZ using α i comprises a first input for receiving the variable α i , a second input for receiving the first stop signal STOP 1, and an output for outputting the first status signal PZ 1, the output the device 510 for checking whether p i is a divisor of the test number TZ with the first output of the device 406 for checking the current test number for divisor freedom with respect to the primes p j . The device 512 for counting comprises a first input for receiving the variable α i , a second input for receiving the first stop signal STOP1, a third input for receiving the first status signal PZ1 and an output for outputting the count signal 514 ,
Gemäß dem nachfolgend
beschriebenen Algorithmus wird in der Einrichtung 502 zum
Auswählen
einer Anzahl von Primzahlen pi aus den Primzahlen
pj eine Anzahl von Primzahlen ausgewählt, wobei
diese Anzahl von Primzahlen pi in die Einrichtung 504 zum
Bestimmen eines Produktes q aus den ausgewählten Primzahlen pi übertragen
wird, die hieraus das Produkt q bildet. Alternativ kann auch eine
Gruppierung aller extern zugeführten Primzahlen
pj und einer Produktbildung aus den einzelnen
Gruppen der Primzahlen erfolgen, wobei die gebildeten Produkte entsprechend
zwischenzuspeichern sind. Gemäß einer
Berechnungsvorschrift des nachfolgend beschriebenen Algorithmus
wird in der Einrichtung 506 zum Reduzieren der Testzahl
TZ unter Verwendung des Produktes q, um eine Variable β zu erhalten,
die Variable β berechnet.
Hieran anschließend wird
die Variable β unter
Verwendung der ausgewählten
Primzahlen pi gemäß dem nachfolgend beschriebenen
Algorithmus reduziert, um zumindest eine Variable αi zu
erhalten. Gemäß dem nachfolgend
beschriebenen Algorithmus erfolgt hieran anschließend ein
Prüfen,
ob eine der Primzahlen pi ein Teiler der
Testzahlen TZ ist unter Verwendung der Variablen αi.
Hierbei wird das erste Statussignal PZ1 gemäß den Ausführungen zu 4 gesetzt.
Durch die Einrichtung 512 zum Zählen wird bestimmt, welche
Anzahl von Primzahlen pi bereits verarbeitet
wurde, wobei über
das Zählsignal 514 die
Einrichtung 502 zum Auswählen einer Anzahl von Primzahlen
pi aus den Primzahlen pj derart
gesteuert werden kann, dass durch die Einrichtung 502 zum
Auswählen eine
neue Anzahl bzw. Gruppe von Primzahlen pi aus
den Primzahlen pj ausgewählt wird. Ferner ist die Einrichtung 512 zum
Zählen
beispielsweise durch das erste Statussignal PZ1 bei einem positiven
Wert (d. h. PZ1 = 1) rücksetzbar,
wodurch gemäß den Ausführungen
zu 4 ein neuer Satz von Primzahlen pj bereitgestellt wird.
Ferner ist eine Signalverarbeitung der in 5 dargestellten
Einrichtungen durch das erste Haltesignal STOP1 unterbrechbar.According to the algorithm described below, in the device 502 for selecting a number of primes p i from the primes p j a number of primes selected, wherein this number of primes p i in the device 504 for determining a product q is transferred from the selected primes p i , which forms the product q therefrom. Alternatively, a grouping of all externally supplied primes p j and a product formation from the individual groups of the primes can take place, wherein the products formed are to be buffered accordingly. According to a calculation rule of the algorithm described below, in the device 506 for reducing the test number TZ using the product q to obtain a variable β which computes variable β. Following this, the variable β is reduced using the selected primes p i according to the algorithm described below to obtain at least one variable α i . According to the algorithm described below, this is followed by a check as to whether one of the primes p i is a divisor of the test numbers TZ using the variables α i . In this case, the first status signal PZ1 according to the statements to 4 set. By the device 512 For counting, it is determined which number of primes p i has already been processed, using the count signal 514 the device 502 for selecting a number of primes p i from the primes p j can be controlled such that by the device 502 for selecting a new number or group of primes p i is selected from the primes p j . Furthermore, the device 512 for counting, for example, by the first status signal PZ1 at a positive value (ie PZ1 = 1) resettable, whereby according to the comments to 4 provided a new set of primes p j becomes. Further, a signal processing of in 5 illustrated devices by the first stop signal STOP1 interruptible.
Um
möglichst
große
Primzahlen zu erzeugen, sollte die Testzahl TZ möglichst groß sein. Um eine möglichst
schnelle Ermittlung einer Primzahl zu ermöglichen, kann zur Primzahlermittlung
vorzugsweise ein Rechner-System eingesetzt werden, das einen Hauptprozessor
und einen Coprozessor umfasst. Während
der Hauptprozessor optimal dazu ausgebildet sein kann, die Abarbeitung
von Schritten des nachfolgend beschriebenen ersten Primzahlgenerierungsalgorithmus
in den hier beschriebenen einzelnen Einrichtungen zu steuern sowie
Rechenoperati onen mit kleinen Zahlen durchzuführen (d.h. ein Rechenwerk mit
kleiner Rechenwerklänge
aufweist), kann der Coprozessor dazu ausgelegt sein, die Verarbeitung
von Rechenoperationen mit großen Zahlen
effizient und schnell durchzuführen,
d.h. ein Rechenwerk mit großer
Rechenwerklänge
aufweisen, das beispielsweise eine Rechenwerkslänge von mehr als 100 Bit aufweist.
Bei einer derartigen Auslegung des Rechner-Systems zur Primzahlenermittlung
ist es nun vorteilhaft, die Einrichtung 506 zum Reduzieren
der (beispielsweise größer als
200 Bit langen binären)
Testzahl TZ unter Verwendung des Produktes q, um eine Variable β zu erhalten
derart auszugestalten, dass die Reduktion der (großen) Testzahl
TZ in dem Coprozessor erfolgt. Hierzu kann die Einrichtung 506 zum
Reduzieren der Testzahl eine in 5 nicht
dargestellte Steuereinrichtung aufweisen, die einen Rechenschritt
zur Berechnung von großen
Zahlen (Lang-Schritt) dem Coprozessor zuweist. Ferner kann die Steuereinrichtung
vorzugsweise ausgebildet sein, der Berechnung des Lang-Schrittes
eine höhere
Priorität
als weiteren, von dem Coprozessor zu bearbeitenden Schritten zuzuteilen. Hierzu
ist es beispielsweise möglich,
die Berechnung eines auf dem Coprozessor durchzuführenden
Miller-Rabin-Test kurzzeitig zu unterbrechen und den Lang-Schritt
durchzuführen,
nach dessen Ausführung
der unterbrochene Miller-Rabin-Test
fortgesetzt wird. Dadurch lässt
sich neben einer deutlichen Beschleunigung der Primzahl-Generierung
eine effiziente Ausnutzung eines zur Verfügung stehenden Rechner-Systems
realisieren. Die weiteren Schritte zum Überprüfen der Aktuell-Testzahl auf Primalität durch
den ersten Primzahlüberprüfungsalgorithmus
lassen sich im Hauptprozessor bearbeiten, da hierzu keine Rechenschritte
mit großen Zahlen
notwendig sind. Bei einer derartigen Vorgehensweise bietet sich
ferner der Vorteil, durch die Einrichtung 504 zum Bestimmen
eines Produktes q aus den ausgewählten
Primzahlen pi das Produkt q derart zu bestimmen,
dass es eine Länge
aufweist so dass in der Einrichtung 506 zum Reduzieren
der Testzahl TZ eine Variable β erhalten
wird, die eine kurze Länge
aufweist, so dass sie sich schnell durch auf dem Hauptprozessor ausführbare Re chenschritte
(d.h. Kurz-Schritte) verarbeiten lässt. Ein derartiges Vorgehen
trägt wesentlich
zur effizienten Ausnutzung der verfügbaren Hardware sowie einer
schnellen Primzahl-Generierung
bei.To generate the largest possible primes, the test number TZ should be as large as possible. To enable the fastest possible determination of a prime number, a computer system comprising a main processor and a coprocessor can preferably be used for determining the prime number. While the main processor may be optimally configured to control the processing of steps of the first prime number generation algorithm described below in the individual devices described herein and to perform arithmetic operations with small numbers (ie, having a small arithmetic unit), the coprocessor may be configured to: to carry out the processing of arithmetic operations with large numbers efficiently and quickly, ie to have an arithmetic unit with a large arithmetic unit length, which has for example an arithmetic unit length of more than 100 bits. In such a design of the computer system for prime number determination, it is now advantageous to the device 506 for reducing the (for example, greater than 200-bit binary) test number TZ using the product q to obtain a variable β such that the reduction of the (large) test number TZ occurs in the coprocessor. For this purpose, the device 506 to reduce the number of tests a in 5 not shown control means, which assigns a calculation step for calculating large numbers (long-step) the coprocessor. Furthermore, the control device can preferably be designed to give the calculation of the long step a higher priority than further steps to be processed by the coprocessor. For this purpose, it is possible, for example, to temporarily interrupt the calculation of a Miller-Rabin test to be performed on the coprocessor and to perform the long step, after the execution of which the interrupted Miller-Rabin test is continued. As a result, in addition to a significant acceleration of the prime number generation, an efficient utilization of an available computer system can be realized. The further steps for checking the current test number for primality by the first prime-checking algorithm can be processed in the main processor, since no calculation steps with large numbers are necessary for this purpose. In such an approach, further offers the advantage of the device 504 for determining a product q from the selected prime numbers p i, determine the product q to have a length such that in the device 506 to reduce the test number TZ, a variable β is obtained which has a short length so that it can be processed quickly by processing steps (ie short steps) that can be executed on the main processor. Such a procedure contributes significantly to the efficient use of the available hardware as well as a fast generation of prime numbers.
6 zeigt
ein detaillierteres Blockschaltbild der in 3 dargestellten
Einrichtung 304 zum Bereitstellen einer Zukunftstestzahl.
Die Einrichtung 304 zum Bereitstellen einer Zukunftstestzahl
umfasst eine Einrichtung 602 zum Bereitstellen einer Ausgangszahlenfolge
(AZ-Folge) sowie eine Einrichtung 604 zum Auswählen einer
Zukunftstestzahl ZTZ aus der Ausgangszahlenfolge. Die Einrichtung 602 zum
Bereitstellen einer Ausgangszahlenfolge umfasst einen ersten Eingang
zum Empfangen der Ausgangszahl AZ, einen zweiten Eingang zum Empfangen
des ersten Haltesignals STOP1 und einen Ausgang zum Ausgeben der
bereitgestellten Ausgangszahlenfolge. Die Einrichtung 604 zum
Auswählen
einer Zukunftstestzahl ZTZ aus der Ausgangszahlenfolge umfasst einen
ersten Eingang zum Empfangen der Ausgangszahlenfolge von der Einrichtung 602 zum
Bereitstellen einer Ausgangszahlenfolge, einen zweiten Eingang zum
Empfangen des ersten Haltesignals STOP1, einen dritten Eingang zum
Empfangen von Primzahlen pi, einen vierten
Eingang zum Empfangen der Variablen αi sowie
einen Ausgang zum Ausgeben der ausgewählten Zukunftstestzahl ZTZ. 6 shows a more detailed block diagram of the in 3 illustrated device 304 to provide a future test number. The device 304 for providing a future test number includes means 602 for providing an output number sequence (AZ sequence) and a device 604 for selecting a future test number ZTZ from the output number sequence. The device 602 for providing an output number sequence comprises a first input for receiving the output number AZ, a second input for receiving the first stop signal STOP1 and an output for outputting the provided output number sequence. The device 604 for selecting a future test number ZTZ from the output number sequence comprises a first input for receiving the output number sequence from the device 602 for providing an output number sequence, a second input for receiving the first stop signal STOP1, a third input for receiving primes p i , a fourth input for receiving the variables α i and an output for outputting the selected future test number ZTZ.
Die
Einrichtung 602 zum Bereitstellen einer Ausgangszahlenfolge
stellt gemäß dem nachfolgend
beschriebenen Algorithmus aus der Ausgangszahl AZ die Ausgangszahlenfolge
AZ-Folge bereit, aus der die Einrichtung 604 zum Auswählen einer
Zukunftstestzahl ZTZ ebenfalls gemäß dem nachfolgend beschriebenen Algorithmus
unter Verwendung der Primzahlen pi und der
Variablen αi die Zukunftstestzahl ZTZ ermittelt, die über den
Ausgang der Einrichtung 604 zum Auswählen einer Zukunftstestzahl
ausgegeben wird. Mittels des ersten Haltesignals STOP1 kann ein
Betrieb der in 6 dargestellten Einrichtungen
angehalten werden.The device 602 to provide an output number sequence, according to the algorithm described below, from the output number AZ, provides the output number sequence AZ sequence from which the device 604 for selecting a future test number ZTZ also according to the algorithm described below using the primes p i and the variables α i the future test number ZTZ determined that the output of the device 604 to select a future test number. By means of the first stop signal STOP1, an operation of the in 6 stopped facilities are stopped.
7 zeigt
ein detaillierteres Blockschaltbild der in 6 dargestellten
Einrichtung 604 zum Auswählen einer Zukunftstestzahl
ZTZ aus der Ausgangszahlenfolge. Die Einrichtung 604 zum
Auswählen
einer Zukunftstestzahl ZTZ umfasst eine Einrichtung 702 zum
Bestimmen einer charakteristischen Bitfolge σ, eine Einrichtung 704 zum
Berechnen einer Variablen ki, eine Einrichtung 706 zum Überprüfen und
Modifizieren der charakteristischen Bitfolge σ sowie eine Einrichtung 708 zum
Bestimmen einer Zukunftstestzahl aus der überprüften und modifizierten Bitfolge σ'. Die Einrichtung 702 zum
Bestimmen einer charakteristischen Bitfolge σ umfasst einen ersten Eingang
zum Empfangen der Ausgangszahlenfolge, einen zweiten Eingang zum
Empfangen der überprüften und
modifizierten Bitfolge σ', einen dritten Eingang
zum Empfangen des ersten Haltesignals STOP1 sowie einen Ausgang
zum Ausgeben der bestimmten charakteristischen Bitfolge σ. Die Einrichtung 704 zum
Berechnen einer Variablen ki umfasst einen
ersten Eingang zum Empfangen von Primzahlen pi,
einen zweiten Eingang zum Empfangen der Variablen αi,
einen dritten Eingang zum Empfangen des ersten Haltesignals STOP1
sowie einen Ausgang zum Ausgeben der berechneten Variablen ki. Die Einrichtung 706 zum Überprüfen und
Modifizieren der charakteristischen Bitfolge σ umfasst einen ersten Eingang
zum Empfangen der charakteristischen Bitfolge σ von der Einrichtung 702 zum
Bestimmen einer charakteristischen Bitfolge σ, einen zweiten Eingang zum
Empfangen von Primzahlen pi, einen dritten
Eingang zum Empfangen der Variablen ki von
der Einrichtung 704 zum Berechnen einer Variablen ki, einen vierten Eingang zum Empfangen des
ersten Haltesignals STOP1 sowie einen Ausgang zum Ausgeben der überprüften und
modifizierten charakteristischen Bitfolge σ'. Die Einrichtung 708 zum Bestimmen
einer Zukunftstestzahl ZTZ aus der überprüften und modifizierten Bitfolge σ' umfasst einen ersten
Eingang zum Empfangen der überprüften und
modifizierten charakteristischen Bitfolge σ', einen zweiten Eingang zum Empfangen
des ersten Haltesignals STOP1 sowie einen Ausgang zum Ausgeben der
bestimmten Zukunftstestzahl ZTZ. 7 shows a more detailed block diagram of the in 6 illustrated device 604 for selecting a future test number ZTZ from the output number sequence. The device 604 for selecting a future test number ZTZ comprises a device 702 for determining a characteristic bit sequence σ, a device 704 for calculating a variable k i , a device 706 for checking and modifying the characteristic bit sequence σ and a device 708 for determining a future test number from the checked and modified bit sequence σ '. The device 702 for determining a characteristic bit sequence σ comprises a first input for receiving the output number sequence, a second input for receiving the checked and modified bit sequence σ ', a third input for receiving the first stop signal STOP1 and an output for outputting the determined characteristic bit sequence σ. The A direction 704 for calculating a variable k i comprises a first input for receiving primes p i , a second input for receiving the variables α i , a third input for receiving the first stop signal STOP 1 and an output for outputting the calculated variables k i . The device 706 for checking and modifying the characteristic bit sequence σ comprises a first input for receiving the characteristic bit sequence σ from the device 702 for determining a characteristic bit sequence σ, a second input for receiving primes p i , a third input for receiving the variable k i from the device 704 for calculating a variable k i , a fourth input for receiving the first stop signal STOP1 and an output for outputting the checked and modified characteristic bit sequence σ '. The device 708 for determining a future test number ZTZ from the checked and modified bit sequence σ 'comprises a first input for receiving the checked and modified characteristic bit sequence σ', a second input for receiving the first stop signal STOP1 and an output for outputting the determined future test number ZTZ.
Die
Einrichtung 702 zum Bestimmen einer charakteristischen
Bitfolge σ bestimmt
gemäß dem nachfolgend
beschriebenen Algorithmus aus der Ausgangszahlenfolge eine charakteristische
Bitfolge σ oder
setzt die charakteristische Bitfolge σ gleich der empfangenen überprüften und
modifizierten charakteristischen Bitfolge σ'. Die Einrichtung 704 zum Berechnen
einer Variable ki berechnet gemäß dem nachfolgend
beschriebenen Algorithmus aus den Werten einer Primzahl pi und der Variablen αi die
Variable ki und stellt diese der Einrichtung 706 zum Überprüfen und
Modifizieren der charakteristischen Bitfolge σ bereit. Die Einrichtung 706 zum Überprüfen und
Modifizieren der charakteristischen Bitfolge σ überprüft und modifiziert die charakteristische
Bitfolge σ gemäß dem nachfolgend
beschriebenen Algorithmus unter Verwendung der Variablen ki sowie der Primzahl pi und
gibt die überprüfte und
modifizierte charakteristische Bitfolge σ' über
den Ausgang der Einrichtung 706 zum Überprüfen und Modifizieren der charakteristischen
Bitfolge σ aus.
Gemäß dem nachfolgend beschriebenen
Algorithmus bestimmt die Einrichtung 708 aus der überprüften und
modifizierten charakteristischen Bitfolge σ' eine Zukunftstestzahl und gibt diese
aus. Alternativ kann auch als weitere Bedingung gesetzt werden,
dass die Zukunftstestzahl mindestens um 20 Stellen größer sein
soll, als die Aktuell-Testzahl.
Mittels des ersten Haltesignals STOP1 kann ein Betrieb der in 7 dargestellten
Einrichtungen angehalten werden.The device 702 for determining a characteristic bit sequence σ, according to the algorithm described below, determines from the output number sequence a characteristic bit sequence σ or sets the characteristic bit sequence σ equal to the received checked and modified characteristic bit sequence σ '. The device 704 for calculating a variable k i calculated according to the algorithm described below from the values of a prime number p i, and the variables α i, the variable i k and provides it to the device 706 for checking and modifying the characteristic bit sequence σ ready. The device 706 for checking and modifying the characteristic bit sequence σ checks and modifies the characteristic bit sequence σ according to the algorithm described below using the variable k i and the prime number p i and outputs the checked and modified characteristic bit sequence σ 'via the output of the device 706 for checking and modifying the characteristic bit sequence σ. The device determines according to the algorithm described below 708 From the checked and modified characteristic bit sequence σ ', a future test number is outputted. Alternatively, it can also be set as a further condition that the future test number should be at least 20 digits larger than the current test number. By means of the first stop signal STOP1, an operation of the in 7 stopped facilities are stopped.
Als
besonders vorteilhaft erweist sich ein derartiges Vorgehen dadurch,
dass es durch den nachfolgend beschriebenen Algorithmus möglich ist,
sehr schnell eine Zukunftstestzahl ZTZ zu finden, die teilerfremd zu
den vorausgehend getesteten Primzahlen ist. Gegenüber den
Verfahren gemäß dem Stand
der Technik ermöglicht
ein derartiges Vorgehen somit ein deutlich schnelleres Auffinden
von Testkandidaten, die eine hohe Wahrscheinlichkeit zum Bestehen
des vorzugsweise einzusetzenden Miller-Rabin-Tests in der Einrichtung 204 zum
Testen aufwei sen. Hieraus resultiert ein beschleunigtes Auffinden
einer großen
Primzahl.Such a procedure proves to be particularly advantageous in that, by the algorithm described below, it is possible to find a future test number ZTZ very quickly which is prime to the previously tested primes. Compared to the methods according to the prior art, such a procedure thus enables a significantly faster finding of test candidates, which has a high probability of passing the preferably used Miller-Rabin test in the device 204 for testing. This results in an accelerated finding of a large prime number.
Nachfolgend
wird ein Ausführungsbeispiel
der vorliegenden Erfindung beschrieben, das einen Hardware-optimierten
Algorithmus zur schnellen Primzahlgenerierung aufweist.following
becomes an embodiment
of the present invention, which is hardware-optimized
Algorithm for fast prime number generation.
Einleitend
zur Beschreibung des erfindungsgemäßen Algorithmus ist zu sagen,
dass die meisten Verfahren zur Berechnung großer Primzahlen aus zwei Teilaufgaben
bestehen:
- 1. Der Erzeugung geeigneter Testkandidaten;
und
- 2. der Anwendung eines schnellen Primzahltests auf die Testkandidaten.
As an introduction to the description of the algorithm according to the invention, most of the methods for calculating large primes consist of two subtasks: - 1. The generation of suitable test candidates; and
- 2. applying a quick primality test to the test candidates.
Um
den Prozess der Primzahlerzeugung zu beschleunigen, bieten sich
daher drei Strategien an:
Strategie A: einen schnelleren Primzahltest
zu finden;
Strategie B: eine Qualität der Testkandidaten zu verbessern;
und
Strategie c: die oben genannten beiden Teilaufgaben (1)
und (2) parallel auszuführen.To speed up the process of generating primes, there are three strategies:
Strategy A: finding a faster primality test;
Strategy B: to improve a quality of the test candidates; and
Strategy c: to carry out the above mentioned two subtasks (1) and (2) in parallel.
Der
erfindungsgemäße Ansatz
der Primzahlermittlung verfolgt die Strategien B und C.Of the
inventive approach
The prime number determination follows the strategies B and C.
Zu
Strategie A: Primzahltests können
in zwei Gruppen eingeteilt werden, in deterministische und probabilistische.
Die probabilistischen Tests sind effizienter und daher für praktische
Zwecke geeigneter. Sie haben aber gegenüber deterministischen Tests
den Nachteil, dass sie nicht nur von Primzahlen, sondern auch von
einigen wenigen zusammengesetzten Zahlen bestanden werden. Eine
zusammengesetzte Zahl, die ei nen probabilistischen Primzahltest
besteht, heißt
Pseudoprimzahl (in Bezug auf den jeweiligen Test). Der schnellste
zur Zeit bekannte probabilistische Primzahltest ist der Miller-Rabin-Test. Er wurde
in den 70er Jahren des 20. Jahrhunderts von Selfridge, Miller und
Rabin entwickelt. Seither ist das Interesse der Mathematiker an
der Entwicklung neuer Primzahltests stark angestiegen. Das steht
im Zusammenhang mit der Entdeckung asymmetrischer Chiffriersysteme
in den letzten 25 Jahren, ihrem weltweiten Einsatz und einem damit
einhergehenden zunehmenden Bedarf an großen Primzahlen. Trotzdem wurde
bisher kein schnellerer Primzahltest als der Miller-Rabin-Test gefunden.To strategy A: Prime tests can be divided into two groups, deterministic and probabilistic. The probabilistic tests are more efficient and therefore more suitable for practical purposes. However, they have the disadvantage over deterministic tests that they are passed not only on primes, but also on a few composite numbers. A composite number that passes a probabilistic primality test is called a pseudo prime number (in relation to the particular test). The fastest currently known probabilistic primality test is the Miller-Rabin test. It was developed in the 70s of the 20th century by Selfridge, Miller and Rabin. Since then, the interest of mathematicians in the development of new primality tests has risen sharply. This has been linked to the discovery of asymmetric cipher systems over the past 25 years, their worldwide deployment, and the concomitant growing need for large primes. Nevertheless, so far no faster primal payment than the Miller-Rabin test found.
Der
wesentliche Rechenaufwand beim Miller-Rabin-Test (wie auch beim
Fermat-Test) besteht darin eine sehr hohe Potenz einer relativ kleinen
Basis b modulo z zu berechnen, wobei z die zu testenden Kandidatenzahl
ist, also eine sehr große
Zahl. Der vorzugsweise einzusetzende Coprozessor ist eigens so konstruiert,
dass er modulare Multiplikationen mit langen Zahlen schnell durchführen kann – zum Unterschied
von einem vorzugsweise einzusetzenden Hauptprozessor. Aus diesem
Grund werden die Miller-Rabin-Tests im Coprozessor durchgeführt.Of the
significant computational effort in the Miller-Rabin test (as well as in the
Fermat test) is a very high power of a relatively small
Calculate base b modulo z, where z is the candidate number to be tested
is so very big
Number. The preferably used coprocessor is specially designed
that he can perform modular multiplications with long numbers quickly - the difference
from a preferably to be used main processor. For this
Reason the Miller Rabin tests are performed in the coprocessor.
Einer
groben Einschätzung
nach wäre
es nicht zielführend,
den Prozeß der
Primzahlgenerierung durch Verfolgen von Strategie A vorantreiben
zu wollen.one
rough assessment
after would be
it not purposeful,
the process of
Promote prime generation by following strategy A.
to want.
Zu
Strategie B: Die meisten Verfahren zur Primzahlgenerierung sind
ihrem Wesen nach Suchverfahren. Es werden so lange gewisse Zahlen
mit Hilfe eines Primzahltests überprüft bis man
eine Primzahl gefunden hat. Die Kunst besteht darin, den Suchprozeß möglichst
kurz zu gestalten.To
Strategy B: Most of the processes for generating prime numbers are
in essence, search procedure. It will be certain numbers
Checked with the help of a primality test
found a prime number. The trick is to try the search process as much as possible
short.
Der
Anteil der Primzahlen unter großen
natürlichen
Zahlen mit einer Länge
von 1024 Bit beträgt
ungefähr
0,14%. Statistisch betrachtet ist also etwa jede 710te ganze Zahl
zwischen 21023 und 21024 eine
Primzahl. Daraus folgt, dass die Wahrschein lichkeit, dass eine zufällig gewählte 1024
Bit große
ungerade natürliche
Zahl eine Primzahl ist, etwa 1/355 beträgt.The proportion of primes among large natural numbers with a length of 1024 bits is about 0.14%. Statistically, every 710th integer between 2 1023 and 2 1024 is a prime number. It follows that the probability that a randomly chosen 1024-bit odd natural number is a prime number is about 1/355.
Sei
p1 = 2, p2 = 3,
p3 = 5, ... die Folge der Primzahlen. Dann
gilt allgemeiner: Die Wahrscheinlichkeit, dass eine zufällig gewählte 1024
Bit große
natürliche
Zahl, die durch keine der ersten r Primzahlen p1,
..., pr teilbar ist, eine Primzahl ist,
ungefähr beträgt,
wobei ln N der natürliche Logarithmus
von N = 21024 ist. Es ist ersichtlich, dass
die Wahrscheinlichkeit mit wachsendem r zunimmt. Für r = 1000
ergibt die Auswertung des Ausdrucks (1) ca. 2,26%, also in etwa
1/44. Die Strategie B besteht darin, den Parameter r so groß wie möglich werden
zu lassen.Let p 1 = 2, p 2 = 3, p 3 = 5, ... the sequence of prime numbers. Then, more generally, the probability that a randomly selected 1024-bit natural number that is not divisible by any of the first r primes p 1 , ..., p r is a prime number, approximately is,
where ln is the natural logarithm of N = 2 1024 . It can be seen that the probability increases with increasing r. For r = 1000, the evaluation of expression (1) gives about 2.26%, that is about 1/44. The strategy B is to make the parameter r as large as possible.
Zu
Strategie C: Bei vielen Verfahren der Primzahlgenerierung stellt
sich die folgende Problematik: zu um so mehr kleinen Primzahlen
die Testzahl teilerfremd ist, um so weniger Primzahltests sind zwar
im Durchschnitt erforderlich aber um so aufwendiger ist dafür die Kandidatenberechnung.
Das erfindungsgemäße Verfahren
ist so konzipiert, dass es eine vorhandene Hardware eines für kryptographische
Operationen ausgelegten Halbleiterchips optimal ausnutzt. Der Halbleiterchip
umfasst hierbei vorzugsweise einen Hauptprozessor und einen kryptographischen
Coprozessor. Sowohl der Hauptprozessor als auch der kryptographische
Coprozessor sind hierbei an dem Prozess der Primzahlengenerierung
beteiligt, und zwar in einer Weise in der beide Prozessoren ständig voll
ausgelastet sind, was sich somit deutlich vorteilhaft gegenüber den
herkömmlichen Ansätzen ausweist.
Die Berechnung der Testkandidaten (Testzahlen TZ) übernimmt
im wesentlichen der Hauptprozessor (HP), während die vorzugsweise einzusetzenden
Miller- Rabin-Tests
(d. h. dem zweiten Primzahlüberprüfungsalgorithmus
in der Einrichtung 204 zum Testen) von dem Coprozessor
abgearbeitet werden können.To strategy C: In many methods of prime number generation, the following problem arises: to the more small primes the test number is prime, the less primality tests are required on average but the more complex is the candidate calculation. The inventive method is designed so that it optimally utilizes existing hardware of a semiconductor chip designed for cryptographic operations. The semiconductor chip here preferably comprises a main processor and a cryptographic coprocessor. Both the main processor and the cryptographic coprocessor are involved in the process of primes generation, in a manner in which both processors are constantly at full capacity, which is thus clearly advantageous over the conventional approaches. The calculation of the test candidates (test numbers TZ) essentially takes over the main processor (HP), while the preferably used Miller-Rabin tests (ie the second prime number checking algorithm in the device 204 for testing) can be processed by the coprocessor.
Für ein besseres
Verständnis
des eigentlichen Algorithmus soll zunächst eine Vorversion (im folgenden
als Voralgorithmus bezeichnet) beschrieben werden. Ein Ausführungsbeispiel
des eigentlich zu realisierenden erfindungsgemäßen Algorithmus wird nachfolgend
Bezug nehmend auf die Schritte des Voralgorithmus in späteren Ausführungen
beschrieben. Das Ausführungsbeispiel
des eigentlich zu realisierenden Algorithmus kann dabei als eine
ausgebaute und verfeinerte Version des Voralgorithmus aufgefaßt werden.For a better one
understanding
The actual algorithm is initially a previous version (below
described as pre-algorithm). An embodiment
of the actual algorithm to be realized according to the invention will be described below
Referring to the steps of the pre-algorithm in later embodiments
described. The embodiment
The algorithm that can actually be implemented can be used as one
developed and refined version of the pre-algorithm.
Um
eine 1 Bit große
Zahl zu berechnen, wird zu Beginn mit Hilfe eines Zufallszahlengenerators
eine 1 Bit große
ungerade Zufallszahl z (= Ausgangszahl AZ) erzeugt. Von Interesse
ist insbesondere der Fall 1 = 1024, da eine Primzahl der Länge 1024
Bit gemäß dem Stand
der Technik für
einen RSA-Schlüssel
benötigt wird.
Für zukünftige Anwendungen
sind jedoch auch größere Werte
von 1 interessant. Die von dem Voralgorithmus (bzw. dem eigentlichen
Algorithmus) schließlich
ausgegebene Primzahl ist die kleinste Primzahl in der Folge
z,
z + 2, z + 4, ....In order to calculate a 1-bit number, a 1-bit odd odd number z (= initial number AZ) is generated at the beginning with the help of a random number generator. In particular, the case 1 = 1024 is of particular interest, since a 1024-bit prime number according to the prior art is required for an RSA key. For future applications, however, larger values of 1 are also interesting. The prime number finally output by the pre-algorithm (or the actual algorithm) is the smallest prime number in the sequence
z, z + 2, z + 4, ....
Wie
bereits ausgeführt,
werden bei der Abarbeitung des Voralgorithmus oder des zu realisierenden
Algorithmus die Testkandidaten (Testzahlen TZ) im Hauptprozessor
berechnet. Die auszuführenden
Miller-Rabin-Tests werden von dem kryptographischen Coprozessor
ausgeführt.As
already executed,
become during the execution of the pre-algorithm or to be realized
Algorithm the test candidates (test numbers TZ) in the main processor
calculated. The executable
Miller-Rabin tests are performed by the cryptographic coprocessor
executed.
Zunächst erfolgt
die Bestimmung des ersten Testkandidaten. Es werden zunächst die
r – 1
Primzahlen p2, ..., pr betrachtet.
Die Zufallszahl z wird modulo jeder einzelnen dieser Primzahlen
reduziert. Sei αi =
z mod pi für i = 2 ,..., r. (2) First, the determination of the first test candidate. First we consider the r - 1 primes p 2 , ..., p r . The random number z is reduced modulo each of these primes. Be α i = z mod p i for i = 2, ..., r. (2)
Für x, y ∈ Z und
n ∈ N
bedeutet x = y mod n, dass x ≡ y
mod n und 0 ≤ x ≤ n – 1 gilt.
Es wird ferner der Ringhomomorphismus betrachtet.For x, y ∈ Z and n ∈ N, x = y mod n means that x ≡ y mod n and 0 ≤ x ≤ n - 1. It also becomes the ring homomorphism considered.
Mit
Hilfe der Abbildung ψ kann
(2) auch durch die kompaktere Form ψ(z)
= (α2, ..., αr) (3)ausgedrückt werden.
wenn alle αi ≠ 0
sind, dann ist z teilerfremd zu jeder der r – 1 Primzahlen p2,
..., pr. Da z ungerade ist, ist z dann teilerfremd
zu den ersten r Primzahlen p1, ..., pr. In diesem Fall ist das Element ψ(z) eine
Einheit im Ring R.With the help of figure ψ, (2) can also by the more compact form ψ (z) = (α 2 , ..., α r ) (3) be expressed. if all α i ≠ 0 then z is prime to each of the r - 1 primes p 2 , ..., p r . Since z is odd, z is then prime to the first r primes p 1 , ..., p r . In this case, the element ψ (z) is a unit in the ring R.
Wenn
dagegen ein j ∈ {2,
..., r} existiert mit αj = 0, dann ist pj ein
Teiler von z. In diesem Fall ist ψ(z) ein Nullteiler im Ring
R. Wenn ψ(z)
= (α2, ..., αr) ∈ R
eine Einheit ist, dann ist z der erste Testkandidat. Andernfalls berechnet
man ψ(z
+ 2) = (β2, ..., βr) durch In contrast, if j ∈ {2, ..., r} exists with α j = 0, then p j is a divisor of z. In this case, ψ (z) is a zero divisor in the ring R. If ψ (z) = (α 2 , ..., α r ) ∈ R is a unit, then z is the first test candidate. Otherwise one calculates ψ (z + 2) = (β 2 , ..., β r )
Wenn
alle Elemente β2, ..., βr von Null verschieden sind, mit anderen
Worten wenn ψ(z
+ 2) ∈ R
eine Einheit ist, dann ist z + 2 der erste Testkandidat. Andernfalls
berechnet man aus den Elementen βi, 2 ≤ βi ≤ r, gemäß der Vorschriften
in (4) ψ(z
+ 4) = (γ2, ..., γr) If all elements β 2 , ..., β r are different from zero, in other words if ψ (z + 2) ∈ R is a unit, then z + 2 is the first test candidate. Otherwise one calculates from the elements β i , 2 ≦ β i ≦ r, according to the rules in (4) ψ (z + 4) = (γ 2 , ..., γ r )
Das
Verfahren wird so lange fortgesetzt bis man ein j ∈ N gefunden
hat, für
das ψ(z
+ 2j) ∈ R
eine Einheit ist. Die Zahl z + 2j ist dann der erste Testkandidat.
Die Zahl z + 2j, die vorzugsweise im Hauptprozessor berechnet wurde,
wird nun in den kryptographischer Coprozessor übertragen. Dort wird z + 2j
mit Hilfe des einzusetzenden Miller-Rabin-Tests auf Primalität hin geprüft.The
The process continues until you find a j ∈ N
has, for
the ψ (z
+ 2j) ∈ R
is a unit. The number z + 2j is then the first test candidate.
The number z + 2j, which was preferably calculated in the main processor,
will now be transferred to the cryptographic coprocessor. There z + 2j
tested for primality using the Miller-Rabin test to be used.
Während der
Coprozessor für
den Testkandidaten z + 2j den Miller-Rabin-Test durchführt, wird
im Hauptprozessor schon der nächste
Testkandidat berechnet. Dazu wird z + 2j umbenannt zu z (beispielsweise durch
die Einrichtung 402 zum Bestimmen einer Aktuell-Testzahl,
wobei z + 2j die Zukunftstestzahl ZTZ ist und z die Aktuell-Testzahl
TZ ist). Dann wird das oben beschrieben Verfahren zur Berechnung
des ersten Testkandidaten wiederholt.While the coprocessor for the test candidate z + 2j performs the Miller-Rabin test, the next test candidate is already calculated in the main processor. For this, z + 2j is renamed z (for example, by the device 402 for determining a current test number, where z + 2j is the future test number ZTZ and z is the current test number TZ). Then, the above-described method of calculating the first test candidate is repeated.
Grob
gesagt, sollte r so gewählt
werden, dass die Zeit, die der Hauptprozessor für die Berechnung eines Testkandidaten
benötigt,
in etwa die gleiche ist, die der Coprozessor für die Ausführung eines Miller-Rabin-Tests
braucht.Rough
said, r should be chosen like that
be that time, which is the main processor for the calculation of a test candidate
needed
is about the same as the coprocessor for running a Miller-Rabin test
needs.
Die
Größe von r
wird bei dem Voralgorithmus durch zwei Umstände begrenzt:
- (i) Durch die Rechenzeit, die der Hauptprozessor zur Bestimmung
des nächsten
Testkandidaten (d.h. der Zufallszahl ZTZ) benötigt. Diese Zeit darf nicht
länger
sein als die Zeit, die der Coprozessor für die Ausführung eines Miller-Rabin-Tests
benötigt.
- (ii) Durch den Speicherbedarf der Primzahlen p2,
..., pr und den zugehörigen Resten von z modulo pi, 2 ≤ i ≤ r. Die Beschränkung (ii)
wird durch den im folgenden beschriebenen eigentlich zu realisierenden
Algorithmus beseitigt.
The size of r is limited in the pre-algorithm by two circumstances: - (i) By the computation time required by the main processor to determine the next test candidate (ie the random number ZTZ). This time must not be longer than the time it takes the coprocessor to perform a Miller Rabin test.
- (ii) By the memory requirement of the prime numbers p 2 , ..., p r and the associated remainders of z modulo p i , 2 ≤ i ≤ r. The restriction (ii) is made by the algorithm actually to be described below eliminated.
Ein
weiterer Nachteil des Voralgorithmus besteht darin, dass die Reduktionen
von z modulo der Primzahlen pi im Hauptprozessor
ausgeführt
werden. Die Zahl z (d. h. die Testzahl TZ) hat aber beispielsweise
1024 Binärstellen
und der Hauptprozessor ist im allgemeinen nicht ausgelegt für das Rechnen
mit derart großen Zahlen.
Operationen mit großen
Zahlen kann jedoch der Coprozessor viel schneller durchführen. Dieser
Umstand wird bei dem zu realisierenden Algorithmus ebenfalls berücksichtigt.Another disadvantage of the pre-algorithm is that the reductions of z modulo the primes p i are executed in the main processor. However, the number z (ie, the test number TZ) has 1024 binary digits, for example, and the main processor is generally not designed for arithmetic with such large numbers. However, large-number operations can be done much faster by the coprocessor. This fact is also taken into account in the algorithm to be realized.
Nach
diesen Vorüberlegungen
unter Zuhilfenahme des Voralgorithmus soll nun der zu realisierende Algorithmus
als ein Ausführungsbeispiel
der vorliegenden Erfindung näher
erläutert
werden.To
these considerations
With the aid of the pre-algorithm, the algorithm to be realized is now to be implemented
as an embodiment
closer to the present invention
explained
become.
Sei
z eine ungerade natürliche
Zahl (etwa die 1024 Bit große
Zufallszahl aus dem Voralgorithmus), und sei p ≥ 3 eine Primzahl. Man betrachte
die arithmetische Folge
z, z + 2, z + 4, ... .Let z be an odd natural number (such as the 1024-bit random number from the pre-algorithm), and let p ≥ 3 be a prime number. Consider the arithmetic sequence
z, z + 2, z + 4, ....
Es
ist durch den Algorithmus zu bestimmen, welche Glieder dieser Folge
durch p teilbar sind.It
is through the algorithm to determine which members of this sequence
are divisible by p.
Die
lineare Kongruenz z
+ 2n ≡ 0
mod p (5)ist äquivalent
zu α + 2n ≡ 0 mod
p (6)mit α = z mod
p ∈ {0,
..., p – 1}.
Die Kongruenzen (5) und (6) haben genau eine Lösung n = k in der Menge {0, ...,
p – 1}.
Dabei kann k folgendermaßen
berechnet werden: The linear congruence z + 2n ≡ 0 mod p (5) is equivalent to α + 2n ≡ 0 mod p (6) with α = z mod p ∈ {0, ..., p - 1}. The congruences (5) and (6) have exactly one solution n = k in the set {0, ..., p - 1}. K can be calculated as follows:
Die
sämtlichen
Lösungen
von (5) sind dann gegeben durch n = k + jp, j = 0, 1, .... Diese
elementaren aber wichtigen Fakten lassen sich in dem folgenden mathematischen
Lemma zusammenfassen:
Lemma 1: Sie z eine ungerade natürliche Zahl
und sei p ≥ 3
eine Primzahl. Sei α =
z mod p. Die durch p teilbaren Folgeglieder von sind
gegeben durch z + 2 (k + jp) , j = 0, 1, ...,wobei
k ∈ {0,
..., p – 1}
gegeben ist durch (7).All the solutions of (5) are then given by n = k + jp, j = 0, 1, .... These elementary but important facts can be summarized in the following mathematical lemma:
Lemma 1: Let z be an odd natural number and let p ≥ 3 be a prime number. Let α = z mod p. The dividable by p followers of are given by z + 2 (k + jp), j = 0, 1, ..., where k ∈ {0, ..., p - 1} is given by (7).
Zum
Erzeugen ist nun zu der vorgegebenen ungeraden Zufallszahl z eine
Folge von endlichen Bitfolgen σ1, σ2, ... der Länge L. Ein möglicher
Wert für
L wäre
2048. Die Folge σr heißt
rte charakteristische Bitfolge zur Zahl z. Die erste charakteristische
Bitfolge σ1 ist die konstante Folge, deren sämtliche
Glieder gleich 1 sind. Die weiteren charakteristischen Bitfolgen
werden rekursiv definiert.For generating, a sequence of finite bit sequences σ 1 , σ 2 ,... Of length L is now available for the given odd random number z. A possible value for L would be 2048. The sequence σ r is called rte characteristic bit sequence for the number z. The first characteristic bit sequence σ 1 is the constant sequence of which all the elements are equal to 1. The further characteristic bit sequences are defined recursively.
Sei
r ≥ 2 und
sei die
(r – 1)te
charakteristische Bitfolge. Zur Bestimmung von σr wird
die rte Primzahl pr benötigt. Sei αr =
z mod pr und sei kr die
eindeutige Lösung
der linearen Kongruenz αr + 2kr ≡ 0 mod
pr mit 0 ≤ kr ≤ pr – 1.
(Die Zahl kr kann durch (7) effizient berechnet
werden.) Die Glieder der Folge sind
dann Let r ≥ 2 and let the (r - 1) te characteristic bit sequence. For the determination of σ r the rte prime p r is required. Let α r = z mod p r and let k r be the unique solution of the linear congruence α r + 2k r ≡ 0 mod p r with 0 ≤ k r ≤ p r - 1. (The number k r can be efficiently solved by (7) calculated.) The members of the sequence are then
Für x ∈ R ist die
größte ganze
Zahl ≤ x.
Der folgende Satz 1 ist eine direkte Konsequenz aus dem genannten
Lemma 1.For x ∈ R is the largest integer ≤ x. The following Theorem 1 is a direct consequence of the said lemma 1.
Satz
1. Sei die
r-te charakteristische Bitfolge zur ungeraden Zahl z ∈ N. Dann
gilt für
n ∈ {0,
..., L – 1}:
Die Zahl z + 2n ist genau dann teilerfremd zu dem Produkt der ersten
r Primzahlen, wenn bn = 1 ist.1st sentence the rth characteristic bit sequence to the odd number z ∈ N. Then, for n ∈ {0, ..., L-1}, the number z + 2n is a prime alien to the product of the first r primes, if b n = 1.
Die
folgende Definition 1 vereinfacht die weiteren Erörterungen.The
the following definition 1 simplifies the further discussions.
Definition
1. Eine natürliche
Zahl n ≥ 2
heißt
Kandidat der Qualität
r ≥ 1, wenn
n teilerfremd ist zu dem Produkt der ersten r Primzahlen.definition
1. A natural one
Number n ≥ 2
is called
Candidate of quality
r ≥ 1, if
n is prime to the product of the first r primes.
Somit
sind ungerade Zahlen Testkandidaten der Qualität 1. Die nte Primzahl pn ist ein Kandidat der Qualität r für 1 ≤ r ≤ n – 1. Die
Zahl 55 ist ein Kandidat der Qualität 1 und 2, aber kein Kandidat
der Qualität
r ≥ 3. Dies
resultiert daher, dass die Zahl 55 nicht teilerfremd zur Primzahl
p3 = 5 ist.Thus odd numbers are test candidates of quality 1. The nth prime p n is a candidate of quality r for 1 ≤ r ≤ n-1. The number 55 is a candidate of quality 1 and 2, but not a candidate of quality r ≥ 3. This results from the fact that the number 55 is not prime to the prime number p 3 = 5.
Das
Konzept der charakteristischen Bitfolge ermöglicht es, Testkandidaten der
Qualität
r zu erzeugen, ohne dass deswegen alle Primzahlen p2,
..., pr in einem Halbleiterchip gespeichert
werden müssen.
Es muss nur jede einzelne dieser Primzahlen kurzzeitig zur Verfügung stehen.
Ein derartiges Vorgehen bedeutet insbesondere, dass zur Primzahlenberechnung
gemäß dem erfindungsgemäßen Ansatz
ein deutlich geringerer Speicher zur Verfügung stehen kann. Das Verändern der
Glieder der Bitfolge erfolgt hierbei vorzugsweise in der Einrichtung 706 zum Überprüfen und
Modifizieren der charakteristischen Bitfolge σ.The concept of the characteristic bit sequence makes it possible to generate test candidates of quality r, without having to store all primes p 2 ,..., P r in a semiconductor chip. Only every one of these primes needs to be available for a short time. Such a procedure means, in particular, that a significantly lower memory can be available for calculating the prime number according to the inventive approach. The changing of the elements of the bit sequence preferably takes place in the device 706 for checking and modifying the characteristic bit sequence σ.
Zur
Berechnung der charakteristischen Bitfolge σ ist zu sagen, dass die Berechnung
der r-ten charakteristischen Bitfolge vereinfacht werden kann, wenn
pr größer wird
als L. Tatsächlich
tritt die Situation bei dem hier vorgestellten Algorithmus schon
sehr bald ein. Sei die
(r – 1)
-te und die
r-te charakteristische Bitfolge. Insbesondere sind die beiden folgenden
Fälle hier
von Interesse.
Fall 1: pr ≥ L und αr =
0.
Dann ist b0 = 0 und bn =
an für
n = 1, 2 ,..., L – 1.
Fall
2 : pr ≥ 2L – 1 und αr ≥ 1 gerade
.
Dann ist bn = an für n = 0
, 1, ..., L – 1.To calculate the characteristic bit sequence σ, it can be said that the calculation of the rth characteristic bit sequence can be simplified if p r becomes greater than L. In fact, the situation occurs very soon in the algorithm presented here. Be the (r - 1) -th and the rth characteristic bit sequence. In particular, the following two cases are of interest here.
Case 1: p r ≥ L and α r = 0.
Then b 0 = 0 and b n = an for n = 1, 2, ..., L - 1.
Case 2: p r ≥ 2L - 1 and α r ≥ 1 even.
Then b n = an for n = 0, 1, ..., L - 1.
Beweis:Proof:
-
Ad Fall 1: Nach (7) impliziert αr =
0, dass kr = 0 ist. Somit folgt die Behauptung
aus (8).Ad Case 1: By (7), α r = 0 implies that k r = 0. Thus the claim follows from (8).
-
Ad Fall 2 : Aus (7) und αr ≤ pr – 1
folgt so dass die Behauptung aus
(8) folgt.Ad Case 2: From (7) and α r ≤ p r - 1 follows so that the statement from (8) follows.
Ende des BeweisesEnd of the proof
Für L = 2048
ist p310 = 2053 die erste Primzahl, die
größer oder
gleich L ist. Die erste Primzahl pr mit pr ≥ 2L – 1 ist
pr = p565 = 4099.For L = 2048, p 310 = 2053 is the first prime that is greater than or equal to L. The first prime p r with p r ≥ 2L-1 is p r = p 565 = 4099.
Das
in den vorausgehenden Ausführungen
beschriebenen Siebverfahren (d. h. das Verfahren zum Überprüfen einer
Aktuell-Testzahl
und zum Bereitstellen einer Zukunftstestzahl) wird vorzugsweise
in der Einrichtung 302 zum Überprüfen einer Aktuell-Testzahl
und der Einrichtung 304 zum Bereitstellen einer Zukunftstestzahl
ausgeführt.
Nachfolgend wird das Siebverfahren anhand eines Beispiels näher erläutert.The screening method described in the preceding embodiments (ie, the method for checking a current test number and providing a future test number) is preferably in the facility 302 to check a current test number and the device 304 to provide a future test count. The screening process will be explained in more detail below by means of an example.
Gegeben
sei die (Zufalls-) Zahl z = 81783 (die als Ausgangszahl AZ verwendet
wird). Gesucht sind die Testkandidaten der Qualität 8 unter
den Elementen z +2j, 0 ≤ j ≤ 9.Given the (random) number z = 81783 (which is used as the starting number AZ). We are looking for the test candidates of quality 8 among the elements z +2 j , 0 ≤ j ≤ 9.
Unter
Rückgriff
auf die in 8 dargestellte tabellarische
Darstellung von Zwischenergebnissen des Verfahrens zum Überprüfen einer
Aktuell-Testzahl und zum Bereitstellen einer Zukunftstestzahl ZTZ
soll in den nachfolgenden Ausführungen
das genannte Verfahren näher
beschrieben werden. Zur Initialisierung werden in jeder der Zellen
bj, 0 ≤ j ≤ 9, der Zeile
n = 1 in der 8 der Wert „1" eingetragen.Taking recourse to in 8th illustrated tabular representation of intermediate results of the method for checking a current test number and for providing a future test number ZTZ will be described in more detail in the following explanations of said method. For initialization, in each of the cells b j , 0 ≦ j ≦ 9, the row n = 1 in the 8th the value "1" is entered.
Berechnung
von Zeile 2:
p2 = 3, α2 =
z mod p2 = 0 und (7) liefert k2 =
0.
Aus (8) folgt b0 = b3 =
b6 = b9 = 0.Calculation of line 2:
p 2 = 3, α 2 = z mod p 2 = 0 and (7) returns k 2 = 0.
From (8) follows b 0 = b 3 = b 6 = b 9 = 0.
Berechnung
von Zeile n = 3: Aus (8) folgt b1 =
b6 = 0.Calculation of line n = 3: From (8) follows b 1 = b 6 = 0.
Berechnung
von Zeile n = 4: Aus (8) folgt b6 =
0.Calculation of line n = 4: From (8) follows b 6 = 0.
Das
Verfahren kann beliebig fortgesetzt werden. Zur Beantwortung der
eingangs gestellten Frage (d. h. zur Suche der Testkandidaten der
Qualität
8 unter dem Element z + 2j) braucht es an dieser Stelle aber nur bis
zur Zeile n = 8 fortgeführt werden.
Ein Blick auf die achte Zeile aus 8 zeigt,
dass die Zellen b4, b5,
b7 und b8 den Wert
1 enthalten. Daraus folgt, dass z + 8, z + 10, z + 14 und z + 16
Testkandidaten der Qualität
8 sind. Tatsächlich
ist z + 16 = 81799 eine Primzahl.The process can be continued as desired. To answer the question at the beginning (ie to search for the test candidates of quality 8 under the element z + 2j), it is only necessary to continue at this point up to line n = 8. A look at the eighth line out 8th shows that the cells b 4 , b 5 , b 7 and b 8 contain the value 1. It follows that z + 8, z + 10, z + 14 and z + 16 are quality 8 test candidates. In fact, z + 16 = 81799 is a prime number.
Man
betrachte, dass zur Berechnung der nten Zeile aus 8 nur
die Zahl z, die nte Primzahl pn und die
Einträge
pj, 0 ≤ j ≤ 9, der (n – 1)ten
Zeile erforderlich sind. Weitere Daten (insbesondere die Daten,
die zur Berechnung von vorangehenden Zeilen benötigt wurden) können gelöscht werden.
Man beachte auch, dass eine Primzahl pn,
die einmal bearbeitet wurde, in der Folge nicht mehr benötigt wird.
Hierdurch ergibt sich wiederum eine Einsparmöglichkeit des zur Primzahlenberechnung
notwendigen Speichers, was sich in einem geringeren notwendigen
Hardwareaufwand zur Primzahlgenerierung gemäß dem erfindungsgemäßen Ansatz vorteilhaft
auswirkt.Consider that to calculate the nth line out 8th only the number z, the nth prime p n and the entries p j , 0 ≤ j ≤ 9, the (n - 1) th line are required. Other data (in particular the data needed to calculate previous lines) can be deleted. Note also that a prime p n , which has been processed once, is no longer needed in the sequence. This in turn results in a savings of the memory necessary for primes calculation, which has a beneficial effect in a lower amount of hardware required for generating the prime number according to the inventive approach.
Im
folgenden soll näher
auf die Häufigkeit
der Primzahlen unter Testkandidaten der Qualität r eingegangen werden. Sei das
Produkt der ersten r Primzahlen und sei .
Angenommen es wird zufällig
eine ganze Zahl aus dem Intervall [0, N] oder [N/2, N] gewählt. Dann
beträgt
die Wahrscheinlichkeit, eine Primzahl zu erhalten etwa 1/ln N, wenn
N groß ist.
Wenn man sich bei der Wahl auf Testkandidaten der Qualität r beschränkt, steigt
die Wahrscheinlichkeit aus den Kandidaten eine Primzahl zu finden in
etwa um den Faktor dr/φ(dr)
an. Die Wahrscheinlichkeit, dass eine zufällig gewählte 1024 Bit große natürliche Zahl
der Qualität
r eine Primzahl ist, beträgt
somit ungefähr In the following, the frequency of the prime numbers under test candidates of quality r will be discussed in greater detail. Be the product of the first r primes and be , Suppose that an integer from the interval [0, N] or [N / 2, N] is chosen randomly. Then the probability of getting a prime is about 1 / ln N when N is large. If one limits oneself to the choice of test candidates of the quality r, the probability of finding a prime number increases by the factor d r / φ (d r ). The probability that a randomly selected 1024-bit natural number of quality r is a prime number is thus approximately
Der
reziproke Wert W(r, 1024)–1 entspricht der durchschnittlichen
Anzahl von Miller-Rabin-Tests, die ausgeführt werden müssen bis
man eine Primzahl gefunden hat, vorausgesetzt man testet Testkandidaten
der Qualität
r, die zufällig
gewählt
wurden. Letzteres trifft streng genommen auf den hier dargestellten
Algorithmus nicht zu. Nur z ist eine echte Zufallszahl. Andere potentielle
Testkandidaten wie z + 2, z + 4 usw. sind es nicht. Dennoch stellen
die in 9 tabellarisch dargestellten Werte einen guten
Anhaltspunkt für
dr/φ(dr), W(r,1024) und der Anzahl von notwendigen
Miller-Rabin-Tests dar.The reciprocal of W (r, 1024) -1 equals the average number of Miller-Rabin tests that must be performed until you find a prime, assuming you are testing random-selected test candidates of r. The latter, strictly speaking, does not apply to the algorithm presented here. Only z is a true random number. Other potential test candidates such as z + 2, z + 4, etc. are not. Nevertheless, the in 9 tabulated values give a good indication of d r / φ (d r ), W (r, 1024) and the number of Miller-Rabin tests required.
Die
Einträge
in der letzten Spalte der in 9 dargestellten
Tabelle beschreiben die Anzahl der im Durchschnitt erforderlichen
Miller-Rabin-Tests mit einer kleinen Basis b, die durchgeführt werden
müssen,
bis eine Zahl gefunden würde,
die den Test besteht. Für
diese Zahl müssen
dann noch zwei Miller-Rabin-Kontrolltests mit einer jeweils unterschiedlichen
zufälligen
Basis b' durchgeführt werden.
Diese beiden zusätzlichen Miller-Rabin-Tests
sind in der Tabelle aus 9 nicht berücksichtigt.The entries in the last column of in 9 The tables presented here describe the number of average required Miller-Rabin tests with a small base b that must be performed until a number is found that passes the test. For this number two Miller-Rabin control tests with a different random base b 'have to be performed. These two additional Miller-Rabin tests are out in the table 9 not considered.
Im
folgenden Abschnitt soll näher
auf die Erzeugung der Primzahlen p2, ...,
pr eingegangen werden. Um die Testkandidaten
der Qualität
r mit dem vorstehend skizzierten Siebverfahren unter Verwendung
der charakteristischen Bitfolge σ zu
ermitteln, müssen
die r – 1
Primzahlen p2, ..., pr zur
Verfügung
stehen. Je größer r ist,
um so weniger Miller-Rabin-Tests sind im Durchschnitt erforderlich,
wie aus der Tabelle in 9 ersichtlich ist. Wie groß r bei
dem erfindungsgemäßen Ansatz
tatsächlich
werden kann, lässt
sich durch Simulationen herausfinden. Ein in diesem Zusammenhang
sinnvoller Wert, dessen Erreichen auch für realistisch gehalten werden
kann, wäre
r = 6543.In the following section, the generation of the prime numbers p 2 , ..., p r will be described in more detail. In order to determine the test candidates of quality r with the screening method outlined above using the characteristic bit sequence σ, the r-1 primes p 2 ,..., P r must be available. The larger r is, the less Miller-Rabin tests are required on average, as shown in the table in 9 is apparent. How big can actually be in the inventive approach can be found out by simulations. A meaningful value in this context, the achievement of which can also be considered realistic, would be r = 6543.
Das
Besondere an dem Wert r = 6543 ist die Tatsache, dass die Zahl r
= 6543 die größte natürliche Zahl
ist, für
die ein Produkt von Primzahlen p6542 = 65521
und p6543 = 65543 noch kleiner als 232 ist. Das heißt, das Produkt p6542p6543 hat vier Byte, während das Produkt p6543p6544 bereits
eine Länge
von mehr als vier Byte hat.The special feature of the value r = 6543 is the fact that the number r = 6543 is the largest natural one Number is for which a product of primes p 6542 = 65521 and p 6543 = 65543 is still less than 2 32 . That is, the product p 6542 p 6543 has four bytes, whereas the product p 6543 p 6544 already has a length of more than four bytes.
Die
ersten 6543 (oder noch mehr) Primzahlen können aufgrund des hierzu notwendigen
Speicherbedarfs auf dem Halbleiterchip nicht permanent gespeichert
werden. Das müssen
sie aber gemäß dem erfindungsgemäßen Ansatz
auch nicht. Es genügt
die ersten 55 Primzahlen permanent vorrätig zu haben. Streng genommen
genügt
es, die ersten 54 Primzahlen p2, ..., p55, zu speichern. Die erste Primzahl p1 = 2 wird nicht benötigt. Es ist jedoch vorteilhaft
auch die 56-te Primzahl p56 abzuspeichern,
was in den nachfolgenden Ausführungen
noch deutlich wird. Aus der in 10 abgebildeten
tabellarischen Darstellung sind die ersten 56 Primzahlen zu entnehmen.The first 6543 (or even more) primes can not be stored permanently on the semiconductor chip due to the memory requirement required for this purpose. But they do not have according to the approach of the invention also not. It is enough to have the first 55 primes permanently in stock. Strictly speaking, it is sufficient to store the first 54 primes p 2 , ..., p 55 . The first prime p 1 = 2 is not needed. However, it is also advantageous to store the 56th prime p 56 , which will become clearer in the following explanations. From the in 10 The tabular representation shows the first 56 primes.
Mit
dem sogenannten „Sieb
des Eratosthenes" können aus
den ersten 55 Primzahlen die ersten 653 Primzahlen berechnet werden.
Dies geschieht vorzugsweise im Hauptprozessor, wobei beispielsweise
immer nur 100 bis 500 Primzahlen auf einmal berechnet werden. Diese
Primzahlen werden dann dazu benutzt, um die Qualität der Testkandidaten
zu erhöhen.
Danach werden sie nicht mehr benötigt
und gelöscht,
wodurch sich die bereits genannte Einsparmöglichkeit an Speicherbedarf
ergibt.With
the so-called "sieve
of Eratosthenes "can
the first 55 primes the first 653 primes are calculated.
This is preferably done in the main processor, for example
always only 100 to 500 primes are calculated at once. These
Primes are then used to determine the quality of the test candidates
to increase.
After that they are no longer needed
and deleted,
resulting in the aforementioned savings on storage requirements
results.
Um
z. B. alle Primzahlen zwischen p56 = 263
und 2000 zu berechnen, wird folgenderweise vorgegangen. Man betrachte
die ungeraden Zahlen 265,
267, 269, ..., 1997, 1999. (9) To z. For example, to calculate all primes between p 56 = 263 and 2000, the procedure is as follows. Consider the odd numbers 265, 267, 269, ..., 1997, 1999. (9)
Man
entferne aus der Liste (9) alle Vielfachen von p2 =
3, p3 = 5, ..., p14 =
43. Die zurückbleibenden Zahlen
sind alle Primzahlen zwischen 264 und 2000. Das sind die 247 Primzahlen
p57, ..., p303.
Eine derartige Vorgehensweise wird als „Sieb des Eratosthenes" bezeichnet.Remove from the list (9) all multiples of p 2 = 3, p 3 = 5, ..., p 14 = 43. The remaining numbers are all primes between 264 and 2000. These are the 247 primes p 57,. .., p 303 . Such a procedure is referred to as the "strainer of Eratosthenes".
Abschließend sei
noch bemerkt, dass die die
dritte Fermatzahl und die
vierte Fermatzahl ist.Finally, it should be noted that the the third Fermatzahl and the fourth Fermatzahl is.
Im
folgenden soll näher
auf eine Hardware-optimierte und somit schnelle Reduktion von z
modulo pi eingegangen werden. Da die vorgegebene
Zufallszahl z mit 1024 Binärstellen
sehr groß ist,
ist der Hauptprozessor oftmals für
die Berechnung der Elemente αi = z mod pi nicht
prädestiniert.
Hierfür
ist meist der eigens für
kryptographische Rechenschritte ausgelegte Coprozessor besser geeignet.In the following, a hardware-optimized and thus rapid reduction of z modulo p i will be discussed in greater detail. Since the given random number z with 1024 binary digits is very large, the main processor is often not predestined for the calculation of the elements α i = z mod p i . For this purpose, the coprocessor designed especially for cryptographic computation steps is usually better suited.
Die
Elemente αi = z mod pi werden
jedoch nicht ausschließlich
im Coprozessor berechnet. Der Reduktionsprozeß z mod pi geschieht
vorzugsweise in zwei Arbeitsgängen.
Der erste Arbeitsgang findet vorzugsweise im Coprozessor statt,
der zweite Arbeitsgang findet vorzugsweise im Hauptprozessor statt.
Die Vorgehensweise stützt
sich hierbei auf ein folgendes Lemma 2, auf dessen elementaren Beweis
an dieser Stelle verzichtet wird.However, the elements α i = z mod p i are not calculated exclusively in the coprocessor. The reduction process z mod p i is preferably done in two operations. The first operation preferably takes place in the coprocessor, the second operation preferably takes place in the main processor. The procedure is based on a following lemma 2, the elementary proof of which is omitted here.
Lemma
2. Sei z ∈ Z
und seien a, b ∈ N
mit a | b (d. h. a teilt b). Dann gilt z mod
a = (z mod b) mod a. Lemma 2. Let z ∈ Z and be a, b ∈ N with a | b (ie a divides b). Then applies z mod a = (z mod b) mod a.
Das
Lemma 2 besagt, dass z mod a in zwei Schritten berechnet werden
kann. Zuerst wird p = z mod b berechnet. Das Ergebnis p ist eine
ganze Zahl zwischen 0 und b – 1.
Dann wird σ =
p mod a berechnet. Man stelle sich vor, dass z eine 1024-Bit-Zahl (128 Byte) ist,
dass b höchstens
4 Byte und a höchstens
2 Byte hat. Eine erste Reduktion p = z mod b würde man dann beispielsweise
im Coprozessor ausführen,
während
eine zweite Reduktion σ =
p mod a im Hauptprozessor ausgeführt
werden kann.The
Lemma 2 states that z mod a are calculated in two steps
can. First, p = z mod b is calculated. The result p is a
integer between 0 and b - 1.
Then σ =
p mod a is calculated. Imagine that z is a 1024-bit number (128 bytes),
that at most b
4 bytes and a maximum
Has 2 bytes. A first reduction p = z mod b would then be, for example
in the coprocessor,
while
a second reduction σ =
p mod a executed in the main processor
can be.
Um
dieses Prinzip für
die Berechnung der αi = z mod pi anwenden
zu können,
werden die Primzahlen p2, p3,
..., p6543 in Produkte qj zu
j e vier Byte zusammengefaßt
. Es gilt also qj < 232 für alle j.In order to be able to apply this principle for the calculation of α i = z mod p i , the primes p 2 , p 3 ,..., P 6543 are combined into products q j of four bytes each. So q j <2 32 for all j.
Dabei
ist q1 = p2p3 ... p10 das Produkt
aus den ersten neun ungeraden Primzahlen, Where q 1 = p 2 p 3 ... p 10 is the product of the first nine odd prime numbers,
Für n = 5,
6, ..., 11 besteht qn aus vier Primfaktoren: qn = p4n+6p4n+7p4n+8p4n+9. For n = 5, 6, ..., 11, q n consists of four prime factors: q n = p 4n + 6 p 4n + 7 p 4n + 8 p 4n + 9 ,
Für n = 12,
13, ..., 79 besteht qn aus drei Primfaktoren: qn = p3n+18p3n+19p3n+20. For n = 12, 13, ..., 79, q n consists of three prime factors: q n = p 3n + 18 p 3n + 19 p 3n + 20 ,
Für n = 80,
81, ..., 3222 besteht qn aus zwei Primfaktoren: qn = p2n+98p2n+99. For n = 80, 81, ..., 3222, q n consists of two prime factors: q n = p 2n + 98 p 2n + 99 ,
Eine
Berechnung von αi = z mod pi geschieht
dann beispielsweise wie folgt:
- 1. Bestimme
dasjenige j mit pi | qj;
- 2. Berechne im Coprozessor βj = z mod qj;
- 3 . Berechne im Hauptprozessor αi = βj mod
pi.
A calculation of α i = z mod p i then happens, for example, as follows: - 1. Determine that j with p i | qj ;
- 2. Calculate in the coprocessor β j = z mod q j ;
- 3. Calculate in the main processor α i = β j mod p i .
Nachfolgend
wird das erfindungsgemäße Verfahren
an Hand eines bevorzugten Ausführungsbeispiels des
zu realisierenden Algorithmus näher
beschrieben. Hierzu wird auf die Schritte des in den 11A bis 11D dargestellten
Ablaufdiagramms Bezug genommen. Der Algorithmus kann in drei Phasen
eingeteilt wer den. In der ersten Phase wird ein Testkandidat der
Qualität
56 erzeugt und dieser dann einem Miller-Rabin-Test (abgekürzt als
M-R-Test bezeichnet) unterworfen. In der zweiten Phase werden Testkandidaten
der Qualität
57 bis 257 erzeugt. In der dritten Phase werden Testkandidaten der
Qualität
258 bis 6543 erzeugt. Ferner werden in der Beschreibung des Algorithmus
sowie in den 11A bis 11D die
Abkürzungen
HP für
den Hauptprozessor und die Abkürzung
CP für
den Coprozessor im folgenden verwendet.The method according to the invention will be described in more detail below with reference to a preferred embodiment of the algorithm to be implemented. For this, the steps in the 11A to 11D Referring to the flowchart shown. The algorithm can be divided into three phases. In the first phase, a test candidate of quality 56 is generated and then subjected to a Miller-Rabin test (abbreviated as MR test). In the second phase test candidates of quality 57 to 257 are generated. In the third phase test candidates of the quality 258 to 6543 are generated. Furthermore, in the description of the algorithm as well as in the 11A to 11D the abbreviations HP for the main processor and the abbreviation CP for the coprocessor are used in the following.
Zunächst wird
die erste Phase des Algorithmus näher beschrieben. In einem ersten
Schritt 1102, der in 11A dargestellt
ist, erzeugt ein Zufallszahlengenerator eine große ungerade Zufallszahl z,
die eine Länge
von größer als
200 Bit, beispielsweise 1024 Bit umfasst. Hierbei kann beispielsweise
die Einrichtung 102 zum Bestimmen einer Ausgangszahl AZ
aus 1 den Zufallszahlengenerator umfassen, wobei die
1024 Bit große
ungerade Zufallszahl z der Ausgangszahl AZ entspricht.First, the first phase of the algorithm is described in more detail. In a first step 1102 who in 11A is shown, a random number generator generates a large odd random number z, which has a length greater than 200 bits, for example 1024 bits. Here, for example, the device 102 for determining an initial number AZ 1 comprise the random number generator, wherein the 1024-bit odd-numbered random number z corresponds to the initial number AZ.
In
einem hieran anschließenden
zweiten Schritt 1104 werden beispielsweise im Hauptprozessor
(HP) aus den permanent gespeicherten 55 Primzahlen p2 =
3, p3 = 5, ..., p56 =
263 wie vorstehend beschrieben 12 Produkte q1,
q2, ..., q12 berechnet.
Die Berechnung der Primzahlen kann beispielsweise in der Einrichtung 504 zum
Bestimmen eines Produktes erfolgen.In a subsequent second step 1104 For example, 12 products q 1 , q 2 ,..., q 12 are calculated in the main processor (HP) from the permanently stored 55 primes p 2 = 3, p 3 = 5,..., p 56 = 263 as described above. The calculation of the primes may, for example, in the device 504 to determine a product.
Hieran
anschließend
werden in einem dritten Schritt 1106 des in 11A dargestellten Diagramms vorzugsweise im Coprozessor
(CP) die Elemente βj = z mod qj, 1 ≤ j ≤ 12, berechnet,
was beispielsweise in der Einrichtung 506 zum Reduzieren
der TZ erfolgen kann. Hierbei ist anzumerken, dass wie zuvor beschrieben
wurde, alle βj und qj vorzugsweise
höchstens
vier Byte haben und somit eine Länge
haben, durch die eine Verarbeitung von βj und
qi im Hauptprozessor numerisch effizient
möglich
ist.This will be followed by a third step 1106 of in 11A represented in the coprocessor (CP), the elements β j = z mod q j , 1 ≤ j ≤ 12, calculated, for example, in the device 506 can be done to reduce the TZ. It should be noted that, as previously described, all β j and q j are preferably at most four bytes and thus have a length that allows numerically efficient processing of β j and q i in the main processor.
In
einem hieran anschließenden
vierten Schritt 1108 des in 11A dargestellten
Diagramms werden vorzugsweise im Hauptprozessor Elemente αi =
z mod pi, 2 ≤ i ≤ 56, folgendermaßen berechnet: In a subsequent fourth step 1108 of in 11A In the diagram shown, preferably in the main processor, elements α i = z mod p i , 2 ≦ i ≦ 56 are calculated as follows:
Dieses
Berechnen kann vorzugsweise in der Einrichtung 508 zum
Reduzieren der Variablen β erfolgen.This computing may preferably be done in the facility 508 for reducing the variable β.
In
einem hieran anschließenden
fünften
Schritt 1110 des in 11A dargestellten
Diagramms werden vorzugsweise im Hauptprozessor aus den Elementen αi und
pi gemäß der Vorschrift
(7) die zugehörigen
Elemente ki berechnet für i = 2, 3, ..., 56. Eine derartige
Berechnung der Elemente ki erfolgt vorzugsweise
in der in 7 dargestellten Einrichtung 704 zum
Berechnen einer Variablen ki.In a subsequent fifth step 1110 of in 11A chart shown are preferably in the main processor of the elements α i and i p according to the method (7) associated elements k i calculated for i = 2, 3, ..., 56. Such a calculation of the elements i k is preferably carried out in the in 7 illustrated device 704 for calculating a variable k i .
In
einem hieran anschließenden
sechsten Schritt 1112 wird mit Hilfe von ki und
pi gemäß (8) die
charakteristische Bitfolge bestimmt.
Dieses Bestimmen der charakteristischen Bitfolge wird vorzugsweise
in der in 7 dargestellten Einrichtung 706 zum Überprüfen und
Modifizieren der charakteristischen Bitfolge σ durchgeführt.In a subsequent sixth step 1112 becomes the characteristic bit sequence by means of k i and p i according to (8) certainly. This determination of the characteristic bit sequence is preferably performed in the in 7 illustrated device 706 for checking and modifying the characteristic bit sequence σ.
Aus
den bisher ausgeführten
Schritten ergeben sich Berechnungsergebnisse, die, wie in 11A dargestellt, als Datensatz 1 bezeichnet werden
können.From the steps performed so far result computation results, which, as in 11A represented as record 1 can be called.
In
einem hieran anschließenden
siebten Schritt 1114 des in 11B dargestellten
Diagramms werden die Berechnungsergebnisse des Datensatzes 1 weiter
verarbeitet, wobei ein Bestimmen des kleinsten Indexes j erfolgt,
für den
bj = 1 ist mit j ∈ {0, 1, ..., L – 1}. Mit
anderen Worten ausgedrückt
ist das Element bj das erste von 0 verschiedene
Element in der Folge σ56 =
b0, b1, ..., bL-1. In a subsequent seventh step 1114 of in 11B As shown in the diagram, the calculation results of the data set 1 are further processed, whereby the smallest index j is determined for which b j = 1 with j ∈ {0, 1,..., L - 1}. In other words, the element b j is the first element other than 0 in the sequence σ 56 = b 0 , b 1 , ..., b L-1 ,
Der
siebte Schritt 1114 des Bestimmen des kleinsten Indexes
für den
bj = 1 gilt, erfolgt vorzugsweise in der
in 7 dargestellten Einrichtung 708 zum Bestimmen
einer Zukunftstestzahl aus der überprüften und modifizierten
Bitfolge σ'.The seventh step 1114 of determining the smallest index for the b j = 1, is preferably in the in 7 illustrated device 708 for determining a future test number from the checked and modified bit sequence σ '.
In
einem nachfolgenden achten Schritt 1116 des in 11B dargestellten Diagramms erfolgt ein Berechnen
der Zahl z + 2j für
das aus dem siebten Schritt 1114 bestimmte j. Diese Zahl
ist teilerfremd zu den ersten 56 Primzahlen. Der achte Schritt 1116 kann
wiederum in der Einrichtung zum Bestimmen einer Zukunftstestzahl 708 aus
der überprüften und
modifizierten Bitfolge σ' erfolgen wobei die
Zahl z + 2j nunmehr der Zukunftstestzahl ZTZ entspricht.In a subsequent eighth step 1116 of in 11B In the diagram shown, the number z + 2j is calculated for that from the seventh step 1114 certain j. This number is prime to the first 56 primes. The eighth step 1116 may turn in the device for determining a future test number 708 from the checked and modified bit sequence σ ', whereby the number z + 2j now corresponds to the future test number ZTZ.
In
einem hieran anschließenden
neunten Schritt 1118 des in 11B dargestellten
Diagramms erfolgt ein Starten eines Miller-Rabin-Tests mit kleiner
Basis b in dem Coprozessor für
die Zahl z + 2j. Hierbei wird die Zahl z + 2j als Testzahl gemäß der Darstellung
in 2 von der Einrichtung 202 zum Überprüfen einer
Aktuell-Testzahl oder zum Bereitstellen einer Zukunftstestzahl zu
der Einrichtung 204 zum Testen übertragen, in welcher der Miller-Rabin-Test
durchgeführt
wird. Ferner kann durch das geeignete Setzen des ersten Statussignals
PZ1 der Miller-Rabin-Test in der Einrichtung 204 zum Testen
gestartet werden.In a subsequent ninth step 1118 of in 11B In the diagram shown, a low base Miller Rabin test b is started in the coprocessor for the number z + 2j. Here, the number z + 2j as a test number as shown in 2 from the institution 202 for checking a current test number or providing a future test number to the device 204 for testing in which the Miller-Rabin test is performed. Further, by appropriately setting the first status signal PZ1, the Miller Rabin test in the device 204 to be started for testing.
Mit
einer Abarbeitung des neunten Schrittes 1118 ist die erste
Phase des zu realisierenden Algorithmus beendet und die zweite Phase
des Algorithmus wird gestartet.With a processing of the ninth step 1118 the first phase of the algorithm to be realized is finished and the second phase of the algorithm is started.
In
einem 10. Schritt 1120 des in 11B dargestellten
Diagramms werden vorzugsweise im Hauptprozessor mit dem Sieb des
Eratosthenes die nächsten
201 Primzahlen p57, p58,
..., p257, berechnet und in 67 Tripel {p57, p58, p59}, ..., {p60, p61, p62}, ..., {p255, p256, p257} unterteilt. Diesen Tripeln sind die
Produkte q13, q14,
..., q79 zugeordnet. Hierbei erfolgt das
Berechnen der nächsten
Primzahlen vorzugsweise in der in 4 dargestellten
Einrichtung 404 zum Bereitstellen von Primzahlen pj sowie das Unterteilen der Primzahl in die
64 Tripel vorzugsweise in der in 5 dargestellten
Einrichtung 502 zum Auswählen einer Anzahl von Primzahlen
pi aus den Primzahlen pj.In a 10th step 1120 of in 11B in the main processor with the sieve of the Eratosthenes, the next 201 primes p 57 , p 58 ,..., p 257 are preferably calculated, and 67 triples {p 57 , p 58 , p 59 },..., {p 60 , p 61 , p 62 }, ..., {p 255 , p 256 , p 257 }. These triples are associated with the products q 13 , q 14 ,..., Q 79 . In this case, the calculation of the next primes preferably takes place in the in 4 illustrated device 404 for providing primes p j and dividing the prime into the 64 triplets preferably in the in 5 illustrated device 502 for selecting a number of primes p i from the primes p j .
In
einem 11. Schritt 1122 des in 11B dargestellten
Diagramms werden im Hauptprozessor die Primzahlen des ersten Tripels
miteinander multipliziert so dass eine Variable q13 =
p57p58p59 erhalten
wird. Dieses Multiplizieren erfolgt vorzugsweise in der in 5 dargestellten
Einrichtung 504 zum Bestimmen eines Produktes q aus den
ausgewählten
Primzahlen pi.In an 11th step 1122 of in 11B In the diagram shown, the prime numbers of the first triple are multiplied together in the main processor so that a variable q 13 = p 57 p 58 p 59 is obtained. This multiplication is preferably carried out in the in 5 illustrated device 504 for determining a product q from the selected prime numbers p i .
In
einem an den 11. Schritt 1122 anschließenden 12. Schritt 1124 des
in 11B dargestellten Diagramms erfolgt ein Berechnen
von β13 = z mod q13 im
Coprozessor. Dieses Berechnen erfolgt vorzugsweise in der in 5 dargestellten
Einrichtung 506 zum Reduzieren der Testzahl TZ unter Verwendung
des Produktes q. Hierbei wird zugleich ausgenutzt, dass die große Testzahl
TZ (die der Zahl z entspricht) numerisch effizient reduziert werden
kann, da der Coprozessor für
die Berechnung mit großen
Zahlen (insbesondere ein modulares Reduzieren von großen Zahlen)
besonders ausgebildet ist.In one at the 11th step 1122 subsequent 12th step 1124 of in 11B In the diagram shown, β 13 = z mod q 13 is calculated in the coprocessor. This calculation is preferably carried out in the in 5 illustrated device 506 for reducing the test number TZ using the product q. At the same time, it is exploited that the large test number TZ (corresponding to the number z) can be efficiently reduced numerically, since the coprocessor is specially designed for the calculation with large numbers (in particular a modular reduction of large numbers).
In
einem an den 12. Schritt 1124 anschließenden 13. Schritt 1126 des
in 11B dargestellten Diagramms werden im Hauptprozessor
die Elemente αi = z mod pi, i =
57, 58, 59, durch folgende Berechnungsvorschrift berechnet: In one at the 12th step 1124 subsequent 13th step 1126 of in 11B In the diagram shown, the elements α i = z mod p i , i = 57, 58, 59 are calculated in the main processor by the following calculation rule:
Das
Berechnen der Elemente αi erfolgt hierbei vorzugsweise in der in 5 dargestellten
Einrichtung 508 zum Reduzieren von β unter Verwendung der Primzahlen
pi, um eine Variable αi zu
erhalten.The calculation of the elements α i is preferably carried out in the in 5 illustrated device 508 for reducing β using the prime numbers p i to obtain a variable α i .
In
einem an den 13. Schritt 1126 anschließenden 14. Schritt 1128 des
in 11B dargestellten Diagramms werden im Hauptprozessor
aus den Elementen αi und pi, i = 57,
58, 59 gemäß den Vorschriften
(7) die Variablen k57, k58 und
k59 berechnet. Dieses Berechnen erfolgt
vorzugsweise in der in 7 dargestellten Einrichtung 704 zum
Berechnen einer Variablen ki.In one at the 13th step 1126 subsequent 14th step 1128 of in 11B In the main processor, from the elements α i and p i , i = 57, 58, 59 according to the rules (7), the variables k 57 , k 58 and k 59 are calculated. This calculation is preferably carried out in the in 7 illustrated device 704 for calculating a variable k i .
In
einem an den 14. Schritt 1128 anschließenden 15. Schritt 1130 des
in 11B dargestellten Diagramms wird im Hauptprozessor
mit Hilfe der ki und pi,
i = 57, 58, 59, gemäß (8) die
charakteristische Bitfolge bestimmt.
Dieses Bestimmen erfolgt vorzugsweise in der in 7 dargestellten
Einrichtung 706 zum Überprüfen und
Modifizieren der charakteristischen Bitfolge σ.In one at the 14th step 1128 subsequent 15th step 1130 of in 11B The diagram shown in the main processor with the aid of k i and p i , i = 57, 58, 59, according to (8) the characteristic bit sequence certainly. This determination preferably takes place in the in 7 illustrated device 706 for checking and modifying the characteristic bit sequence σ.
Aus
den bereits ausgeführten
Schritten ergeben sich Berechnungsergebnisse, die als Datensatz 2 bezeichnet
werden können,
so wie es in 11B dargestellt ist.The steps that have already been performed result in calculation results that are used as a data record 2 can be designated, as it is in 11B is shown.
In
einem an den 15. Schritt 1130 anschließenden 16. Schritt 1132,
der in dem Diagramm aus 11C dargestellt
ist, werden die Berechnungsergebnisse aus dem Datensatz 2 weiter
verarbeitet, wobei j der im siebten Schritt 1114 bestimmte
Index sei. Betrachtet werde ein Folgeglied cj von .
In einem ersten Fall sei cj gleich 0. In
diesem ersten Fall sei das kleinste j' ∈ {0,
1, ..., L – 1}
mit cj' =
1 zu bestimmen, wobei klarerweise gilt, dass j' > j
ist. Weiterhin ist eine neue Testzahl z + 2j' zu berechnen. Außerdem ist der im Coprozessor laufende
Miller-Rabin-Test abzubrechen und für die neue Testzahl z + 2j' ein neuer Miller-Rabin-Test
zu starten. Diese neue Testzahl ist in diesem ersten Fall ein Testkandidat
der Qualität
59. In einem zweiten Fall ist cj gleich 1.
In diesem zweiten Fall soll mit einem nachfolgend dargestellten
17. Schritt 1134 fortgefahren werden.In one at the 15th step 1130 subsequent 16th step 1132 that in the diagram 11C is shown, the calculation results from the data set 2 are further processed, where j in the seventh step 1114 certain index. Consider a follower c j of , In a first case, let c j be 0. In this first case, we have to determine the smallest j '∈ {0, 1, ..., L - 1} with c j' = 1, where it is clear that j '> j is. Furthermore, a new test number z + 2j 'is to be calculated. In addition, the coprocessor running Miller Rabin test abort and start for the new test number z + 2j 'a new Miller Rabin test. In this second case, this new test number is a test candidate of quality 59. In a second case, c j is 1. In this second case, a step 17 is shown below 1134 be continued.
Der
16. Schritt 1132 wird vorzugsweise in der in 7 dargestellten
Einrichtung 708 zum Bestimmen einer Zukunftstestzahl ZTZ
aus der überprüften und
modifizierten Bitfolge σ' durchgeführt, wobei
die Zukunftstestzahl gleich der neuen Testzahl z + 2j' ist. Die neue Testzahl
liegt damit größenordnungsmäßig im Bereich der
ursprünglichen
Testzahl, da lediglich eine zur Aktuell-Testzahl im wesentlichen
benachbarte Zukunftstestzahl gewählt
wird, für
die eine Teilerfreiheit zu bereits vorausgehend ermittelten Primzahlen
sichergestellt ist. Ferner wird über
das erste Statussignal PZ1 ausgegeben, das die ursprüngliche
Testzahl, für
die in der in 2 dargestellten Einrichtung 204 zum
Testen ein Miller-Rabin-Test läuft
keine Primzahl ist (PZ1 = –1)
(Fall 1) wobei die Einrichtung 206 zum Erkennen ausgebildet
ist, ansprechend auf das erste Statussignal PZ1 ein zweites Haltesignal
STOP2 auszugeben, um den in der Einrichtung 204 zum Testen
laufenden Miller-Rabin-Test zu stoppen. Durch die Einrichtung 202 zum Überprüfen einer
Aktuell-Testzahl oder zum Bereitstellen einer Zukunftstestzahl wird
bereits die Zukunftstestzahl ZTZ (d. h. die neue Testzahl z + 2j') über den
ersten Ausgang des Signals TZ der Einrichtung 204 zum Testen übermittelt,
wobei über
das erste Statussignal PZ1 (beispielsweise bei dem Übergang
von einem negativen Status PZ1 = –1 in einen „undefinierten" Status PZ1 = 0)
ein neuer Miller-Rabin-Test gestartet werden kann.The 16th step 1132 is preferably in the in 7 illustrated device 708 for determining a future test number ZTZ from the checked and modified bit sequence σ ', the future test number being equal to the new test number z + 2j'. The new test number is therefore of the order of magnitude in the area of the original test number, since only one future test number essentially adjacent to the current test number is selected, for which a divisor freedom to previously determined primes is ensured. Furthermore, output is made via the first status signal PZ1, which corresponds to the original test number for which in 2 illustrated device 204 for testing a Miller-Rabin test is not running prime (PZ1 = -1) (case 1) where the device 206 is designed to detect, in response to the first status signal PZ1 output a second stop signal STOP2 to the in the device 204 to stop testing ongoing Miller-Rabin test. By the device 202 to verify a current test count or to provide a future test count, the future test count ZTZ (ie the new test count z + 2j ') already passes over the first output of the device's TZ signal 204 for testing, wherein via the first status signal PZ1 (for example, in the transition from a negative status PZ1 = -1 to an "undefined" status PZ1 = 0), a new Miller-Rabin test can be started.
In
einem an den 16. Schritt 1132 anschließenden 17. Schritt 1134 erfolgt
ein Wiederholen der Schritte 11 bis 16 für jedes der restlichen 66 Tripel
aus dem 10. Schritt 1120, wobei die Einrichtung 512 zum
Zählen
die Abarbeitung der Schritte 11 bis 16 überwacht.In one at the 16th step 1132 subsequent 17th step 1134 the steps 11 to 16 are repeated for each of the remaining 66 triples from the 10th step 1120 , where the device 512 to monitor the processing of steps 11 to 16 monitored.
Sobald
ein Miller-Rabin-Test im Coprozessor beendet ist, wird verfahren,
wie im an den 17. Schritt anschließenden 18. Schritt 1136 des
in 11C dargestellten Diagramms beschrieben ist:
Fall
1: Die getestete Zahl (Testzahl) hat den Miller-Rabin-Test bestanden.Once a Miller Rabin test is completed in the coprocessor, the procedure is as in step 18 following step 17 1136 of in 11C described diagram is described:
Case 1: The tested number (test number) has passed the Miller-Rabin test.
Es
werden zwei weitere Miller-Rabin-Tests für diese Testzahl durchgeführt. Während der
Miller-Rabin-Test, den die Testzahl bereits bestanden hat, mit einer
kleinen Basis b durchgeführt
wurde, werden diese beide Miller-Rabin-Tests mit unterschiedlichen
Zufallsbasen b' durchgeführt. Wenn
die Testzahl die zwei zusätzlichen
Miller-Rabin-Tests besteht, wird sie als Primzahl erkannt und ausgegeben
und der Algorithmus an dieser Stelle gestoppt. Andernfalls so vor
gegangen wie in einem zweiten Fall des 18. Schrittes 1136 beschrieben
wird.Two more Miller-Rabin tests will be performed on this test count. While the Miller-Rabin test, which the test count has already passed, was performed on a small base b, both Miller-Rabin tests are performed on different random bases b '. If the test count passes the two additional Miller-Rabin tests, it is recognized as a prime number and output and the algorithm stopped there. Otherwise, the procedure is the same as in a second case of the 18th step 1136 is described.
Fall
2: Die getestete Zahl (Testzahl) hat den Miller-Rabin-Test nicht bestanden.case
2: The tested number (test number) failed the Miller-Rabin test.
Man
betrachte im Hauptprozessor die aktuelle charakteristische Bitfolge .
Sei j der Index des ersten von 0 verschiedenen Folgengliedes dj. Berechne z + 2j und starte im Coprozessor
einen neuen Miller-Rabin-Test für
die Testzahl z + 2j.Consider the current characteristic bit sequence in the main processor , Let j be the index of the first of 0 different sequence terms d j . Compute z + 2j and start a new Miller-Rabin test for the test number z + 2j in the coprocessor.
Der
erste Fall des 18. Schrittes 1136 kann beispielsweise in
der Einrichtung 204 zum Testen durchgeführt werden. Hierzu kann die
Einrichtung 204 zum Testen durch das zweite Statussignal
PZ2 der Einrichtung 206 zum Erkennen signalisieren, dass
die Testzahl TZ den Miller-Rabin-Test sowie die zwei weiteren Miller-Rabin-Tests
bestanden hat und somit als Primzahl (oder als Zahl, die mit einer
hohen Wahrscheinlichkeit eine Primzahl ist) anzusehen ist. Die Einrichtung 206 zum
Erkennen kann weiterhin über
das erste Haltesignal STOP1 und das zweite Haltesignal STOP2 einen
Betrieb der Einrichtung 202 zum Überprüfen einer Aktuell-Testzahl
oder zum Bereitstellen einer Zukunftstestzahl sowie der Einrichtung 204 zum
Testen beenden und die Testzahl als Primzahl über den zweiten Ausgang PZout
ausgeben.The first case of the 18th step 1136 For example, in the facility 204 for testing. For this purpose, the device 204 for testing by the second status signal PZ2 of the device 206 to recognize that the test number TZ has passed the Miller-Rabin test and the two other Miller-Rabin tests and thus is to be regarded as a prime number (or a number that is likely to be a prime number). The device 206 for detecting can continue on the first stop signal STOP1 and the second stop signal STOP2 an operation of the device 202 to verify a current test count or to provide a future test count and setup 204 for testing and output the test number as a prime number via the second output PZout.
Der
zweite Fall kann in der Einrichtung 204 zum Testen, der
Einrichtung 206 zum Erkennen sowie der Einrichtung 202 zum Überprüfen einer
Aktuell-Testzahl oder zum Bereitstellen einer Zukunftstestzahl abgearbeitet
werden. Hierzu wird über
das zweite Statussignal PZ2 von der Einrichtung zum Testen der
Einrichtung 206 zum Erkennen signalisiert, dass die Testzahl
TZ den Miller-Rabin-Test nicht bestanden hat und über das erste
Haltesignal STOP1 somit der Einrichtung zum Überprüfen 202 einer Aktuell-Testzahl
oder zum Bereitstellen einer Zukunftstestzahl signalisiert, dass
eine Zukunftstestzahl z + 2j zu berechnen ist und im Coprozessor
ein neuer Miller-Rabin-Test für
diese neue Zukunftstestzahl z + 2j zu starten ist.The second case may be in the facility 204 for testing, the device 206 to recognize and to set up 202 to verify a current test count or provide a future test count. This is done via the second status signal PZ2 from the device for testing the device 206 for detection signals that the test number TZ has not passed the Miller-Rabin test and thus the means for checking via the first stop signal STOP1 202 of a current test count or providing a future test number signals that a future test count z + 2j is to be calculated and a new Miller Rabin test for this new future test count z + 2j is to be started in the coprocessor.
Mit
einer Abarbeitung des 18. Schrittes 1136 ist die zweite
Phase des Algorithmus beendet und die dritte Phase wird gestartet.With a processing of the 18th step 1136 the second phase of the algorithm is finished and the third phase is started.
Die
dritte Phase des als bevorzugtes Ausführungsbeispiel gewählten Algorithmus,
die nach dem 18. Schritt 1136 beginnt, besteht aus sieben
identischen Teilphasen. Zu Beginn jeder Teilphase werden zunächst mit
dem „Sieb
des Eratosthenes" die
nächsten
898 Primzahlen erzeugt. Dabei werden in der jeweiligen Teilphase
die folgenden Primzahlen erzeugt: The third phase of the algorithm chosen as the preferred embodiment, after the 18th step 1136 begins, consists of seven identical sub-phases. At the beginning of each subphase, the next 898 primes are first created with the "sieve of Eratosthenes", whereby the following prime numbers are generated in the respective subphase:
Im
folgenden werden die Schritte der ersten Teilphase näher beschrieben.
Die weiteren Teilphasen verlaufen zur ersten Teilphase analog.in the
Following are the steps of the first sub-phase described in more detail.
The other subphases proceed analogously to the first subphase.
Im
19. Schritt 1138 (d. h. im ersten Schritt der Teilphase 1)
des in 11C dargestellten Diagramms werden
mit dem Sieb des Eratosthenes die 898 Primzahlen p258,
p259, ..., p1155 erzeugt
und in 449 Paare
{p258, p259},
{p260, p261}, ...,
{p1154, p1155} zusammengefasst.
Diesen Paaren sind die 449 Produkte q80,
q81, ..., g258 zugeordnet.
Der 19. Schritt 1138 erfolgt hierbei analog zu den obigen
Ausführungen
in der in 4 dargestellten Einrichtung 404 zum
Bereitstellen der Primzahlen pj sowie der
in 5 dargestellten Einrichtung 502 zum Auswählen einer
Primzahl von Primzahlen pi aus den Primzahlen
pj.In the 19th step 1138 (ie in the first step of the subphase 1 ) of the 11C In the diagram shown, the sieve of Eratosthenes is used to generate 898 prime numbers p 258 , p 259 , ..., p 1155 and 449 pairs
{p 258 , p 259 }, {p 260 , p 261 }, ..., {p 1154 , p 1155 }. These pairs are assigned the 449 products q 80 , q 81 , ..., g 258 . The 19th step 1138 takes place analogously to the above statements in the in 4 illustrated device 404 for providing the prime numbers p j and the in 5 illustrated device 502 for selecting a prime number of prime numbers p i from the prime numbers p j .
In
einem an den 19. Schritt 1138 folgenden 20. Schritt 1140 werden
dem Hauptprozessor die Primzahlen des ersten Paares miteinander
multipliziert: q80 = p258p259. Analog zu den obigen Ausführungen
erfolgt dieses Multiplizieren in der in 5 dargestellten
Einrichtung 504 zum Bestimmen eines Produktes q aus den ausgewählten Primzahlen
pi.In one at the 19th step 1138 following 20th step 1140 The prime number of the first pair is multiplied by the main processor: q 80 = p 258 p 259 . Analogous to the above, this multiplication takes place in the in 5 illustrated device 504 for determining a product q from the selected prime numbers p i .
Aus
den bisher ausgeführten
Schritten ergeben sich Berechnungsergebnisse, die als Datensatz
3 bezeichnet werden können,
wie in 11C dargestellt ist.Calculation results, which can be referred to as data set 3, result from the steps performed so far, as in 11C is shown.
In
einem an den 20. Schritt 1140 anschließenden 21. Schritt 1142,
des in 11D dargestellten Diagramms,
werden die Berechnungsergebnisse des Datensatzes 3 weiter verarbeitet,
wobei im Coprozessor die Variable β80 =
z mod q80 berechnet wird. Analog zu den
obigen Ausführungen
erfolgt dieses Berechnen in der in 5 dargestellten
Einrichtung 506 zum Reduzieren der Testzahl unter Verwendung
des Produktes q, um eine Variable β zu erhalten, wobei die Testzahl
TZ nunmehr der Zahl z entspricht.In one at the 20th step 1140 subsequent 21st step 1142 , of in 11D 2, the calculation results of the data set 3 are processed further, the variable β 80 = z mod q 80 being calculated in the coprocessor. Analogous to the above, this calculation is done in the in 5 illustrated device 506 for reducing the test number using the product q to obtain a variable β, the test number TZ now corresponding to the number z.
In
einem an den 21. Schritt 1142 anschließenden 22. Schritt 1144 des
in 11D dargestellten Diagramms werden im Hauptprozessor
wiederum die Elemente αi = z mod pi, i =
258, 259 berechnet durch die folgende Berechnungsvorschrift: In one at the 21st step 1142 subsequent 22nd step 1144 of in 11D In the diagram shown, the elements α i = z mod p i , i = 258, 259 are again calculated in the main processor by the following calculation rule:
Analog
zu den obigen Ausführungen
erfolgt das Berechnen der Elemente αi in
der in 5 dargestellten Einrichtung 508 zum Reduzieren
von β unter
Verwendung der Primzahlen pi, um eine Variable αi zu
erhalten.Analogous to the above explanations, the calculation of the elements α i in the in 5 illustrated device 508 for reducing β using the prime numbers p i to obtain a variable α i .
In
einem an den 22. Schritt 1144 anschließenden 23. Schritt 1146 des
in 11D dargestellten Diagramms werden aus den Elementen αi und
pi im Hauptprozessor i = 258, 259, gemäß der Vorschrift
(7) die Variablen (Zahlen) k258 und
k259 berechnet. Analog zu den obigen Ausführungen
erfolgt dieses Berechnen in der in 7 dargestellten
Einrichtung 704 zum Berechnen einer Variablen ki.In one at the 22nd step 1144 subsequent 23rd step 1146 of in 11D are represented by the elements α i and p i in the main processor i = 258, 259, according to the regulation ( 7 ) calculates the variables (numbers) k 258 and k 259 . Analogous to the above, this calculation is done in the in 7 illustrated device 704 for calculating a variable k i .
In
einem an den 23. Schritt 1146 anschließenden 24. Schritt 1148 des
in 11D dargestellten Teildiagramms wird im Hauptprozessor
mit Hilfe der ki und pi,
i = 258, 259, gemäß der Vorschrift
(8) die charakteristische Bitfolge bestimmt.
Dieses Bestimmen erfolgt analog zu den vorherigen Ausführungen
in der in 7 dargestellten Einrichtung 706 zum Überprüfen und
Modifizieren der charakteristischen Bitfolge σ.In one at the 23rd step 1146 subsequent 24th step 1148 of in 11D shown partial diagram is in the main processor by means of k i and p i , i = 258, 259, according to the rule (8) the characteristic bit sequence certainly. This determination is carried out analogously to the previous statements in the in 7 illustrated device 706 for checking and modifying the characteristic bit sequence σ.
In
einem an den 24. Schritt 1148 anschließenden 25. Schritt 1150 des
in 11D dargestellten Teildiagramms sei j ∈ {0, 1,
..., L – 1}
der kleinste Index für
den ej = 1 ist. Betrachte den Testkandidaten
z + 2j. Sei z + 2j0 der Testkandidat für den im
Coprozessor gerade ein Miller-Rabin-Test durchgeführt wird.
Fall
1: j ≠ j0 In one at the 24th step 1148 subsequent 25th step 1150 of in 11D As shown in the partial diagram, let j ∈ {0, 1, ..., L - 1} be the smallest index for e j = 1. Consider the test candidate z + 2j. Let z + 2j 0 be the test candidate for which the coprocessor is currently performing a Miller-Rabin test.
Case 1: j ≠ j 0
Stoppe
den im Coprozessor laufenden Miller-Rabin-Test und starte einen
neuen Miller-Rabin-Test für z
+ 2j.
Fall 2: j = j0 Stop the coprocessor-running Miller-Rabin test and start a new Miller-Rabin test for z + 2j.
Case 2: j = j 0
Gehe
zu einem im folgenden beschrieben 26. Schritt 1152.Go to step 26 described below 1152 ,
Ein
Teil des 25. Schritt 1150 wird vorzugsweise in der in 7 dargestellten
Einrichtung 708 zum Bestimmen einer Zukunftstestzahl ZTZ
aus der überprüften und
modifizierten Bitfolge σ' ausgeführt. Weiterhin wird
gemäß den obigen
Ausführungen
der in der Einrichtung 204 zum Testen laufenden Miller-Rabin-Test
beispielsweise ansprechend auf das zweite Haltesignal STOP2 oder
einen Zustandswechsel des ersten Statussignals PZ1 abgebrochen und
gemäß den obigen
Ausführungen
durch eine neue Testzahl TZ (in diesem Fall durch die Testzahl z
+ 2j), die die Zukunftstestzahl darstellt) gestartet.Part of the 25th step 1150 is preferably in the in 7 illustrated device 708 for determining a future test number ZTZ from the checked and modified bit sequence σ '. Furthermore, according to the above, the in the device 204 for testing ongoing Miller-Rabin test, for example, in response to the second stop signal STOP2 or a state change of the first status signal PZ1 aborted and according to the above by a new test number TZ (in this case by the test number z + 2j), which represents the future test number) started.
In
einem an den 25. Schritt 1150 anschließenden 26. Schritt 1152 erfolgt
ein Wiederholen der Schritte 20 bis 25 für jedes der übrigen 448
Paare aus dem 19. Schritt 1138. Das Zählen der jeweils abgearbeiteten Paare
kann hierbei durch die in 5 dargestellte
Einrichtung 512 zum Zählen
erfolgen, die über
das Zählsignal 514 die
Einrichtung 502 zum Auswählen einer Anzahl von Primzahlen
pi aus den Primzahlen pj steuert.In one at the 25th step 1150 subsequent 26th step 1152 Repeat steps 20 through 25 for each of the remaining 448 pairs from the 19th step 1138 , The counting of each processed pairs can be determined by the in 5 illustrated device 512 to count, via the count signal 514 the device 502 for selecting a number of primes p i from the primes p j .
Immer
dann, wenn ein Miller-Rabin-Test im Coprozessor beendet ist, ist
gemäß einem
27. Schritt 1154 so zu verfahren, wie im 18. Schritt 1136 beschrieben
ist.Whenever a Miller Rabin test is finished in the coprocessor, it is a 27th step 1154 to act as in the 18th step 1136 is described.
Nachdem
die erste Teilphase nach dem 27. Schritt 1154 beendet ist,
ist gemäß einem
28. Schritt 1156 das in den Schritten 19 bis 27 beschriebene
Verfahren analog für
die Teilphasen 2 bis 7 durchzuführen.
In jeder einzelnen dieser Teilphasen wiederholen sich somit die
Schritte 19 bis 27, wobei die im Schritt 19 jeweils zu erzeugenden
Primzahlen der oben angeführten
Liste zu entnehmen sind.After the first part phase after the 27th step 1154 is finished is according to a 28th step 1156 to carry out the procedure described in steps 19 to 27 analogously for the phases 2 to 7. The steps 19 to 27 are therefore repeated in each of these sub-phases, wherein the primes to be generated in step 19 of the list given above are to be taken from each other.
Abhängig von
den Gegebenheiten kann das erfindungsgemäße Verfahren zum Ermitteln,
ob eine Testzahl eine Primzahl ist, oder ob über die Testzahl mit einer
vorbestimmten Wahrscheinlichkeit gesagt werden kann, dass sie eine
Primzahl ist, in Hardware oder in Software implementiert werden.
Die Implementation kann auf einem digitalen Speichermedium, insbesondere
einer Diskette oder CD mit elektronisch auslesbaren Steuersignalen
erfolgen, die so mit einem programmierbaren Computersystem zusammenwirken
können,
dass das entsprechende Verfahren ausgeführt wird. Allgemein besteht
die Erfindung somit auch in einem Computer-Programm-Produkt mit
einem auf einem maschinenlesbaren Träger gespeicherten Programmcode
zur Durchführung
des erfindungsgemäßen Verfahrens,
wenn das Computer-Programm-Produkt auf einem Rechner abläuft. In
anderen Worten ausgedrückt
kann die Erfindung somit als ein Computer-Programm mit einem Programmcode zur
Durchführung
des Verfahrens realisiert werden, wenn das Computer-Programm auf
einem Computer abläuft.Depending on
the circumstances, the inventive method for determining
whether a test number is a prime number, or whether the test number with a
Predetermined probability can be said that they have one
Prime is to be implemented in hardware or in software.
The implementation may be on a digital storage medium, in particular
a floppy disk or CD with electronically readable control signals
done so interact with a programmable computer system
can,
that the corresponding procedure is carried out. Generally exists
the invention thus also in a computer program product with
a program code stored on a machine-readable medium
to carry out
of the method according to the invention,
when the computer program product runs on a computer. In
in other words
The invention can thus be used as a computer program with a program code for
execution
the process can be realized when the computer program is up
a computer expires.
Abschließend ist
anzumerken, dass das beschriebene Verfahren der Primzahlgenerierung
ein statistisches Verfahren ist. Der Algorithmus liefert mit hoher
Wahrscheinlichkeit einen Output, der mit hoher Wahrscheinlichkeit
eine Primzahl ist. Das liegt einerseits daran, dass in der vorliegenden
Erfindung vorzugsweise der (probabilistische) Miller-Rabin-Test
benutzt wird und es Miller-Rabin-Pseudozufallszahlen gibt. Wenn
eine 1024 Bit große
natürliche
Zahl allerdings den Miller-Rabin-Test
für drei
verschiedene Zufallsbasen bestanden hat (was bei dem erfindungsgemäßen Verfahren
auch gefordert wird), dann ist die Wahrscheinlichkeit dass es sich
bei dieser Zahl um keine echte Primzahl handelt kleiner als 2–80.
Ein so kleiner Wert ist für
die Praxis ohne Bedeutung.Finally, it should be noted that the method of prime-number generation described is a statistical method. The algorithm is very likely to produce an output that is highly likely to be a prime number. On the one hand, this is because in the present invention, the (probabilistic) Miller-Rabin test is preferably used and there are Miller-Rabin pseudorandom numbers. However, if a 1024-bit natural number passed the Miller-Rabin test for three different random bases (as required by the method of the invention), then the probability that this number is not a true prime is less than 2 . 80 . Such a small value is irrelevant in practice.
Der
andere Fall, dass der Algorithmus in der ihm zugestandenen Zeit
gar keinen Output produziert ist, ist ebenfalls von untergeordneter
Bedeutung. Theoretisch kann dieser Fall jedoch eintreten. Das liegt
an der Tatsache, dass es auf der Zahlengeraden beliebig große primzahlfreie
Abschnitte gibt.Of the
other case, that the algorithm in its time
no output is produced, is also of minor importance
Importance. Theoretically, however, this case can occur. It lies
the fact that it is on the number line arbitrarily large prime-free
There are sections.
Es
stellt sich daher die Frage, wie groß der Abstand zwischen zwei
benachbarten Primzahlen höchstens
sein kann. Im Jahre 1985 bewiesen Lou und Yao, dass für alle hinreichen
großen
n ∈ N gilt, wobei C eine positive
Konstante ist. Zahlentheoretiker vermuten, dass die obere Schranke
in (10) durch ersetzt
werden kann. Dies ist definitiv der Fall, wenn die sogenannte „Riemannsche
Vermutung" wahr
ist.This raises the question of how big the distance between two adjacent prime numbers can be at most. In 1985, Lou and Yao proved that for all sufficiently large n ∈ N where C is a positive constant. Number theorists suggest that the upper bound in (10) is through can be replaced. This is definitely the case when the so-called "Riemann Hypothesis" is true.
Eine
Auswertung umfangreicher empirischer Daten betreffend den Abstand
zwischen benachbarten Primzahlen legt jedoch nahe, dass selbst die
Schranke viel
zu groß ist.
Es scheint, dass pn – pn-1 niemals viel
größer ist
als (log n)2. Der zur Zeit größte bekannte
Wert von pn – pn-1 beträgt 778.However, an analysis of extensive empirical data concerning the distance between adjacent primes suggests that even the barrier way too big. It seems that p n - p n-1 never is much larger than (log n) 2 . At present the largest known value of p n - p n-1 is the 778th
Er
tritt auf bei pn = 42 842 283 926 129. Für diesen
Wert pn gilt .It occurs at p n = 42 842 283 926 129. For this value p n holds ,
Es
gibt eine Vermutung von H. Cramér, die lautet, Pn – Pn–1 =
O ((log pn)2). There is a supposition by H. Cramér that P n - P n-1 = O ((log p n ) 2 ).
Nach
dieser Vermutung kann der Abstand zweier benachbarter 1024 Bit großer Primzahlen
den Wert 500.000 nicht wesentlich überschreiten.To
This assumption may be the distance between two adjacent 1024-bit primes
not significantly exceed the value of 500,000.
Zusammenfassend
lässt sich
somit feststellen, dass in der vorliegenden Erfindung gleichzeitig
eine Testzahl (Aktuell-Testzahl)
mit einem ersten Primzahlüberprüfungsalgorithmus überprüft wird
und die Testzahl mit einem zweiten Primzahlüberprüfungsalgorithmus auf Primalität getestet
wird. Ein Vorteil bei dieser Vorgehensweise besteht einerseits darin,
dass schon zu Beginn der Ermittlung, ob eine Testzahl eine Primzahl
ist, mit dem Testen unter Verwendung des zweiten Primzahlüberprüfungsalgorithmus
begonnen werden kann. Ein weiterer Vorteil besteht weiterhin darin,
dass der Siebprozess (d. h. das Überprüfen der
Testzahl mit dem ersten Primzahlüberprüfungsalgorithmus) über das
im Stand der Technik bekannte Überprüfen bis
zu dem vorbestimmten Abbruchkriterium hinaus fortgesetzt werden
kann. Auf diese weise kann sichergestellt werden, dass die Testzahlen
(Testkandidaten), die den ersten Primzahlüberprüfungsalgorithmus bestehen,
eine höhere Wahrscheinlichkeit
auf Primalität
haben, und somit auch größere Chancen
haben, das Testen auf Primalität durch
den zweiten Primzahlüberprüfungsalgorithmus
(vorzugsweise einen Miller-Rabin-Test) zu bestehen. Während bei
den bisherigen Verfahren der Siebprozess typischerweise bis zu dem
vorbestimmten Abbruchkriterium getrieben wird, so dass sichergestellt
ist, dass die Kandidatenzahl (Testzahl) teilerfremd zu den ersten (beispielsweise)
100 bis 200 Primzahlen ist, wird im erfindungsgemäßen Ansatz
der Siebprozess (d.h. das Überprüfen der
Testzahl) so lange fortgesetzt, bis die Testzahl entweder durch
den ersten Primzahlüberprüfungsalgorithmus
oder den zweiten Primzahlüberprüfungsalgorithmus
als NICHT-Primzahl
erkannt wird oder die Testzahl durch den zweiten Primzahlüberprüfungsalgorithmus
als Primzahl oder als Zahl, die mit hoher Wahrscheinlichkeit eine
Primzahl ist, erkannt wird. Durch das Ausführen des Testens der Testzahl
auf Primalität
mit dem zweiten Primzahlüberprüfungsalgorithmus
während
dem Überprüfen der
Testzahl auf Primalität mit
dem ersten Primzahlüberprüfungsalgorithmus
ist es daher möglich,
sicherzustellen, dass die Kandidatenzahlen (Testzahlen) beispielsweise
teilerfremd zu den ersten 1000 bis 10.000 (oder mehr) Primzahlen
sind. Hierdurch wird im erfindungsgemäßen Ansatz wesentlich früher eine
Primzahl (vorzugsweise mit der gewünschten großen Bitlänge) gefunden.In summary
let yourself
thus finding that in the present invention simultaneously
a test number (current test number)
is checked with a first prime checking algorithm
and testing the test number for primality with a second prime checking algorithm
becomes. One advantage of this procedure is, on the one hand,
that already at the beginning of the determination, whether a test number is a prime number
with the testing using the second prime verify algorithm
can be started. Another advantage is
that the screening process (that is, checking the
Test number with the first prime check algorithm) over the
Known in the prior art Check up
continue to the predetermined abort criterion
can. In this way, it can be ensured that the test numbers
(Test candidates) that pass the first prime-checking algorithm,
a higher probability
on primality
have, and therefore greater opportunities
Have the testing for primality through
the second prime verify algorithm
(preferably a Miller-Rabin test). While at
the previous process of the screening process typically up to the
predetermined abort criterion is driven so that ensured
is that the number of candidates (test number) is divisive to the first (for example)
100 to 200 prime numbers is in the inventive approach
the screening process (i.e.
Test number) continued until the test number either by
the first prime checking algorithm
or the second prime verify algorithm
as NOT prime
is recognized or the test number by the second prime number checking algorithm
as a prime number or a number that is most likely a
Prime number is detected. By performing the testing of the test number
on primality
with the second prime verify algorithm
while
checking the
Test number for primality with
the first prime verify algorithm
is it therefore possible
for example, ensure that the candidate numbers (test numbers)
prime to the first 1000 to 10.000 (or more) primes
are. As a result, in the inventive approach much earlier
Prime (preferably with the desired long bit length).
Ferner
kann bei dem erfindungsgemäßen Prozess
der Primzahlenermittlung die vorhandene Hardware optimal ausgenutzt
werden, d. h. sowohl die Kapazitäten
eines vorzugsweise einzusetzenden Coprozessors als auch die Kapazitäten eines
Hauptprozessors voll genutzt werden können. Der Siebprozess findet
hierbei in der CPU (d. h. im Hauptprozessor) statt, während gleichzeitig
die vorzugsweise einzusetzenden Miller-Rabin-Tests im kryptographischen (mathematischen)
Coprozessor ablaufen. Während
der gesamten Dauer der Primzahlsuche, wird somit im Hauptprozessor
das Siebverfahren vorangetrieben und im Coprozessor werden die einzusetzenden
Miller-Rabin-Tests durchgeführt.Further
can in the process of the invention
The prime number determination optimally exploits the existing hardware
be, d. H. both the capacities
a preferably used coprocessor and the capacity of a
Main processor can be fully utilized. The screening process finds
here in the CPU (i.e., in the main processor) instead of while simultaneously
the preferably used Miller-Rabin tests in the cryptographic (mathematical)
Coprocessor expire. While
the entire duration of the prime search, thus becomes the main processor
the sieving process is promoted and in the coprocessor to be used
Miller-Rabin tests performed.
Bei
dem Siebverfahren werden dabei vorwiegend Operationen mit kleinen
Zahlen benutzt. Diese Zahlen sind so klein, dass sie im allgemeinen
nur 1 bis 4 Byte für
ihre Darstellung beanspruchen. Deshalb ist der Hauptprozessor geeignet,
das Siebverfahren durchzuführen.
Es gibt nur eine Operation im Siebverfahren, die modulare Reduktionen
einer großen
Zahl N modulo einer kleinen Primzahl p, die die CPU nicht schnell
ausführen
kann. Diese Operation wird daher vorzugsweise in den Coprozessor
verlegt. Alle anderen Operationen des Siebverfah rens werden gemäß dem oben
beschriebenen Ausführungsbeispiel
in der CPU ausgeführt.
Die Zeit zum Ermitteln einer großen Primzahl, wie sie beispielsweise
für eine
RSA-Schlüssel-Generierung benötigt wird,
kann daher durch den erfindungsgemäßen Ansatz schätzungsweise
um ca. 50% verkürzt
werden.at
The screening process will be mainly operations with small
Numbers used. These numbers are so small that they are generally
only 1 to 4 bytes for
claim their presentation. Therefore, the main processor is suitable
to carry out the sieving process.
There is only one screening operation, the modular reductions
a big one
Number N modulo a small prime p, which does not fast the CPU
To run
can. This operation is therefore preferably in the coprocessor
laid. All other operations of the sieving method are according to the above
described embodiment
executed in the CPU.
The time to find a large prime, such as
for one
RSA key generation is needed
can therefore be estimated by the approach of the invention
shortened by about 50%
become.
Obwohl
oben ein bevorzugtes Ausführungsbeispiel
der vorliegenden Erfindung näher
erläutert
wurde, ist offensichtlich, dass die vorliegende Erfindung nicht
auf dieses Ausführungsbeispiel
beschränkt
ist. Insbesondere findet die vorliegende Erfindung auch Anwendung
auf eine weitere mögliche
Aufteilung der Schritte zwischen dem Coprozessor und dem Hauptprozessor.Even though
above a preferred embodiment
closer to the present invention
explained
it is obvious that the present invention is not
to this embodiment
limited
is. In particular, the present invention also applies
to another possible
Splitting the steps between the coprocessor and the main processor.
-
100100
-
Vorrichtung
zur Erzeugung einer Primzahlcontraption
for generating a prime number
-
102102
-
Einrichtung
zum Bestimmen einer Ausgangszahl AZFacility
for determining an initial number AZ
-
104104
-
Einrichtung
zum Ermitteln, ob eine Testzahl TZ eineFacility
for determining whether a test number TZ is a
-
-
Primzahl
ist oder mit einer vorbestimmtenPrime number
is or with a predetermined
-
-
Wahrscheinlichkeit
gesagt werden kann, dass die Testzahlprobability
can be said that the test number
-
-
TZ
eine Primzahal istTZ
a primezahal is
-
202202
-
Einrichtung
zum Überprüfen einer
Aktuell-Testzahl oderFacility
to check one
Current test number or
-
-
zum
Bereitstellen einer Zukunftstestzahlto the
Provide a future test number
-
204204
-
Einrichtung
zum TestenFacility
to test
-
206206
-
Einrichtung
zum ErkennenFacility
To recognize
-
-
-
302302
-
Einrichtung
zum Überprüfen einer
Aktuell-TestzahlFacility
to check one
Currently test number
-
304304
-
Einrichtung
zum Bereitstellen einer ZukunftstestzahlFacility
to provide a future test number
-
-
-
402402
-
Einrichtung
zum Bestimmen einer Aktuell-TestzahlFacility
for determining a current test number
-
404404
-
Einrichtung
zum Bereitstellen der Primzahlen pj Device for providing the primes p j
-
406406
-
Einrichtung
zum Prüfen
der Aktuell-Testzahl aufFacility
for testing
the current test number
-
-
Teilerfreiheit
in Bezug auf die Primzahlen pj Divisor freedom with respect to the prime numbers p j
-
502502
-
Einrichtung
zum Auswählen
einer Anzahl von Primzahlen pi Device for selecting a number of primes p i
-
-
aus
den Primzahlen pj from the primes p j
-
504504
-
Einrichtung
zum Bestimmen eines Produktes q aus denFacility
for determining a product q from the
-
-
ausgewählten Primzahlen
pi selected primes p i
-
506506
-
Einrichtung
zum Reduzieren der Testzahl unter VerwendungFacility
to reduce the number of tests using
-
-
des
Produktes q, um eine Variable β zu
erhaltenof
Product q to a variable β too
receive
-
508508
-
Einrichtung
zum Reduzieren von β unter
Verwendung derFacility
for reducing β under
Use of
-
-
Primzahlen
pi, um eine Variable αi zu
erhaltenPrime numbers p i to obtain a variable α i
-
510510
-
Einrichtung
zum Prüfen,
ob pi ein Teiler der TestzahlDevice for checking whether p i is a divisor of the test number
-
-
ist
unter Verwendung von αi is using α i
-
512512
-
Einrichtung
zum ZählenFacility
to count
-
514514
-
Zählsignalcount signal
-
602602
-
Einrichtung
zum Bereitstellen einer AusgangszahlenfolgeFacility
to provide a payout sequence
-
604604
-
Einrichtung
zum Auswählen
einer Zukunftstestzahl aus derFacility
to choose
a future test from the
-
-
AusgangszahlenfolgeOutput number sequence
-
702702
-
Einrichtung
zum Bestimmen einer charakteristischenFacility
for determining a characteristic
-
-
Bitfolge σBit sequence σ
-
704704
-
Einrichtung
zum Berechnen einer Variablen ki Device for calculating a variable k i
-
706706
-
Einrichtung
zum Überprüfen und
Modifizieren derFacility
to check and
Modify the
-
-
charakteristischen
Bitfolge σcharacteristic
Bit sequence σ
-
708708
-
Einrichtung
zum Bestimmen einer Zukunftstestzahl aus derFacility
to determine a future test number from the
-
-
überprüften und
modifizierten Bitfolge σ'checked and
modified bit sequence σ '
-
11021102
-
erster
Schritt des Algorithmusfirst
Step of the algorithm
-
11041104
-
zweiter
Schritt des Algorithmussecond
Step of the algorithm
-
11061106
-
dritten
Schritt des Algorithmusthird
Step of the algorithm
-
11081108
-
vierter
Schritt des Algorithmusfourth
Step of the algorithm
-
11101110
-
fünfter Schritt
des Algorithmusfifth step
of the algorithm
-
11121112
-
sechster
Schritt des Algorithmussixth
Step of the algorithm
-
11141114
-
siebter
Schritt des Algorithmusseventh
Step of the algorithm
-
11161116
-
achter
Schritt des Algorithmuseight
Step of the algorithm
-
11181118
-
neunter
Schritt des Algorithmusninth
Step of the algorithm
-
11201120
-
zehnter
Schritt des Algorithmustenth
Step of the algorithm
-
11221122
-
11.
Schritt des Algorithmus11th
Step of the algorithm
-
11241124
-
12.
Schritt des Algorithmus12th
Step of the algorithm
-
11261126
-
13.
Schritt des Algorithmus13th
Step of the algorithm
-
11281128
-
14.
Schritt des Algorithmus14th
Step of the algorithm
-
11301130
-
15.
Schritt des Algorithmus15th
Step of the algorithm
-
11321132
-
16.
Schritt des Algorithmus16th
Step of the algorithm
-
11341134
-
17.
Schritt des Algorithmus17th
Step of the algorithm
-
11361136
-
18.
Schritt des Algorithmus18th
Step of the algorithm
-
11381138
-
19.
Schritt des Algorithmus19th
Step of the algorithm
-
11401140
-
20.
Schritt des Algorithmus20th
Step of the algorithm
-
11421142
-
21.
Schritt des Algorithmus21st
Step of the algorithm
-
11441144
-
22.
Schritt des Algorithmus22nd
Step of the algorithm
-
11461146
-
23.
Schritt des Algorithmus23rd
Step of the algorithm
-
11481148
-
24.
Schritt des Algorithmus24th
Step of the algorithm
-
11501150
-
25.
Schritt des Algorithmus25th
Step of the algorithm
-
11521152
-
26.
Schritt des Algorithmus26th
Step of the algorithm
-
-
-
11541154
-
27.
Schritt des Algorithmus27th
Step of the algorithm
-
11561156
-
28.
Schritt des Algorithmus28th
Step of the algorithm