const union { long one; char little; } is_endian = {1};
unsigned int n, ctr;
size_t i;
- u64 mlen = ctx->len.u[1];
+ u64 mlen = ctx->len.u[1];
+ block128_f block = ctx->block;
+ void *key = ctx->key;
#ifdef GCM_FUNCREF_4BIT
void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
# ifdef GHASH
size_t j=GHASH_CHUNK;
while (j) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
size_t j=i;
while (len>=16) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
}
#else
while (len>=16) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
}
#endif
if (len) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
#endif
for (i=0;i<len;++i) {
if (n==0) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
const union { long one; char little; } is_endian = {1};
unsigned int n, ctr;
size_t i;
- u64 mlen = ctx->len.u[1];
+ u64 mlen = ctx->len.u[1];
+ block128_f block = ctx->block;
+ void *key = ctx->key;
#ifdef GCM_FUNCREF_4BIT
void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
# ifdef GHASH
GHASH(ctx,in,GHASH_CHUNK);
while (j) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
if ((i = (len&(size_t)-16))) {
GHASH(ctx,in,i);
while (len>=16) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
}
#else
while (len>=16) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
}
#endif
if (len) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
for (i=0;i<len;++i) {
u8 c;
if (n==0) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
const union { long one; char little; } is_endian = {1};
unsigned int n, ctr;
size_t i;
- u64 mlen = ctx->len.u[1];
+ u64 mlen = ctx->len.u[1];
+ void *key = ctx->key;
#ifdef GCM_FUNCREF_4BIT
void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
# ifdef GHASH
}
#if defined(GHASH) && !defined(OPENSSL_SMALL_FOOTPRINT)
while (len>=GHASH_CHUNK) {
- (*stream)(in,out,GHASH_CHUNK/16,ctx->key,ctx->Yi.c);
+ (*stream)(in,out,GHASH_CHUNK/16,key,ctx->Yi.c);
ctr += GHASH_CHUNK/16;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
if ((i = (len&(size_t)-16))) {
size_t j=i/16;
- (*stream)(in,out,j,ctx->key,ctx->Yi.c);
+ (*stream)(in,out,j,key,ctx->Yi.c);
ctr += (unsigned int)j;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
#endif
}
if (len) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*ctx->block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
const union { long one; char little; } is_endian = {1};
unsigned int n, ctr;
size_t i;
- u64 mlen = ctx->len.u[1];
+ u64 mlen = ctx->len.u[1];
+ void *key = ctx->key;
#ifdef GCM_FUNCREF_4BIT
void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
# ifdef GHASH
#if defined(GHASH) && !defined(OPENSSL_SMALL_FOOTPRINT)
while (len>=GHASH_CHUNK) {
GHASH(ctx,in,GHASH_CHUNK);
- (*stream)(in,out,GHASH_CHUNK/16,ctx->key,ctx->Yi.c);
+ (*stream)(in,out,GHASH_CHUNK/16,key,ctx->Yi.c);
ctr += GHASH_CHUNK/16;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
j = i/16;
in -= i;
#endif
- (*stream)(in,out,j,ctx->key,ctx->Yi.c);
+ (*stream)(in,out,j,key,ctx->Yi.c);
ctr += (unsigned int)j;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);
len -= i;
}
if (len) {
- (*ctx->block)(ctx->Yi.c,ctx->EKi.c,ctx->key);
+ (*ctx->block)(ctx->Yi.c,ctx->EKi.c,key);
++ctr;
if (is_endian.little)
PUTU32(ctx->Yi.c+12,ctr);