zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit ed091636a9a295d46fb1c539ca86c7b34c4fb115
parent 8cb9630be6f3ed39ce32fb5f3548913c140e7f00
Author: Jaromil <jaromil@dyne.org>
Date:   Thu,  9 Jun 2022 18:28:30 +0200

added initial zencode crypto scripts

Diffstat:
M.gitignore | 3++-
Asrc/zencode/keygen.zen | 28++++++++++++++++++++++++++++
Asrc/zencode/passgen_pbkdf2.zen | 5+++++
Asrc/zencode/passverify_pbkdf2.zen | 7+++++++
4 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore @@ -35,7 +35,8 @@ cover/ !/priv/repo/migrations/*.exs # src code -!/src/**/*.ex +!/src/zencode/*.zen +!/src/zenflows/*.ex # confs !/conf/common.exs diff --git a/src/zencode/keygen.zen b/src/zencode/keygen.zen @@ -0,0 +1,28 @@ +Scenario ecdh : 'keygen' +Scenario ethereum: 'keygen' +Scenario schnorr: 'keygen' +Scenario reflow: 'keygen' + +Given nothing +When I create the ecdh key +When I create the reflow key +When I create the schnorr key +When I create the ethereum key +When I create the bitcoin key + +When I create the 'base64 dictionary' named 'pubkeys' +When I create the ecdh public key +and I move 'ecdh public key' in 'pubkeys' +When I create the reflow public key +and I move 'reflow public key' in 'pubkeys' +When I create the schnorr public key +and I move 'schnorr public key' in 'pubkeys' + +When I create the ethereum address +When I create the bitcoin address + +Then print the 'keyring' +and print the 'pubkeys' +and print the 'ethereum address' +and print the 'bitcoin address' + diff --git a/src/zencode/passgen_pbkdf2.zen b/src/zencode/passgen_pbkdf2.zen @@ -0,0 +1,5 @@ +Given I have a 'hex' named 'salt' +and I have a 'string' named 'password' +When I create the key derivation of 'password' with password 'salt' +Then print the 'key derivation' as 'base64' + diff --git a/src/zencode/passverify_pbkdf2.zen b/src/zencode/passverify_pbkdf2.zen @@ -0,0 +1,7 @@ +Given I have a 'hex' named 'salt' +and I have a 'base64' named 'hash' +and I have a 'string' named 'password' +When I create the key derivation of 'password' with password 'salt' +and I verify 'key_derivation' is equal to 'hash' +Then print the string '1' +# when false zenroom returns error