-
Notifications
You must be signed in to change notification settings - Fork 5
/
keypairoomClientRecreateKeys.zen
80 lines (68 loc) · 3.05 KB
/
keypairoomClientRecreateKeys.zen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (C) 2022-2023 Dyne.org foundation <[email protected]>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
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'
and I have a 'base64' named 'seedServerSideShard.HMAC'
When I rename 'seedServerSideShard.HMAC' to 'salt'
and I create the key derivation of 'seed' with password 'salt'
and I rename the 'key derivation' to 'seed.root'
# SKs generation
# In this flow the order should NOT be changed
When I create the hash of 'seed.root'
When I rename the 'hash' to 'seed.ecdh'
When I create the hash of 'seed.ecdh'
When I rename the 'hash' to 'seed.eddsa'
When I create the hash of 'seed.eddsa'
When I rename the 'hash' to 'seed.ethereum'
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'
# This prints the PKs, one object each
Then print the 'ecdh public key' as 'base58'
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'