# Deterministic HMAC fixture Pinned input/output triple for the `AsbSystemAuthenticator.Sign` crypto path, captured from the .NET reference. Used by the Rust parity test in `crates/mxaccess-asb-nettcp/tests/deterministic_hmac.rs` to assert byte-equality of crypto_key derivation, canonical XML emission, HMAC-SHA1, PBKDF2-SHA1 AES key derivation, and AES-CBC encryption — independent of session randomness (DH private key, remote public key, and AES IV are all pinned to deterministic values so a single `cargo test` run can reproduce the .NET output). ## Capture procedure ```powershell dotnet run --project src\MxAsbClient.Probe -c Release -- --dump-deterministic-hmac > capture.txt ``` The probe's `--dump-deterministic-hmac` flag (added 2026-05-05) inlines the per-step decomposition of `Sign` (`AsbSystemAuthenticator .cs:62-82`): 1. `shared = remote_pub^private_key mod prime` (.NET `BigInteger.ModPow`) 2. `crypto_key = shared || passphrase_utf8` 3. `xml = AuthenticateMe.ToXml()` with empty MAC + IV 4. `hmac = HMAC-SHA1(crypto_key, utf8(xml))` 5. `aes_key = PBKDF2-SHA1(base64(crypto_key), "ArchestrAService", 1000, 16)` 6. `encrypted_mac = AES-CBC(aes_key, iv=zeros, hmac, padding=PKCS7)` Step 6 uses an all-zero IV to make the test reproducible — the real wire path uses a random IV per call, but the Rust test bypasses the random IV path by calling the AES primitive directly with the same zero IV. ## File format Plain-ASCII `key=value` lines, one per line. Hex values are upper-case (matching .NET's `Convert.ToHexString`). The `xml_utf8_b64` field encodes the canonical XML as base64 of the UTF-8 bytes. ## Files - `authenticate-me.kv` — fixture for the `AuthenticateMe` shape with the `[XmlType(Namespace="http://asb.contracts.data/20111111")]` ConsumerAuthenticationData wrapper.