3 ms·
SUPERCOP [1] has a bunch of public-domain implementations. [2] is a portable one. To get top speed, you need SIMD, though. The available implementations in SUPE
by pbsd 13y ago
SUPERCOP [1] has a bunch of public-domain implementations. [2] is a portable one. To get top speed, you need SIMD, though. The available implementations in SUPERCOP are in (x86) assembly, but they really should be converted to intrinsics to be more portable.
I don't know if Rust has intrinsics or some other kind of vector register support. I'd even volunteer to implement Salsa20 on it.
[1] http://bench.cr.yp.to/supercop.html http://bench.cr.yp.to/supercop.html
[2] https://github.com/floodyberry/supercop/blob/master/crypto_stream/salsa2012/e/merged/e/ https://github.com/floodyberry/supercop/blob/master/crypto_s...
[3] https://github.com/floodyberry/supercop/tree/master/crypto_stream/salsa2012/amd64_xmm6 https://github.com/floodyberry/supercop/tree/master/crypto_s...
- pcwalton 13y agoThere's support for SIMD in Rust, and the compiler intrinsics that LLVM supports. Inline assembler is supported as well. However, note that the SIMD support will quite possibly change to become more first-class.