-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I have the following code that uses a fork of curve25519/internal/edwards25519:
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.
Metadata
Metadata
Assignees
Labels
No labels