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

block-cipher: add BlockCipherMut #179

Merged
merged 1 commit into from Jun 9, 2020
Merged

block-cipher: add BlockCipherMut #179

merged 1 commit into from Jun 9, 2020

Commits on Jun 9, 2020

  1. block-cipher: add BlockCipherMut

    Adds a stateful equivalent to `BlockCipher` that permits `&mut self`
    access to the underlying type.
    
    The main use case for this trait is hardware cryptographic accelerators
    which need to e.g. communitate with a peripheral device via an
    underlying `&mut` reference.
    
    While it's possible to use some underlying logic to use the existing
    `BlockCipher` trait in such a scenario, the solutions are somewhat ugly.
    Here is a real-world example:
    
    https://github.com/iqlusioninc/usbarmory.rs/blob/develop/firmware/usbarmory/src/dcp/aes128.rs#L198-L236
    
    The idea with `BlockCipherMut` would be to alternatively provide
    `AeadMut`/`AeadMutInPlace` for AEAD modes with an underlying
    `BlockCipherMut` (when possible).
    tarcieri committed Jun 9, 2020
    Copy the full SHA
    680bb66 View commit details
    Browse the repository at this point in the history