usetech-llc / sr25519

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sr25519.c

burdges opened this issue · comments

I noticed all the elliptic curve, ristretto code, and signature scheme code lives in one enormous 56k file: https://github.com/usetech-llc/sr25519/blob/master/src/sr25519.c

I presume the underlying elliptic curve code came from elsewhere, but you stripped out unnecessary code from the original source, presumably because you want this code to run in a resource constrained environment.

It'd be far easier to review this code if you'd preserved the file structure of the original Ed25519 implementation from which you started. You could've commented out the unused parts if you do not trust the linker to omit them.

It'd make the code easier to merge with the original crypto library too. I'll note that libsodium added some ristretto support too: https://github.com/jedisct1/libsodium/