Lines Matching refs:ks
73 AES_KEY ks; member
74 } ks; member
85 AES_KEY ks; member
86 } ks; /* AES key schedule to use */ member
299 ret = aes_v8_set_decrypt_key(key, ctx->key_len * 8, &dat->ks.ks); in aes_init_key()
306 ret = AES_set_decrypt_key(key, ctx->key_len * 8, &dat->ks.ks); in aes_init_key()
310 ret = vpaes_set_decrypt_key(key, ctx->key_len * 8, &dat->ks.ks); in aes_init_key()
315 ret = AES_set_decrypt_key(key, ctx->key_len * 8, &dat->ks.ks); in aes_init_key()
321 ret = aes_v8_set_encrypt_key(key, ctx->key_len * 8, &dat->ks.ks); in aes_init_key()
330 ret = AES_set_encrypt_key(key, ctx->key_len * 8, &dat->ks.ks); in aes_init_key()
334 ret = vpaes_set_encrypt_key(key, ctx->key_len * 8, &dat->ks.ks); in aes_init_key()
339 ret = AES_set_encrypt_key(key, ctx->key_len * 8, &dat->ks.ks); in aes_init_key()
358 (*dat->stream.cbc)(in, out, len, &dat->ks, ctx->iv, ctx->encrypt); in aes_cbc_cipher()
360 CRYPTO_cbc128_encrypt(in, out, len, &dat->ks, ctx->iv, dat->block); in aes_cbc_cipher()
362 CRYPTO_cbc128_decrypt(in, out, len, &dat->ks, ctx->iv, dat->block); in aes_cbc_cipher()
379 (*dat->block)(in + i, out + i, &dat->ks); in aes_ecb_cipher()
391 CRYPTO_ctr128_encrypt_ctr32(in, out, len, &dat->ks, ctx->iv, ctx->buf, &num, in aes_ctr_cipher()
394 CRYPTO_ctr128_encrypt(in, out, len, &dat->ks, ctx->iv, ctx->buf, &num, in aes_ctr_cipher()
405 CRYPTO_ofb128_encrypt(in, out, len, &dat->ks, ctx->iv, &ctx->num, dat->block); in aes_ofb_cipher()
477 aes_ctr_set_key(&gctx->ks.ks, &gctx->gcm, NULL, key, ctx->key_len); in aes_gcm_init_key()
483 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, iv, gctx->ivlen); in aes_gcm_init_key()
490 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, iv, gctx->ivlen); in aes_gcm_init_key()
594 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, gctx->iv, gctx->ivlen); in aes_gcm_ctrl()
611 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, gctx->iv, gctx->ivlen); in aes_gcm_ctrl()
659 if (!CRYPTO_gcm128_encrypt(&gctx->gcm, &gctx->ks.ks, in, out, res)) { in aes_gcm_cipher()
663 bulk = AES_gcm_encrypt(in + res, out + res, len - res, &gctx->ks.ks, in aes_gcm_cipher()
669 if (!CRYPTO_gcm128_encrypt_ctr32(&gctx->gcm, &gctx->ks.ks, in + bulk, in aes_gcm_cipher()
675 if (!CRYPTO_gcm128_encrypt(&gctx->gcm, &gctx->ks.ks, in + bulk, in aes_gcm_cipher()
687 if (!CRYPTO_gcm128_decrypt(&gctx->gcm, &gctx->ks.ks, in, out, res)) { in aes_gcm_cipher()
691 bulk = AES_gcm_decrypt(in + res, out + res, len - res, &gctx->ks.ks, in aes_gcm_cipher()
697 if (!CRYPTO_gcm128_decrypt_ctr32(&gctx->gcm, &gctx->ks.ks, in + bulk, in aes_gcm_cipher()
703 if (!CRYPTO_gcm128_decrypt(&gctx->gcm, &gctx->ks.ks, in + bulk, in aes_gcm_cipher()
889 aesni_set_encrypt_key(key, ctx->key_len * 8, &gctx->ks.ks); in aesni_gcm_init_key()
890 CRYPTO_gcm128_init(&gctx->gcm, &gctx->ks, (block128_f)aesni_encrypt); in aesni_gcm_init_key()
898 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, iv, gctx->ivlen); in aesni_gcm_init_key()
905 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, iv, gctx->ivlen); in aesni_gcm_init_key()
1055 AES_KEY ks; member
1056 } ks; member
1087 aes_ctr_set_key(&gcm_ctx->ks.ks, &gcm_ctx->gcm, NULL, key, key_len); in aead_aes_gcm_init()
1118 const AES_KEY *key = &gcm_ctx->ks.ks; in aead_aes_gcm_seal()
1165 const AES_KEY *key = &gcm_ctx->ks.ks; in aead_aes_gcm_open()
1288 AES_KEY ks; in aead_aes_key_wrap_seal() member
1289 } ks; in aead_aes_key_wrap_seal() local
1341 if (AES_set_encrypt_key(kw_ctx->key, kw_ctx->key_bits, &ks.ks) < 0) { in aead_aes_key_wrap_seal()
1354 AES_encrypt(A, A, &ks.ks); in aead_aes_key_wrap_seal()
1377 AES_KEY ks; in aead_aes_key_wrap_open() member
1378 } ks; in aead_aes_key_wrap_open() local
1425 if (AES_set_decrypt_key(kw_ctx->key, kw_ctx->key_bits, &ks.ks) < 0) { in aead_aes_key_wrap_open()
1443 AES_decrypt(A, A, &ks.ks); in aead_aes_key_wrap_open()
1496 AES_KEY ks; member
1497 } ks; member
1561 aes_ctr_set_key(&aes_ctx->ks.ks, NULL, &aes_ctx->block, key, aes_key_len); in aead_aes_ctr_hmac_sha256_init()
1635 CRYPTO_ctr128_encrypt_ctr32(in, out, len, &aes_ctx->ks.ks, counter, in aead_aes_ctr_hmac_sha256_crypt()
1639 CRYPTO_ctr128_encrypt(in, out, len, &aes_ctx->ks.ks, counter, in aead_aes_ctr_hmac_sha256_crypt()