Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification of unknown signature configurations #331

Open
spencerschrock opened this issue Dec 5, 2024 · 0 comments
Open

Verification of unknown signature configurations #331

spencerschrock opened this issue Dec 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@spencerschrock
Copy link
Contributor

Description

Under the (sigstore) API introduced in #323, there's sign and verify. The defaults work well together assuming the entity signing is the same entity verifying, and that the defaults haven't changed between sign/verify:

model_signing_api.sign(model_path, signature_path)
model_signing_api.verify(model_path, signature_path, identity=expected_identity)

However, verification of the underlying signature requires knowledge of the HashingConfig used during signing. Again, if everyone uses the default, or the signing/verifying entities are the same that's fine. But defaults can change over time, and one model you download might be signed differently than another.

For the most flexible verification, API users need to inspect the signature before verifying it and:

  1. Determine signature type (currently only sigstore DSSE envelope).
  2. Determine manifest type, (all 4 combinations of { file, shard} x {manifest, digest of digests} )
    1. If using file shards, confirm shard size
  3. Confirm hashing algorithm (sha or blake)

I don't believe any of these have any trust implications, so the default verify function could do a lot of this transparently to the user.

@spencerschrock spencerschrock added the enhancement New feature or request label Dec 5, 2024
@spencerschrock spencerschrock changed the title Verification of unknown signatures Verification of unknown signature configurations Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant