Example of the project fnx.Demo.BigInts for Lazarus
Creation of a 512-bit strong BPSW-prime with the IRandomStrongBPSWPrime function
of the fnx.BigInts.Primes unit.
////////////////////////////////////////////////////////////////////////////////
P (strong BPSW-prime)
---------------------
69699244587108932984202864891960504310542321536046383765792897312847892060031108
52004986524036510225485668722191877490381763486150910982030871257115667533
Binary size = 512
Q (factor of P - 1)
-------------------
2185854219097253269983366257956020995702913362516152474011979660343509141
Binary size = 241
R (factor of P + 1)
-------------------
534715245307606015368246176978647766672006429900298696023781292108906961
Binary size = 239
S (factor of Q - 1)
-------------------
3417675204665718081253855511937974213660901296548803535350139567
Binary size = 212
Check (P = 1 mod Q) : OK
Check (P = -1 mod R) : OK
Check (Q = 1 mod S) : OK
Check (P is BPSW-prime) : OK
Check (Q is BPSW-prime) : OK
Check (R is BPSW-prime) : OK
Check (S is BPSW-prime) : OK
Running time (creation) = 18.995 ms
////////////////////////////////////////////////////////////////////////////////
|
|
|
|