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:23:00 UTC

[jira] [Created] (SANTUARIO-607) HMAC-based Extract-and-Expand Key Derivation Function (HKDF [RFC5869]) for AgreementMethod

Joze Rihtarsic created SANTUARIO-607:
----------------------------------------

             Summary:  HMAC-based Extract-and-Expand Key Derivation Function (HKDF [RFC5869]) for AgreementMethod
                 Key: SANTUARIO-607
                 URL: https://issues.apache.org/jira/browse/SANTUARIO-607
             Project: Santuario
          Issue Type: New Feature
            Reporter: Joze Rihtarsic
            Assignee: Colm O hEigeartaigh


{color:#000000}The IETF is preparing an update of the RFC 9231 so that the HKDF [RFC5869] derivation algorithm will be suitable to be used with the AgreementMethod implemented in task SANTUARIO-511. The HKDF can be used insteadn of ConcatKDF method
The HKDF  Identifier:{color}{color:#000000}
      {color}[http://www.w3.org/2021/04/xmldsig-more#hkdf]
Proposed scheme
{code:xml}
<xs:element name="HKDFParams" type="xenc11:HKDFParamsType"/>
 
<xs:complexType name="HKDFParamsType">
  <xs:sequence>
    <xs:element ref="ds:DigestMethod" minOccurs="1" maxOccurs="1" />
    <xs:element name="Salt" minOccurs="0" maxOccurs="1" type="xs:base64Binary"/>
  </xs:sequence>
  <xs:attribute name="KeyLength" type="xs:positiveInteger"/>
  <xs:attribute name="Info" type="xs:string" use="required"/>
</xs:complexType>
 {code}
{color:#000000}
Example in AgreementMethod {color}
{code:xml}
<xenc:AgreementMethod 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" 
        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>
 {code}
{color:#000000} The purpose of the task is to add configuration option to choose KeyDerivationAlgorithm and to implement support for HKDF  in santuarion library
{color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)