You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Joze Rihtarsic (Jira)" <ji...@apache.org> on 2023/11/10 07:47:00 UTC
[jira] [Created] (SANTUARIO-608) Key AgreementMethod without EncryptionKey and wrapping algorithm.
Joze Rihtarsic created SANTUARIO-608:
----------------------------------------
Summary: Key AgreementMethod without EncryptionKey and wrapping algorithm.
Key: SANTUARIO-608
URL: https://issues.apache.org/jira/browse/SANTUARIO-608
Project: Santuario
Issue Type: New Feature
Reporter: Joze Rihtarsic
Assignee: Colm O hEigeartaigh
{color:#0e101a}The Key Agreement method ECDH_ES (implemented SANTUARIO-511) is usually used with the KeyEncryption element using Key Wrapping algorithms. See the {color}[{color:#4a6ee0}W3c standard{color}|https://www.w3.org/TR/xmlenc-core1/#sec-ECDH-ES]{color:#0e101a} and {color}[{color:#4a6ee0}test cases{color}|https://www.w3.org/2008/xmlsec/Drafts/xmlenc-core-11/test-cases/#sec-KeyAgreement]{color:#0e101a}. To increase performance, reduce complexity, and attack surface, some security experts argue that KeyWrapping is not necessarily in the case of AES encryption transport algorithms, and the derived key can be used directly for encryption and decryption.
The purpose of the ticket is to implement configuration option to skip EncryptionKey and use
key agreement directly in EncryptedData element.
{color}
The example:
{code:xml}
<xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:xenc11="http://www.w3.org/2009/xmlenc11#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:dsig11="http://www.w3.org/2009/xmldsig11#"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
Id="ED-ad394cf3-a2c0-442e-9943-f01cea6782cb" MimeType="application/gzip"
Type="http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1#Attachment-Content-Only">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2009/xmlenc11#aes128-gcm"/>
<ds:KeyInfo>
<xenc:AgreementMethod Algorithm="http://www.w3.org/2009/xmlenc11#ECDH-ES">
<xenc11:KeyDerivationMethod Algorithm="http://www.w3.org/2021/04/xmldsig-more#hkdf">
<xenc11:HKDFParams Info="ebms3-as4-xmlencryption" KeyLength="16">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<xenc11:Salt>ENCODED</xenc11:Salt>
</xenc11:HKDFParams>
</xenc11:KeyDerivationMethod>
<xenc:OriginatorKeyInfo>
<!-- for X25519 and X448 Keys for EC keys use KeyValue-->
<dsig11:DEREncodedKeyValue>DER ENCODED KEY</dsig11:DEREncodedKeyValue>
</xenc:OriginatorKeyInfo>
<xenc:RecipientKeyInfo>
<ds:KeyValue>
<wsse:SecurityTokenReference>
<wsse:KeyIdentifier
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier"
>ENCODED
</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</ds:KeyValue>
</xenc:RecipientKeyInfo>
</xenc:AgreementMethod>
</ds:KeyInfo>
<xenc:CipherData>
<xenc:CipherReference URI="cid:1400668830234@seller.eu">
<xenc:Transforms>
<ds:Transform Algorithm="http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1#Attachment-Ciphertext-Transform"/>
</xenc:Transforms>
</xenc:CipherReference>
</xenc:CipherData>
</xenc:EncryptedData> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)