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.
 
BUF_MEM *(* compute_key )(EVP_PKEY *key, const BUF_MEM *in, BN_CTX *bn_ctx)
 Completes a key agreement by computing the shared secret.
 
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

◆ cipher

const EVP_CIPHER* ka_ctx::cipher

Cipher to use for encryption/decryption.

Definition at line 103 of file eac.h.

◆ cipher_engine

ENGINE* ka_ctx::cipher_engine

Cipher's engine.

Definition at line 105 of file eac.h.

◆ cmac_ctx

CMAC_CTX* ka_ctx::cmac_ctx

Context for CMAC.

Definition at line 101 of file eac.h.

◆ 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.

◆ enc_keylen

int ka_ctx::enc_keylen

Length of the computed key for the encryption/decryption.

Definition at line 111 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.

◆ iv

unsigned char* ka_ctx::iv

Initialisation vector for encryption/decryption.

Definition at line 107 of file eac.h.

◆ k_enc

BUF_MEM* ka_ctx::k_enc

Symmetric key used for encryption/decryption. Derived from KA_CTX.shared_secret.

Definition at line 139 of file eac.h.

◆ k_mac

BUF_MEM* ka_ctx::k_mac

Symmetric key used for integrity protection. Derived from KA_CTX.shared_secret.

Definition at line 141 of file eac.h.

◆ key

EVP_PKEY* ka_ctx::key

Container for the key pair used for key agreement.

Definition at line 134 of file eac.h.

◆ mac_keylen

int ka_ctx::mac_keylen

Length of the computed key for the message authentication code.

Definition at line 109 of file eac.h.

◆ md

const EVP_MD* ka_ctx::md

Digest to use for key derivation.

Definition at line 97 of file eac.h.

◆ md_engine

ENGINE* ka_ctx::md_engine

Digest's engine.

Definition at line 99 of file eac.h.

◆ shared_secret

BUF_MEM* ka_ctx::shared_secret

Shared secret computed during the key agreement protocol.

Definition at line 137 of file eac.h.


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