Sample parameters (from Guide to Elliptic Curve Cryptography #262)
P-192: p = 2^192 − 2^64 − 1, a = −3, h = 1
S = 0x 3045AE6F C8422F64 ED579528 D38120EA E12196D5
r = 0x 3099D2BB BFCB2538 542DCD5F B078B6EF 5F3D6FE2 C745DE65
b = 0x 64210519 E59C80E7 0FA7E9AB 72243049 FEB8DEEC C146B9B1
n = 0x FFFFFFFF FFFFFFFF FFFFFFFF 99DEF836 146BC9B1 B4D22831
x = 0x 188DA80E B03090F6 7CBF20EB 43A18800 F4FF0AFD 82FF1012
y = 0x 07192B95 FFC8DA78 631011ED 6B24CDD5 73F977A1 1E794811
The variables:
x = 602046282375688656758213480587526111916698976636884684818
y = 174050332293622031404857552280219410364023488927386650641
b = 2455155546008943817740293915197451784769108058161191238065
Calculating in PARI:
Last login: Thu Nov 19 10:29:35 on ttys002
CGs-MacBook:~ chika$ gp
Reading GPRC: /sw/etc/gprc ...Done.
GP/PARI CALCULATOR Version 2.1.7 (released)
unknown 32-bit version
(readline v5.0 enabled, extended help available)
Copyright (C) 2002 The PARI Group
PARI/GP is free software, covered by the GNU General Public License, and
comes WITHOUT ANY WARRANTY WHATSOEVER.
Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.
realprecision = 28 significant digits
seriesprecision = 16 significant terms
format = g0.28
parisize = 4000000, primelimit = 500000
(13:41) gp > p = 2^192-2^64-1
%1 = 6277101735386680763835789423207666416083908700390324961279
(13:42) gp > a = Mod(-3,p)
%2 = Mod(6277101735386680763835789423207666416083908700390324961276, 6277101735386680763835789423207666416083908700390324961279)
(13:44) gp > b = Mod(2455155546008943817740293915197451784769108058161191238065,p)
%3 = Mod(2455155546008943817740293915197451784769108058161191238065, 6277101735386680763835789423207666416083908700390324961279)
(13:46) gp > E = ([0,0,0,a,b])
%4 = [0, 0, 0, Mod(6277101735386680763835789423207666416083908700390324961276, 6277101735386680763835789423207666416083908700390324961279), Mod(2455155546008943817740293915197451784769108058161191238065, 6277101735386680763835789423207666416083908700390324961279)]
(13:47) gp > ? isoncuve
*** isoncuve: unknown identifier.
(13:47) gp > ?isoncurve
*** obsolete function: isoncurve
^---------
For full compatibility with GP 1.39, type "default(compatible,3)" (you can
also set "compatible = 3" in your GPRC file).
New syntax: isoncurve(e,x) ===> ellisoncurve(e,x)
ellisoncurve(e,x): true(1) if x is on elliptic curve e, false(0) if not.
(13:47) gp > ellisoncurve
*** expected character: '(' instead of: ellisoncurve
^
(13:47) gp > ?isoncurve
*** obsolete function: isoncurve
^---------
For full compatibility with GP 1.39, type "default(compatible,3)" (you can
also set "compatible = 3" in your GPRC file).
New syntax: isoncurve(e,x) ===> ellisoncurve(e,x)
ellisoncurve(e,x): true(1) if x is on elliptic curve e, false(0) if not.
(13:47) gp > x = Mod(602046282375688656758213480587526111916698976636884684818,p)
%5 = Mod(602046282375688656758213480587526111916698976636884684818, 6277101735386680763835789423207666416083908700390324961279)
(13:48) gp > ellisoncurve(E, x)
*** bad argument for an elliptic curve related function
(13:48) gp > ellisoncurve(E, x)
*** bad argument for an elliptic curve related function
(13:48) gp > ellisoncurve(E,x)
*** bad argument for an elliptic curve related function
(13:49) gp > y = Mod(174050332293622031404857552280219410364023488927386650641,p)
%6 = Mod(174050332293622031404857552280219410364023488927386650641, 6277101735386680763835789423207666416083908700390324961279)
(13:49) gp > z = (x,y)
*** expected character: ')' instead of: z=(x,y)
^---
(13:49) gp > z=(x,y)
*** expected character: ')' instead of: z=(x,y)
^---
(13:49) gp > z = (x,y)
*** expected character: ')' instead of: z=(x,y)
^---
(13:49) gp > z=[x,y]
%7 = [Mod(602046282375688656758213480587526111916698976636884684818, 6277101735386680763835789423207666416083908700390324961279), Mod(174050332293622031404857552280219410364023488927386650641, 6277101735386680763835789423207666416083908700390324961279)]
(13:49) gp > ellisoncurve(E,z)
%8 = 1
(13:50) gp >
[editing is on progress]
Recent Comments