Go to the documentation of this file.
55 #include "../../internal.h"
74 "block cannot be divided into crypto_word_t");
92 assert(
key && ecount_buf &&
num);
99 *(
out++) = *(
in++) ^ ecount_buf[
n];
104 (*block)(ivec, ecount_buf,
key);
106 for (
n = 0;
n < 16;
n +=
sizeof(crypto_word_t)) {
116 (*block)(ivec, ecount_buf,
key);
142 unsigned int n, ctr32;
144 assert(
key && ecount_buf &&
num);
151 *(
out++) = *(
in++) ^ ecount_buf[
n];
158 size_t blocks =
len / 16;
162 if (
sizeof(
size_t) >
sizeof(
unsigned int) && blocks > (1U << 28)) {
170 if (ctr32 < blocks) {
174 (*func)(
in,
out, blocks,
key, ivec);
188 (*func)(ecount_buf, ecount_buf, 1,
key, ivec);
static void ctr96_inc(uint8_t *counter)
static void CRYPTO_store_word_le(void *out, crypto_word_t v)
static void * OPENSSL_memset(void *dst, int c, size_t n)
static void ctr128_inc(uint8_t *counter)
static void CRYPTO_store_u32_be(void *out, uint32_t v)
void(* ctr128_f)(const uint8_t *in, uint8_t *out, size_t blocks, const AES_KEY *key, const uint8_t ivec[16])
OPENSSL_STATIC_ASSERT(16 % sizeof(crypto_word_t)==0, "block cannot be divided into crypto_word_t")
static uint32_t CRYPTO_load_u32_be(const void *in)
void CRYPTO_ctr128_encrypt(const uint8_t *in, uint8_t *out, size_t len, const AES_KEY *key, uint8_t ivec[16], uint8_t ecount_buf[16], unsigned int *num, block128_f block)
void(* block128_f)(const uint8_t in[16], uint8_t out[16], const AES_KEY *key)
void CRYPTO_ctr128_encrypt_ctr32(const uint8_t *in, uint8_t *out, size_t len, const AES_KEY *key, uint8_t ivec[16], uint8_t ecount_buf[16], unsigned int *num, ctr128_f func)
static crypto_word_t CRYPTO_load_word_le(const void *in)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:02