RustCrypto / block-ciphers

Collection of block cipher algorithms written in pure Rust
677 stars 130 forks source link

cast6: initial crate #384

Closed LegionMammal978 closed 1 year ago

LegionMammal978 commented 1 year ago

This crate is mostly a copy-paste of the cast5 code. Apart from everything being larger in size, there are a couple main differences: forward_quad() and backward_quad() replace the direct fX!() calls, and Cast6::key_schedule() is implemented more regularly in terms of forward_octave(). The TM and TR arrays were generated from the algorithm in the RFC; since it only takes a bunch of wrapping additions, it might be worthwhile to construct one or both arrays with a const function, or even to compute each element at runtime.

tarcieri commented 1 year ago

Going to merge this in the interest of getting it in before we do a cipher upgrade across the whole repo.

@newpavlov can you grant crate publishing access to the block ciphers team?

newpavlov commented 1 year ago

@tarcieri Done.