Implement the per ssrc key derivation algorithm and add computed test vectors#207
Open
aronrosenberg wants to merge 5 commits into
Open
Implement the per ssrc key derivation algorithm and add computed test vectors#207aronrosenberg wants to merge 5 commits into
aronrosenberg wants to merge 5 commits into
Conversation
bifurcation
requested changes
Apr 7, 2026
Collaborator
bifurcation
left a comment
There was a problem hiding this comment.
Some minor rearrangement needed, but overall this looks sound.
| use hmac::SimpleHmac; | ||
| use sha2::{Sha256, Sha512}; | ||
|
|
||
| /// Derive the per-SSRC stream key for a given SFrame cipher suite. |
Collaborator
There was a problem hiding this comment.
Please note that this scheme is defined in Section 7 of draft-ietf-avtcore-rtp-sframe. I initially thought it was something from RFC 9605.
Comment on lines
+1
to
+3
| // Test harness for SFrame per-SSRC stream key derivation vectors. | ||
| // Loads per-ssrc-key-derivation.json from the project's test-vectors directory | ||
| // and verifies that the Rust implementation produces identical keys. |
Collaborator
There was a problem hiding this comment.
This code should go in a new module in examples/test_vectors.rs, and follow the new/verify pattern there. Following that pattern will also get you an MD file you can include in the AVTCORE spec.
Co-authored-by: Richard Barnes <rlb@ipv.sx>
aronrosenberg
commented
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test vectors have been verified with two other implementations in different languages.