Lines Matching refs:fctx
363 struct flexi_crypto_context *fctx) in crypto_key_is_valid() argument
365 if (unlikely(xform->key.length > sizeof(fctx->crypto.key))) { in crypto_key_is_valid()
381 struct flexi_crypto_context *fctx = &ctx->fctx; in configure_cipher_ctx() local
391 if (unlikely(!cipher_is_aes && !crypto_key_is_valid(xform, fctx))) in configure_cipher_ctx()
397 fctx->flags = rte_be_to_cpu_64(fctx->flags); in configure_cipher_ctx()
398 fctx->w0.cipher_type = type; in configure_cipher_ctx()
399 fctx->w0.aes_keylen = aes_keylen; in configure_cipher_ctx()
400 fctx->w0.iv_source = IV_FROM_DPTR; in configure_cipher_ctx()
401 fctx->flags = rte_cpu_to_be_64(fctx->flags); in configure_cipher_ctx()
402 memset(fctx->crypto.key, 0, sizeof(fctx->crypto.key)); in configure_cipher_ctx()
403 memcpy(fctx->crypto.key, xform->key.data, xform->key.length); in configure_cipher_ctx()
439 struct flexi_crypto_context *fctx) in auth_key_is_valid() argument
446 if (unlikely(length > sizeof(fctx->auth.opad))) { in auth_key_is_valid()
460 struct flexi_crypto_context *fctx = &ctx->fctx; in configure_auth_ctx() local
467 fctx))) in configure_auth_ctx()
472 fctx->flags = rte_be_to_cpu_64(fctx->flags); in configure_auth_ctx()
473 fctx->w0.hash_type = type; in configure_auth_ctx()
474 fctx->w0.auth_input_type = 1; in configure_auth_ctx()
475 fctx->w0.mac_len = xform->digest_length; in configure_auth_ctx()
476 fctx->flags = rte_cpu_to_be_64(fctx->flags); in configure_auth_ctx()
477 memset(&fctx->auth, 0, sizeof(fctx->auth)); in configure_auth_ctx()
478 memcpy(fctx->auth.opad, xform->key.data, xform->key.length); in configure_auth_ctx()
487 struct flexi_crypto_context *fctx = &ctx->fctx; in configure_aead_ctx() local
503 fctx))) in configure_aead_ctx()
509 fctx->flags = rte_be_to_cpu_64(fctx->flags); in configure_aead_ctx()
510 fctx->w0.cipher_type = CIPHER_AES_GCM; in configure_aead_ctx()
511 fctx->w0.aes_keylen = aes_keylen; in configure_aead_ctx()
512 fctx->w0.iv_source = IV_FROM_DPTR; in configure_aead_ctx()
513 fctx->w0.hash_type = AUTH_NULL; in configure_aead_ctx()
514 fctx->w0.auth_input_type = 1; in configure_aead_ctx()
515 fctx->w0.mac_len = xform->digest_length; in configure_aead_ctx()
516 fctx->flags = rte_cpu_to_be_64(fctx->flags); in configure_aead_ctx()
517 memset(fctx->crypto.key, 0, sizeof(fctx->crypto.key)); in configure_aead_ctx()
518 memcpy(fctx->crypto.key, xform->key.data, xform->key.length); in configure_aead_ctx()
519 memset(&fctx->auth, 0, sizeof(fctx->auth)); in configure_aead_ctx()
520 memcpy(fctx->auth.opad, xform->key.data, xform->key.length); in configure_aead_ctx()