[gnutls-devel] GnuTLS | Add ecdh compute function gnutls_ecdh_compute_key (!1395)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon May 10 20:57:52 CEST 2021




Nicolas Mora commented on a discussion on lib/ecdh.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1395#note_571819948

> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public License
> + * along with this program.  If not, see <https://www.gnu.org/licenses/>
> + *
> + */
> +
> +/* Helper functions for ECC handling 
> + * based on public domain code by Tom St. Dennis.
> + */
> +#include "gnutls_int.h"
> +#include <ecdh.h>
> +#include "errors.h"
> +
> +int gnutls_ecdh_compute_key(gnutls_privkey_t privkey, gnutls_pubkey_t pubkey, gnutls_datum_t *Z)

The documentation has been improved like this:

```C
/**
 * gnutls_ecdh_compute_key:
 * @privkey: is a #gnutls_privkey_t key to compute
 * @pubkey: is a #gnutls_pubkey_t key to compute with privkey
 * @Z: the computation result
 * 
 * This function calculates a key agreement with Elliptic
 * Curve Diffie-Hellman Ephemeral Static using a private and
 * a public ECC keys
 *
 * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a
 *   negative error value.
 *
 * Since: 3.7.??
 **/
```

I'm not sure with the `Since` value though

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1395#note_571819948
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20210510/c94fdc8d/attachment-0001.html>


More information about the Gnutls-devel mailing list