RubyCrypto / x25519

Public key cryptography library for Ruby providing the X25519 Diffie-Hellman function
https://cr.yp.to/ecdh.html
Other
46 stars 10 forks source link

Avoid gating implementations at build time on x86_64 #3

Closed tarcieri closed 6 years ago

tarcieri commented 6 years ago

ref10, if built with the CFLAGS that rfc7748_precomputed uses, is optimized with the MULX instruction, which causes illegal instruction errors. This means we can't use ref10 as a deoptimized alternative to rfc7748_precomputed if we detect that we aren't on a 4th gen Core CPU.

It'd be nice to vary CFLAGS for the codebases. One option would be to build rfc7748_precomputed as a static library, and then link with it when building the MRI extension.

tarcieri commented 6 years ago

This was addressed in #5