-
Notifications
You must be signed in to change notification settings - Fork 31
Security
This section has security-relevant information regarding orion.
orion has a best-effort approach to wiping sensitive memory. There are known obstacles for ensuring effective memory wiping using Rust (from zeroize):
However, be aware that Rust's current memory semantics (e.g. move) can leave copies of data in memory, and there isn't presently a good solution for ensuring all copies of data on the stack are properly cleared.
Furthermore, orion partly uses destructors to wipe memory. According to the Rustonomicon, there are no guarantees that destructors are actually called, as safe Rust considers failing to call destructors safe, "However any program that actually manages to do such a thing is probably incorrect." (from Rustonomicon).
Due to such limitations, orion offers no guarantees that all sensitive memory is wiped.
orion also makes no attempts to avoid sensitive memory being written to the system swap space.
orion only aims to protect against timing-based side-channel vulnerabilities.
orion itself forbids the use of so-called “unsafe” code, meaning that all memory-safety guarantees provided by Rust are enforced at compile-time. However, even though orion itself does not allow unsafe code, it is used in some of its dependencies.
These are metrics that give an overview of which dependencies use unsafe code and how much:
Metric output format: x/y
x = unsafe code used by the build
y = total unsafe code found in the crate
Functions Expressions Impls Traits Methods Dependency
0/0 0/0 0/0 0/0 0/0 orion v0.12.1 (**omitted**)
0/1 214/224 0/0 0/0 0/0 ☢ ├── byteorder v1.2.7
0/0 14/14 14/14 1/1 3/3 ☢ ├── clear_on_drop v0.2.3
│ [build-dependencies]
0/0 4/162 0/2 0/0 0/4 ☢ │ └── cc v1.0.25
0/0 12/40 0/0 0/0 0/0 ☢ ├── rand_os v0.1.1
0/0 0/0 0/0 0/0 0/0 │ ├── libc v0.2.44
0/0 47/47 0/0 0/0 0/0 ☢ │ └── rand_core v0.3.0
0/0 1/1 0/0 0/0 0/0 ☢ ├── subtle v2.0.0
0/0 13/13 0/0 0/0 0/0 ☢ └── tiny-keccak v1.4.2
0/0 0/0 0/0 0/0 0/0 └── crunchy v0.1.6
[dev-dependencies]
0/0 0/0 0/0 0/0 0/0 ├── hex v0.3.2
0/0 0/5 0/0 0/0 0/0 └── serde_json v1.0.33
0/0 0/1 0/0 0/0 0/0 ├── itoa v0.4.3
0/15 0/38 0/0 0/0 0/2 ├── ryu v0.2.7
0/0 0/0 0/0 0/0 0/0 └── serde v1.0.83
These metrics were made using cargo-geiger.
orion has not yet received any formal security audit.