W3C home > Mailing lists > Public > public-xmlsec@w3.org > June 2010

RE: ACTION-574: proposal on prefix rewriting

From: Pratik Datta <pratik.datta@oracle.com>
Date: Tue, 22 Jun 2010 08:44:30 -0700 (PDT)
Message-ID: <2886b292-b58b-4824-98c6-371eb9e36c43@default>
To: Scott Cantor <cantor.2@osu.edu>, XMLSec WG Public List <public-xmlsec@w3.org>
I realized that a URI is a sequence of characters, it can't be digested unless it is converted to bytes. For this I am proposing that we use US-ASCII encoding, because URI are limited to US-ASCII characters aren't they ? 

Here is the text that I am adding.

"Assign new prefix values "nD" to each prefix in this list where D is the
SHA1 digest of the URI expressed as a hexidecimal string using the
characters '0'-'9' and 'a'-'f'. Before digesting, the URI should be converted to octets using US-ASCII encoding. "


this should close my ACTION-579

Pratik

-----Original Message-----
From: Scott Cantor [mailto:cantor.2@osu.edu] 
Sent: Tuesday, May 04, 2010 9:10 AM
To: XMLSec WG Public List
Subject: ACTION-574: proposal on prefix rewriting

The current c14n draft proposes the following for digest-based prefix
rewrite:

"Assign new prefix values "nD" to each prefix in this list where D is SHA1
digest of the URI, the digest encoded as a base64 string, and then the
base64 chars '/', '+' and '=' replaced by '_', '-' and '.' to achieve XML
name rules."

My suggestion in my comments a few weeks back was to hex-encode the SHA1
digest and add a leading underscore, but the leading n solves the problem
with digits anyway.

So my proposal amounts to:

Assign new prefix values "nD" to each prefix in this list where D is the
SHA1 digest of the URI expressed as a hexidecimal string using the
characters '0'-'9' and 'a'-'f'.

The downside obviously is the text gets longer (20 bytes encoded into base64
-> 40 characters). If there's an encoding we can use that doesn't result in
unsafe names, that's fine with me.

-- Scott
Received on Tuesday, 22 June 2010 15:45:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 June 2010 15:45:33 GMT