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

XTEA implementation #422

Merged
merged 6 commits into from
Jul 29, 2024
Merged

XTEA implementation #422

merged 6 commits into from
Jul 29, 2024

Conversation

valaphee
Copy link
Contributor

@valaphee valaphee commented May 11, 2024

This PR implements XTEA as described by various sources, including https://en.wikipedia.org/wiki/XTEA,

XTEA is a historical cipher, which is no longer commonly used today, but some legacy software still uses it to this day.

I tested that the cipher methods get properly unrolled, which boosts a 3x speed increase, and is one of the faster ciphers in this collection. (Hopefully there will be an unroll pragma sometime in the future)

Partially solves #1

I decided against pre-computing keys as the computation is trivial, and doesn't have a noticeable impact on speed, probably because of memory accesses and that 256 byte don't fit easily in a cache line anyway.

@tarcieri tarcieri merged commit 0be7856 into RustCrypto:master Jul 29, 2024
1 of 18 checks passed
@newpavlov newpavlov mentioned this pull request Jul 29, 2024
19 tasks
@valaphee valaphee deleted the xtea branch September 13, 2024 14:30
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.

2 participants