Recover the complete HMAC construction
HMAC combines a secret key, a hash function and message bytes. The app then encodes the result for the request. Record the hash, key source, signed bytes, truncation and output encoding together.
A header's length is a clue, not an algorithm test. A digest can be shortened before hex or Base64 encoding. The same visible length can come from several constructions. Trace the function that produces it and confirm the result with known inputs.
Follow the inputs before the network call
Start at the header assignment and follow its value back to the signing function. Record the raw bytes passed to the MAC, including method, path, query, body, timestamps and any signed headers. Keep separators, empty fields and character encoding exact.
Follow the key into that function as well. Record whether it comes from app code, a session exchange, derivation or a runtime key service. A per-session key needs the same setup and refresh behavior in the delivered client.
Observe the hash function and parameters in code or at its runtime boundary. Changing a signature and reading the server's error does not establish whether verification uses HMAC or a public key. The server can hide several failures behind one response.
Compare bytes with fixed test cases
Use fixed inputs and the observed key to compute a candidate MAC outside the app. Compare raw output first, then apply the app's truncation and wire encoding. Keep the signed message as bytes so JSON formatting, percent encoding and newline changes remain visible.
A match verifies that test case. Add cases with changed bodies, query values, empty fields and non-ASCII text. Include each route family that builds its signed message differently. A single matching capture does not establish all endpoint rules.
Identical keys and message bytes produce the same HMAC. When the output changes, inspect the complete inputs and key state. A changing value alone does not identify an asymmetric signature or prove which hidden field changed.
Test the working session
After local vectors match, test fresh sessions and changed inputs against safe read-only workflows. Check how the app obtains timestamps, creates nonces and refreshes signing keys. Keep signing failures separate from login, transport and access-rule failures.
A valid MAC does not provide replay protection by itself. Trace the server-checked freshness rules and bind them to the same request. The client must create the next valid request, not keep reusing a captured signature.
Deliver a client your system can run
Keep signing in one tested module with setup steps and fixed vectors. Document the key lifecycle, message layout, output encoding and failure handling. Run the request-signing example to inspect a controlled signing and replay test.
For full APK work, SReverse reconstructs signing and session behavior within the complete API delivery. Related guides cover body bytes, runtime keys and repair after app updates.
Technical references
Reviewed 19 October 2026 · SReverse research desk