Skip to content

gnutls_privkey_derive_secret: new function

Daiki Ueno requested to merge dueno/gnutls:wip/dueno/ecdh-api into master

This adds a new function gnutls_privkey_derive_secret, which can be used in conjunction with the other key import or key generation API to calculate shared secret.

Key import can be done with gnutls_{pubkey,privkey}_import_ecc_raw for ECDH and gnutls_{pubkey,privkey}_import_dh_raw for FFDH, while key generation could be done with gnutls_privkey_generate2 with respective algorithms (e.g., GNUTLS_PK_ECDH_X25519) and key generation parameters in gnutls_keygen_data_st format.

Fixes: #894 (closed)

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • Code modified for feature
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated / NEWS entry present (for non-trivial changes)
  • CI timeout is 2h or higher (see Settings/CICD/General pipelines/Timeout)

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTION.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Daiki Ueno

Merge request reports