#hash #octavo #warnings #production #function #sha-512

octavo-digest

Octavo - Cryptographic Hash Functions. WARNING!!! Not suitable for production

3 releases

Uses old Rust 2015

0.1.2 Apr 12, 2016
0.1.1 Apr 11, 2016
0.1.0 Apr 8, 2016

#20 in #sha-512

Download history 48/week @ 2024-09-02 25/week @ 2024-09-09 43/week @ 2024-09-23 4/week @ 2024-10-14 69/week @ 2024-12-02 94/week @ 2024-12-09

163 downloads per month
Used in 2 crates

MIT license

2.5MB
2.5K SLoC

Octavo

Join the chat at https://gitter.im/libOctavo/octavo

Crates.io License Build Status Coverage Status GetBadges Game Gratipay

Octavo

Highly modular & configurable hash & crypto library written in pure Rust.

Installation

[dependencies]
octavo = { git = "https://github.com/libOctavo/octavo" }

WARNING!!! Octavo is in very early stage of development. There is a hell lot of issues and vulnerabilities to enormous kind of attacks! Do not use it in production code (yet)!

Contributing

You can help with this project in 3 ways:

  1. Help me code this up! Just fork, create branch, code & pull-request. Yay!
  2. Audit code or use it. If you find a bug just file an issue, it also is a great help.
  3. Support us at Gratipay.

Full disclosure

If you find security bugs, contact me via mail lukasz@niemier.pl using my PGP key.

Licence

Check LICENSE file.


lib.rs:

Cryptographic hash functions primitives

Via Wikipedia:

The ideal cryptographic hash function has four main properties:

  • it is easy to compute the hash value for any given message
  • it is infeasible to generate a message from its hash
  • it is infeasible to modify a message without changing the hash
  • it is infeasible to find two different messages with the same hash.

Example

Calculate SHA-512 sum:

use octavo_digest::Digest;
use octavo_digest::sha2::Sha512;

let mut result = vec![0; Sha512::output_bytes()];
let mut sha = Sha512::default();

sha.update(data);
sha.result(&mut result);

for byte in result {
    print!("{:2x}", byte);
}
println!(" {}", data);

Dependencies