Skip to content
IAM Insights

Explainers · Glossary

JSON Canonicalization Scheme

JCS · RFC 8785 · RFC8785

By Boston Identity · Explained · 6 min read

The short answer

The JSON Canonicalization Scheme (JCS) is a fixed recipe for writing JSON data as one exact string of bytes, so two systems that hash or sign the same data get the same result.

What it is
A standard
Defined by
RFC 8785, Informational, not IETF standards track
Who it's for
Teams signing or hashing JSON records
In our briefings
47By month of the source: 2025-12: 0, 2026-01: 0, 2026-02: 1, 2026-03: 2, 2026-04: 4, 2026-05: 2, 2026-06: 3, 2026-07: 7, 2026-08: 2, 2026-09: 6, 2026-10: 16, 2026-11: 22by month, last 12
01

What is JSON Canonicalization Scheme?

JSON (JavaScript Object Notation) lets the same data be written many ways. Spaces, the order of property names and the spelling of a number can all change while the meaning stays put. A hash or a signature sees only bytes, so two systems that write the same record differently get different results.§1

JCS fixes one way to write it. It builds on the rules JavaScript's own standard, ECMAScript, uses to print strings, numbers and literals, limits data to I-JSON (Internet JSON, a stricter subset), and sorts property names in a fixed order.§1 The authors' point is that the data can travel in its original form while each end computes over the same canonical bytes, so a JSON object stays a JSON object after it is signed.§1

RFC 8785 is an Independent Submission published for information. It is not an IETF standard, and the RFC Editor says it makes no statement about its value for deployment.S1 Its authors still use MUST and SHOULD in the usual way, and say a conformant implementation is supposed to follow them.§2

Not a signature format. JCS only produces the bytes; a separate signing scheme signs them and says where the signature goes.App. F Nor is it the approach of JSON Web Signature (JWS), which signs a base64url-encoded copy of the data instead.§1

02

How does JSON Canonicalization Scheme work?

Three parties take part: a producer that creates or receives the data, a canonicalizer that turns it into fixed bytes, and a receiver that checks a hash or signature over those bytes. The receiver runs the same canonicalizer on its side.

Figure steps
  1. The producer prepares the data
  2. The canonicalizer drops whitespace
  3. The canonicalizer writes each value one way
  4. The canonicalizer sorts property names
  5. The canonicalizer outputs UTF-8 bytes
  6. The receiver checks before acting
Fig. 1

The canonicalizer turns the producer's JSON into one fixed string of UTF-8 bytes, and the receiver rebuilds the same bytes before it trusts the signature.

Drawn from RFC 8785, sections 3 and 5 and Appendix F

Swipe for the full figure →

  1. The producer prepares the data

    The data may come from parsing earlier JSON or from a program. Either way it must fit I-JSON: no duplicate property names, strings expressible in Unicode, and numbers expressible as IEEE 754 double-precision values (the standard 64-bit floating-point format). Parsed strings must not be altered, and Unicode text must be kept as is, with no normalization.§3.1

  2. The canonicalizer drops whitespace

    No whitespace may be emitted between JSON tokens, so indentation and line breaks disappear.§3.2.1

  3. The canonicalizer writes each value one way

    The literals null, true and false are written as such. Strings get a fixed set of escapes, and every other character is written as is. Numbers follow the ECMAScript rule, so 4.50 becomes 4.5 and 1E30 becomes 1e+30. NaN, Infinity and invalid Unicode such as a lone surrogate must stop the canonicalizer with an error.§3.2.2

  4. The canonicalizer sorts property names

    Property names are sorted at every level, including objects inside arrays. The sort compares names as UTF-16 code units, treated as plain unsigned numbers, regardless of locale. The order of array elements must not change.§3.2.3

  5. The canonicalizer outputs UTF-8 bytes

    The result must be encoded in UTF-8, and those bytes are the input to the hash or signature.§3.2.4 In the signing scheme the RFC sketches, the producer signs the canonical bytes and adds the signature value to the original JSON in a designated property.App. F The canonical form does not have to be what travels on the wire.App. C

  6. The receiver checks before acting

    Before acting on signed data, the receiver must parse it and confirm it is I-JSON, check it against the conventions of its own system, including where the signature sits, and then verify the signature. If any step fails, the operation must be aborted.§5 In the RFC's sketch, the receiver removes the signature property, canonicalizes the rest and verifies the signature over that.App. F

03

Why does JSON Canonicalization Scheme matter now?

Several of the AI agent drafts we have been reading at the IETF this year depend on canonical JSON, and two name JCS outright. Schrock's Canonical Action Identifier, which gives permits and receipts one name for an agent action, makes JCS with SHA-256 its required suite.1 Gilda's agent audit record signs RFC 8785 canonical bytes, and members a verifier can recompute catch an edit even by the key holder.2 Another draft's Capsule ID is a SHA-256 hash over the record's canonical JSON.3

Coetzee's draft shows what rides on it. It lets a short-lived agent token carry a SHA-256 digest of the canonical JSON of the tool, its parameters and the target, though that binding is optional, a MAY on each leaf token. The enforcement point recomputes the digest over the call actually made and refuses on a mismatch.4 He ranks canonicalization mismatch first among his design's risks: if the two sides serialize the same call differently, he writes, a divergence is a full authorization bypass.5

We read this as a shift in where the risk sits. Where a design like Coetzee's is deployed, the control holds only if the agent side and the enforcement point canonicalize the call byte for byte alike.5

04

Where does it fit?

Compared withHow JSON Canonicalization Scheme differs
JSON Web SignatureJSON Web Signature avoids the problem another way: it encodes the payload in base64url, a fixed form, and signs that.§1 JCS instead keeps the data as readable JSON and signs a canonical copy of it.
ES256JCS defines no signature algorithm of its own; it only fixes the bytes that a hash or signature is computed over.§1
05

What goes wrong?

  • Two canonicalizers that disagree produce different bytes for the same data, so a hash or signature made on one side fails on the other. The RFC leaves the number algorithm to ECMAScript and points to V8 and Ryu as references, and it supplies sample values to test against.S1 Sorting is another trap: for names like those in the RFC's non-ASCII test data, sorting by UTF-8 or UTF-32 instead of UTF-16 code units gives a different order that is incompatible with JCS.§3.2.3 JCS also borrows its value rules from ECMAScript; if a future ECMAScript changed them, the RFC leaves developers to keep to RFC 8785 or write a new specification.§3.2.2 For an agent token tied to one call, one author ranks such a mismatch as a full authorization bypass.5
  • Parsers can quietly change data. A parser that turns a string into a date or big integer and back may print "055" as "55" or add milliseconds to a time, and the signature then fails. Stream- and schema-based parsers must treat such values as plain strings.App. E
  • Numbers beyond double precision lose accuracy. The RFC recommends carrying higher-precision numbers and long integers as JSON strings.§3.1 Numbers with no natural place in JSON must be wrapped as strings, and the RFC notes that money would presumably not rely on floating point.App. D
  • The RFC asks for sanity checks on input to avoid buffer overflows and similar damage.§5
  • Canonical bytes say nothing about authority. One draft we read stresses that a valid signature over a record proves only that a key signed it, and verifiers must not infer authority from that alone.3 Another tells verifiers to check the signature over the exact bytes received rather than strip unknown fields and try again.6
06

What should a security leader ask?

  1. 01

    Which of our signed or hashed JSON records rely on canonical form, and which canonicalizer library does each side use?

  2. 02

    Have the agent side and the enforcement point been tested against the same RFC 8785 sample values, including the number samples in Appendix B?

  3. 03

    Where do we carry amounts, large integers or timestamps as JSON numbers or parsed types that could change when re-serialized?

  4. 04

    When a signature check fails, does our code abort, or does it retry after removing or reordering fields?

  5. 05

    When a vendor says it signs "canonical JSON", does it mean RFC 8785, and can it show us test vectors?

07

Sources

›Evidence: 6 claims from 5 briefings
  1. 1BI-FIND-2026-0956 · Schrock's action identifier would let permits and receipts name the same agent action, and it authorizes nothingSchrock's Canonical Action Identifier is meant to give permits, receipts and mandates one comparable name for the action they each digest in their own way. His example of the problem: a digest over {"action": "wire"} "commits to no amount, no currency, and no beneficiary" yet looks bound to an action. A CAID instead digests a typed action object that must carry every material field its type requires, canonicalized under a registered suite; JSON Canonicalization Scheme with SHA-256 is the required one. For agent tool calls the draft defines a tool.call.1 type with the target, the tool and the arguments, and the executor must build the object from the operation it will perform, or check every material field against the relying party's system of record. A CAID received from the presenter "MAY be compared with the recomputed value, but MUST NOT replace executor-side construction." The draft states that a CAID is neither authorization nor identity.
  2. 2BI-FIND-2026-0510 · An agent audit record that shows when a 'deny' went through anywayGilda's record is one in-toto statement in a signed DSSE envelope that pairs the decision a policy engine reported with the effect an observer saw, and derives an agreement value from the two: a deny beside a write that occurred is a disagreement, and "A disagreement is the record working." Revision 02 adds whether the decision point evaluated at all, so a permit given because a needed input was unavailable is visible as failing open. The signature covers RFC 8785 canonical bytes, and members a verifier can recompute catch an edit even by the key holder. What the record does not carry is the delegation chain: one subject plus a digest of the authority document, with the credential, policy and authority all bound by digest and none of them included.
  3. 3BI-FIND-2026-1158 · A draft records every AI agent verdict, refusals too, and won't let a dispatched action pass as confirmedThe draft is plain about what a valid Capsule does not prove. Its ID is a SHA-256 hash over the record's canonical JSON, kept apart from any signature, and a verified Producer Envelope proves only that the holder of the key named in kid signed that ID, not that the key is authorized for the Capsule's operator, developer or action. Those two fields are required plain strings, naming the accountable tenant and the agent's identity and version. A verifier that relies on producer identity for a policy decision MUST apply an outside authorization rule and "MUST NOT infer authority from signature validity alone". The profile is deliberately agnostic about delegation, which a separate draft by Rampalli binds in. The effect has the same limit: confirmed means the producer bound the bytes of a response it observed, not that the world reached that state, and the draft does not mitigate a forged success delivered on the path, which produces an honest confirmed Capsule for an effect that never landed.
  4. 4BI-FIND-2026-0524 · Coetzee's agent token is good for one declared call, and the hard part is hashing that call the same way twiceCoetzee's answer to a hijacked agent is a token that is good for one declared call and nothing else. A root token from a person narrows through delegated tokens to a leaf that lives "on the order of seconds" and can carry a digest: SHA-256 over the canonical JSON of the tool, its parameters and the target. The enforcement point recomputes the digest over the call actually made and refuses on a mismatch or a missing claim. The draft is plain about what that buys. A compromised agent holds a token "cryptographically useless" for any other action, but nothing stops an authorized agent doing a harmful thing it declared. And the binding itself is optional: a MAY on each leaf token.
  5. 5BI-FIND-2026-0525 · Coetzee's agent token is good for one declared call, and the hard part is hashing that call the same way twiceThe author ranks his own design's risks and puts canonicalization mismatch first: if the agent side and the enforcement point serialize the same call differently, "a divergence is a full authorization bypass". Attenuation bypass, downgrade, replay and parser bugs follow. The draft leaves open the pieces that would close those gaps. It never defines the transaction-context hash the leaf carries, never says which party requests the leaf or how the enforcement point learns the declared parameters before the call, and describes replay defence only as a single-use nonce cache. A reference implementation and an adversarial review are claimed, with no name, link or result.
  6. 6BI-FIND-2026-1115 · Delegation receipts for AI agents, revision 15: holding a copy of a receipt no longer lets you extend the chainRevision -12 reversed the draft's rule on receipt fields a verifier does not recognize. Revision -11 told verifiers to ignore unknown fields in the receipt body. Now the top-level field set is closed: an issuer must not add fields, and a verifier must reject a receipt that carries one, because, in Nelson's words, "an unrecognized field could be a restriction on authority." Extensions go in a signed metadata object whose contents verifiers must ignore when deciding. Verifiers must also check the signature over the exact bytes received rather than strip unknown fields and verify again. Revision -14 removed a leftover line in the canonicalization section that said unknown fields must be dropped, which the change log calls a contradiction with the closed set; the line now only bars issuers from putting unknown fields into what they sign. The draft credits the -12 change to a proposal by Iman Schrock of the EMILIA Protocol on the IETF OAuth mailing list, a thread we have not seen.

›In our briefings

What our briefings say about JSON Canonicalization Scheme itself, with the most direct claims first.

  1. RFC 8785 gets two implementations to the same bytes only if both get a few easy-to-miss rules right. Input must be I-JSON: no duplicate property names, and numbers that fit IEEE 754 doubles, with larger ones recommended as JSON strings; lone surrogates, NaN and Infinity must stop a compliant implementation with an error. Numbers must be written the way ECMAScript writes them, and the RFC leaves that algorithm out of its own text, pointing to Google's V8 and to Ryu as references. Object keys must be sorted by UTF-16 code units: the RFC's seven-key test sorts differently under UTF-8 or UTF-32, though it says ASCII-only names sort the same either way. Strings must be kept "as is", with no Unicode normalization. Appendix E then shows a stream-based parser converting typed strings on the fly, so "055" comes back as "55" and a timestamp gains ".000", "presumably making an application depending on JCS fail."

    Signed Agent Cards and agent receipts rest on RFC 8785, an Informational RFC that shows how a parser can change the bytesBI-FIND-2020-0018

  2. The authors withdrew their own extension to JCS on 2026-08-18. Called jcs-n, it also stripped null, empty-array and empty-object members before hashing. Section 5.2 gives the grounds: a census found the reference implementation was the only one implementing that normalization step, a byte audit found 191 of 203 evaluated records byte-identical under plain jcs, with the 12 that differed described as proof-of-concept artefacts, and every registry entry now needs a named consuming profile. Records sealed under jcs-n stay verifiable only with cryptographically verifiable evidence that they predate the cutoff; a payload timestamp or a source-control commit date "MUST NOT be used as vintage evidence." Section 5.2 does not say who ran the audit.

    A SCITT draft tells verifiers not to guess how a hash was made; its interop proof is the authors' own recordBI-FIND-2026-1963

›Cited in 47 briefings

Every briefing that discusses this term, newest first.

  1. An IETF draft puts the last check on an AI agent's action at the service that commits it

    Draft · · IETF Datatracker · Sangam Das · Nov 17, 2026

  2. Qwixl's agent-messaging draft makes data misuse attributable to a key, not preventable

    Draft · · IETF Datatracker · Luke Daniel Chapman, Qwixl · Nov 16, 2026

  3. An agent audit draft can now name the token issuer, subject and client behind a decision

    Draft · · IETF Datatracker · Sankalp Gilda · Oct 16, 2026

  4. From trust level L2 up, an agent audit draft no longer lets the agent vouch for itself

    Draft · · IETF Datatracker · Raza Sharif, CyberSecAI · Oct 26, 2026

  5. Asor's agent-chain draft now says a chain keeps verifying after its principal leaves, until expiry or revocation

    Draft · · IETF Datatracker · Rafael Asor · Oct 28, 2026

  6. Agent-audit draft now admits a call on the principal and the current agent, as RFC 8693 requires

    Draft · · IETF Datatracker · Shameer Thaha et al. · Oct 19, 2026

  7. An agent-evidence draft no longer checks every actor in a delegation chain before a service admits a call

    Draft · · IETF Datatracker · Shameer Thaha et al. · Oct 19, 2026

  8. A draft joining four agent records on one hash reports no valid joint run and now claims less about what agents did

    Draft · · IETF Datatracker · Steven Mih et al. · Aug 16, 2026

  9. A SCITT draft tells verifiers not to guess how a hash was made; its interop proof is the authors' own record

    Draft · · IETF Datatracker · Steven Mih et al. · Oct 26, 2026

  10. Sweeney's delegation draft concedes its server is trusted with users' credentials, and drops an interop claim

    Draft · · IETF Datatracker · Kieran Sweeney · Oct 13, 2026

  11. A draft has each company sign its own half when one company's agent acts at another's request, refusals included

    Draft · · IETF Datatracker · Steven Mih, Action State Group · Oct 29, 2026

  12. A 'human approved' field is not evidence, says Schrock's draft; only a bound, signed approval counts

    Draft · · IETF Datatracker · Iman Schrock, EMILIA Protocol · Jul 3, 2026

  13. Lee's draft would hold an agent's action at the boundary until a receipt for that exact action passes every check

    Draft · · IETF Datatracker · Yong Bok Lee, Meridian Verity Group · Jun 5, 2026

  14. Agent URI draft -04 ties an agent's name to a key document and bars OAuth servers from trusting the name alone

    Draft · · IETF Datatracker · Yaswanth Narvaneni et al. · Oct 20, 2026

  15. Niyikiza's agent tokens narrow to a tool's arguments offline; revision -02 breaks -01 implementations

    Draft · · IETF Datatracker · Niki Aimable Niyikiza · Jun 15, 2026

  16. Delegation receipts for AI agents, revision 15: holding a copy of a receipt no longer lets you extend the chain

    Draft · · IETF Datatracker · Ryan Nelson, Authproof · Oct 22, 2026

  17. ChainIT's design has the payment rail rebuild each payment's hash before money moves; the paper reports no test

    Paper · · arXiv · Jeremy Blackburn et al. · Oct 16, 2026

  18. An OAuth agent profile has the token server block any widening of scope, and leaves revoking the chain optional

    Draft · · IETF Datatracker · Sanjeev Kumar, Orchestrum Technologies LLP · Aug 30, 2026

  19. A transparency-log profile for agents exposes edited and dropped records; an action nobody logged leaves no gap

    Draft · · IETF Datatracker · Pinar Emirdag et al. · Oct 12, 2026

  20. Human Delegation Provenance is now an audit record only, and one that cannot prove it is complete

    Draft · · IETF Datatracker · Asiri Dalugoda, Helixar · Oct 6, 2026

  21. Schrock's action identifier would let permits and receipts name the same agent action, and it authorizes nothing

    Draft · · IETF Datatracker · Iman Schrock, EMILIA Protocol · Oct 2, 2026

  22. A draft records every AI agent verdict, refusals too, and won't let a dispatched action pass as confirmed

    Draft · · IETF Datatracker · Steven Mih, Action State Group · Sep 27, 2026

  23. An end-to-end encrypted draft would hide an AI agent's task from the broker, but not who sent it or to whom

    Draft · · IETF Datatracker · Hamdy Atakora, Imara Labs · Sep 21, 2026

  24. Schrock's receipts prove a named key approved one exact agent action, and the draft lists at length what they cannot prove

    Draft · · IETF Datatracker · Iman Schrock, EMILIA Protocol · Sep 12, 2026

  25. Munoz's agent Permit is signed before the action runs, but the profile does not make the action wait for it

    Draft · · IETF Datatracker · Christian Munoz, Keel API, Inc. · Jul 19, 2026

  26. A2A 1.0 connects agents across companies and leaves out the person they act for

    Article · · A2A Protocol (Linux Foundation) · A2A Protocol project et al. · May 28, 2026

  27. OpenA2A's protocol proves an agent holds a key and scores its behaviour, but never says who it works for

    Draft · · IETF Datatracker · Abdel Fane, OpenA2A · Oct 6, 2026

  28. A draft ties what each AI agent may read to what it may do, and still can't take a grant back

    Draft · · IETF Datatracker · Hamdy Atakora · Sep 21, 2026

  29. DIF's KYA-OS names every AI agent by a DID and makes the verifier check every delegation hop

    Article · · Decentralized Identity Foundation (KYA-OS) · Dylan Hobbs et al. · Jul 29, 2026

  30. An agent audit record that shows when a 'deny' went through anyway

    Draft · · IETF Datatracker · Sankalp Gilda · Oct 5, 2026

  31. Stripe and Tempo propose paying for an HTTP request the way you log in to one, and leave the agent out

    Draft · · IETF Datatracker · Brendan Ryan et al. · Sep 9, 2026

  32. Coetzee's agent token is good for one declared call, and the hard part is hashing that call the same way twice

    Draft · · IETF Datatracker · Rudolf Jacobus Coetzee · Jul 19, 2026

  33. The 'intent' in the Agentic JWT draft is a workflow step, and the agent reports its own fingerprint

    Draft · · IETF Datatracker · Abhishek Goswami · Jul 1, 2026

  34. CAID requires executors to check the action they will actually invoke

    Draft · · IETF Datatracker · Iman Schrock, EMILIA Protocol · Sep 28, 2026

  35. IPC passes a delegation chain between services; its signature proves only the last signer

    Draft · · IETF Datatracker · Ravi Kant Sharma, Ericsson · Jul 23, 2026

  36. A valid delegation chain cannot replace required human approval or proof of key possession

    Draft · · IETF Datatracker · Karthik Rampalli, Glyphzero Labs · Jul 6, 2026

  37. A June OAuth draft logs each hand-off between AI agents, but the per-hop limits the act claim lacks are optional

    Draft · · IETF Datatracker · Dapeng Liu et al. · Jun 8, 2026

  38. An AI agent's refused action can be approved only by someone its mandate names, says a revised draft

    Draft · · IETF Datatracker · Lars Kersten Kroehl, CryptoKRI GmbH · May 21, 2026

  39. An Imperial and Oxford protocol would give AI agents one approved use of a secret, never the secret itself

    Paper · · arXiv · Xiaohang Yu et al. · Apr 27, 2026

  40. A 'decentralized' agent identity draft blocks risky calls when its Registry is down, and did:aip is taken

    Draft · · IETF Datatracker · Paras Singla · Apr 17, 2026

  41. A proposed consent log for A2A and MCP records the terms an agent accepted, but the agent fills it in itself

    Paper · · arXiv · Ravi Kiran Kadaboina · Apr 16, 2026

  42. A proposed record of who authorized an AI agent's actions cannot yet prove which agent took them

    Paper · · arXiv · Asiri Dalugoda, Helixar · Apr 6, 2026

  43. AIP puts an agent's delegation chain in the token; its perfect score against attacks tests rules only AIP has

    Paper · · arXiv · Sunil Prakash · Mar 25, 2026

  44. An MCP signing draft shows a client who wrote a tool, and admits a poisoned tool can still be validly signed

    Draft · · IETF Datatracker · Raza Sharif, CyberSecAI · Mar 14, 2026

  45. OpenPort holds agent writes as drafts for an operator by default; its own tests check less than its spec asks

    Paper · · arXiv · Genliang Zhu et al. · Feb 22, 2026

  46. W3C Data Integrity proofs name their purpose, so a verifier can refuse a credential signature offered as a login

    Article · · W3C · Manu Sporny et al. · May 15, 2025

  47. Signed Agent Cards and agent receipts rest on RFC 8785, an Informational RFC that shows how a parser can change the bytes

    Article · · RFC Editor · Anders Rundgren et al. · Jun 1, 2020

Related terms

What appears alongside JSON Canonicalization Scheme in the same briefings.

Agent Delegation ReceiptsJSON Web SignatureAgent CardSCITTRFC 9943 SCITT architectureWIMSECOSEUCAN

Was this explainer useful?

Share this explainer

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem that involves JSON Canonicalization Scheme? Talk to Boston Identity