Skip to content

cipher: simplify BlockCipherEncrypt/Decrypt traits? #2129

@newpavlov

Description

@newpavlov

The traits contain a bunch of methods which exist only for the ECB mode, which is "implemented" directly by cipher types.

This arrangement is hard to discover for new users and increases API surface of our traits significantly for a niche (and heavily discouraged) use case. It may be worth to remove the methods in favor of implementing ECB mode in a separate crate. I think we should be able to implement BlockCipherMode for &ecb::Encrypt<C> to preserve the ability to use the mode with shared references.

I asked the ecb crate owner about potential transfer here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions