ietf-mailsig
[Top] [All Lists]

Re: DKIM Body Count/Length

2005-07-25 07:24:27

Hector Santos wrote:
I have some comments about the l= tag.

From the spec:

   l=   Body count (plain-text decimal integer; OPTIONAL, default is
      entire body).  This tag informs the verifier of the number of
      bytes in the body of the email included in the cryptographic hash,
      starting from 0 immediately following the CRLF preceding the body.

First, it seems to me this l= count is the size of the canonicalized body.
If so, it should probably state so in the paragraph above.

That is correct.

Second, based on the above, the count starts after the second CRLF (the CRLF
presiding the body).

        last-header: xxxxx<CRLF>
        <CRLF>
    -> BODY

If this correct?

That seems correct to me -- that's how IIM did it; the CRLF is a
property of the headers end marker, not of the body.

But the example in the specs shows otherwise:

   A: <SP> X <CRLF>
   B: <SP> Y <CRLF>
    <SP> Z <CRLF>
   <CRLF>
   C <CRLF>
   D <SP><TAB><SP> E <CRLF>

      is canonicalized to:

   a:X<CRLF>b:YZ<CRLF><CRLF>CDE

Based on this example, the two parts are:

 canonicalized header: a:X<CRLF>b:YZ<CRLF>
 canonicalized body: <CRLF>CDE

Therefore the the l= count size includes the CRLF presiding the body.

I think you're reading too much into the example. The example is,
I think, showing the nowsp canonicalization. The point being to show
where the syntactic CRLF's are actually given to the hash (vs. eaten
by the nowsp algorithm).


                Mike


<Prev in Thread] Current Thread [Next in Thread>