crypto_type就是用于重载crypto_alg中的cra_u中的各个类中的成员函数,当通过crypto_alloc_base,crypto_create_tfm等接口申请相应的crypto的TFM上下文时,若有传入crypto_type参数,TFM优先使用crypto_type中的init_tfm成员函数去初始化crypto_tfm衍生类的操作方法。 ctxsize:获取当前算法类型TFM上下文大小(crypto_tfm+cryp...
tea.ccrypto: Prepare to move crypto_tfm_ctx 2 years ago testmgr.ccrypto: testmgr - Hide ENOENT errors better 5 months ago testmgr.hcrypto: sm2 - Remove sm2 algorithm 9 months ago twofish_common.ccrypto: Prepare to move crypto_tfm_ctx ...
(1)获取aes_genric自身的crypto_tfm上下文crypto_aes_ctx (2)将密钥设置到crypto_aes_ctx的密钥相关成员中 2.1.5 build_cipher_test_sglists 该函数用于创建加解密源数据以及目的数据的sglist,其中它们指向的内存为step 3分配的buffer。其主要工作如下:(1)根据sglist包含的entry数量,通过sg_init_table函数初始化数...
1struct crypto_tfm { 2 u32 crt_flags; 3 int node; 4 void (*exit)(struct crypto_tfm *tfm); 5 struct crypto_alg *__crt_alg; // crypto algorithm or transformation implementation 6 void *__crt_ctx[] CRYPTO_MINALIGN_ATTR; 7}; 当有crypto request进来,会先根据request中指定的算法名称,从...
crypto_skcipher_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); return -EINVAL; return ce_aes_expandkey(ctx, in_key, key_len); } struct crypto_aes_xts_ctx { @@ -167,11 +161,7 @@ static int xts_set_key(struct crypto_skcipher *tfm, const u8 *in_key, if (!ret) ret = ce_aes...
struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); struct skcipher_walk walk; unsigned int nbytes; int err;err = skcipher_walk_virt(&walk, req, false);while ((nbytes = walk.nbytes) > 0) { const u8 *iv = walk.iv; const u8 *src = walk.src.virt.addr; ...
aes_ti.c crypto: Prepare to move crypto_tfm_ctx 2 years ago af_alg.c crypto: Add missing MODULE_DESCRIPTION() macros 8 months ago ahash.c crypto: remove CONFIG_CRYPTO_STATS 10 months ago akcipher.c crypto: akcipher - Drop sign/verify operations 4 months ago algapi.c crypto: api...
static int pkcs1pad_set_pub_key(struct crypto_akcipher *tfm, const void *key, unsigned int keylen) { struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); int err; ctx->key_size = 0; err = crypto_akcipher_set_pub_key(ctx->child, key, keylen); ...
int wc_CryptoCb_RegisterDevice(int devId, CryptoDevCallbackFunc cb, void * ctx)This function registers a unique device identifier (devID) and callback function for offloading crypto operations to external hardware such as Key Store, Secure Element, HSM, PKCS11 or TPM. void wc_CryptoCb_UnRegiste...
int (*clone_tfm)(struct crypto_ahash *dst, struct crypto_ahash *src); struct hash_alg_common halg; }; struct shash_desc { KABI_RESERVE(1); KABI_RESERVE(2); struct crypto_shash *tfm; void *__ctx[] __aligned(ARCH_SLAB_MINALIGN); }; #...