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

Vendor rust-crypto aes/soft implementation #1886

Open
briansmith opened this issue Jan 9, 2024 · 1 comment
Open

Vendor rust-crypto aes/soft implementation #1886

briansmith opened this issue Jan 9, 2024 · 1 comment

Comments

@briansmith
Copy link
Owner

The code is at https://github.com/RustCrypto/block-ciphers/tree/master/aes/src/soft.

  • The code should be placed in src/rust_crypto/aes/soft/ in the ring sources.
  • The first commit should add the two source files, unmodified. They will not successfully build. Include the full commit hash from the upstream repository in the commit message.
  • Remove hazmat and other code that will never be needed. Retain the decryption code; even though it will be dead code; the future AES-CBC code will use it.
  • Add src/rust_crypto/aes/soft/block.rs to define the Block type in a way that does not use the cipher crate.
  • Replace types FixsliceBlocks and BatchBlocks with types that do not use the cipher crate.
  • Adapt ring::aead::aes to use the newly-vendored code instead of aes_nohw.c. Remove aes_nohw.c, aes/internal.h, and all references to the files from build.rs and Cargo.toml.
@briansmith
Copy link
Owner Author

The change that implements this should be done in a single PR. I will use diff against the latest commit of the aes crate sources on GitHub to verify that the first commit is exactly identical to what's in the upstream source. Then I will review each commit in the PR as though it were its own PR. So basically the submitter needs to be prepared to do a lot of rebasing through the review process if there are many rounds of review.

@briansmith briansmith changed the title Vendor rust-aes/soft implementation Vendor rust-crypto aes/soft implementation Jan 11, 2024
rohhamh added a commit to rohhamh/ring that referenced this issue Apr 10, 2024
RustCrypto/block-ciphers commit: 6b263c07436a9861c8456bc73f81ff075673f7a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant