|
|
Log in / Subscribe / Register

Rust abstractions for Crypto API

From:  FUJITA Tomonori <fujita.tomonori-AT-gmail.com>
To:  rust-for-linux-AT-vger.kernel.org, linux-crypto-AT-vger.kernel.org
Subject:  [PATCH v2 0/3] Rust abstractions for Crypto API
Date:  Mon, 10 Jul 2023 19:22:22 +0900
Message-ID:  <20230710102225.155019-1-fujita.tomonori@gmail.com>
Cc:  alex.gaynor-AT-gmail.com, herbert-AT-gondor.apana.org.au, ebiggers-AT-kernel.org, benno.lossin-AT-proton.me
Archive-link:  Article

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-...

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

-- 
2.34.1



Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds