I have been back fiddling at the Web Services Enhancements (WSE) 3.0 technology space for the past few weeks and I am now grokking into the plumbings since there are quite a few forums, blogs, posts out there focusing on the higher-level abstract programming model.
I am very pleased that WSE 3.0 has implemented WS-Security Specifications 1.1 at its very core, so much so that it is the de-facto security standard to be used in most of the Turnkey Security Assertions that comes with the product.
One of the things that I have always been asking for through my contacts and channels in the OASIS WS-Security Technical Committee is the ability to sign my document snippets with a symmetric key instead. Since XML-Encryption already utilized symmetric key encryption via the [xenc:EncryptedKey] [1] for performance and throughput reasons, there is no reason why XML-Digital Signature cannot do the same. While the improvements in throughput may be slight due to the fact that in digital signatures, messages are already hashed before encryption, it is still a viable option that should be made available.
In WS-Security 1.0, this is what is commonly seen in the Digital Signature Parts:
...
[wsse:BinarySecurityToken ValueType="...oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="...oasis-200401-wss-soap-message-security-1.0#Base64Binary"
wsu:Id="SecurityToken-7b5d..."]MIIBxDCCAW...[/wsse:BinarySecurityToken]
[Signature xmlns="http://www.w3.org/2000/09/xmldsig#"]
[SignedInfo]
[CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /]
[SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /]
[Reference URI="#Id-f7e1..."]
[Transforms]
[Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /]
[/Transforms]
[DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /]
[DigestValue]avMezj5NhZwNerXidi5oBmjqi/g=[/DigestValue]
[/Reference]
...
[/SignedInfo]
[SignatureValue]SJfnqZeDHboWDI2n2gWHqTJO5hXvZOFQw8UtDdajktzR40H+W6D
prs5CW/l9A5TF3xcFfyryA3hz7c+0vdlZSnaA+cBn2qPxt7/YmwaAx5Ave
awuach6YPYI123I4I3f58eSMUgPsx6/uuFQFcJltEMw1nWLE6Wb6CPg5OdtXLs=[/SignatureValue]
[KeyInfo]
[wsse:SecurityTokenReference]
[wsse:Reference URI="#SecurityToken-7b5d..."
ValueType="...oasis-200401-wss-x509-token-profile-1.0#X509v3" /]
[/wsse:SecurityTokenReference]
[/KeyInfo]
[/Signature]
Now in WS-Security 1.1 via WSE 3.0, I can do this:
[xenc:EncryptedKey Id="SecurityToken-32e4..." xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"]
...
[wsse:SecurityTokenReference]
[wsse:KeyIdentifier ValueType="...oasis-wss-soap-message-security-1.1#ThumbprintSHA1" EncodingType="...oasis-200401-wss-soap-message-security-1.0#Base64Binary"]qRTA40Xfk6w1Os3mgpgy8UgwR/Y=[/wsse:KeyIdentifier]
[/wsse:SecurityTokenReference]
[/KeyInfo]
[xenc:CipherData]
[xenc:CipherValue]n6PnkIWb+QsIeOPehLdtQQKYZn202uGqhN+ShCWyBaCf20rmVcta
Bw2MhB1fv9pE0hOLpAxMMT5ffk4/hnwZ/ef2XcZediF6ySfpse14TI2TGy
cp9XErpeYlZNn1wSchHlOEz2gVYfViZoEOIwn8qR7EofLN3U3Mc5Zp2qG2coI=[/xenc:CipherValue]
[/xenc:CipherData]
[xenc:ReferenceList]
[xenc:DataReference URI="#Enc-0914..." /]
[xenc:DataReference URI="#Enc-3aab..." /]
[/xenc:ReferenceList]
[/xenc:EncryptedKey]
[xenc:EncryptedData Id="Enc-0914..." Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"]
[xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" /]
[xenc:CipherData] [xenc:CipherValue]RLASn...[/xenc:CipherValue]
[/xenc:CipherData]
[/xenc:EncryptedData]
[Signature xmlns="http://www.w3.org/2000/09/xmldsig#"]
[SignedInfo]
...
[SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1" /]
[Reference URI="#SecurityToken-d217..."]
[Transforms]
[Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /]
[/Transforms]
[DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /]
[DigestValue]A0K7OVwZN3vP4rIXfbTZYy+f+ck=[/DigestValue]
[/Reference]
[Reference URI="#Timestamp-6f12..."]
...
[/Reference]
[/SignedInfo]
[SignatureValue]d8KmXpfspmKiEOZ1eBVY7mk05Wo=[/SignatureValue]
[KeyInfo]
[wsse:SecurityTokenReference]
[wsse:Reference URI="#SecurityToken-32e4..."
ValueType="...oasis-wss-soap-message-security-1.1#EncryptedKey" /]
[/wsse:SecurityTokenReference]
[/KeyInfo]
[/Signature]
Note the fonts in RED. There is a new URI: http://docs.oasisopen.org/wss/oasiswss-soap-messagesecurity-1.1#EncryptedKey which ties to a ValueType: A token type of an [xenc:EncryptedKey]
... and more importantly ...
the [SignatureValue] contents is slightly shorter now because it is actually encrypted with a symmetric key now. I know I may be picking here BUT hey, even a single byte in reduction means a lot in throughput performance in terms of wire transfer of documents.
.
There are other improvements WS-Security 1.1 brings over its predecessor 1.0, which I will blog more about as I go along.
[1] Just a note to defuse any confusion if it crops up: Asymmetric (Public-Private) key technologies are still very much used in WS-Security and other document-related security specifications today. I dont think it will be dropped anytime soon unless Quantum Cryptography takes off mainstream in a big way or the subtle effects of this reverberates adversely through the security space. Having said that, Symmetric (Master/Session) key technologies have a huge place in the security specifications world too, just by the fact that it is a 1000x faster than much-secure asymmetric ones. Therefore, both technologies co-exist and work very well together in the document security space. To put it simply, a symmetric key (KeyA) is randomly-generated (key-length can be specified by the application - the longer, the better) and then used to encrypt/decrypt messages (MsgA). Once that is done - KeyA is then subsequently encrypted by an asymmetric key (KeyB) and then transmitted through the message. Only the holder of the Private-Key pair of KeyB will be able to decrypt KeyA which can then decrypt/encrypt MsgA.