Mitchell,
I think that is a perfectly valid statement. You are correct that adding whitespace to the assertion and performing validation on the assertion with that added whitespace will break the validation of the signature. However, the standard process for validating a signature should include canonicalization of what you are signing as the first step (assuming it was used during the original signature process). Signature blocks contain metadata about what canoncalization algorithm was used before signing specifically so you can repeat it during validation.
Bob
You can take some arbitrary bit of XML, add whitespaces, and *then* sign
it and then verify it. So, assuming the person meant exactly what they
said, then they were telling the truth. However, you can not take that
same XML, sign it, then add whitespace and verify it.
--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Net Services
Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68
chad....@switch.ch, http://www.switch.ch
Yes, I understand it so.
Saying that you can add whitespace before signing is tautological
and irrelevant. You can do any sort of transformation before signing,
not just adding whitespace, you could duplicate every other XML
element with a name starting by F if you wanted, and then sign .
The only relevant discussion is what modifications are allowed
between signature and verification, and this (I'm not an expert)
is what canonicalization methods (or their equivalence classes)
define. You can do any modification between signing and
verification as long and the canonicalization result stays
the same as before your modification.
So it all boils down to : Is there a canonicalization that
ignores whitespace and/or pretty printing ? Not that I know.
You could define one but it wouldn't be standard, AFAIK.
But let someone knowledgeable answer.
--
Xavi Drudis Ferran
xdr...@ambarinformatica.com
Mitchell Prentice <mitchell...@gmail.com>
04/02/2009 10:41 AM
|
|
|
<ele a1="text.." a2="mote text..">
as
<ele a1="text.."
a2="more text...">
and the signature would still be good. You could even reformat it as
<ele a2="more text..." a1="text..." >
without invalidating the signature. You cannot, however, add important
white space. Doing something like
<ele1 ...><ele2 ...>
reformatted to
<ele1 ...>
<ele2 ...>
would invalidate the signature, because the new white space becomes part
of the document.
Jim