edwards25519 icon indicating copy to clipboard operation
edwards25519 copied to clipboard

An academic question

Open DeviPrasad opened this issue 1 year ago • 3 comments

I've been reading this code while learning the field operations from the ground up. I'm also re-implementing the ideas in Rust on my own so I understand things better. I noticed that in the field implementation, 'SetBytes' and 'Bytes' (bytes) do not appear to be symmetric. I thought it would be nice if the code makes their complementary nature more explicit.

I tried it out in Rust, and it reads better, I thought. https://github.com/DeviPrasad/dev-tech-write/blob/main/techauth/tech/cryptography/code/c25519/src/field.rs#L431

Would it make sense if I try to write a Go version of the same? Would you like to comment?

DeviPrasad avatar Feb 05 '24 07:02 DeviPrasad

I am glad the codebase is being useful in learning!

I am not sure what change you are suggesting, can you give me a rough example?

FiloSottile avatar Feb 05 '24 10:02 FiloSottile

Thanks! I will share a snippet of Go code here to show the basic idea. That's on me.

DeviPrasad avatar Feb 09 '24 08:02 DeviPrasad

I think this might be actually covered by https://github.com/FiloSottile/edwards25519/pull/50

AlexanderYastrebov avatar Mar 05 '25 13:03 AlexanderYastrebov