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

SymmetricState implementation. More...

#include "internal.h"
#include <string.h>

Go to the source code of this file.

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

Definition in file symmetricstate.c.