BLOCK_SIZE
#ifndef BLOCK_SIZE
for (j = 0; j < BLOCK_SIZE; j++) {
unsigned char Y[BLOCK_SIZE], M_last[BLOCK_SIZE], padded[BLOCK_SIZE];
unsigned char K1[BLOCK_SIZE], K2[BLOCK_SIZE];
unsigned char input[BLOCK_SIZE];
if (enc->block_size != BLOCK_SIZE)
n = (length + BLOCK_SIZE - 1) / BLOCK_SIZE;
flag = ((length % BLOCK_SIZE) == 0);
iov[0].data = make_data(input, BLOCK_SIZE);
memset(Y, 0, BLOCK_SIZE);
d = make_data(Y, BLOCK_SIZE);
k5_iov_cursor_init(&cursor, data, num_data, BLOCK_SIZE, TRUE);
padding(input, padded, length % BLOCK_SIZE);
iov[0].data = make_data(M_last, BLOCK_SIZE);
static unsigned char const_Rb[BLOCK_SIZE] = {
for (z = 0; z < BLOCK_SIZE / 4; z++) {
for (i = BLOCK_SIZE - 1; i >= 0; i--) {
unsigned char L[BLOCK_SIZE];
unsigned char tmp[BLOCK_SIZE];
d = make_data(L, BLOCK_SIZE);
unsigned char last_cipherblock[BLOCK_SIZE];
data += (nblocks - 1) * BLOCK_SIZE;
memcpy(last_cipherblock, data, BLOCK_SIZE);
for (; nblocks > 0; nblocks--, data -= BLOCK_SIZE) {
xorblock(nblocks == 1 ? iv : data - BLOCK_SIZE, data);
memcpy(iv, last_cipherblock, BLOCK_SIZE);
unsigned char iv[BLOCK_SIZE], block[BLOCK_SIZE];
unsigned char blockN2[BLOCK_SIZE], blockN1[BLOCK_SIZE];
k5_iov_cursor_init(&cursor, data, num_data, BLOCK_SIZE, FALSE);
nblocks = (input_length + BLOCK_SIZE - 1) / BLOCK_SIZE;
memset(iv, 0, BLOCK_SIZE);
memcpy(iv, ivec->data, BLOCK_SIZE);
memset(iv, 0, BLOCK_SIZE);
memcpy(ivec->data, iv, BLOCK_SIZE);
unsigned char iv[BLOCK_SIZE], dummy_iv[BLOCK_SIZE], block[BLOCK_SIZE];
unsigned char blockN2[BLOCK_SIZE], blockN1[BLOCK_SIZE];
k5_iov_cursor_init(&cursor, data, num_data, BLOCK_SIZE, FALSE);
nblocks = (input_length + BLOCK_SIZE - 1) / BLOCK_SIZE;
last_len = input_length - (nblocks - 1) * BLOCK_SIZE;
memset(iv, 0, BLOCK_SIZE);
memcpy(iv, ivec->data, BLOCK_SIZE);
memset(iv, 0, BLOCK_SIZE);
memcpy(ivec->data, blockN2, BLOCK_SIZE);
memcpy(blockN1 + last_len, blockN2 + last_len, BLOCK_SIZE - last_len);
unsigned char iv[BLOCK_SIZE], block[BLOCK_SIZE];
if (output->length < BLOCK_SIZE)
memcpy(iv, ivec->data, BLOCK_SIZE);
memset(iv, 0, BLOCK_SIZE);
k5_iov_cursor_init(&cursor, data, num_data, BLOCK_SIZE, FALSE);
output->length = BLOCK_SIZE;
memcpy(output->data, iv, BLOCK_SIZE);
for (q = 0; q < BLOCK_SIZE; q += 4)
for (; nblocks > 0; nblocks--, data += BLOCK_SIZE) {
memcpy(iv, data, BLOCK_SIZE);
int ret = 0, olen = BLOCK_SIZE;
unsigned char iblock[BLOCK_SIZE], oblock[BLOCK_SIZE];
k5_iov_cursor_init(&cursor, data, num_data, BLOCK_SIZE, FALSE);
ret = EVP_DecryptUpdate(ctx, oblock, &olen, iblock, BLOCK_SIZE);
zap(iblock, BLOCK_SIZE);
zap(oblock, BLOCK_SIZE);
nblocks = (input_length + BLOCK_SIZE - 1) / BLOCK_SIZE;
if (input_length != BLOCK_SIZE)
nblocks = (input_length + BLOCK_SIZE - 1) / BLOCK_SIZE;
if (input_length != BLOCK_SIZE)
int ret, olen = BLOCK_SIZE;
unsigned char iblock[BLOCK_SIZE], oblock[BLOCK_SIZE];
k5_iov_cursor_init(&cursor, data, num_data, BLOCK_SIZE, FALSE);
ret = EVP_EncryptUpdate(ctx, oblock, &olen, iblock, BLOCK_SIZE);
zap(iblock, BLOCK_SIZE);
zap(oblock, BLOCK_SIZE);
int ret = 0, olen = BLOCK_SIZE;
unsigned char iblock[BLOCK_SIZE], oblock[BLOCK_SIZE];
k5_iov_cursor_init(&cursor, data, num_data, BLOCK_SIZE, FALSE);
ret = EVP_DecryptUpdate(ctx, oblock, &olen, iblock, BLOCK_SIZE);
zap(iblock, BLOCK_SIZE);
zap(oblock, BLOCK_SIZE);
nblocks = (input_length + BLOCK_SIZE - 1) / BLOCK_SIZE;
if (input_length != BLOCK_SIZE)
nblocks = (input_length + BLOCK_SIZE - 1) / BLOCK_SIZE;
if (input_length != BLOCK_SIZE)
int ret, olen = BLOCK_SIZE;
unsigned char iblock[BLOCK_SIZE], oblock[BLOCK_SIZE];
k5_iov_cursor_init(&cursor, data, num_data, BLOCK_SIZE, FALSE);
ret = EVP_EncryptUpdate(ctx, oblock, &olen, iblock, BLOCK_SIZE);
zap(iblock, BLOCK_SIZE);
zap(oblock, BLOCK_SIZE);
uint8_t msg_auth_key[BLOCK_SIZE];
uint8_t padding[BLOCK_SIZE];
uint8_t output[BLOCK_SIZE];
uint8_t block[BLOCK_SIZE];
uint8_t keystream[BLOCK_SIZE];
uint32_t x32[BLOCK_SIZE / sizeof(uint32_t)];
uint8_t x8[BLOCK_SIZE];
out_len = BLOCK_SIZE;
for (i = 0; i < BLOCK_SIZE; i += 8) {
out_len = BLOCK_SIZE;
if (!EVP_EncryptUpdate(ctx->ecb_ctx, output, &out_len, data.block, BLOCK_SIZE))
out_len = BLOCK_SIZE;
if (!EVP_EncryptUpdate(ctx->ecb_ctx, output, &out_len, data.block, BLOCK_SIZE))
len = fread(ptr->data, 1, BLOCK_SIZE, pfd[1]);
if (y1 == BLOCK_SIZE) {
if (y2 == BLOCK_SIZE) {
if (y1 == BLOCK_SIZE) {
if (y2 == BLOCK_SIZE) {
size_t size = sizeof(*pb) + (2 * BLOCK_SIZE);
if (y2 == BLOCK_SIZE) {
pb->mask = pb->data + BLOCK_SIZE;
pb->length = BLOCK_SIZE;