Skip to content

Commit

Permalink
feat(client): ✨ add dilithium key to issuer did document (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-cristino authored Feb 13, 2024
1 parent 41413fe commit 7e64b4a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions client/v1/issuer/create-identity-pubkeys.zen
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Scenario 'eddsa' : Create the pk
Scenario 'credential': Create the pk
Scenario 'bbs': Create the pk
Scenario 'es256': Create the pk
Scenario 'qp': Create the pk

Given my name is in a 'string' named 'controller'
and I have my 'keyring'
Expand All @@ -18,6 +19,7 @@ and I create the reflow public key
and I create the issuer public key
and I create the bbs public key
and I create the es256 public key
and I create the dilithium public key

Then I print the 'eddsa public key'
and I print the 'ethereum address'
Expand All @@ -27,4 +29,5 @@ and I print the 'reflow public key'
and I print the 'issuer public key' as 'compressed issuer public key'
and I print the 'bbs public key'
and I print the 'es256 public key'
and I print the 'dilithium public key'
and I print my name in 'identity'
2 changes: 2 additions & 0 deletions client/v1/issuer/create-keyring.zen
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Scenario reflow
Scenario es256
Scenario credential
Scenario bbs
Scenario qp

Given I my name is in a 'string' named 'controller'

Expand All @@ -16,6 +17,7 @@ and I create the reflow key
and I create the es256 key
and I create the issuer key
and I create the bbs key
and I create the dilithium key

# keyring and explicit owner identity
Then print my 'keyring'
Expand Down
1 change: 1 addition & 0 deletions client/v1/issuer/did-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"https://dyne.github.io/W3C-DID/specs/IssuerBLS12381.json",
"https://dyne.github.io/W3C-DID/specs/Bbs.json",
"https://dyne.github.io/W3C-DID/specs/EcdsaSecp256r1.json",
"https://dyne.github.io/W3C-DID/specs/Dilithium2.json",
{
"description": "https://schema.org/description"
}
Expand Down
20 changes: 19 additions & 1 deletion client/v1/issuer/pubkeys-request-unsigned.zen
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Scenario 'eddsa' : Move pk in did doc
Scenario 'credential': Move pk in did doc
Scenario 'bbs': Move pk in did doc
Scenario 'es256': Move pk in did doc
Scenario 'qp': Move pk in did doc

# data
Given I have a 'string array' named '@context'
Expand All @@ -20,6 +21,7 @@ Given I have a 'ecdh_public_key'
Given I have a 'reflow_public_key'
Given I have a 'bbs_public_key'
Given I have a 'es256_public_key'
Given I have a 'dilithium_public_key'
Given I have a 'base58' named 'issuer_public_key'
Given I have a 'base58' named 'bitcoin public key'

Expand Down Expand Up @@ -153,7 +155,23 @@ When I move 'id' in 'verification-key'
When I copy the 'did:dyne:' to 'controller' in 'verification-key'
When I move 'verification-key' in 'verificationMethod'

# 8-ethereum address
# 8-dilithium public key
When I create the 'string dictionary' named 'verification-key'
# pk
When I create the 'base58' string of 'dilithium public key'
and I move the 'base58' to 'publicKeyBase58' in 'verification-key'
# type
When I set 'type' to 'Dilithium2VerificationKey' as 'string'
When I move 'type' in 'verification-key'
# id
When I copy 'did:dyne:' to 'id'
When I append the string '#dilithium_public_key' to 'id'
When I move 'id' in 'verification-key'
# controller
When I copy the 'did:dyne:' to 'controller' in 'verification-key'
When I move 'verification-key' in 'verificationMethod'

# 9-ethereum address
When I create the 'string dictionary' named 'verification-key'
# address
# this follows the CAIP-10(https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md) spec
Expand Down

0 comments on commit 7e64b4a

Please sign in to comment.