mbox series

[v2,0/3] Rust abstractions for Crypto API

Message ID 20230710102225.155019-1-fujita.tomonori@gmail.com
Headers show
Series Rust abstractions for Crypto API | expand

Message

FUJITA Tomonori July 10, 2023, 10:22 a.m. UTC
This patchset adds minimum Rust abstractions for Crypto API; message
digest and random number generator.

I'm trying to upstream network and crypto abstractions separately so
v2 has only crypto stuff.

Changes since v1 [1]:
- ShashDesc::new() returns the initialized object.
- checks the length of buffer.
- fix a compile error without CONFIG_CRYPTO.
- adds RNG support.
- drops network code.
- updates the CRYPTO API entry.

[1] https://lore.kernel.org/netdev/010101881db036fb-2fb6981d-e0ef-4ad1-83c3-54d64b6d93b3-000000@us-west-2.amazonses.com/T/

FUJITA Tomonori (3):
  rust: crypto abstractions for synchronous message digest API
  rust: crypto abstractions for random number generator API
  MAINTAINERS: add Rust crypto abstractions files to the CRYPTO API
    entry

 MAINTAINERS                     |   2 +
 rust/bindings/bindings_helper.h |   2 +
 rust/helpers.c                  |  38 ++++++++++
 rust/kernel/crypto.rs           |   6 ++
 rust/kernel/crypto/hash.rs      | 128 ++++++++++++++++++++++++++++++++
 rust/kernel/crypto/rng.rs       | 101 +++++++++++++++++++++++++
 rust/kernel/lib.rs              |   2 +
 7 files changed, 279 insertions(+)
 create mode 100644 rust/kernel/crypto.rs
 create mode 100644 rust/kernel/crypto/hash.rs
 create mode 100644 rust/kernel/crypto/rng.rs