Skip to content

Compute manifest hashes per RFC 9575 section 4.4.3 - #6

Open
erkki wants to merge 1 commit into
Fahdonn:drip-hardeningfrom
bear-metal:fix/manifest-hash-verification
Open

Compute manifest hashes per RFC 9575 section 4.4.3#6
erkki wants to merge 1 commit into
Fahdonn:drip-hardeningfrom
bear-metal:fix/manifest-hash-verification

Conversation

@erkki

@erkki erkki commented Sep 1, 2026

Copy link
Copy Markdown

Util.hash used cSHAKE128 with the DET Context ID as the customization string;
RFC 9575 §4.4.3 specifies cSHAKE128(input, 64, "", "Remote ID Auth Hash"). No
received message hash ever matched a manifest ASTM Message Hash slot, so manifests
verified 0 messages.

Changes:

  • Customization string: DET Context ID → "Remote ID Auth Hash".
  • §4.4.3.2: on extended transports the manifest hashes the whole Message Pack
    (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.
  • §4.4.2: a manifest is rejected unless its DRIP Link hash equals the hash of a
    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 45796187b0e82876 equals the hash of the
178-byte pack carrying the Link's pages. Both values are unit-test vectors.

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>
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.

1 participant