Skip to content

Commit

Permalink
Merge pull request #567 from sandrask/issue-566
Browse files Browse the repository at this point in the history
chore: Add Bls12381G2Key2020 key
  • Loading branch information
troyronda authored Mar 3, 2021
2 parents 50c4792 + b3b407e commit eae12c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/versions/1_0/operationparser/patchvalidator/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var (

const (
jwsVerificationKey2020 = "JwsVerificationKey2020"
bls12381G2Key2020 = "Bls12381G2Key2020"
jsonWebKey2020 = "JsonWebKey2020"
ecdsaSecp256k1VerificationKey2019 = "EcdsaSecp256k1VerificationKey2019"
x25519KeyAgreementKey2019 = "X25519KeyAgreementKey2019"
Expand All @@ -45,6 +46,7 @@ type existenceMap map[string]string

var allowedKeyTypesGeneral = existenceMap{
jwsVerificationKey2020: jwsVerificationKey2020,
bls12381G2Key2020: bls12381G2Key2020,
jsonWebKey2020: jsonWebKey2020,
ecdsaSecp256k1VerificationKey2019: ecdsaSecp256k1VerificationKey2019,
ed25519VerificationKey2018: ed25519VerificationKey2018,
Expand All @@ -53,6 +55,7 @@ var allowedKeyTypesGeneral = existenceMap{

var allowedKeyTypesVerification = existenceMap{
jwsVerificationKey2020: jwsVerificationKey2020,
bls12381G2Key2020: bls12381G2Key2020,
jsonWebKey2020: jsonWebKey2020,
ecdsaSecp256k1VerificationKey2019: ecdsaSecp256k1VerificationKey2019,
ed25519VerificationKey2018: ed25519VerificationKey2018,
Expand All @@ -61,6 +64,7 @@ var allowedKeyTypesVerification = existenceMap{
var allowedKeyTypesAgreement = existenceMap{
// TODO: Verify appropriate agreement key types for JWS and Secp256k1
jwsVerificationKey2020: jwsVerificationKey2020,
bls12381G2Key2020: bls12381G2Key2020,
jsonWebKey2020: jsonWebKey2020,
ecdsaSecp256k1VerificationKey2019: ecdsaSecp256k1VerificationKey2019,
x25519KeyAgreementKey2019: x25519KeyAgreementKey2019,
Expand Down

0 comments on commit eae12c7

Please sign in to comment.