OpenPACE
Data Fields
ka_ctx Struct Reference

Context for a key agreement and subsequent derivation of session keys. More...

#include <eac.h>

Data Fields

const EVP_MD * md
 Digest to use for key derivation.
 
ENGINE * md_engine
 Digest's engine.
 
CMAC_CTX * cmac_ctx
 Context for CMAC.
 
const EVP_CIPHER * cipher
 Cipher to use for encryption/decryption.
 
ENGINE * cipher_engine
 Cipher's engine.
 
unsigned char * iv
 Initialisation vector for encryption/decryption.
 
int mac_keylen
 Length of the computed key for the message authentication code.
 
int enc_keylen
 Length of the computed key for the encryption/decryption.
 
BUF_MEM *(* generate_key )(EVP_PKEY *key, BN_CTX *bn_ctx)
 Generates a key pair for key agreement. More...
 
BUF_MEM *(* compute_key )(EVP_PKEY *key, const BUF_MEM *in, BN_CTX *bn_ctx)
 Completes a key agreement by computing the shared secret. More...
 
EVP_PKEY * key
 Container for the key pair used for key agreement.
 
BUF_MEM * shared_secret
 Shared secret computed during the key agreement protocol.
 
BUF_MEM * k_enc
 Symmetric key used for encryption/decryption. Derived from KA_CTX.shared_secret.
 
BUF_MEM * k_mac
 Symmetric key used for integrity protection. Derived from KA_CTX.shared_secret.
 

Detailed Description

Context for a key agreement and subsequent derivation of session keys.

Note
The key agreement itself is done via an underlying DH or ECDH.

Definition at line 95 of file eac.h.

Field Documentation

◆ compute_key

BUF_MEM*(* ka_ctx::compute_key) (EVP_PKEY *key, const BUF_MEM *in, BN_CTX *bn_ctx)

Completes a key agreement by computing the shared secret.

Parameters
[in]keyObject for key computation, usually &KA_CTX.key
[in]inPublic key from the other party
[in]bn_ctx(optional)
Returns
Shared secret or NULL in case of an error

Definition at line 131 of file eac.h.

◆ generate_key

BUF_MEM*(* ka_ctx::generate_key) (EVP_PKEY *key, BN_CTX *bn_ctx)

Generates a key pair for key agreement.

Parameters
[in]keyObject for key generation, usually &KA_CTX.key
[in]bn_ctx(optional)
Returns
Public key or NULL in case of an error

Definition at line 121 of file eac.h.


The documentation for this struct was generated from the following file: