rust-crypto icon indicating copy to clipboard operation
rust-crypto copied to clipboard

A (mostly) pure-Rust implementation of various cryptographic algorithms.

Results 103 rust-crypto issues
Sort by recently updated
recently updated
newest added

As per issue #345, I've written a Twofish implementation which might be usable until someone provides a better one.

The implementations in this library are of varying code quality. Some look robust, for example the AES-NI implementation. Others look... less robust, for example the fallback pure Rust AES implementation,...

``` rust extern crate crypto; use crypto::aes::KeySize; use crypto::aesni::AesNiEncryptor; use crypto::symmetriccipher::BlockEncryptor; fn main() { let enc = AesNiEncryptor::new(KeySize::KeySize256, &[0; 32]); let mut out = [0; 16]; enc.encrypt_block(&vec![], &mut out); }...

If I try building with just `cargo build` on OpenBSD I get an error from GCC, which is used to compile one of the headers: ``` $ cargo build Compiling...

I added md4 hash function with tests and benchmarks. Some parts of code are based on md5.rs since they are similar algorithms.

Breaking change in derivations of Clone for arrays; see rust-lang/rust#30244. Offending line: https://github.com/DaGenix/rust-crypto/blob/db7fe6caf38315d94f7e3dfb6257cd1f876f1c39/src/blowfish.rs#L13 rust-lang/rust#30130 was reverted due to ICEs related to Copy on large arrays in rust-lang/rust#25733 Possible solution: use...

Using ghash to create a gmac I noticed is slower than an hmac using sha256; I was under the impression gmac would be faster when c is left blank (no...

`Digest` has a handy `result_str` function, but for `Mac` (eg `Hmac`), to just get a hex string, you need to use `serialize::hex::ToHex` and do the following: ``` rust hmac.result().code().as_slice().to_hex() ```...

`pub fn keypair(seed: &[u8]) -> ([u8; 64], [u8; 32])` => `pub fn keypair(seed: &[u8]) -> (Secret, Public)` `let foo = keypair(..); .. foo.0 ..` can be non obvious for readers.

[Nadeko](https://github.com/klutzy/nadeko) could replace custom unsafe assembly code while keeping constant-time operations. cc #93