Lines Matching refs:ctx

155 void aesInitForEncr(struct AesContext *ctx, const uint32_t *k)  in aesInitForEncr()  argument
157 uint32_t i, *ks = ctx->K, roundConstant = 0x01000000; in aesInitForEncr()
160 memcpy(ctx->K, k, sizeof(uint32_t[AES_KEY_WORDS])); in aesInitForEncr()
183 void aesInitForDecr(struct AesContext *ctx, struct AesSetupTempWorksSpace *tmpSpace, const uint32_t… in aesInitForDecr() argument
185 uint32_t i, j, *ks = ctx->K + 4, *encrK = tmpSpace->tmpCtx.K + 52; in aesInitForDecr()
191 memcpy(ctx->K, tmpSpace->tmpCtx.K + 56, sizeof(uint32_t[4])); in aesInitForDecr()
204 void aesEncr(struct AesContext *ctx, const uint32_t *src, uint32_t *dst) in aesEncr() argument
207 uint32_t *k = ctx->K, i; in aesEncr()
274 void aesDecr(struct AesContext *ctx, const uint32_t *src, uint32_t *dst) in aesDecr() argument
277 uint32_t *k = ctx->K, i; in aesDecr()
344 void aesCbcInitForEncr(struct AesCbcContext *ctx, const uint32_t *k, const uint32_t *iv) in aesCbcInitForEncr() argument
346 aesInitForEncr(&ctx->aes, k); in aesCbcInitForEncr()
347 memcpy(ctx->iv, iv, sizeof(uint32_t[AES_BLOCK_WORDS])); in aesCbcInitForEncr()
350 void aesCbcInitForDecr(struct AesCbcContext *ctx, const uint32_t *k, const uint32_t *iv) in aesCbcInitForDecr() argument
354 aesInitForDecr(&ctx->aes, &tmp, k); in aesCbcInitForDecr()
355 memcpy(ctx->iv, iv, sizeof(uint32_t[AES_BLOCK_WORDS])); in aesCbcInitForDecr()
358 void aesCbcEncr(struct AesCbcContext *ctx, const uint32_t *src, uint32_t *dst) in aesCbcEncr() argument
363 ctx->iv[i] ^= *src++; in aesCbcEncr()
365 aesEncr(&ctx->aes, ctx->iv, dst); in aesCbcEncr()
366 memcpy(ctx->iv, dst, sizeof(uint32_t[AES_BLOCK_WORDS])); in aesCbcEncr()
369 void aesCbcDecr(struct AesCbcContext *ctx, const uint32_t *src, uint32_t *dst) in aesCbcDecr() argument
373 aesDecr(&ctx->aes, src, tmp); in aesCbcDecr()
375 tmp[i] ^= ctx->iv[i]; in aesCbcDecr()
377 memcpy(ctx->iv, src, sizeof(uint32_t[AES_BLOCK_WORDS])); in aesCbcDecr()