theupdateframework / theupdateframework/rust-tuf
Investigate use of binary protocol instead of JSON for data transfer
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 198
- Forks
- 39
- Avg merge
- 9h 19m
- Merged PRs (30d)
- 2
Description
A disadvantage of JSON is that in order to verify the metadata, it has to be parsed first. It would be better to use a binary protocol that lets us treat the signed field as raw bytes until after we verify it. Then, do a second round of parsing on the trusted data. For example:
message SignedRootMetadata {
repeated Signature signature = 1;
bytes signed = 2;
}
message Signature {
bytes keyid = 1;
bytes sig = 2;
}
Followed by
let signed_root = parse_signed_root(bytes_from_network)?;
let root = if verify(signed_root) {
parse_root(signed_root.signed)?
} else {
return Err("oh dear")
}
// do stuff with root
Protobufs were used in the example here, but they may not be deterministic, so something like ASN.1 / DER would need to be used.
This is motivated by my dislike of parsers being allowed to work on any more untrusted data than necessary.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating the current JSON metadata parsing and signature-verification flow, then assess a deterministic binary format such as ASN.1/DER against the stated two-stage parsing goal. Done would require a decided approach and an agreed implementation scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100