OpenVPN
Data Fields
crypto_options Struct Reference

Security parameter state for processing data channel packets. More...

#include <crypto.h>

Collaboration diagram for crypto_options:
Collaboration graph
[legend]

Data Fields

struct key_ctx_bi key_ctx_bi
 OpenSSL cipher and HMAC contexts for both sending and receiving directions.
 
struct epoch_key epoch_key_send
 last epoch_key used for generation of the current send data keys.
 
struct epoch_key epoch_key_recv
 epoch_key used for the highest receive epoch keys
 
struct key_type epoch_key_type
 the key_type that is used to generate the epoch keys
 
uint64_t aead_usage_limit
 The limit for AEAD cipher, this is the sum of packets + blocks that are allowed to be used.
 
struct key_ctxepoch_data_keys_future
 Keeps the future epoch data keys for decryption.
 
uint16_t epoch_data_keys_future_count
 number of keys stored in epoch_data_keys_future
 
struct key_ctx epoch_retiring_data_receive_key
 The old key before the sender switched to a new epoch data key.
 
struct packet_id_rec epoch_retiring_key_pid_recv
 
struct packet_id packet_id
 Current packet ID state for both sending and receiving directions.
 
struct packet_id_persistpid_persist
 Persistent packet ID state for keeping state between successive OpenVPN process startups.
 
unsigned int flags
 Bit-flags determining behavior of security operation functions.
 

Detailed Description

Security parameter state for processing data channel packets.

Definition at line 291 of file crypto.h.

Field Documentation

◆ aead_usage_limit

uint64_t crypto_options::aead_usage_limit

The limit for AEAD cipher, this is the sum of packets + blocks that are allowed to be used.

Will switch to a new epoch if this limit is reached

Definition at line 312 of file crypto.h.

Referenced by epoch_check_send_iterate(), and epoch_init_key_ctx().

◆ epoch_data_keys_future

struct key_ctx* crypto_options::epoch_data_keys_future

Keeps the future epoch data keys for decryption.

The current one that is expected to be used is stored in key_ctx_bi.

for encryption keys this is not needed as we only need the current and move to another key by iteration and we never need to go back to an older key.

Definition at line 321 of file crypto.h.

Referenced by crypto_test_epoch_key_generation(), crypto_test_epoch_key_overflow(), epoch_generate_future_receive_keys(), epoch_init_key_ctx(), epoch_lookup_decrypt_key(), epoch_replace_update_recv_key(), and free_epoch_key_ctx().

◆ epoch_data_keys_future_count

uint16_t crypto_options::epoch_data_keys_future_count

◆ epoch_key_recv

struct epoch_key crypto_options::epoch_key_recv

◆ epoch_key_send

struct epoch_key crypto_options::epoch_key_send

last epoch_key used for generation of the current send data keys.

As invariant, the epoch of epoch_key_send is always kept >= the epoch of epoch_key_recv

Definition at line 301 of file crypto.h.

Referenced by crypto_test_epoch_key_generation(), crypto_test_epoch_key_overflow(), crypto_test_epoch_key_rotation(), epoch_check_send_iterate(), epoch_init_key_ctx(), epoch_init_send_key_ctx(), epoch_iterate_send_key(), epoch_replace_update_recv_key(), free_epoch_key_ctx(), and should_trigger_renegotiation().

◆ epoch_key_type

struct key_type crypto_options::epoch_key_type

the key_type that is used to generate the epoch keys

Definition at line 307 of file crypto.h.

Referenced by epoch_init_key_ctx(), epoch_init_recv_key(), and epoch_init_send_key_ctx().

◆ epoch_retiring_data_receive_key

struct key_ctx crypto_options::epoch_retiring_data_receive_key

The old key before the sender switched to a new epoch data key.

Definition at line 327 of file crypto.h.

Referenced by crypto_check_replay(), crypto_test_epoch_key_receive_lookup(), crypto_test_epoch_key_rotation(), epoch_lookup_decrypt_key(), epoch_replace_update_recv_key(), and free_epoch_key_ctx().

◆ epoch_retiring_key_pid_recv

struct packet_id_rec crypto_options::epoch_retiring_key_pid_recv

◆ flags

unsigned int crypto_options::flags

◆ key_ctx_bi

struct key_ctx_bi crypto_options::key_ctx_bi

◆ packet_id

struct packet_id crypto_options::packet_id

◆ pid_persist

struct packet_id_persist* crypto_options::pid_persist

Persistent packet ID state for keeping state between successive OpenVPN process startups.

Definition at line 339 of file crypto.h.

Referenced by crypto_check_replay(), do_init_crypto_static(), do_init_crypto_tls(), and key_state_init().


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