-
Notifications
You must be signed in to change notification settings - Fork 9
Align MTC support closer to spec #57
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
Conversation
In MTCs, the certificate serial number is its index in the log. Since X.509 serial numbers must be non-zero, MTCs adds an initial 'null_entry' at index 0 to help avoid off-by-one errors in consumers of the log.
This is not compatibile with the current MTC draft which uses RELATIVE-OID, but will do until RustCrypto/formats#1875 is handled.
* Update wrangler KV and R2 resources for MTC dev deploy * Re-enable wasm-opt (see cloudflare/workers-rs#767)
- Add support for cosignature/v1 signatures from tlog-cosignature - Add support for subtree_signatures from current MTC draft. This is currently limited to signing checkpoints but not arbitrary subtrees. Other changes (hopefully improvements): - Consolidate signed_note error types into NoteError - Add new() functions for Ed25519NoteSigner/Verifier to avoid needing to go through text format - Add KeyName wrapper around string that enforces that key names are valid according to signed_note spec - Move Ed25519 signer/verifier to separate file in signed_note - Add enum for signed_note signature types
Previously, when enable_dedup was set to false, entries were still written to the long-term deduplication cache in KV. Now, deduplication is skipped entirely.
| let checkpoint_extension = Box::new(|_| vec![]); | ||
|
|
||
| // TODO parse log ID as a RelativeOid after https://github.com/RustCrypto/formats/issues/1875 | ||
| let log_id_relative_oid = ObjectIdentifier::from_str(¶ms.log_id).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RelativeOID format is not that complicated. There is an implementation of it in our old Go code.
As a hack, btw, you can prepend "0.0", parse as an OID, and then leave out the first byte:
bas@Mac ~ $ echo 'RELATIVE_OID {.1234.1.2}' | ascii2der | hexdump -C
00000000 0d 04 89 52 01 02 |...R..|
00000006
bas@Mac ~ $ echo 'OBJECT_IDENTIFIER {0.0.1234.1.2}' | ascii2der | hexdump -C
00000000 06 05 00 89 52 01 02 |....R..|
00000007
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that's a nice trick! The encoding itself makes sense now, but just trying to figure out how to incorporate into the RustCrypto library..
Add cosignature support
currently limited to signing checkpoints but not arbitrary subtrees.
Other changes (hopefully improvements):
Clean up config
Rename Signature -> NoteSignature to avoid naming conflicts
Add support for parsing the log ID as a ObjectIdentifier
This is not compatibile with the current MTC draft which uses RELATIVE-OID, but will do until RustCrypto/formats#1875 is handled.
Add support for MTC's initial log entry
In MTCs, the certificate serial number is its index in the log. Since
X.509 serial numbers must be non-zero, MTCs adds an initial 'null_entry'
at index 0 to help avoid off-by-one errors in consumers of the log.
Align MTC implementation closer to spec