RustCrypto / RustCrypto/block-ciphers
camellia: Replace S-Box lookup tables
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 784
- Forks
- 157
- Avg merge
- 15h 24m
- Merged PRs (30d)
- 9
Description
The camellia cipher currently uses lookup tables instead of a bitsliced/hardware accelerated backend.
I mention hardware acceleration because there are affine isomorphisms between the AES S-Box and the Camellia S-Box, meaning you can utilise AES-NI or AES bitslicing (and their SIMD accelerations) on Camellia through introducing a small affine transformation over GF(2).
See: https://arxiv.org/abs/2411.12360
I'm just noting this down here to get some input whether this kind of solution is something this project is interested in. I have started drafting out some things in code in a fork and would PR it as soon as it's in a ready enough state.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current Camellia implementation and the linked paper on affine isomorphisms between the AES and Camellia S-Boxes. Compare the approach with the draft code in the reporter's fork and seek project input on the desired backend. Done means the approach is agreed and developed into a ready pull request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100