Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add credential and es256 keys #20

Merged
merged 3 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/keypairoomClient-8-9-10-11-12.zen
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Scenario 'ecdh': Create the key
Scenario 'ethereum': Create key
Scenario 'reflow': Create the key
Scenario 'eddsa': Create the key
Scenario 'es256': Create the key


# Loading the user name from data
Expand Down Expand Up @@ -72,19 +73,29 @@ When I rename the 'hash' to 'seed.reflow'
When I create the hash of 'seed.reflow'
When I rename the 'hash' to 'seed.bitcoin'

When I create the hash of 'seed.bitcoin'
When I rename the 'hash' to 'seed.es256'

# end of the sorted creation flow

When I create the ecdh key with secret key 'seed.ecdh'
When I create the eddsa key with secret key 'seed.eddsa'
When I create the ethereum key with secret key 'seed.ethereum'
When I create the reflow key with secret key 'seed.reflow'
When I create the bitcoin key with secret key 'seed.bitcoin'
When I create the es256 key with secret key 'seed.es256'

# Here we create the "credential" key (used to request a Coconut zkp credential)
# from the reflow key, cause they both are BL381 keys the credential sk doesn't have a pk
When I pickup from path 'keyring.reflow'
When I create credential key with secret 'reflow'

When I create the ecdh public key
When I create the eddsa public key
When I create the ethereum address
When I create the reflow public key
When I create the bitcoin public key
When I create the es256 public key

# Creating the hashes of the single challenges, to OPTIONALLY help
# regeneration of the keypair
Expand Down Expand Up @@ -125,3 +136,4 @@ Then print the 'eddsa public key' as 'base58'
Then print the 'ethereum address'
Then print the 'reflow public key' as 'base58'
Then print the 'bitcoin public key' as 'base58'
Then print the 'es256 public key' as 'base58'
13 changes: 13 additions & 0 deletions src/keypairoomClientRecreateKeys.zen
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Scenario 'ecdh': Create the key
Scenario 'ethereum': Create key
Scenario 'reflow': Create the key
Scenario 'eddsa': Create the key
Scenario 'es256': Create the key

# here we load the seed as a mnemonic
Given I have a 'mnemonic' named 'seed'
Expand All @@ -39,19 +40,30 @@ When I create the hash of 'seed.ethereum'
When I rename the 'hash' to 'seed.reflow'
When I create the hash of 'seed.reflow'
When I rename the 'hash' to 'seed.bitcoin'
When I create the hash of 'seed.bitcoin'
When I rename the 'hash' to 'seed.es256'


When I create the ecdh key with secret key 'seed.ecdh'
When I create the eddsa key with secret key 'seed.eddsa'
When I create the ethereum key with secret key 'seed.ethereum'
When I create the reflow key with secret key 'seed.reflow'
When I create the bitcoin key with secret key 'seed.bitcoin'
When I create the es256 key with secret key 'seed.es256'

# Here we create the "credential" key (used to request a Coconut zkp credential)
# from the reflow key, cause they both are BL381 keys the credential sk doesn't have a pk
When I pickup from path 'keyring.reflow'
When I create credential key with secret 'reflow'


# PKs generation
When I create the ecdh public key
When I create the eddsa public key
When I create the ethereum address
When I create the reflow public key
When I create the bitcoin public key
When I create the es256 public key

# This prints the keyring containing the SKs
Then print the 'keyring'
Expand All @@ -62,6 +74,7 @@ Then print the 'eddsa public key' as 'base58'
Then print the 'ethereum address'
Then print the 'reflow public key' as 'base58'
Then print the 'bitcoin public key' as 'base58'
Then print the 'es256 public key' as 'base58'

# This prints the seed for the private keys as mnemonic
Then print the 'seed' as 'mnemonic'
2 changes: 1 addition & 1 deletion test/vectors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# example graphql with most allowed characters used

v_keyring='{"bitcoin_public_key":"ukQvpps4nhSthRf1FLsEQGnYoZDYUJkfYY8Fr6wNgC41","ecdh_public_key":"NNnAfK9c2A8QJ2oNXPvy6779DdLXS6HYv9aBUGvKjFpLAAexTr46JyooXo6vdYHw7x5veYAxrHLiHkb4pcH1LFMu","eddsa_public_key":"BmW1a6x43P4Rae9B4hS67PhHTCUShXAGy4K8tQtUfa8L","ethereum_address":"0x4152BF951c86bA52ceC089eae22cec506cd8B874","keyring":{"bitcoin":"KxDiAHPio8igFegwt6yX94vHywxYcApUxknEnqPHoLhh5qNuSozW","ecdh":"gHMNRNJrKavz/cqSus4qcIex/+z/5uZVStccaYpVXCY=","eddsa":"EmDKWxH78WxKzJpUvsC6RWVRDWeB4q8AceooYf7uVaRv","ethereum":"e43de93b08b950652cf154da16b3659f40709a8fd3831f2bbb6e5c054c348a7e","reflow":"whNys7dhBwmeFCaunYcqvuTCZg+rX+Sbhsylt6QuSvQ="},"reflow_public_key":"AX8cmFkKLcmMGYb6YfnqAVDgRAa5tiX4XSfzvKordckZguU7ZVQTWf95x9VnenwgBcyJgniVNKQDSkodhrfGc3z3BzDfUcFEMEJhcinkrFayPq2G51Cx85bFQqfUw9DgUK12dgGP7Utout9CdqdEr2nCqmBJ25UGcpsQbjRF2edbLQTx7r6tkghpgopQUepMDnpGJXU8m8vADB5dxyhZsSNjWoH28QDTCyiRsfeV2a4w8ACGpvPb2ZjDPqZw1AVa9BcG2b","seed":"arrow story season about lucky wedding weird vast verify route churn rally"}'
v_keyring='{"bitcoin_public_key":"ukQvpps4nhSthRf1FLsEQGnYoZDYUJkfYY8Fr6wNgC41","ecdh_public_key":"NNnAfK9c2A8QJ2oNXPvy6779DdLXS6HYv9aBUGvKjFpLAAexTr46JyooXo6vdYHw7x5veYAxrHLiHkb4pcH1LFMu","eddsa_public_key":"BmW1a6x43P4Rae9B4hS67PhHTCUShXAGy4K8tQtUfa8L","es256_public_key":"3ikhPTh86hDrP2k3mzAFZFZoagUBkvs9fUHs5XM4wenhWCng69nntfWQVdP7iqtHXRnz4S4WUiqKtjjy8x7PojxC","ethereum_address":"0x4152BF951c86bA52ceC089eae22cec506cd8B874","keyring":{"bitcoin":"KxDiAHPio8igFegwt6yX94vHywxYcApUxknEnqPHoLhh5qNuSozW","credential":"whNys7dhBwmeFCaunYcqvuTCZg+rX+Sbhsylt6QuSvQ=","ecdh":"gHMNRNJrKavz/cqSus4qcIex/+z/5uZVStccaYpVXCY=","eddsa":"EmDKWxH78WxKzJpUvsC6RWVRDWeB4q8AceooYf7uVaRv","es256":"0dBC9UBnUWQyB/nDVYNbsnkNKDAdv3l1Q/oVdGFox1Y=","ethereum":"e43de93b08b950652cf154da16b3659f40709a8fd3831f2bbb6e5c054c348a7e","reflow":"whNys7dhBwmeFCaunYcqvuTCZg+rX+Sbhsylt6QuSvQ="},"reflow_public_key":"AX8cmFkKLcmMGYb6YfnqAVDgRAa5tiX4XSfzvKordckZguU7ZVQTWf95x9VnenwgBcyJgniVNKQDSkodhrfGc3z3BzDfUcFEMEJhcinkrFayPq2G51Cx85bFQqfUw9DgUK12dgGP7Utout9CdqdEr2nCqmBJ25UGcpsQbjRF2edbLQTx7r6tkghpgopQUepMDnpGJXU8m8vADB5dxyhZsSNjWoH28QDTCyiRsfeV2a4w8ACGpvPb2ZjDPqZw1AVa9BcG2b","seed":"arrow story season about lucky wedding weird vast verify route churn rally"}'

v_pubkey='{"eddsa_public_key":"BmW1a6x43P4Rae9B4hS67PhHTCUShXAGy4K8tQtUfa8L"}'

Expand Down
Loading