Ordo
0.3.4
Symmetric Cryptography Library
|
Module. More...
#include "ordo/primitives/stream_ciphers.h"
Go to the source code of this file.
Macros | |
#define | ordo_enc_stream_init |
#define | ordo_enc_stream_update |
#define | ordo_enc_stream_final |
#define | ordo_enc_stream_bsize |
Functions | |
ORDO_PUBLIC size_t | enc_stream_key_len (prim_t cipher, size_t key_len) |
Module.
Interface to encrypt plaintext and decrypt ciphertext with various stream ciphers.
#define ordo_enc_stream_init |
Initializes a stream encryption context.
[in,out] | ctx | A stream encryption context. |
[in] | key | The cryptographic key to use. |
[in] | key_size | The size, in bytes, of the key. |
[in] | params | Stream cipher specific parameters. |
ORDO_SUCCESS
on success, else an error code. #define ordo_enc_stream_update |
Encrypts or decrypts a data buffer.
[in,out] | ctx | A stream encryption context. |
[in,out] | buffer | The plaintext or ciphertext buffer. |
[in] | len | Number of bytes to read from the buffer. |
#define ordo_enc_stream_final |
Finalizes a stream encryption context.
[in,out] | ctx | A stream encryption context. |
#define ordo_enc_stream_bsize |
Gets the size in bytes of an ENC_STREAM_CTX
.
ORDO_PUBLIC size_t enc_stream_key_len | ( | prim_t | cipher, |
size_t | key_len | ||
) |
Queries a stream cipher for its key length.
[in] | cipher | The stream cipher to query. |
[in] | key_len | A suggested key length. |
key_len
if and only if key_len
is a valid key length for this stream cipher. Otherwise, returns the nearest valid key length greater than key_len
. However, if no such key length exists, it will return the largest key length admitted by the stream cipher.