Skip to content

Commit

Permalink
chore: Add P-384 to protocol params
Browse files Browse the repository at this point in the history
Add "P-384" to protocol parameters

Signed-off-by: Sandra Vrtikapa <sandra.vrtikapa@securekey.com>
  • Loading branch information
sandrask committed Jul 5, 2022
1 parent 6dbcaa0 commit 2e6f73f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/protocolversion/versions/v1_0/config/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func GetProtocolConfig() protocol.Protocol {
MaxProofFileSize: 2500000,
Patches: []string{"add-public-keys", "remove-public-keys", "add-services", "remove-services", "ietf-json-patch"}, //nolint:lll
SignatureAlgorithms: []string{"EdDSA", "ES256", "ES256K"},
KeyAlgorithms: []string{"Ed25519", "P-256", "secp256k1"},
KeyAlgorithms: []string{"Ed25519", "P-256", "P-384", "secp256k1"},
MaxMemoryDecompressionFactor: 3,
NonceSize: 16,
}
Expand Down
7 changes: 6 additions & 1 deletion pkg/protocolversion/versions/v1_0/config/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ import (
)

func TestGetProtocolConfig(t *testing.T) {
t.Run("success", func(t *testing.T) {
t.Run("success - maximum operation count", func(t *testing.T) {
cfg := GetProtocolConfig()
require.Equal(t, uint(10000), cfg.MaxOperationCount)
})

t.Run("success - key algorithms", func(t *testing.T) {
cfg := GetProtocolConfig()
require.Equal(t, []string{"Ed25519", "P-256", "P-384", "secp256k1"}, cfg.KeyAlgorithms)
})
}

0 comments on commit 2e6f73f

Please # to comment.