CRYPTO_cts128_encrypt

Encrypt with CS1 ciphertext stealing using a CBC encrypt function.

Synopsis

Declared in <openssl/modes.h>

size_t
CRYPTO_cts128_encrypt(
    unsigned char const* in,
    unsigned char* out,
    size_t len,
    void const* key,
    unsigned char ivec[],
    cbc128_f cbc);

Return Value

Number of ciphertext bytes written, or 0 on error.

Parameters

NameDescription
inInput plaintext of length len (must be greater than 16).
outOutput ciphertext buffer of length len.
lenNumber of plaintext bytes.
keyCipher-specific expanded key for cbc.
ivec16-byte IV updated like CBC.
cbcCBC-mode encrypt function for the underlying cipher.