---
name: "kcapi_kpp_ecdh_setcurve"
section: "3"
platform: "linux"
package: "libkcapi-dev"
version: "1.4.0-1+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/kcapi_kpp_ecdh_setcurve"
---

# kcapi\_kpp\_ecdh\_setcurve(3)

set the ECC curve to be used for ECDH

## NAME

kcapi\_kpp\_ecdh\_setcurve - set the ECC curve to be used for ECDH

## SYNOPSIS

**int kcapi\_kpp\_ecdh\_setcurve(struct kcapi\_handle \*** *handle***, unsigned long** *curve\_id***);**

## ARGUMENTS

*handle*

\[in\] cipher handle

*curve\_id*

\[in\] ID of the ECC curve

## DESCRIPTION

With this function, the caller sets the ECC curve for subsequent cipher operations. The curve ID is one of the ECC\_CURVE\_\* identifiers.

Note, this function defines that the subsequent key generation and shared secret operation performs an ECC Diffie-Hellman operation.

*return* 0 upon success; a negative errno-style error code if an error occurred

## AUTHOR

**Stephan Mueller** \<smueller@chronox.de\>

Author.

## COPYRIGHT
