Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speck: initial crate #297

Merged
merged 6 commits into from
Feb 10, 2023
Merged

speck: initial crate #297

merged 6 commits into from
Feb 10, 2023

Conversation

jvdsn
Copy link
Contributor

@jvdsn jvdsn commented Jan 22, 2022

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.

@jvdsn jvdsn force-pushed the speck branch 3 times, most recently from d1651ce to 6debb87 Compare January 22, 2022 19:35
@jvdsn jvdsn marked this pull request as ready for review February 10, 2022 20:32
@jvdsn
Copy link
Contributor Author

jvdsn commented Feb 10, 2022

With cipher v0.4 being released, this is a bit more ready for review, but of course the crate name issue remains.

@newpavlov
Copy link
Member

I've registered speck-cipher, so we can use it for now.

@tarcieri
Copy link
Member

I can ask the owners of the current speck crate if they'd be willing to give it to us. It's worked before!

@jvdsn
Copy link
Contributor Author

jvdsn commented Feb 10, 2022

I can ask the owners of the current speck crate 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/...

Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check implementation a bit later. For now I only have several minor nits.

speck/Cargo.toml Show resolved Hide resolved
speck/README.md Outdated Show resolved Hide resolved
speck/src/lib.rs Outdated Show resolved Hide resolved
speck/src/lib.rs Outdated Show resolved Hide resolved
@newpavlov
Copy link
Member

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.

@tarcieri
Copy link
Member

@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.

speck/tests/mod.rs Outdated Show resolved Hide resolved
@jvdsn
Copy link
Contributor Author

jvdsn commented Feb 17, 2022

I added some configuration for a minimal-versions action.

speck/src/lib.rs Outdated Show resolved Hide resolved
@tarcieri
Copy link
Member

tarcieri commented Mar 1, 2022

FYI: I reached out to the owners of the speck crate and did not hear back

@tarcieri tarcieri changed the title Add implementation of Speck speck: initial crate Feb 10, 2023
@tarcieri tarcieri merged commit 8b1499c into RustCrypto:master Feb 10, 2023
@newpavlov newpavlov mentioned this pull request Jun 23, 2023
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants