summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2025-04-05 11:26:01 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2025-04-07 13:22:28 +0800
commitceba0eda831382864dc420fcab5f6079fbb26ba2 (patch)
tree2bf529c2a2bff9c962ab04079d23a11cbd7dd311 /tools/lib/python
parent570ef50a15d7caa4d63d66f1e28d967065733f84 (diff)
crypto: riscv/chacha - implement library instead of skcipher
Currently the RISC-V optimized ChaCha20 is only wired up to the crypto_skcipher API, which makes it unavailable to users of the library API. The crypto_skcipher API for ChaCha20 is going to change to be implemented on top of the library API, so the library API needs to be supported. And of course it's needed anyway to serve the library users. Therefore, change the RISC-V ChaCha20 code to implement the library API instead of the crypto_skcipher API. The library functions take the ChaCha state matrix directly (instead of key and IV) and support both ChaCha20 and ChaCha12. To make the RISC-V code work properly for that, change the assembly code to take the state matrix directly and add a nrounds parameter. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions