Skip to content

Could the relationship between crypto-common and block-buffer be reversed? #1662

Closed

Description

@tarcieri

Note: I don't have a concrete proposal here, just spitballing.

One thing that's currently kind of tricky is updating block-buffer, because block-buffer (utils repo) depends on crypto-common (this repo), and digest (this repo) depends on block-buffer.

Would there be a way to reverse that so that crates in this repo only depend on crates in the utils repo, and not the other direction? That would simplify updates.

Alternatively, perhaps crypto-common could go in the utils repo.

Activity

  1. newpavlov commented on Sep 6, 2024

    @newpavlov
    Member

    The only reason why block-buffer depends on crypto-common is the BlockSizes trait. Moving it into the block-buffer crate is probably not a good idea. I guess we could replace compile-time check with runtime check or maybe even with a monomorphization error.

  2. tarcieri commented on Sep 6, 2024

    @tarcieri
    MemberAuthor

    @newpavlov what about moving crypto-common into utils?

  3. newpavlov commented on Sep 6, 2024

    @newpavlov
    Member

    Well, the crate literally contains "common cryptographic traits", so the utils repo looks like a wrong place for it.

    If I am not missing something, it looks like in the new release cycle block-buffer is used only by the digest crate. Maybe we could simply move the block-buffer code into it?

  4. tarcieri commented on Sep 6, 2024

    @tarcieri
    MemberAuthor

    That works!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions