Skip to content

aead: add FromBlockCipher trait? #259

Closed

Description

@newpavlov

Unfortunately we can't rely on From<BlockCipher>, see #217.

Activity

  1. added
    aead
    on Aug 12, 2020
  2. tarcieri commented on Feb 4, 2021

    @tarcieri
    Member

    I'm not sure this trait is necessary/helpful as it seems From is sufficient to solve the problem of converting a cipher into an AEAD?

    Here's an example from the aes-gcm crate:

    https://github.com/RustCrypto/AEADs/blob/4fe07ab/aes-gcm/src/lib.rs#L203-L224

  3. newpavlov commented on Feb 6, 2021

    @newpavlov
    MemberAuthor

    It works only because the implementation is not generic over block cipher. If I remember correctly the MAC issue, your code will not work for a generic GCM implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    aead

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions