FiloSottile / FiloSottile/edwards25519
document how to replace ExtendedGroupElement
- Dominant language
- Go
- Stars
- 188
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
I have the following code that uses a fork of curve25519/internal/edwards25519:
```go
func TestUnmarshalMarshal(t *testing.T) {
pub, _, _ := Keypair(rand.Reader)
var A edwards25519.ExtendedGroupElement
var pubBytes [32]byte
copy(pubBytes[:], pub)
if !A.FromBytes(&pubBytes) {
t.Fatalf("ExtendedGroupElement.FromBytes failed")
}
var pub2 [32]byte
A.ToBytes(&pub2)
if pubBytes != pub2 {
t.Errorf("FromBytes(%v)->ToBytes does not round-trip, got %x\n", pubBytes, pub2)
}
}
```
I looked for matching code in this library and I wasn't quite sure what the replacement for ExtendedGroupElement, FromBytes or ToBytes should be. (Unfortunately I don't understand the crypto primitives well enough to guess at what should be the case or suggest a solution.)
I would love to be able to rip out the internal/edwards25519 fork if I can help it.
Contributor guide
Research direction
Start with the Go example in TestUnmarshalMarshal and compare the fork's curve25519/internal/edwards25519 ExtendedGroupElement, FromBytes, and ToBytes APIs with this library's exposed API. Document the replacement mapping clearly enough that users can remove the fork while preserving the unmarshalling and marshalling round trip.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100