2018-09-07 04:41:16 +03:00
|
|
|
:: Create a private key-file
|
|
|
|
::
|
|
|
|
/- *sole
|
2018-11-01 07:18:54 +03:00
|
|
|
/+ *generators
|
2018-09-07 04:41:16 +03:00
|
|
|
::
|
|
|
|
:- %ask
|
2018-10-14 21:25:09 +03:00
|
|
|
|= $: [now=@da eny=@uvJ bec=beak]
|
|
|
|
[who=ship ~]
|
|
|
|
life=_1
|
2018-09-07 04:41:16 +03:00
|
|
|
==
|
|
|
|
^- (sole-result (cask cord))
|
2018-11-01 07:18:54 +03:00
|
|
|
%+ print leaf+"generating keys for {(scow %p who)}, life #{(scow %ud life)}"
|
|
|
|
%+ prompt [%| %pope-pass "passphrase: "]
|
|
|
|
%+ parse (boss 256 (star prn))
|
2020-11-25 23:22:55 +03:00
|
|
|
|= fra=@t
|
2018-09-07 04:41:16 +03:00
|
|
|
=/ bur (shaz (add who (shaz fra)))
|
|
|
|
=/ cub (pit:nu:crub:crypto 512 bur)
|
|
|
|
::
|
|
|
|
=/ pub=pass pub:ex:cub
|
2020-12-02 07:42:38 +03:00
|
|
|
=/ mag=cord (new-end 3 pub)
|
2018-09-07 04:41:16 +03:00
|
|
|
?> =('b' mag)
|
2020-12-02 09:30:36 +03:00
|
|
|
=/ bod=@ (new-rsh 3 pub)
|
|
|
|
=/ cry=@ (new-rsh 8 bod)
|
2020-12-02 07:42:38 +03:00
|
|
|
=/ sgn=@ (new-end 8 bod)
|
2018-11-01 07:18:54 +03:00
|
|
|
%+ print leaf+" authentication: 0x{(render-hex-bytes:ethereum 32 sgn)}"
|
|
|
|
%+ print leaf+" networking: 0x{(render-hex-bytes:ethereum 32 cry)}"
|
|
|
|
%+ print leaf+"ethereum public keys:"
|
2018-09-07 04:41:16 +03:00
|
|
|
::
|
|
|
|
=/ sed=seed:able:jael
|
2018-10-14 21:25:09 +03:00
|
|
|
[who life sec:ex:cub ~]
|
2018-11-01 07:18:54 +03:00
|
|
|
%- produce [%atom (scot %uw (jam sed))]
|