Make zeroize available to product and vendor am: db8d34d3ab

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/zeroize/+/2476535

Change-Id: I57c8c183d129a5b076705785e08cb7700ee24f05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
tree: 7f6716249b4ac7150acdb2d1e481c8207e53c880
  1. patches/
  2. src/
  3. tests/
  4. .cargo_vcs_info.json
  5. Android.bp
  6. Cargo.toml
  7. Cargo.toml.orig
  8. cargo2android.json
  9. cargo2android_nostd.bp
  10. CHANGELOG.md
  11. LICENSE-APACHE
  12. METADATA
  13. MODULE_LICENSE_APACHE2
  14. OWNERS
  15. README.md
  16. TEST_MAPPING
README.md

RustCrypto: zeroize

Crate Docs Apache 2.0/MIT Licensed MSRV Build Status

Securely zero memory (a.k.a. zeroize) while avoiding compiler optimizations.

This crate implements a portable approach to securely zeroing memory using techniques which guarantee they won't be “optimized away” by the compiler.

The Zeroize trait is the crate's primary API.

Documentation

About

Zeroing memory securely is hard - compilers optimize for performance, and in doing so they love to “optimize away” unnecessary zeroing calls. There are many documented “tricks” to attempt to avoid these optimizations and ensure that a zeroing routine is performed reliably.

This crate isn‘t about tricks: it uses core::ptr::write_volatile and core::sync::atomic memory fences to provide easy-to-use, portable zeroing behavior which works on all of Rust’s core number types and slices thereof, implemented in pure Rust with no usage of FFI or assembly.

  • No insecure fallbacks!
  • No dependencies!
  • No FFI or inline assembly! WASM friendly (and tested)!
  • #![no_std] i.e. embedded-friendly!
  • No functionality besides securely zeroing memory!
  • (Optional) Custom derive support for zeroing complex structures

Minimum Supported Rust Version

Rust 1.51 or newer.

In the future, we reserve the right to change MSRV (i.e. MSRV is out-of-scope for this crate's SemVer guarantees), however when we do it will be accompanied by a minor version bump.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.