Searched refs:mex (Results 1 – 6 of 6) sorted by relevance
/linux-4.1.27/drivers/s390/crypto/ |
D | zcrypt_cca_key.h | 136 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 …]
|
D | zcrypt_pcicc.c | 156 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type6MEX_msg() argument 180 if (copy_from_user(msg->text, mex->inputdata, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msg() 183 if (is_PKCS11_padded(msg->text, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msg() 190 if (is_PKCS12_padded(msg->text, mex->inputdatalength)) { in ICAMEX_msg_to_type6MEX_msg() 192 pad_len = strnlen(msg->text + 2, mex->inputdatalength - 2) + 3; in ICAMEX_msg_to_type6MEX_msg() 193 if (pad_len <= 9 || pad_len >= mex->inputdatalength) in ICAMEX_msg_to_type6MEX_msg() 195 vud_len = mex->inputdatalength - pad_len; in ICAMEX_msg_to_type6MEX_msg() 200 size = zcrypt_type6_mex_key_en(mex, msg->text + vud_len, 0); in ICAMEX_msg_to_type6MEX_msg() 205 vud_len = mex->inputdatalength; in ICAMEX_msg_to_type6MEX_msg() 212 size = zcrypt_type6_mex_key_de(mex, msg->text + vud_len, 0); in ICAMEX_msg_to_type6MEX_msg() [all …]
|
D | zcrypt_pcica.c | 86 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type4MEX_msg() argument 91 mod_len = mex->inputdatalength; in ICAMEX_msg_to_type4MEX_msg() 117 if (copy_from_user(modulus, mex->n_modulus, mod_len) || in ICAMEX_msg_to_type4MEX_msg() 118 copy_from_user(exponent, mex->b_key, mod_len) || in ICAMEX_msg_to_type4MEX_msg() 119 copy_from_user(message, mex->inputdata, mod_len)) in ICAMEX_msg_to_type4MEX_msg() 285 struct ica_rsa_modexpo *mex) in zcrypt_pcica_modexpo() argument 299 rc = ICAMEX_msg_to_type4MEX_msg(zdev, &ap_msg, mex); in zcrypt_pcica_modexpo() 306 rc = convert_response(zdev, &ap_msg, mex->outputdata, in zcrypt_pcica_modexpo() 307 mex->outputdatalength); in zcrypt_pcica_modexpo()
|
D | zcrypt_msgtype50.c | 187 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() 427 struct ica_rsa_modexpo *mex) in zcrypt_cex2a_modexpo() argument 446 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()
|
D | zcrypt_msgtype6.c | 163 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() 916 struct ica_rsa_modexpo *mex) in zcrypt_msgtype6_modexpo() argument 932 rc = ICAMEX_msg_to_type6MEX_msgX(zdev, &ap_msg, mex); in zcrypt_msgtype6_modexpo() 939 rc = convert_response_ica(zdev, &ap_msg, mex->outputdata, in zcrypt_msgtype6_modexpo() 940 mex->outputdatalength); in zcrypt_msgtype6_modexpo()
|
D | zcrypt_api.c | 421 static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex) in zcrypt_rsa_modexpo() argument 426 if (mex->outputdatalength < mex->inputdatalength) in zcrypt_rsa_modexpo() 433 mex->outputdatalength = mex->inputdatalength; in zcrypt_rsa_modexpo() 439 zdev->min_mod_size > mex->inputdatalength || in zcrypt_rsa_modexpo() 440 zdev->max_mod_size < mex->inputdatalength) in zcrypt_rsa_modexpo() 448 rc = zdev->ops->rsa_modexpo(zdev, mex); in zcrypt_rsa_modexpo() 823 struct ica_rsa_modexpo mex; in zcrypt_unlocked_ioctl() local 824 if (copy_from_user(&mex, umex, sizeof(mex))) in zcrypt_unlocked_ioctl() 827 rc = zcrypt_rsa_modexpo(&mex); in zcrypt_unlocked_ioctl() 832 rc = zcrypt_rsa_modexpo(&mex); in zcrypt_unlocked_ioctl() [all …]
|