Skip to content

Commit

Permalink
chore: Add Bls12381G2Key2020 key
Browse files Browse the repository at this point in the history
Add Bls12381G2Key2020 key

Closes #566

Signed-off-by: Sandra Vrtikapa <sandra.vrtikapa@securekey.com>
  • Loading branch information
sandrask committed Mar 3, 2021
1 parent 44bd3b0 commit b3b407e
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 b3b407e

Please sign in to comment.