Lines Matching refs:key_size

116 	unsigned int key_size;  member
136 ctx->key_size = 0; in pkcs1pad_set_pub_key()
147 ctx->key_size = err; in pkcs1pad_set_pub_key()
157 ctx->key_size = 0; in pkcs1pad_set_priv_key()
168 ctx->key_size = err; in pkcs1pad_set_priv_key()
182 return ctx->key_size; in pkcs1pad_get_max_size()
210 pad_len = ctx->key_size - len; in pkcs1pad_encrypt_sign_complete()
216 out_buf = kzalloc(ctx->key_size, GFP_ATOMIC); in pkcs1pad_encrypt_sign_complete()
224 sg_nents_for_len(req->dst, ctx->key_size), in pkcs1pad_encrypt_sign_complete()
225 out_buf, ctx->key_size); in pkcs1pad_encrypt_sign_complete()
229 req->dst_len = ctx->key_size; in pkcs1pad_encrypt_sign_complete()
257 if (!ctx->key_size) in pkcs1pad_encrypt()
260 if (req->src_len > ctx->key_size - 11) in pkcs1pad_encrypt()
263 if (req->dst_len < ctx->key_size) { in pkcs1pad_encrypt()
264 req->dst_len = ctx->key_size; in pkcs1pad_encrypt()
268 req_ctx->in_buf = kmalloc(ctx->key_size - 1 - req->src_len, in pkcs1pad_encrypt()
273 ps_end = ctx->key_size - req->src_len - 2; in pkcs1pad_encrypt()
280 ctx->key_size - 1 - req->src_len, req->src); in pkcs1pad_encrypt()
288 req->dst, ctx->key_size - 1, req->dst_len); in pkcs1pad_encrypt()
311 if (dst_len < ctx->key_size - 1) in pkcs1pad_decrypt_complete()
315 if (dst_len == ctx->key_size) { in pkcs1pad_decrypt_complete()
371 if (!ctx->key_size || req->src_len != ctx->key_size) in pkcs1pad_decrypt()
374 req_ctx->out_buf = kmalloc(ctx->key_size, GFP_KERNEL); in pkcs1pad_decrypt()
379 ctx->key_size, NULL); in pkcs1pad_decrypt()
388 ctx->key_size); in pkcs1pad_decrypt()
408 if (!ctx->key_size) in pkcs1pad_sign()
414 if (req->src_len + digest_info_size > ctx->key_size - 11) in pkcs1pad_sign()
417 if (req->dst_len < ctx->key_size) { in pkcs1pad_sign()
418 req->dst_len = ctx->key_size; in pkcs1pad_sign()
422 req_ctx->in_buf = kmalloc(ctx->key_size - 1 - req->src_len, in pkcs1pad_sign()
427 ps_end = ctx->key_size - digest_info_size - req->src_len - 2; in pkcs1pad_sign()
437 ctx->key_size - 1 - req->src_len, req->src); in pkcs1pad_sign()
445 req->dst, ctx->key_size - 1, req->dst_len); in pkcs1pad_sign()
473 if (dst_len < ctx->key_size - 1) in pkcs1pad_verify_complete()
477 if (dst_len == ctx->key_size) { in pkcs1pad_verify_complete()
518 req_ctx->out_buf + ctx->key_size, in pkcs1pad_verify_complete()
521 if (memcmp(req_ctx->out_buf + ctx->key_size, out_buf + pos, in pkcs1pad_verify_complete()
561 !ctx->key_size || sig_size != ctx->key_size) in pkcs1pad_verify()
564 req_ctx->out_buf = kmalloc(ctx->key_size + digest_size, GFP_KERNEL); in pkcs1pad_verify()
569 ctx->key_size, NULL); in pkcs1pad_verify()
577 req_ctx->out_sg, sig_size, ctx->key_size); in pkcs1pad_verify()