Lines Matching refs:auth_mode
63 enum drv_hash_mode auth_mode; member
89 if (ctx->auth_mode == DRV_HASH_XCBC_MAC) { /* XCBC authetication */ in cc_aead_exit()
101 } else if (ctx->auth_mode != DRV_HASH_NULL) { /* HMAC auth. */ in cc_aead_exit()
139 ctx->auth_mode = cc_alg->auth_mode; in cc_aead_init()
155 if (ctx->auth_mode == DRV_HASH_XCBC_MAC) { /* XCBC authetication */ in cc_aead_init()
168 } else if (ctx->auth_mode != DRV_HASH_NULL) { /* HMAC authentication */ in cc_aead_init()
305 unsigned int hash_mode = (ctx->auth_mode == DRV_HASH_SHA1) ? in hmac_setkey()
307 unsigned int digest_size = (ctx->auth_mode == DRV_HASH_SHA1) ? in hmac_setkey()
321 ctx->auth_mode), in hmac_setkey()
377 switch (ctx->auth_mode) { in validate_keys_sizes()
392 dev_err(dev, "Invalid auth_mode=%d\n", ctx->auth_mode); in validate_keys_sizes()
424 u32 larval_addr = cc_larval_digest_addr(ctx->drvdata, ctx->auth_mode); in cc_get_plain_hmac_key()
435 switch (ctx->auth_mode) { /* auth_key required and >0 */ in cc_get_plain_hmac_key()
556 if (ctx->auth_mode != DRV_HASH_NULL) { /* authenc() alg. */ in cc_aead_setkey()
600 if (ctx->auth_mode == DRV_HASH_XCBC_MAC) { in cc_aead_setkey()
602 } else if (ctx->auth_mode != DRV_HASH_NULL) { /* HMAC */ in cc_aead_setkey()
610 switch (ctx->auth_mode) { in cc_aead_setkey()
621 dev_err(dev, "Unsupported authenc (%d)\n", ctx->auth_mode); in cc_aead_setkey()
729 if (ctx->auth_mode == DRV_HASH_XCBC_MAC && in cc_set_assoc_desc()
739 if (ctx->auth_mode == DRV_HASH_XCBC_MAC && in cc_set_assoc_desc()
869 unsigned int hash_mode = (ctx->auth_mode == DRV_HASH_SHA1) ? in cc_proc_digest_desc()
881 if (ctx->auth_mode == DRV_HASH_XCBC_MAC) { in cc_proc_digest_desc()
900 if (ctx->auth_mode == DRV_HASH_XCBC_MAC) { in cc_proc_digest_desc()
984 unsigned int hash_mode = (ctx->auth_mode == DRV_HASH_SHA1) ? in cc_set_hmac_desc()
986 unsigned int digest_size = (ctx->auth_mode == DRV_HASH_SHA1) ? in cc_set_hmac_desc()
1092 unsigned int hash_mode = (ctx->auth_mode == DRV_HASH_SHA1) ? in cc_proc_scheme_desc()
1094 unsigned int digest_size = (ctx->auth_mode == DRV_HASH_SHA1) ? in cc_proc_scheme_desc()
2015 switch (ctx->auth_mode) { in cc_proc_aead()
2030 dev_err(dev, "Unsupported authenc (%d)\n", ctx->auth_mode); in cc_proc_aead()
2359 .auth_mode = DRV_HASH_SHA1,
2378 .auth_mode = DRV_HASH_SHA1,
2397 .auth_mode = DRV_HASH_SHA256,
2416 .auth_mode = DRV_HASH_SHA256,
2435 .auth_mode = DRV_HASH_XCBC_MAC,
2454 .auth_mode = DRV_HASH_SHA1,
2473 .auth_mode = DRV_HASH_SHA256,
2492 .auth_mode = DRV_HASH_XCBC_MAC,
2511 .auth_mode = DRV_HASH_NULL,
2530 .auth_mode = DRV_HASH_NULL,
2549 .auth_mode = DRV_HASH_NULL,
2568 .auth_mode = DRV_HASH_NULL,
2587 .auth_mode = DRV_HASH_NULL,
2619 t_alg->auth_mode = tmpl->auth_mode; in cc_create_aead_alg()