block-ciphers
block-ciphers copied to clipboard
Add implementation of Speck
Based on https://eprint.iacr.org/2013/404.pdf Using testvectors from Appendix C of the aforementioned paper.
Notes:
- I implemented this based on the cipher v0.4 branch, so this should only be merged after that branch is merged.
- The crate name is currently
speck, however, there's already a crate with that name on crates.io, so I think we need to come up with a different name? I've never published on crates.io before. - The actual code itself uses a macro system similar to AES, with the code inside the macro definition based on SM4.
- I'm not very experienced in Rust, so there might be some things that could be done better. Please let me know!
This partially solves #1.
With cipher v0.4 being released, this is a bit more ready for review, but of course the crate name issue remains.
I've registered speck-cipher, so we can use it for now.
I can ask the owners of the current speck crate if they'd be willing to give it to us. It's worked before!
I can ask the owners of the current
speckcrate if they'd be willing to give it to us. It's worked before!
Perhaps that could be worth a shot, the crate on crates.io doesn't seem to be very active. If that doesn't work out, I can prepare a commit to change the crate names in the code/README/...
I can ask the owners of the current speck crate if they'd be willing to give it to us.
One problem with speck is that it's a post-1.0 crate. So making a breaking cipher change would mean that we would have to publish speck v2.0.
@newpavlov if the existing authors are OK with it, we could yank the existing post-1.0 releases and use 0.x releases while our API is unstable, and when we're ready to stabilize, release 2.0.
It doesn't have many downloads (2622) and only one downstream dependency (speck-cbc) which itself has no downstream dependencies, so I don't imagine it will be an issue. If anyone complains, we can re-release the original crate under a new name they can switch to.
I added some configuration for a minimal-versions action.
FYI: I reached out to the owners of the speck crate and did not hear back