Compute manifest hashes per RFC 9575 section 4.4.3 - #6
Open
erkki wants to merge 1 commit into
Open
Conversation
Util.hash used cSHAKE128 with the DET Context ID as the customization string. RFC 9575 section 4.4.3 specifies cSHAKE128(input, 64, "", "Remote ID Auth Hash"), so no received message hash ever matched a manifest ASTM Message Hash and manifests always reported zero verified messages. - Customization string: DET Context ID -> "Remote ID Auth Hash". - Section 4.4.3.2: on extended transports the manifest hashes the whole Message Pack (excluding the message counter). Hash received packs as one object, keep a bounded per-aircraft map pack hash -> constituent 25-byte message hashes, and expand a matching manifest slot to its constituents before per-message matching. - Section 4.4.2: reject a manifest whose DRIP Link hash matches no received Message Pack (section 4.4.3.2 construction; the pack that carried the Link's authentication pages). Vectors from an over-the-air capture: manifest ASTM slot 9544455026460af0 = hash of the broadcast data pack; DRIP Link slot 45796187b0e82876 = hash of the 178-byte pack carrying the Link's pages. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Util.hashused cSHAKE128 with the DET Context ID as the customization string;RFC 9575 §4.4.3 specifies
cSHAKE128(input, 64, "", "Remote ID Auth Hash"). Noreceived message hash ever matched a manifest ASTM Message Hash slot, so manifests
verified 0 messages.
Changes:
"Remote ID Auth Hash".(excluding the message counter). Received packs are hashed as one object; a bounded
per-aircraft map (pack hash → constituent 25-byte message hashes) expands a matching
manifest slot to its constituents before per-message matching.
received Message Pack (the §4.4.3.2 construction: the pack that carried the Link's
authentication pages). Rejections log the offending hash.
Capture-verified: 21/22 manifests in a 2-minute field capture pass every receiver
check; ASTM Message Hash slots equal the broadcast data-pack hashes (misses correspond
to packs lost over the air), DRIP Link slot
45796187b0e82876equals the hash of the178-byte pack carrying the Link's pages. Both values are unit-test vectors.