2018-09-07 04:41:16 +03:00
|
|
|
:: Create a private key-file
|
|
|
|
::
|
|
|
|
/- *sole
|
2020-12-09 04:57:41 +03:00
|
|
|
/+ *generators, ethereum
|
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 11:47:29 +03:00
|
|
|
=/ mag=cord (end 3 pub)
|
2018-09-07 04:41:16 +03:00
|
|
|
?> =('b' mag)
|
2020-12-02 11:47:29 +03:00
|
|
|
=/ bod=@ (rsh 3 pub)
|
|
|
|
=/ cry=@ (rsh 8 bod)
|
|
|
|
=/ sgn=@ (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
|
|
|
::
|
2020-12-08 03:47:06 +03:00
|
|
|
=/ sed=seed: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))]
|