Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/encryption
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2016-04-23 17:49:53 +0200
committerArthur de Jong <arthur@arthurdejong.org>2016-04-23 19:06:56 +0200
commit9b76135997517c325d9847ea28b176a12d2cb5ad (patch)
treed620ec8b68c0883694d05cd5db275999b5570c5d /tests/encryption
parentd53f05b1a8be02d62b29a3890e3af92f11eaf463 (diff)
Allow global specification of IV
In older versions of the PSKC standard it was allowed to have a global initialization vector for CBC based encryption algorithms. It is probably not a good idea to re-use an IV in general.
Diffstat (limited to 'tests/encryption')
-rw-r--r--tests/encryption/aes128-cbc-noiv.pskcxml38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/encryption/aes128-cbc-noiv.pskcxml b/tests/encryption/aes128-cbc-noiv.pskcxml
new file mode 100644
index 0000000..1fba51b
--- /dev/null
+++ b/tests/encryption/aes128-cbc-noiv.pskcxml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Test that holds an aes128-cbc encrypted value. Key is
+ 12345678901234567890123456789012. The IV is not part of the CipherValue.
+-->
+
+<KeyContainer Version="1.0"
+ xmlns="urn:ietf:params:xml:ns:keyprov:pskc"
+ xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+ xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
+ <EncryptionKey>
+ <ds:KeyName>Pre-shared-key</ds:KeyName>
+ </EncryptionKey>
+ <MACMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#hmac-sha224">
+ <MACKey>
+ <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
+ <xenc:CipherData>
+ <xenc:CipherValue>Diahu/VzjP5IbRYxRgNYT+YQcIa03s5FLMnHjTM0rSQ=</xenc:CipherValue>
+ </xenc:CipherData>
+ </MACKey>
+ </MACMethod>
+ <KeyPackage>
+ <Key>
+ <Data>
+ <Secret>
+ <EncryptedValue>
+ <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
+ <xenc:CipherData>
+ <xenc:CipherValue>5wgci2UHdatrUNSnFW87HaV5/VWY08IyXyPBmohSoa8=</xenc:CipherValue>
+ </xenc:CipherData>
+ </EncryptedValue>
+ <ValueMAC>mNUFNm7a8VqhdmoYDX95B/V7HY36hHOKr6F9jQ==</ValueMAC>
+ </Secret>
+ </Data>
+ </Key>
+ </KeyPackage>
+</KeyContainer>