Home
last modified time | relevance | path

Searched refs:tfm (Results 1 – 11 of 11) sorted by relevance

/linux-2.4.37.9/include/linux/
Dcrypto.h135 int (*cit_setkey)(struct crypto_tfm *tfm,
137 int (*cit_encrypt)(struct crypto_tfm *tfm,
141 int (*cit_encrypt_iv)(struct crypto_tfm *tfm,
145 int (*cit_decrypt)(struct crypto_tfm *tfm,
149 int (*cit_decrypt_iv)(struct crypto_tfm *tfm,
157 void (*dit_init)(struct crypto_tfm *tfm);
158 void (*dit_update)(struct crypto_tfm *tfm,
160 void (*dit_final)(struct crypto_tfm *tfm, u8 *out);
161 void (*dit_digest)(struct crypto_tfm *tfm, struct scatterlist *sg,
163 int (*dit_setkey)(struct crypto_tfm *tfm,
[all …]
/linux-2.4.37.9/crypto/
Dhmac.c24 static void hash_key(struct crypto_tfm *tfm, u8 *key, unsigned int keylen) in hash_key() argument
31 crypto_digest_digest(tfm, &tmp, 1, key); in hash_key()
35 int crypto_alloc_hmac_block(struct crypto_tfm *tfm) in crypto_alloc_hmac_block() argument
39 BUG_ON(!crypto_tfm_alg_blocksize(tfm)); in crypto_alloc_hmac_block()
41 tfm->crt_digest.dit_hmac_block = kmalloc(crypto_tfm_alg_blocksize(tfm), in crypto_alloc_hmac_block()
43 if (tfm->crt_digest.dit_hmac_block == NULL) in crypto_alloc_hmac_block()
50 void crypto_free_hmac_block(struct crypto_tfm *tfm) in crypto_free_hmac_block() argument
52 if (tfm->crt_digest.dit_hmac_block) in crypto_free_hmac_block()
53 kfree(tfm->crt_digest.dit_hmac_block); in crypto_free_hmac_block()
56 void crypto_hmac_init(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen) in crypto_hmac_init() argument
[all …]
Dcipher.c47 static int crypt(struct crypto_tfm *tfm, in crypt() argument
54 const unsigned int bsize = crypto_tfm_alg_blocksize(tfm); in crypt()
62 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_BLOCK_LEN; in crypt()
84 prfn(tfm, dst_p, src_p, crfn, enc, info, in_place); in crypt()
94 crypto_yield(tfm); in crypt()
98 static void cbc_process(struct crypto_tfm *tfm, u8 *dst, u8 *src, in cbc_process() argument
108 tfm->crt_u.cipher.cit_xor_block(iv, src); in cbc_process()
109 fn(crypto_tfm_ctx(tfm), dst, iv); in cbc_process()
110 memcpy(iv, dst, crypto_tfm_alg_blocksize(tfm)); in cbc_process()
112 u8 stack[in_place ? crypto_tfm_alg_blocksize(tfm) : 0]; in cbc_process()
[all …]
Dapi.c58 static int crypto_init_flags(struct crypto_tfm *tfm, u32 flags) in crypto_init_flags() argument
60 tfm->crt_flags = 0; in crypto_init_flags()
62 switch (crypto_tfm_alg_type(tfm)) { in crypto_init_flags()
64 return crypto_init_cipher_flags(tfm, flags); in crypto_init_flags()
67 return crypto_init_digest_flags(tfm, flags); in crypto_init_flags()
70 return crypto_init_compress_flags(tfm, flags); in crypto_init_flags()
80 static int crypto_init_ops(struct crypto_tfm *tfm) in crypto_init_ops() argument
82 switch (crypto_tfm_alg_type(tfm)) { in crypto_init_ops()
84 return crypto_init_cipher_ops(tfm); in crypto_init_ops()
87 return crypto_init_digest_ops(tfm); in crypto_init_ops()
[all …]
Ddigest.c21 static void init(struct crypto_tfm *tfm) in init() argument
23 tfm->__crt_alg->cra_digest.dia_init(crypto_tfm_ctx(tfm)); in init()
26 static void update(struct crypto_tfm *tfm, in update() argument
43 tfm->__crt_alg->cra_digest.dia_update in update()
44 (crypto_tfm_ctx(tfm), p, in update()
47 crypto_yield(tfm); in update()
55 static void final(struct crypto_tfm *tfm, u8 *out) in final() argument
57 tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), out); in final()
60 static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in setkey() argument
63 if (tfm->__crt_alg->cra_digest.dia_setkey == NULL) in setkey()
[all …]
Dinternal.h39 static inline void crypto_yield(struct crypto_tfm *tfm) in crypto_yield() argument
45 static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm) in crypto_tfm_ctx() argument
47 return (void *)&tfm[1]; in crypto_tfm_ctx()
63 int crypto_alloc_hmac_block(struct crypto_tfm *tfm);
64 void crypto_free_hmac_block(struct crypto_tfm *tfm);
66 static inline int crypto_alloc_hmac_block(struct crypto_tfm *tfm) in crypto_alloc_hmac_block() argument
71 static inline void crypto_free_hmac_block(struct crypto_tfm *tfm) in crypto_free_hmac_block() argument
82 int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags);
83 int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags);
84 int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags);
[all …]
Dcompress.c21 static int crypto_compress(struct crypto_tfm *tfm, in crypto_compress() argument
25 return tfm->__crt_alg->cra_compress.coa_compress(crypto_tfm_ctx(tfm), in crypto_compress()
30 static int crypto_decompress(struct crypto_tfm *tfm, in crypto_decompress() argument
34 return tfm->__crt_alg->cra_compress.coa_decompress(crypto_tfm_ctx(tfm), in crypto_decompress()
39 int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags) in crypto_init_compress_flags() argument
44 int crypto_init_compress_ops(struct crypto_tfm *tfm) in crypto_init_compress_ops() argument
47 struct compress_tfm *ops = &tfm->crt_compress; in crypto_init_compress_ops()
49 ret = tfm->__crt_alg->cra_compress.coa_init(crypto_tfm_ctx(tfm)); in crypto_init_compress_ops()
60 void crypto_exit_compress_ops(struct crypto_tfm *tfm) in crypto_exit_compress_ops() argument
62 tfm->__crt_alg->cra_compress.coa_exit(crypto_tfm_ctx(tfm)); in crypto_exit_compress_ops()
Dtcrypt.c86 struct crypto_tfm *tfm; in test_hash() local
102 tfm = crypto_alloc_tfm(algo, 0); in test_hash()
103 if (tfm == NULL) { in test_hash()
117 crypto_digest_init (tfm); in test_hash()
118 if (tfm->crt_u.digest.dit_setkey) { in test_hash()
119 crypto_digest_setkey (tfm, hash_tv[i].key, in test_hash()
122 crypto_digest_update (tfm, sg, 1); in test_hash()
123 crypto_digest_final (tfm, result); in test_hash()
125 hexdump (result, crypto_tfm_alg_digestsize (tfm)); in test_hash()
128 crypto_tfm_alg_digestsize(tfm)) ? "fail" : in test_hash()
[all …]
/linux-2.4.37.9/Documentation/crypto/
Dapi-intro.txt50 struct crypto_tfm *tfm;
52 tfm = crypto_alloc_tfm("md5", 0);
53 if (tfm == NULL)
58 crypto_digest_init(tfm);
59 crypto_digest_update(tfm, &sg, 2);
60 crypto_digest_final(tfm, result);
62 crypto_free_tfm(tfm);
/linux-2.4.37.9/drivers/net/wireless/
Dairo.c1072 struct crypto_tfm *tfm; member
1128 emmh32_setseed(&ai->mod[0].mCtx.seed,mic_rid.multicast,sizeof(mic_rid.multicast), ai->tfm); in micinit()
1146 emmh32_setseed(&ai->mod[0].uCtx.seed, mic_rid.unicast, sizeof(mic_rid.unicast), ai->tfm); in micinit()
1162 if (ai->tfm == NULL) in micsetup()
1163 ai->tfm = crypto_alloc_tfm("aes", 0); in micsetup()
1165 if (ai->tfm == NULL) { in micsetup()
1432 void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct crypto_tfm *tfm) in emmh32_setseed() argument
1442 crypto_cipher_setkey(tfm, pkey, 16); in emmh32_setseed()
1454 crypto_cipher_encrypt(tfm, sg, sg, 16); in emmh32_setseed()
2092 if (ai->tfm) in stop_airo_card()
[all …]
/linux-2.4.37.9/net/sctp/
Dsocket.c3986 struct crypto_tfm *tfm=NULL; in sctp_inet_listen() local
3999 tfm = sctp_crypto_alloc_tfm(sctp_hmac_alg, 0); in sctp_inet_listen()
4000 if (!tfm) { in sctp_inet_listen()
4021 sctp_sk(sk)->hmac = tfm; in sctp_inet_listen()
4026 if (tfm) in sctp_inet_listen()
4027 sctp_crypto_free_tfm(tfm); in sctp_inet_listen()