The register arguments to the AESE instruction are commutative, however
the first input register is constrained in that it also names the output
register. The constraint on register allocation causes recent LLVM
versions to emit a lot of MOV instructions, significantly impacting
performance.
Swapping the register operands allows the compiler to emit significantly
fewer MOV instructions. This change improves performance on Arm
infrastructure micro-architectures by 14-36% depending on the
micro-architecture
Found and reported by George Steed from ARM. Thanks!
* Support for Cloudflare Workers for javascript_stir
* Ramove debugging comment
---------
Co-authored-by: Frank Denis <124872+jedisct1@users.noreply.github.com>
* Version 12 of ECVRF
* Incorrect ordering of function inputs
* Identation and notation
* single multiscalar multiplication function
Also changed the style of tests, where the expected output is in vrf.exp rather than in test data (following the style of the hashing).
* declarations inside the if code block
* identation of test_data
* Rename to RFC9381
* Move declarations to top of block
* Check small order over deserialised PK
* Include from_string functions in ed25519_ref10
* Update quirks.h
---------
Co-authored-by: Frank Denis <124872+jedisct1@users.noreply.github.com>
Includes being outside of `extern "C"` are de-facto standard in all other include files of libsodium.
At the same time, having inside the `extern "C"` is causing problem with C++ vs. C toolchain being confused about which libraries should be linked. This was especially painful while working on `swift-sodium` integration with windows.
So that we can include additional checks, especially for weak states.
Ideally, weak states should be checked after every update, but they
would be especially bad when the cipher is used as a stream cipher.
And in that case, checking for a weak state only at the end is
sufficient.