<?xml version="1.0" encoding="UTF-8"?>
<!--
  xmlsec-ghc-schema.rnc (derived from xmlsec-ghc-schema.xsd)
  
  Copyright ©[2011] World Wide Web Consortium 
  (Massachusetts Institute of Technology,  
   European Research Consortium for Informatics and Mathematics, 
   Keio University). All Rights Reserved.  
  This work is distributed under the W3C® Software License [1] in the
  hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  PURPOSE. 
  [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
  
  
-->
<grammar ns="http://www.w3.org/2009/xmlsec-gh#" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <define name="gh_GenericHybridCipherMethod">
    <element name="GenericHybridCipherMethod">
      <ref name="gh_GenericHybridCipherMethodType"/>
    </element>
  </define>
  <define name="gh_GenericHybridCipherMethodType">
    <element name="KeyEncapsulationMethod">
      <ref name="gh_KeyEncapsulationMethodType"/>
    </element>
    <element name="DataEncapsulationMethod">
      <ref name="xenc_EncryptionMethodType"/>
    </element>
  </define>
  <define name="gh_KeyEncapsulationMethodType">
    <ref name="xenc11_KeyDerivationMethod"/>
    <element name="KeyLen">
      <data type="positiveInteger"/>
    </element>
    <ref name="gh_KeyEncapsulationMethodParams"/>
  </define>
  <define name="gh_KeyEncapsulationMethodParams">
    <choice>
      <attribute name="Algorithm">
        <value type="anyURI">http://www.w3.org/2010/xmlsec-ghc#rsaes-kem</value>
      </attribute>
      <attribute name="Algorithm">
        <value type="anyURI">http://www.w3.org/2010/xmlsec-ghc#ecies-kem</value>
      </attribute>
    </choice>
  </define>
  <define name="xenc_EncryptionMethodOtherParams" combine="choice">
    <attribute name="Algorithm">
      <value type="anyURI">http://www.w3.org/2010/xmlsec-ghc#generic-hybrid</value>
    </attribute>
    <ref name="gh_GenericHybridCipherMethod"/>
  </define>
  <!-- List of known algorithms -->
  <define name="xenc_EncryptionAlgorithms" combine="choice">
    <value type="anyURI">http://www.w3.org/2010/xmlsec-ghc#generic-hybrid</value>
  </define>
  <define name="gh_KeyEncapsulationAlgorithms">
    <choice>
      <value type="anyURI">http://www.w3.org/2010/xmlsec-ghc#rsaes-kem</value>
      <value type="anyURI">http://www.w3.org/2010/xmlsec-ghc#ecies-kem</value>
    </choice>
  </define>
</grammar>
