<?xml version="1.0" encoding="UTF-8"?>
<!--
  xmlsec-ghc-schema.rnc (derived from xmlsec-ghc-schema.xsd)
  
  Copyright 2011 W3C (Massachusetts Institute of Technology, 
  Institut National de Recherche en Informatique et en Automatique, 
  Keio University). All Rights Reserved.  http://www.w3.org/Consortium/Legal/
  
  Use and distribution of all schemas in this directory are permitted under the terms
  W3C Software Notice and License
  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/2009/xmlsec-gh#rsaes-kem</value>
      </attribute>
      <attribute name="Algorithm">
        <value type="anyURI">http://www.w3.org/2009/xmlsec-gh#ecies-kem</value>
      </attribute>
    </choice>
  </define>
  <define name="xenc_EncryptionMethodOtherParams" combine="choice">
    <attribute name="Algorithm">
      <value type="anyURI">http://www.w3.org/2009/xmlsec-gh#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/2009/xmlsec-gh#generic-hybrid</value>
  </define>
  <define name="gh_KeyEncapsulationAlgorithms">
    <choice>
      <value type="anyURI">http://www.w3.org/2009/xmlsec-gh#rsaes-kem</value>
      <value type="anyURI">http://www.w3.org/2009/xmlsec-gh#ecies-kem</value>
    </choice>
  </define>
</grammar>
