mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
crypto: ecc - Optimize vli additive operations using compiler builtins
Replace the software carry flag emulation with compiler builtins. Even the newest compilers struggle with taking advantage of the hardware carry flag. Compiler builtins allow the compiler to much more easily achieve this while still remaining constant-time. This yields an approximately 6-7% performance improvement on the ecc_gen_privkey, ecc_make_pub_key and crypto_ecdh_shared_secret functions on x86_64 on all curve sizes. Additionally, the code becomes much more readable. Signed-off-by: Fabian Blatter <fabianblatter09@gmail.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
54e56712f0
commit
9deef9c5b8
1 changed files with 60 additions and 38 deletions
98
crypto/ecc.c
98
crypto/ecc.c
Loading…
Add table
Add a link
Reference in a new issue