Visitar URL original
Add support for tink primitives - AEAD AES-CTR HMAC · Issue #13033 · pyca/cryptography · GitHub
Skip to content

Add support for tink primitives - AEAD AES-CTR HMAC #13033

Open

Description

@vgrozdanic

Hi all, as per discussion in #12968 (comment) i would propose the first supported primitive to be AES-CTR HMAC.

Instead of a one quite large PR, I propose the work to be separated into multiple "smaller" PRs/tasks:

  • implement AES-CTR-HMAC primitive following the tink's wire format and the draft for AES-CBC-HMAC from Mcgrew
  • implement keyset
  • implement keyset JSON serialization/deserialization
  • (optional, but needed for full tink support) protobuf support <-- this requires additional dependency (protobuf package) to cryptography library :/

If this sounds good, we can discuss more in detail and I can start slowly working on this.

DISCLAIMER: I am very inexperienced with (more advanced) cryptography, so my understanding could be totally wrong :)

Activity

  1. reaperhulk commented on Jun 4, 2025

    @reaperhulk
    Member

    Separating into small, reviewable PRs that can be independently reviewed and landed is a good idea, yes.

    We shouldn't need to add a Python dep for protobuf for this because what we implement here is going to live chiefly on the Rust side. Instead, we can use a tool that builds rust structs from proto files with no additional deps. I haven't done the research here, but things like prost-build may be a way forward (and some rust tink projects have done this with prost, see: https://docs.rs/tink-proto/latest/tink_proto/).

    For any primitive we'll also need a set of test vectors; preferably tink's own!

    As an aside, as such a low level dependency in the ecosystem adding something like protobuf and its myriad dependencies is really not an option. Fortunately we've got alternatives here 😄

  2. alex commented on Jun 4, 2025

    @alex
    Member
  3. fury0928 commented on Jan 21, 2026

    @fury0928

    Hi @alex @reaperhulk , nice to meet you
    Is this still valid issue?

    • implement AES-CTR-HMAC primitive following the tink's wire format and the draft for AES-CBC-HMAC from Mcgrew
    • implement keyset
    • implement keyset JSON serialization/deserialization

    I'd like to contribute on this project, may I try on first or second PR of these three?

  4. alex commented on Jan 21, 2026

    @alex
    Member

    This is still an open issue, however there's a lot of open design questions about what the API would look like, what our implementation strategy woudl be, etc. before you start implementation we'd like someone to share a design here.

  5. fury0928 commented on Jan 21, 2026

    @fury0928

    I see, I thought this was ready to start, would you assign me any other issue to contribute?
    Thank you

  6. alex commented on Jan 21, 2026

    @alex
    Member

    We don't assign issues, if you want to start on something you don't need that.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions