mmcloughlin / avo

Generate x86 Assembly with Go
BSD 3-Clause "New" or "Revised" License
2.7k stars 90 forks source link

ports: try re-implementing stdlib crypto in avo #56

Open mmcloughlin opened 5 years ago

mmcloughlin commented 5 years ago

The standard library contains some massive crypto assembly files. It would be an interesting exercise to port these to avo, to see if we could improve readability. That said, some of these would be highly non-trivial projects.

$ find src -name '*_amd64.s' | xargs wc -l | sort -n | tail
     743 src/runtime/sys_darwin_amd64.s
    1031 src/crypto/sha256/sha256block_amd64.s
    1286 src/crypto/aes/gcm_amd64.s
    1377 src/internal/x/crypto/curve25519/ladderstep_amd64.s
    1468 src/crypto/sha512/sha512block_amd64.s
    1500 src/crypto/sha1/sha1block_amd64.s
    1632 src/runtime/asm_amd64.s
    2348 src/crypto/elliptic/p256_asm_amd64.s
    2695 src/internal/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s
   24962 total

Note this is from Go version:

$ git describe --tags
go1.12beta2-31-g8ec729c141
dominikh commented 3 years ago

Is this issue still relevant, with the work that Filippo has been putting in?

mmcloughlin commented 3 years ago

Filippo's work definitely contributes to this, and it's really exciting, but there's still a lot of crypto assembly to address (with avo or otherwise).