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

C2PA 2.1: Enhanced timestamp validation #217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karlobencic
Copy link
Contributor

  • Added validation for C2PA spec v2.1 timestamp requirements in Signature class:
    • Enforce single timestamp requirement per spec
    • Add validation for timestamp falling within signer certificate validity period
    • Add validation for TSA certificates
  • Added comprehensive test suite for timestamp validation in COSE signatures

@karlobencic karlobencic requested a review from cyraxx January 17, 2025 15:41
@cyraxx
Copy link
Contributor

cyraxx commented Jan 17, 2025

In previous spec versions there was a remark that a validator should treat an invalid timestamp as non-existing and continue with the next one. Has this changed?

If there is now a strict requirement that there can be only one timestamp anyway, we can simplify some of the code (no more foreach needed).

@karlobencic
Copy link
Contributor Author

karlobencic commented Jan 17, 2025

In previous spec versions there was a remark that a validator should treat an invalid timestamp as non-existing and continue with the next one. Has this changed?

If there is now a strict requirement that there can be only one timestamp anyway, we can simplify some of the code (no more foreach needed).

This is mentioned in spec 2.1: "A manifest shall contain only one time-stamp. Previous versions of this specification allowed for multiple time-stamps to be included in a manifest."

Maybe we should only enforce this validation for timestamp v2 and allow multiple v1 signatures?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants