DaGenix / rust-crypto

A (mostly) pure-Rust implementation of various cryptographic algorithms.
Apache License 2.0
1.39k stars 295 forks source link

Threefish symmetric block cipher implementation #400

Open cbarcenas opened 7 years ago

cbarcenas commented 7 years ago

This is an implementation of the Threefish symmetric block cipher, requested in #370.

My plan is to get this reviewed and accepted upstream before submitting a separate PR for an implementation of the Skein hash scheme, which relies on Threefish.

This cipher is defined in the following paper: The Skein Hash Function Family v1.3 (Ferguson, Lucks, Schneier, et al.) Specifically, see sections 2.2 and 3.3.

Test vectors come directly from the Known Answer Test submission to NIST by the Skein team. For more information about Skein, and for a link to the test vectors, see https://www.schneier.com/academic/skein/.