Continue with fixed seed-length changes, don't append pass
[inp (to-byts 'urbitkeygen')]
::
++ child-node-from-seed
- |= [seed=byts met=meta pass=(unit @t)]
+ |= [seed=@ met=meta pass=(unit @t)]
^- node
=+ dr=~(. sd pass)
=+ child-seed=(seed:dr seed met)
- :+ met dat.child-seed
+ :+ met child-seed
(wallet:dr child-seed)
::
++ full-wallet-from-ticket
++ full-wallet-from-seed
|= [owner-seed=@ux sis=(set ship) pass=(unit @t) revs=revisions]
=+ dr=~(. sd pass)
- =+ cn=|=([s=byts m=meta] (child-node-from-seed s m pass))
+ =+ cn=|=([s=@ m=meta] (child-node-from-seed s m pass))
::
:- ^= owner ^- node
:+ *meta owner-seed
%+ ~(put by u) s
=+ m=["network" network.revs `s]
=+ s=(seed:dr seed.manage m)
- [m dat.s (urbit:dr s)]
+ [m s (urbit:dr s)]
::
++ sd :: seed derivation
|_ pass=(unit @t)
- ++ append-pass
- |= s=@ux
- ^- @ux
- =+ (fall pass '')
- (cat 3 (swp 3 -) dat.b)
- ::
++ wallet
- %+ cork append-pass
|= seed=@ux
^- ^wallet
=> (from-seed:bip32 32^seed)
[public-key private-key chain-code]
::
++ urbit
- %+ cork append-pass
|= seed=@ux
^- edkeys
=+ =< [pub=pub:ex sec=sec:ex]
++ seed
|= [seed=@ux meta]
^- @ux
- %- sha-256l
- %- append-pass
- =+ ;: weld
+ =/ salt=tape
+ ;: weld
typ "-" (a-co:co rev)
?~(who ~ ['-' (a-co:co u.who)])
==
- :- (add 32 (lent -))
- (cat 3 (crip (flop -)) seed)
+ %- sha-256l
+ :- (add 32 (lent salt))
+ (cat 3 (crip (flop salt)) seed)
--
--
