Searched refs:mex (Results 1 – 5 of 5) sorted by relevance
/linux/drivers/s390/crypto/ |
H A D | zcrypt_cca_key.h | 99 static inline int zcrypt_type6_mex_key_en(struct ica_rsa_modexpo *mex, void *p) in zcrypt_type6_mex_key_en() argument 121 if (WARN_ON_ONCE(mex->inputdatalength > 512)) in zcrypt_type6_mex_key_en() 131 if (copy_from_user(ptr, mex->b_key, mex->inputdatalength)) in zcrypt_type6_mex_key_en() 133 ptr += mex->inputdatalength; in zcrypt_type6_mex_key_en() 135 if (copy_from_user(ptr, mex->n_modulus, mex->inputdatalength)) in zcrypt_type6_mex_key_en() 138 key->pubsec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_en() 139 key->pubsec.modulus_byte_len = mex->inputdatalength; in zcrypt_type6_mex_key_en() 140 key->pubsec.exponent_len = mex->inputdatalength; in zcrypt_type6_mex_key_en() 142 2 * mex->inputdatalength; in zcrypt_type6_mex_key_en() 148 return sizeof(*key) + 2 * mex->inputdatalength; in zcrypt_type6_mex_key_en()
|
H A D | zcrypt_msgtype50.c | 156 int get_rsa_modex_fc(struct ica_rsa_modexpo *mex, int *fcode) in get_rsa_modex_fc() argument 158 if (!mex->inputdatalength) in get_rsa_modex_fc() 161 if (mex->inputdatalength <= 128) /* 1024 bit */ in get_rsa_modex_fc() 163 else if (mex->inputdatalength <= 256) /* 2048 bit */ in get_rsa_modex_fc() 197 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type50MEX_msg() argument 202 mod_len = mex->inputdatalength; in ICAMEX_msg_to_type50MEX_msg() 241 if (copy_from_user(mod, mex->n_modulus, mod_len) || in ICAMEX_msg_to_type50MEX_msg() 242 copy_from_user(exp, mex->b_key, mod_len) || in ICAMEX_msg_to_type50MEX_msg() 243 copy_from_user(inp, mex->inputdata, mod_len)) in ICAMEX_msg_to_type50MEX_msg() 454 struct ica_rsa_modexpo *mex, in zcrypt_msgtype50_modexpo() argument [all …]
|
H A D | zcrypt_msgtype6.c | 193 struct ica_rsa_modexpo *mex) in icamex_msg_to_type6mex_msgx() argument 220 if (WARN_ON_ONCE(mex->inputdatalength > PAGE_SIZE)) in icamex_msg_to_type6mex_msgx() 224 msg->length = mex->inputdatalength + 2; in icamex_msg_to_type6mex_msgx() 225 if (copy_from_user(msg->text, mex->inputdata, mex->inputdatalength)) in icamex_msg_to_type6mex_msgx() 229 size = zcrypt_type6_mex_key_en(mex, msg->text + mex->inputdatalength); in icamex_msg_to_type6mex_msgx() 232 size += sizeof(*msg) + mex->inputdatalength; in icamex_msg_to_type6mex_msgx() 967 struct ica_rsa_modexpo *mex, in zcrypt_msgtype6_modexpo() argument 983 rc = icamex_msg_to_type6mex_msgx(zq, ap_msg, mex); in zcrypt_msgtype6_modexpo() 995 mex->outputdata, in zcrypt_msgtype6_modexpo() 996 mex->outputdatalength); in zcrypt_msgtype6_modexpo()
|
H A D | zcrypt_api.c | 639 struct ica_rsa_modexpo *mex) in zcrypt_rsa_modexpo() argument 649 trace_s390_zcrypt_req(mex, TP_ICARSAMODEXPO); in zcrypt_rsa_modexpo() 653 if (mex->outputdatalength < mex->inputdatalength) { in zcrypt_rsa_modexpo() 664 mex->outputdatalength = mex->inputdatalength; in zcrypt_rsa_modexpo() 666 rc = get_rsa_modex_fc(mex, &func_code); in zcrypt_rsa_modexpo() 679 if (zc->min_mod_size > mex->inputdatalength || in zcrypt_rsa_modexpo() 680 zc->max_mod_size < mex->inputdatalength) in zcrypt_rsa_modexpo() 724 rc = pref_zq->ops->rsa_modexpo(pref_zq, mex, &ap_msg); in zcrypt_rsa_modexpo() 736 trace_s390_zcrypt_rep(mex, func_code, rc, in zcrypt_rsa_modexpo() 1467 struct ica_rsa_modexpo mex; in icarsamodexpo_ioctl() local [all …]
|
H A D | zcrypt_msgtype50.h | 22 int get_rsa_modex_fc(struct ica_rsa_modexpo *mex, int *fc);
|