Lines Matching refs:algo

51 	u32				algo;		/* hash algo */  member
372 static int rk_hash_init(void *hw_ctx, u32 algo) in rk_hash_init() argument
390 tmp_ctx->algo = algo; in rk_hash_init()
391 switch (algo) { in rk_hash_init()
619 ret = rk_hash_init(hash_ctx, ctx->algo); in rockchip_crypto_sha_init()
663 nbits = crypto_algo_nbits(ctx->algo); in rockchip_crypto_sha_final()
682 int rk_hmac_init(void *hw_ctx, u32 algo, u8 *key, u32 key_len) in rk_hmac_init() argument
694 ret = rk_hash_init(hw_ctx, algo); in rk_hmac_init()
726 ret = rk_hmac_init(priv->hw_ctx, ctx->algo, key, key_len); in rockchip_crypto_hmac_init()
902 u32 algo, u32 mode, bool enc) in hw_cipher_init() argument
917 switch (algo) { in hw_cipher_init()
934 if (algo == CRYPTO_AES || algo == CRYPTO_SM4) { in hw_cipher_init()
1300 switch (ctx->algo) { in rockchip_crypto_cipher()
1325 int rk_crypto_mac(struct udevice *dev, u32 algo, u32 mode, in rk_crypto_mac() argument
1335 if (algo != CRYPTO_AES && algo != CRYPTO_SM4) in rk_crypto_mac()
1340 if (algo == CRYPTO_AES && key_len == AES_KEYSIZE_192) in rk_crypto_mac()
1345 algo, mode, true); in rk_crypto_mac()
1360 ret = rk_crypto_mac(dev, ctx->algo, ctx->mode, in rockchip_crypto_mac()
1368 int rk_crypto_ae(struct udevice *dev, u32 algo, u32 mode, in rk_crypto_ae() argument
1382 if (algo != CRYPTO_AES && algo != CRYPTO_SM4) in rk_crypto_ae()
1387 if (algo == CRYPTO_AES && key_len == AES_KEYSIZE_192) in rk_crypto_ae()
1392 algo, mode, true); in rk_crypto_ae()
1408 ret = rk_crypto_ae(dev, ctx->algo, ctx->mode, ctx->key, ctx->key_len, in rockchip_crypto_ae()
1425 switch (ctx->algo) { in rockchip_crypto_fw_cipher()
1467 if (ctx->algo != CRYPTO_RSA512 && in rockchip_crypto_rsa_verify()
1468 ctx->algo != CRYPTO_RSA1024 && in rockchip_crypto_rsa_verify()
1469 ctx->algo != CRYPTO_RSA2048 && in rockchip_crypto_rsa_verify()
1470 ctx->algo != CRYPTO_RSA3072 && in rockchip_crypto_rsa_verify()
1471 ctx->algo != CRYPTO_RSA4096) in rockchip_crypto_rsa_verify()
1474 n_bits = crypto_algo_nbits(ctx->algo); in rockchip_crypto_rsa_verify()
1528 if (ctx->algo != CRYPTO_SM2 && in rockchip_crypto_ec_verify()
1529 ctx->algo != CRYPTO_ECC_192R1 && in rockchip_crypto_ec_verify()
1530 ctx->algo != CRYPTO_ECC_224R1 && in rockchip_crypto_ec_verify()
1531 ctx->algo != CRYPTO_ECC_256R1) in rockchip_crypto_ec_verify()
1534 n_bits = crypto_algo_nbits(ctx->algo); in rockchip_crypto_ec_verify()
1552 ret = rockchip_ecc_verify(ctx->algo, hash, hash_len, &point_P, &point_sign); in rockchip_crypto_ec_verify()