Noise-C
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Typedefs | Functions
symmetricstate.h File Reference

SymmetricState interface. More...

#include <noise/protocol/cipherstate.h>
#include <noise/protocol/names.h>

Go to the source code of this file.

Typedefs

typedef struct
NoiseSymmetricState_s 
NoiseSymmetricState
 Opaque object that represents a SymmetricState. More...
 

Functions

int noise_symmetricstate_decrypt_and_hash (NoiseSymmetricState *state, NoiseBuffer *buffer)
 Decrypts a block of data with this SymmetricState object and adds the ciphertext to the handshake hash. More...
 
int noise_symmetricstate_encrypt_and_hash (NoiseSymmetricState *state, NoiseBuffer *buffer)
 Encrypts a block of data with this SymmetricState object and adds the ciphertext to the handshake hash. More...
 
int noise_symmetricstate_free (NoiseSymmetricState *state)
 Frees a SymmetricState object after destroying all sensitive material. More...
 
size_t noise_symmetricstate_get_mac_length (const NoiseSymmetricState *state)
 Gets the current length of packet MAC values for a SymmetricState object. More...
 
int noise_symmetricstate_get_protocol_id (const NoiseSymmetricState *state, NoiseProtocolId *id)
 Gets the protocol identifier associated with a SymmetricState object. More...
 
int noise_symmetricstate_mix_hash (NoiseSymmetricState *state, const uint8_t *input, size_t size)
 Mixes new input data into the handshake hash. More...
 
int noise_symmetricstate_mix_key (NoiseSymmetricState *state, const uint8_t *input, size_t size)
 Mixes new input data into the chaining key. More...
 
int noise_symmetricstate_new_by_id (NoiseSymmetricState **state, const NoiseProtocolId *id)
 Creates a new SymmetricState object from a protocol identifier. More...
 
int noise_symmetricstate_new_by_name (NoiseSymmetricState **state, const char *name)
 Creates a new SymmetricState object from a protocol name. More...
 
int noise_symmetricstate_split (NoiseSymmetricState *state, NoiseCipherState **c1, NoiseCipherState **c2)
 Splits the transport encryption CipherState objects out of this SymmetricState object. More...
 

Detailed Description

SymmetricState interface.

Definition in file symmetricstate.h.