0xADE1A1DE / CryptOpt

CryptOpt: Verified Compilation with Randomized Program Search for Cryptographic Primitives
https://0xade1a1de.github.io/CryptOpt/
Apache License 2.0
56 stars 11 forks source link

Target request: x86_64 without ADX #143

Open andres-erbsen opened 1 year ago

andres-erbsen commented 1 year ago

It would be nice to use CryptOpt to generate plain x86_64 code that does not depend on the ADX extension, to serve as a fallback from CryptOpt-optimized fast assembly in distributed binaries. This is a requirement for deployment in BoringSSL, and I hear it may be relevant to adoption of https://github.com/mit-plv/fiat-crypto/issues/1582 as well.

I am thinking of use of CryptOpt in this context as primarily an assurance benefit, though if it's decently fast still, even better.

I would be happy to do the work for adapting CryptOpt here if you think that this would be a good first project to hack on in the CryptOpt codebase.

dderjoel commented 1 year ago

There is a couple things here

I would be happy to do the work for adapting CryptOpt here if you think that this would be a good first project to hack on in the CryptOpt codebase.

Hard to tell. I wonder if it would make sense to dive into that now or refactor beforehand to have some sort of capability system, based on which CryptOpt can emit code constructs. (Thinking of bringing this to Go-Assembly or ARM).

andres-erbsen commented 1 year ago

Ok, thank you for the overview! Adding support for more constrained register allocation seems to be the main challenge here, and I don't feel up to tackling it right now.