cloudflare / cloudflare/circl

Make ed25519 and ed448 usable for Golang interfaces

Open
#109 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.7k
Forks
219
Avg merge
15h 45m
Merged PRs (30d)
4

Description

Hi!

Thanks so much for all the work on this!

So, the implementation for ed25519 and ed448 expose a certain API that is quite similar to the way golang handles it in its libraries (ecdsa, rsa, and ed25519). However, when I tried to use it for the crypto signer interface, it panics due to:

```
panic: interface conversion: ed25519.PrivateKey is not crypto.Signer: missing method Public [recovered]
panic: interface conversion: ed25519.PrivateKey is not crypto.Signer: missing method Public
```

I was wondering if we could create a method `func (priv *PrivateKey) Public() crypto.PublicKey` (in similar fashion as https://golang.org/pkg/crypto/ecdsa/#PrivateKey.Public and https://golang.org/pkg/crypto/ed25519/#PrivateKey.Public) so the APIs can be used for other interfaces as the crypto signer...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.