<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Werner,</p>
    <p>the only API change is the addition of the following interface
      function:</p>
    <p><tt>gcry_err_code_t</tt><tt><br>
      </tt><tt>_gcry_pk_encap(gcry_sexp_t *r_ciph, gcry_sexp_t*
        r_shared_key, gcry_sexp_t s_pkey)</tt><tt><br>
      </tt></p>
    <p>This also means that the public key spec needs to contain this
      additional function. For Kyber our public key spec currently looks
      as follows:</p>
    <p><tt>gcry_pk_spec_t _gcry_pubkey_spec_kyber = {</tt><tt><br>
      </tt><tt>  GCRY_PK_KYBER, {0, 1},</tt><tt><br>
      </tt><tt>  (GCRY_PK_USAGE_ENCAP),        // TODOMTG: can the key
        usage "encryption" remain or do we need new KU "encap"?</tt><tt><br>
      </tt><tt>  "Kyber", kyber_names,</tt><tt><br>
      </tt><tt>  "p", "s", "a", "", "p",       // elements of pub-key,
        sec-key, ciphertext, signature, key-grip</tt><tt><br>
      </tt><tt>  kyber_generate,</tt><tt><br>
      </tt><tt>  kyber_check_secret_key,</tt><tt><br>
      </tt><tt>  NULL,                         // encrypt</tt><tt><br>
      </tt><tt>  kyber_encap,</tt><tt><br>
      </tt><tt>  kyber_decrypt,</tt><tt><br>
      </tt><tt>  NULL,                         // sign,</tt><tt><br>
      </tt><tt>  NULL,                         // verify,</tt><tt><br>
      </tt><tt>  kyber_get_nbits,</tt><tt><br>
      </tt><tt>  run_selftests,</tt><tt><br>
      </tt><tt>  compute_keygrip</tt><tt><br>
      </tt><tt>};</tt><br>
    </p>
    <p>For the PKEs the encapsulation function would of course be NULL.
      Regarding the TODO on the key usage marked in the code above, this
      so far doesn't seem to have any implications for us so the
      decision isn't urgent from my point of view.</p>
    <p>- Falko    <br>
    </p>
    <div class="moz-cite-prefix">Am 30.03.23 um 15:43 schrieb Werner
      Koch:<br>
    </div>
    <blockquote type="cite"
      cite="mid:87tty2cq2q.fsf@wheatstone.g10code.de">
      <pre class="moz-quote-pre" wrap="">On Wed, 29 Mar 2023 10:09, Falko Strenzke said:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">While the integration of the signature algorithms is straightforward, the KEM
requires a new interface function, as the KEM encapsulation cannot be modelled
by a public-key encryption.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
It would be good if we can discuss a proposed API early enough, so that
we can see how it fits into the design of Libgcrypt.  Can you already
roughly describes the needs?


Salam-Shalom,

   Werner

</pre>
    </blockquote>
    <div class="moz-signature">-- <br>
      <!-- MTG AG HTML signature v.1.0 - Messen 2022, 2022-03-14 - Author: Andreas Cholet -->
      <p style="line-height: 1.1;"><font face="Arial"><span
            style="font-size: small; color: rgb(93, 93, 95);">
            <strong>MTG AG</strong><br>
            Dr. Falko Strenzke<br>
            Executive System Architect<br>
            <!--up to here--> </span></font></p>
      <font face="Arial">
        <p>
          <span style="font-size: small; color: rgb(93, 93, 95);">
            <span style="display:inline-block;width:4em">Phone: </span>+49
            6151 8000 24<br>
            <span style="display:inline-block;width:4em">E-Mail: </span><a class="moz-txt-link-abbreviated" href="mailto:falko.strenzke@mtg.de">falko.strenzke@mtg.de</a><br>
            <span style="display:inline-block;width:4em">Web: </span><a
              href="https://www.mtg.de" title="MTG AG Internet"
              target="_blank">mtg.de</a><br>
            <br>
            <br>
            <strong>MTG Exhibitions – See you in 2023</strong>
          </span></p>
        <font face="Arial">
          <hr style="width:320px; text-align:left;margin-left:0; height:
            0,1px">
          <a
href="https://community.e-world-essen.com/institutions/allExhibitors?query=true&keywords=mtg"
            title="Info E-world 2023" target="_blank" rel="“noopener"
            noreferrer"="">
            <img data-filename="Eworld.png"
              src="cid:part1.YK5bTJyA.WnhQvcgM@mtg.de"
              style="width:126px; margin-left: 6px"></a>
          <span style="font-size: small; color: rgb(93, 93, 95);">
            <a href="https://www.itsa365.de/de-de/companies/m/mtg-ag"
              title="Info itsa365 2023" target="_blank" rel="“noopener"
              noreferrer"="">
              <img data-filename="itsa.png"
                src="cid:part2.pXYh0pZ7.ZqTpjzCq@mtg.de"
                style="width:83px; margin-left: 60px"></a></span></font>
        <span style="font-size: small; color: rgb(93, 93, 95);">
          <!--a href="https://www.mtg.de/de/aktuelles/Hannover-Messe-2021-IT-Security-fuer-das-IoT/" title="Mehr Informationen" target="_blank"><strong>Mehr Informationen</strong></a -->
        </span><br>
        <br>
      </font>
      <p style="line-height: 1.2;"><font face="Arial">
          <span style="font-size: x-small; color: rgb(93, 93, 95);">
            MTG AG - Dolivostr. 11 - 64293 Darmstadt, Germany<br>
            Commercial register: HRB 8901<br>
            Register Court: Amtsgericht Darmstadt<br>
            Management Board: Jürgen Ruf (CEO), Tamer Kemeröz<br>
            Chairman of the Supervisory Board: Dr. Thomas Milde<br>
            <br>
            This email may contain confidential and/or privileged
            information. If you are not the correct recipient or have
            received this email in error,
            <br>
            please inform the sender immediately and delete this email.
            Unauthorised copying or distribution of this email is not
            permitted.<br>
            <br>
            Data protection information: <a
              href="https://www.mtg.de/en/privacy-policy" title="MTG
              Privacy policy" target="_blank">Privacy policy</a>
          </span></font></p>
    </div>
  </body>
</html>