commit | b71187d92ab069c9ebdedb25d359c9791fcb69d6 | [log] [tgz] |
---|---|---|
author | Sam Saccone <[email protected]> | Tue Jul 18 22:11:47 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Jul 18 22:11:47 2023 +0000 |
tree | b7b82362ddfe12cb0b8506c1994ff8c7592ddb0f | |
parent | eb687e079ce69a00d270030d12966a86ecac0204 [diff] | |
parent | 3d149d574aa7171f6d2442386af46d5976377cf9 [diff] |
Move OWNER reference master=>main. am: 8f02481fb0 am: 7d0215080c am: 85934f3834 am: 7371d117e7 am: 3d149d574a Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/zeroize/+/2661237 Change-Id: I076003f3601cb715ea7280485c4df79c5effea63 Signed-off-by: Automerger Merge Worker <[email protected]>
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.
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_std]
i.e. embedded-friendly!Rust 1.56 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.
Licensed under either of:
at your option.
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.