kcapi_kpp_ssgen
Prev | Synchronous Key Protocol Primitives API - One Shot | Next

## Name

kcapi_kpp_ssgen — generate a shared secret

## Synopsis

`int32_t kcapi_kpp_ssgen (` | struct kcapi_handle * handle,
| const uint8_t * pubkey,
| uint32_t pubkeylen,
| uint8_t * ss,
| uint32_t sslen,
| int access`)`;

## Arguments

`handle`

  [in] cipher handle

`pubkey`

  [in] public key of peer that shall be used to generate the shared secret with

`pubkeylen`

  [in] length of the public key buffer

`ss`

  [out] generated shared secret

`sslen`

  [in] length of key buffer

`access`

  [in] kernel access type (KCAPI_ACCESS_HEURISTIC - use internal heuristic for fastest kernel access; KCAPI_ACCESS_VMSPLICE - use vmsplice access; KCAPI_ACCESS_SENDMSG - sendmsg access)

## Description

`return` number of bytes returned by the shared secret generation operation upon success; a negative errno-style error code if an error occurred

Prev | Up | Next
kcapi_kpp_keygen | Home | Asynchronous Key Protocol Primitives API - One Shot