diff --git a/signature/ed25519/ed25519.go b/signature/ed25519/ed25519.go index ea828bf..bb9e9ff 100644 --- a/signature/ed25519/ed25519.go +++ b/signature/ed25519/ed25519.go @@ -21,6 +21,7 @@ import ( "github.com/tink-crypto/tink-go/v2/core/registry" "github.com/tink-crypto/tink-go/v2/internal/internalregistry" + "github.com/tink-crypto/tink-go/v2/internal/protoserialization" ) func init() { @@ -33,4 +34,16 @@ func init() { if err := registry.RegisterKeyManager(new(verifierKeyManager)); err != nil { panic(fmt.Sprintf("ed25519.init() failed: %v", err)) } + if err := protoserialization.RegisterKeySerializer[*PublicKey](&publicKeySerializer{}); err != nil { + panic(fmt.Sprintf("ed25519.init() failed: %v", err)) + } + if err := protoserialization.RegisterKeyParser(verifierTypeURL, &publicKeyParser{}); err != nil { + panic(fmt.Sprintf("ed25519.init() failed: %v", err)) + } + if err := protoserialization.RegisterKeySerializer[*PrivateKey](&privateKeySerializer{}); err != nil { + panic(fmt.Sprintf("ed25519.init() failed: %v", err)) + } + if err := protoserialization.RegisterKeyParser(signerTypeURL, &privateKeyParser{}); err != nil { + panic(fmt.Sprintf("ed25519.init() failed: %v", err)) + } }