RE: ACTION-574: proposal on prefix rewriting

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 UTC