<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I also would prefer to provide the length of each encoded value
in the function signature explicitly.<br>
</p>
<p>Regarding the values which will de facto be byte arrays (keys,
shared secret), they should be passed as (<tt>const</tt>)<tt>
unsigned char*</tt> in my opinion. </p>
<p>For the context object, as I wrote before, I think it should be a
specific type. This would be in line with existing API functions
for hash functions, MAC, etc. Or is there a specific reason to
make the type obscure specifically in this case?</p>
<p>- Falko<br>
</p>
<div class="moz-cite-prefix">Am 18.10.23 um 10:21 schrieb Werner
Koch via Gcrypt-devel:<br>
</div>
<blockquote type="cite" cite="mid:87lec0xrwk.fsf@jacob.g10code.de">
<pre class="moz-quote-pre" wrap="">Hi!
On Tue, 17 Oct 2023 15:27, NIIBE Yutaka said:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">In this API, format of the CONTEXT, PUBKEY, SECKEY, CIPHERTEXT,
SHARED_SECRET are defined by ALGO. (Most of the cases, it's
fixed-length byte string.)
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
I really would like to see a size parmater for each pointer. This can
help to detect eerrrors earlier, avoid problems with API/ABI mismatches,
and makes low-level language bindings easier to write.
Regarding the context parameter, I consider this extremely useful and it
was a misconception that we did not add this to the other public key
functions. Most other subsystems in Libgcrypt follow the open-use-close
paradigm with the public key functions beeing the major exception.
The context parameter offers us a way to do pre-computations and keep to
keep other kinds of state.
Salam-Shalom,
Werner
</pre>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Gcrypt-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gcrypt-devel@gnupg.org">Gcrypt-devel@gnupg.org</a>
<a class="moz-txt-link-freetext" href="https://lists.gnupg.org/mailman/listinfo/gcrypt-devel">https://lists.gnupg.org/mailman/listinfo/gcrypt-devel</a>
</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>
</span></p>
<font face="Arial">
<hr
style="width:320px; text-align:left;margin-left:0; height: 0,1px">
</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>
</font></div>
</body>
</html>