mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
Converting points on curve to un/compressed numbers.
This commit is contained in:
parent
3ac9b33697
commit
beae8cc01a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user