oxidecomputer / oxidecomputer/rats-corim

is exposing `TaggedBytes` through the `Digest` iterator bad?

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1
Forks
1
Avg merge
2d 44m
Merged PRs (30d)
1

Description

This iterator / interface is used here: https://github.com/oxidecomputer/dice-util/blob/main/attest-data/src/lib.rs#L232. The TaggedBytes type is a bit awkward but since the caller is explicitly processing a Corim type it doesn't seem unusual to expect them to handle it. An alternative would be to keep both alg and val private in the Digest type and expose these values through functions? This may be complicated if we ever expect to use the tagged variant of TaggedBytes in a Digest.

see https://github.com/oxidecomputer/rats-corim/pull/4#discussion_r2161948371

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with attest-data/src/lib.rs at line 232, where the Digest iterator/interface is used, then read the linked rats-corim pull-request discussion. Determine whether exposing TaggedBytes or accessor functions is the intended public contract; done means the API decision is resolved and the implementation reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.