Commit edef2fb3 authored by bernd's avatar bernd

Fixed mangled key storage

parent 340c8097
No preview for this file type
......@@ -17,7 +17,7 @@
64 Constant state#
state# 2* buffer: key-assembly
state# buffer: no-key \ just zeros for no key
state# 2* buffer: no-key \ just zeros for no key
state# buffer: mykey \ instance's private key
state# rng$ mykey swap move
......
......@@ -201,13 +201,15 @@ previous definitions
: >keys ( -- )
skc pkc ed-dh +key ;
: +keypair ( type nick u -- )
+passphrase gen-keys
: +gen-keys ( type nick u -- )
gen-keys
key:code
pkc keysize $, newkey skc keysize $, privkey
$, keynick lit, keytype ticks lit, keyfirst
end:key key>file >keys ;
: +keypair ( type nick u -- ) +passphrase +gen-keys ;
\ read key file
: try-decrypt ( -- addr u / 0 0 )
......@@ -242,8 +244,8 @@ previous definitions
ke-sk $@ skc swap move ;
0 [IF] \ generate keypairs
key#anon "test" +keypair
key#anon "anonymous" +keypair
keys $@ drop 2@ key+len 2! key#anon "test" +gen-keys
keys $@ drop 2@ key+len 2! key#anon "anonymous" +gen-keys
[THEN]
0 [IF]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment