All Projects → dalek-cryptography → Subtle

dalek-cryptography / Subtle

Licence: bsd-3-clause
Pure-Rust traits and utilities for constant-time cryptographic implementations.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Subtle

Wolfssh
wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
Stars: ✭ 142 (-9.55%)
Mutual labels:  cryptography
Awesome Virgil
Key Management and Crypto Building Block for your App or Device.
Stars: ✭ 146 (-7.01%)
Mutual labels:  cryptography
Discordcrypt
End-To-End File & Message Encryption For Discord
Stars: ✭ 150 (-4.46%)
Mutual labels:  cryptography
Mpyc
MPyC for Secure Multiparty Computation in Python
Stars: ✭ 142 (-9.55%)
Mutual labels:  cryptography
Simon Speck
The SIMON and SPECK families of lightweight block ciphers. #nsacyber
Stars: ✭ 146 (-7.01%)
Mutual labels:  cryptography
Simplednscrypt
A simple management tool for dnscrypt-proxy
Stars: ✭ 1,901 (+1110.83%)
Mutual labels:  cryptography
Dizk
Java library for distributed zero knowledge proof systems
Stars: ✭ 140 (-10.83%)
Mutual labels:  cryptography
Bot18
Bot18 is a high-frequency cryptocurrency trading bot developed by Zenbot creator @carlos8f
Stars: ✭ 157 (+0%)
Mutual labels:  cryptography
Cryptokernel
A SDK for implementing blockchain-based digital currencies
Stars: ✭ 146 (-7.01%)
Mutual labels:  cryptography
Auth Adt
Authenticated Data Structures Generically
Stars: ✭ 150 (-4.46%)
Mutual labels:  cryptography
Opentimestamps Server
OpenTimestamps server component
Stars: ✭ 143 (-8.92%)
Mutual labels:  cryptography
Wasm Crypto
A WebAssembly (via AssemblyScript) set of cryptographic primitives for building authentication and key exchange protocols.
Stars: ✭ 146 (-7.01%)
Mutual labels:  cryptography
Torus Node
Torus nodes run a Distributed Key Generation protocol amongst themselves that allows for the generation, storage and assignment of cryptographic keys
Stars: ✭ 148 (-5.73%)
Mutual labels:  cryptography
Dumb Crypto
Dumb, but easily verifiable implementations of crypto algorithms
Stars: ✭ 137 (-12.74%)
Mutual labels:  cryptography
Shamir
A Java implementation of Shamir's Secret Sharing algorithm over GF(256).
Stars: ✭ 153 (-2.55%)
Mutual labels:  cryptography
Noiseprotocol
Noise Protocol Framework - Python 3 implementation
Stars: ✭ 142 (-9.55%)
Mutual labels:  cryptography
Branca
🔑 Secure alternative to JWT. Authenticated Encrypted API Tokens for Go.
Stars: ✭ 147 (-6.37%)
Mutual labels:  cryptography
Login With Metamask Demo
Demo project for "One-click Login with Blockchain: A MetaMask Tutorial"
Stars: ✭ 157 (+0%)
Mutual labels:  cryptography
Argon2rs
The pure-Rust password hashing library running on Argon2.
Stars: ✭ 157 (+0%)
Mutual labels:  cryptography
Dontclickshit
Як не стати кібер-жертвою
Stars: ✭ 149 (-5.1%)
Mutual labels:  cryptography

subtle

Pure-Rust traits and utilities for constant-time cryptographic implementations.

It consists of a Choice type, and a collection of traits using Choice instead of bool which are intended to execute in constant-time. The Choice type is a wrapper around a u8 that holds a 0 or 1.

subtle = "2.4"

This crate represents a “best-effort” attempt, since side-channels are ultimately a property of a deployed cryptographic system including the hardware it runs on, not just of software.

The traits are implemented using bitwise operations, and should execute in constant time provided that a) the bitwise operations are constant-time and b) the bitwise operations are not recognized as a conditional assignment and optimized back into a branch.

For a compiler to recognize that bitwise operations represent a conditional assignment, it needs to know that the value used to generate the bitmasks is really a boolean i1 rather than an i8 byte value. In an attempt to prevent this refinement, the crate tries to hide the value of a Choice's inner u8 by passing it through a volatile read. For more information, see the About section below.

Versions prior to 2.2 recommended use of the nightly feature to enable an optimization barrier; this is not required in versions 2.2 and above.

Note: the subtle crate contains debug_asserts to check invariants during debug builds. These invariant checks involve secret-dependent branches, and are not present when compiled in release mode. This crate is intended to be used in release mode.

Documentation

Documentation is available here.

Minimum Supported Rust Version

Rust 1.41 or higher.

Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump.

About

This library aims to be the Rust equivalent of Go’s crypto/subtle module.

The optimization barrier in impl From<u8> for Choice was based on Tim Maclean's work on rust-timing-shield, which attempts to provide a more comprehensive approach for preventing software side-channels in Rust code.

subtle is authored by isis agora lovecruft and Henry de Valence.

Warning

This code is a low-level library, intended for specific use-cases implementing cryptographic protocols. It represents a best-effort attempt to protect against some software side-channels. Because side-channel resistance is not a property of software alone, but of software together with hardware, any such effort is fundamentally limited.

USE AT YOUR OWN RISK

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].