Searched refs:mex (Results 1 – 4 of 4) sorted by relevance
/linux-4.19.296/drivers/s390/crypto/ ! |
D | zcrypt_cca_key.h | 104 static inline int zcrypt_type6_mex_key_en(struct ica_rsa_modexpo *mex, void *p) in zcrypt_type6_mex_key_en() argument 127 if (WARN_ON_ONCE(mex->inputdatalength > 512)) in zcrypt_type6_mex_key_en() 137 if (copy_from_user(temp, mex->b_key, mex->inputdatalength)) in zcrypt_type6_mex_key_en() 140 for (i = 0; i < mex->inputdatalength; i++) in zcrypt_type6_mex_key_en() 143 if (i >= mex->inputdatalength) in zcrypt_type6_mex_key_en() 145 memmove(temp, temp + i, mex->inputdatalength - i); in zcrypt_type6_mex_key_en() 146 temp += mex->inputdatalength - i; in zcrypt_type6_mex_key_en() 148 if (copy_from_user(temp, mex->n_modulus, mex->inputdatalength)) in zcrypt_type6_mex_key_en() 151 key->pubSec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_en() 152 key->pubSec.modulus_byte_len = mex->inputdatalength; in zcrypt_type6_mex_key_en() [all …]
|
D | zcrypt_msgtype50.c | 161 unsigned int get_rsa_modex_fc(struct ica_rsa_modexpo *mex, int *fcode) in get_rsa_modex_fc() argument 164 if (!mex->inputdatalength) in get_rsa_modex_fc() 167 if (mex->inputdatalength <= 128) /* 1024 bit */ in get_rsa_modex_fc() 169 else if (mex->inputdatalength <= 256) /* 2048 bit */ in get_rsa_modex_fc() 204 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type50MEX_msg() argument 209 mod_len = mex->inputdatalength; in ICAMEX_msg_to_type50MEX_msg() 247 if (copy_from_user(mod, mex->n_modulus, mod_len) || in ICAMEX_msg_to_type50MEX_msg() 248 copy_from_user(exp, mex->b_key, mod_len) || in ICAMEX_msg_to_type50MEX_msg() 249 copy_from_user(inp, mex->inputdata, mod_len)) in ICAMEX_msg_to_type50MEX_msg() 457 struct ica_rsa_modexpo *mex) in zcrypt_cex2a_modexpo() argument [all …]
|
D | zcrypt_api.c | 216 static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex) in zcrypt_rsa_modexpo() argument 224 trace_s390_zcrypt_req(mex, TP_ICARSAMODEXPO); in zcrypt_rsa_modexpo() 226 if (mex->outputdatalength < mex->inputdatalength) { in zcrypt_rsa_modexpo() 237 mex->outputdatalength = mex->inputdatalength; in zcrypt_rsa_modexpo() 239 rc = get_rsa_modex_fc(mex, &func_code); in zcrypt_rsa_modexpo() 251 if (zc->min_mod_size > mex->inputdatalength || in zcrypt_rsa_modexpo() 252 zc->max_mod_size < mex->inputdatalength) in zcrypt_rsa_modexpo() 279 rc = pref_zq->ops->rsa_modexpo(pref_zq, mex); in zcrypt_rsa_modexpo() 286 trace_s390_zcrypt_rep(mex, func_code, rc, in zcrypt_rsa_modexpo() 802 struct ica_rsa_modexpo mex; in zcrypt_unlocked_ioctl() local [all …]
|
D | zcrypt_msgtype6.c | 253 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type6MEX_msgX() argument 280 if (WARN_ON_ONCE(mex->inputdatalength > PAGE_SIZE)) in ICAMEX_msg_to_type6MEX_msgX() 284 msg->length = mex->inputdatalength + 2; in ICAMEX_msg_to_type6MEX_msgX() 285 if (copy_from_user(msg->text, mex->inputdata, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msgX() 289 size = zcrypt_type6_mex_key_en(mex, msg->text+mex->inputdatalength); in ICAMEX_msg_to_type6MEX_msgX() 292 size += sizeof(*msg) + mex->inputdatalength; in ICAMEX_msg_to_type6MEX_msgX() 1032 struct ica_rsa_modexpo *mex) in zcrypt_msgtype6_modexpo() argument 1048 rc = ICAMEX_msg_to_type6MEX_msgX(zq, &ap_msg, mex); in zcrypt_msgtype6_modexpo() 1058 mex->outputdata, in zcrypt_msgtype6_modexpo() 1059 mex->outputdatalength); in zcrypt_msgtype6_modexpo()
|