Converting points on curve to un/compressed numbers.

This commit is contained in:
Fang 2018-06-27 20:20:35 +02:00
parent 3ac9b33697
commit beae8cc01a

View File

@ -304,6 +304,14 @@
=/ p ~(. fo p)
=/ n ~(. fo n)
|%
++ point-compressed
|= pont
(can 3 ~[w^x 1^(add 0x2 (cut 0 [0 1] y))])
::
++ point-uncompressed
|= pont
(can 3 ~[w^y w^x 1^0x4])
::
++ priv-to-pub :: get pub from priv
|= prv=@
^- pont