Canonicalization

Canonicalization is the process of presenting the document unambiguosuly in a non-homogenous environment, and plays an important role in signing and verifying digital signatures.  When a document is passed through the internet, some forwarding agents modify the document to the way their local systems interpret character sets and line delimiters.   When the document is modified, this same document may be forwarded to the next transfer agent who may likewise make other modifications before forwarding to the next transfer agent.  The final recipient is no longer guaranteed that the document received is the original document from the sender even though a "harmless" transfer occurred along the way.  Under this same condition, if the document is digitally signed by the sender, the recipient would not be able to verify the same document.  Therefore, the document has to be canonicalized so that there is only one way in which the document can be interpreted across transfer agents and local systems.  When the canonicalized document is signed on the sender side, it can be verified on the receiving side.

Some of the different ways in which transfer agents and local systems interpret the document may be:

Required Steps for Canonicalization

When a document is canonicalized, it is modified as follows:

Framework EDI Canonicalization

Because of the many different possible representations of data that are processed and transfered, the question of whether data is canonicalized or not has to be determined.  A MIME document is composed of two sections: a header and a body.  Framework EDI only reads MIME documents whose header is already canonicalized, i.e. all characters in the header are 7-bit and are all terminated using the line delimiter CRLF canonical form.  In the same token, Framework EDI prepares MIME documents with properly canonicalized headers.  Therefore, when preparing and processing, only the body is canonicalized.  As always, Framework EDI plays on the side of caution from  automatically modifying data, and it takes the followings steps to determine if the body should be canonicalized before undertaking the process.