Home
last modified time | relevance | path

Searched refs:mex (Results 1 – 4 of 4) sorted by relevance

/linux-4.4.14/drivers/s390/crypto/
Dzcrypt_cca_key.h136 static inline int zcrypt_type6_mex_key_de(struct ica_rsa_modexpo *mex, in zcrypt_type6_mex_key_de() argument
184 sizeof(key->pvtMeSec.exponent) - mex->inputdatalength; in zcrypt_type6_mex_key_de()
185 if (copy_from_user(temp, mex->b_key, mex->inputdatalength)) in zcrypt_type6_mex_key_de()
190 sizeof(key->pvtMeSec.modulus) - mex->inputdatalength; in zcrypt_type6_mex_key_de()
191 if (copy_from_user(temp, mex->n_modulus, mex->inputdatalength)) in zcrypt_type6_mex_key_de()
193 key->pubMeSec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_de()
208 static inline int zcrypt_type6_mex_key_en(struct ica_rsa_modexpo *mex, in zcrypt_type6_mex_key_en() argument
233 if (copy_from_user(temp, mex->b_key, mex->inputdatalength)) in zcrypt_type6_mex_key_en()
236 for (i = 0; i < mex->inputdatalength; i++) in zcrypt_type6_mex_key_en()
239 if (i >= mex->inputdatalength) in zcrypt_type6_mex_key_en()
[all …]
Dzcrypt_msgtype50.c187 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type50MEX_msg() argument
192 mod_len = mex->inputdatalength; in ICAMEX_msg_to_type50MEX_msg()
227 if (copy_from_user(mod, mex->n_modulus, mod_len) || in ICAMEX_msg_to_type50MEX_msg()
228 copy_from_user(exp, mex->b_key, mod_len) || in ICAMEX_msg_to_type50MEX_msg()
229 copy_from_user(inp, mex->inputdata, mod_len)) in ICAMEX_msg_to_type50MEX_msg()
425 struct ica_rsa_modexpo *mex) in zcrypt_cex2a_modexpo() argument
444 rc = ICAMEX_msg_to_type50MEX_msg(zdev, &ap_msg, mex); in zcrypt_cex2a_modexpo()
453 rc = convert_response(zdev, &ap_msg, mex->outputdata, in zcrypt_cex2a_modexpo()
454 mex->outputdatalength); in zcrypt_cex2a_modexpo()
Dzcrypt_msgtype6.c163 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type6MEX_msgX() argument
191 msg->length = mex->inputdatalength + 2; in ICAMEX_msg_to_type6MEX_msgX()
192 if (copy_from_user(msg->text, mex->inputdata, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msgX()
196 size = zcrypt_type6_mex_key_en(mex, msg->text+mex->inputdatalength, 1); in ICAMEX_msg_to_type6MEX_msgX()
199 size += sizeof(*msg) + mex->inputdatalength; in ICAMEX_msg_to_type6MEX_msgX()
912 struct ica_rsa_modexpo *mex) in zcrypt_msgtype6_modexpo() argument
928 rc = ICAMEX_msg_to_type6MEX_msgX(zdev, &ap_msg, mex); in zcrypt_msgtype6_modexpo()
938 mex->outputdata, in zcrypt_msgtype6_modexpo()
939 mex->outputdatalength); in zcrypt_msgtype6_modexpo()
Dzcrypt_api.c423 static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex) in zcrypt_rsa_modexpo() argument
428 if (mex->outputdatalength < mex->inputdatalength) in zcrypt_rsa_modexpo()
435 mex->outputdatalength = mex->inputdatalength; in zcrypt_rsa_modexpo()
441 zdev->min_mod_size > mex->inputdatalength || in zcrypt_rsa_modexpo()
442 zdev->max_mod_size < mex->inputdatalength) in zcrypt_rsa_modexpo()
450 rc = zdev->ops->rsa_modexpo(zdev, mex); in zcrypt_rsa_modexpo()
824 struct ica_rsa_modexpo mex; in zcrypt_unlocked_ioctl() local
825 if (copy_from_user(&mex, umex, sizeof(mex))) in zcrypt_unlocked_ioctl()
828 rc = zcrypt_rsa_modexpo(&mex); in zcrypt_unlocked_ioctl()
833 rc = zcrypt_rsa_modexpo(&mex); in zcrypt_unlocked_ioctl()
[all …]