shithub: riscv

ref: b0377e84cf31c48afed765c433abe7eebb4135a5
dir: /sys/src/libsec/port/secp256r1.mp/

View raw version
# E: y² = x³ + ax + b 
secp256r1(p,a,b,x,y,n,h) {
	p = 2^256 - 2^224 + 2^192 + 2^96 - 1;
	a = p - 3;
	b = 0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B;
	x = 0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296;
	y = 0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5;
	n = 0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551;
	h = 1;
}