Crates.io | subtle-encoding |
lib.rs | subtle-encoding |
version | 0.5.1 |
source | src |
created_at | 2018-10-02 15:34:29.36946 |
updated_at | 2020-02-08 20:55:50.540048 |
description | Encoders and decoders for common data encodings (base64, bech32, hex) which avoid data-dependent branching/table lookups and therefore provide "best effort" constant time. Useful for encoding/decoding secret values such as cryptographic keys. |
homepage | https://github.com/iqlusioninc/crates/ |
repository | https://github.com/iqlusioninc/crates/tree/develop/subtle-encoding |
max_upload_size | |
id | 87624 |
size | 53,795 |
Rust crate for encoding/decoding binary data to/from base64 and hex encodings while avoiding data-dependent branching/table lookups, and therefore providing "best effort" constant-time operation.
Also includes a non-constant-time Bech32 encoder/decoder gated under the
bech32-preview
Cargo feature (with a goal of eventually making it
constant-time).
Useful for encoding/decoding secret values such as cryptographic keys.
While this crate takes care to avoid data-dependent branching, that does not actually make it "constant time", which is an architecture-dependent property.
This crate is a "best effort" attempt at providing a constant time encoding library, however it presently provides no guarantees, nor has it been independently audited for security vulnerabilities.
Use at your own risk.
Copyright © 2018-2020 iqlusion
subtle-encoding is distributed under the terms of either the MIT license or the Apache License (Version 2.0), at your option.
See LICENSE (Apache License, Version 2.0) file in the iqlusioninc/crates
toplevel directory of this repository or LICENSE-MIT for details.