From b3b407e37715554afc0e24b87c60646ba652b93c Mon Sep 17 00:00:00 2001 From: Sandra Vrtikapa Date: Wed, 3 Mar 2021 13:43:13 -0500 Subject: [PATCH] chore: Add Bls12381G2Key2020 key Add Bls12381G2Key2020 key Closes #566 Signed-off-by: Sandra Vrtikapa --- pkg/versions/1_0/operationparser/patchvalidator/document.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/versions/1_0/operationparser/patchvalidator/document.go b/pkg/versions/1_0/operationparser/patchvalidator/document.go index e978459d..17e56227 100644 --- a/pkg/versions/1_0/operationparser/patchvalidator/document.go +++ b/pkg/versions/1_0/operationparser/patchvalidator/document.go @@ -22,6 +22,7 @@ var ( const ( jwsVerificationKey2020 = "JwsVerificationKey2020" + bls12381G2Key2020 = "Bls12381G2Key2020" jsonWebKey2020 = "JsonWebKey2020" ecdsaSecp256k1VerificationKey2019 = "EcdsaSecp256k1VerificationKey2019" x25519KeyAgreementKey2019 = "X25519KeyAgreementKey2019" @@ -45,6 +46,7 @@ type existenceMap map[string]string var allowedKeyTypesGeneral = existenceMap{ jwsVerificationKey2020: jwsVerificationKey2020, + bls12381G2Key2020: bls12381G2Key2020, jsonWebKey2020: jsonWebKey2020, ecdsaSecp256k1VerificationKey2019: ecdsaSecp256k1VerificationKey2019, ed25519VerificationKey2018: ed25519VerificationKey2018, @@ -53,6 +55,7 @@ var allowedKeyTypesGeneral = existenceMap{ var allowedKeyTypesVerification = existenceMap{ jwsVerificationKey2020: jwsVerificationKey2020, + bls12381G2Key2020: bls12381G2Key2020, jsonWebKey2020: jsonWebKey2020, ecdsaSecp256k1VerificationKey2019: ecdsaSecp256k1VerificationKey2019, ed25519VerificationKey2018: ed25519VerificationKey2018, @@ -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,