Subject: [ietf-dkim] Question regarding computing message hashes

From: Roman Meisl <[email-masked]>
Date: Mon, 21 Aug 2006 11:26:57 +0200

Hello,

I've got a question regarding the computing of message hashes. In
chapter 3.7 is listed a formal notation for that algorithm:

       body-hash = hash-alg(canon_body)
       header-hash = hash-alg(canon_header || DKIM-SIG)
       signature = sig-alg(header-hash, key)

I'm not quite sure, what "||" means. I assume it means concatenation
of the two strings. Is that right?

Then it would perhaps be better to write
       header-hash = hash-alg(canon_header + DKIM-SIG)
or
       header-hash = hash-alg(concat(canon_header,DKIM-SIG))
in the second line or at least to mention concatenation explicitly in the
text.

TIA,
   Roman

-- 
<http://www.mathematik.uni-marburg.de/~meisl>

_______________________________________________
NOTE WELL: This list operates according to 
http://mipassoc.org/dkim/ietf-list-rules.html

---

From: Paul Hoffman <[email-masked]>
Date: Mon, 21 Aug 2006 08:19:27 -0700

>of the two strings. Is that right?

Yes. That is standard terminology in security documents.

>in the second line or at least to mention concatenation explicitly in the

The first could be confusing because "+" normally indicates numeric 
addition. The second could also be used, but the action of 
concatenation doesn't have be a function.

It would be easiest if the document just said "|| indicates string 
concatenation".
_______________________________________________
NOTE WELL: This list operates according to 
http://mipassoc.org/dkim/ietf-list-rules.html

---

From: Dave Crocker <[email-masked]>
Date: Mon, 21 Aug 2006 08:24:36 -0700

> It would be easiest if the document just said "|| indicates string

+1

d/
-- 

  Dave Crocker
  Brandenburg InternetWorking
  bbiw.net
_______________________________________________
NOTE WELL: This list operates according to 
http://mipassoc.org/dkim/ietf-list-rules.html

---

From: Frank Ellermann <[email-masked]>
Date: Tue, 22 Aug 2006 15:58:08 +0200

Paul Hoffman wrote:

>> I'm not quite sure, what "||" means. I assume it means
>> concatenation of the two strings. Is that right?
 
> Yes. That is standard terminology in security documents.

It's also the string concatenation operator in REXX.  In a
security related memo I've seen { } (curly braces), but "||"
(or "+" if unambiguous) are IMO better to read.  Awk-style,
operands separated (only) by space(s), could confuse me, in
REXX that's the same as x || " " || y, and not just x || y.

> It would be easiest if the document just said "|| indicates
> string concatenation".

Frank