Cryptographic algorithms written in pure Rust. AEAD encryption, block/stream ciphers, hashes, elliptic curves, RSA, signatures, PKCS/PKIX, and more

Joined April 2020
Excited to use the new `hybrid-array` crate from @RustCryptoOrg ! It's like `generic-array` but with no `unsafe` under the hood, a bridge to using fully-featured const generics in expressions in the not-too-distant Rust future! docs.rs/hybrid-array crates.io/crates/hybrid-arra…
1
10
Our `ecdsa` crate prevents vulnerabilities like Java's CVE-2022-21449 using type safety. We use a `NonZeroScalar` type to model the `r` and `s` components of an ECDSA signature. This prevents either of them from ever accidentally being zero. docs.rs/ecdsa/0.13.4/ecdsa/s…
3
85
14
384
Yes
Replying to @kennyog
Yes, it ensures both r and s are valid nonzero elements of the scalar field
2
Replying to @RustCryptoOrg
Is this sufficient to prevent r or s from being 0 mod q?
1
2
Yes, it ensures both r and s are valid nonzero elements of the scalar field
1
1
17
Announcing initial hash2curve support in the following @RustCryptoOrg elliptic curve crates: - `k256` v0.10.2 (secp256k1) - `p256` v0.10.1 (NIST P-256) Repo: github.com/RustCrypto/ellipt… See trait documentation here: docs.rs/elliptic-curve/0.11.…
4
11
My sha1 crate is now called sha1_smol for when you need a dependency free version. Major versions of the sha1 crate in the future will refer to the RustCrypto SHA1 implementation. Users of the 0.6 line of sha1 are auto migrated to sha1_smol. github.com/mitsuhiko/sha1-sm…
1
4
20
[ANN] `rsa` v0.5.0: pure @rustlang implementation of the RSA public key cipher and digital signature algorithm. This release includes constant-time PEM decoding/encoding for PKCS#1 and PKCS#8 keys. - repo: github.com/RustCrypto/RSA - docs: docs.rs/rsa/0.5.0/
1
5
14
Why is constant-time PEM encoding important for an RSA library? A forthcoming paper illustrates RSA key extraction from SGX enclaves using PEM/Base64 sidechannels alone: xitter.cf/JanWichelmann/status/1…
3
7
In a moment of serendipity I just so happen to have published a new @RustCryptoOrg strict PEM parser which not only uses a constant time Base64 implementation but in the happy path completely avoids any branching or table lookups on potentially secret data github.com/RustCrypto/utils/…
This quoted post is unavailable.
7
2
27
Updated ECDSA/secp256k1 benchmarks comparing: - @RustCryptoOrg's pure Rust `k256` crate - The pure Rust `libsecp256k1` crate - The `secp256k1` crate (FFI wrapper for the bitcoin-core C library) Faster is better.
2
5
1
14
There are many other low-hanging fruit optimizations to pursue as yet. For example, we don't yet precompute powers of the generator, which would also speed up verification. We also use constant-time formulas for ECDSA verification. Things might be improved by e.g. wNAF.
1
1
Likewise, we use constant-time scalar inversions for ECDSA verification, where variable-time inversions could potentially be faster.