Home
last modified time | relevance | path

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

/linux-6.1.9/drivers/s390/crypto/
Dzcrypt_cca_key.h102 static inline int zcrypt_type6_mex_key_en(struct ica_rsa_modexpo *mex, void *p) in zcrypt_type6_mex_key_en() argument
125 if (WARN_ON_ONCE(mex->inputdatalength > 512)) in zcrypt_type6_mex_key_en()
135 if (copy_from_user(temp, mex->b_key, mex->inputdatalength)) in zcrypt_type6_mex_key_en()
138 for (i = 0; i < mex->inputdatalength; i++) in zcrypt_type6_mex_key_en()
141 if (i >= mex->inputdatalength) in zcrypt_type6_mex_key_en()
143 memmove(temp, temp + i, mex->inputdatalength - i); in zcrypt_type6_mex_key_en()
144 temp += mex->inputdatalength - i; in zcrypt_type6_mex_key_en()
146 if (copy_from_user(temp, mex->n_modulus, mex->inputdatalength)) in zcrypt_type6_mex_key_en()
149 key->pubsec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_en()
150 key->pubsec.modulus_byte_len = mex->inputdatalength; in zcrypt_type6_mex_key_en()
[all …]
Dzcrypt_msgtype50.c159 int get_rsa_modex_fc(struct ica_rsa_modexpo *mex, int *fcode) in get_rsa_modex_fc() argument
161 if (!mex->inputdatalength) in get_rsa_modex_fc()
164 if (mex->inputdatalength <= 128) /* 1024 bit */ in get_rsa_modex_fc()
166 else if (mex->inputdatalength <= 256) /* 2048 bit */ in get_rsa_modex_fc()
200 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type50MEX_msg() argument
205 mod_len = mex->inputdatalength; in ICAMEX_msg_to_type50MEX_msg()
244 if (copy_from_user(mod, mex->n_modulus, mod_len) || in ICAMEX_msg_to_type50MEX_msg()
245 copy_from_user(exp, mex->b_key, mod_len) || in ICAMEX_msg_to_type50MEX_msg()
246 copy_from_user(inp, mex->inputdata, mod_len)) in ICAMEX_msg_to_type50MEX_msg()
467 struct ica_rsa_modexpo *mex, in zcrypt_cex2a_modexpo() argument
[all …]
Dzcrypt_msgtype6.c193 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()
1026 struct ica_rsa_modexpo *mex, in zcrypt_msgtype6_modexpo() argument
1042 rc = icamex_msg_to_type6mex_msgx(zq, ap_msg, mex); in zcrypt_msgtype6_modexpo()
1054 mex->outputdata, in zcrypt_msgtype6_modexpo()
1055 mex->outputdatalength); in zcrypt_msgtype6_modexpo()
Dzcrypt_api.c676 struct ica_rsa_modexpo *mex) in zcrypt_rsa_modexpo() argument
686 trace_s390_zcrypt_req(mex, TP_ICARSAMODEXPO); in zcrypt_rsa_modexpo()
695 if (mex->outputdatalength < mex->inputdatalength) { in zcrypt_rsa_modexpo()
706 mex->outputdatalength = mex->inputdatalength; in zcrypt_rsa_modexpo()
708 rc = get_rsa_modex_fc(mex, &func_code); in zcrypt_rsa_modexpo()
721 if (zc->min_mod_size > mex->inputdatalength || in zcrypt_rsa_modexpo()
722 zc->max_mod_size < mex->inputdatalength) in zcrypt_rsa_modexpo()
767 rc = pref_zq->ops->rsa_modexpo(pref_zq, mex, &ap_msg); in zcrypt_rsa_modexpo()
779 trace_s390_zcrypt_rep(mex, func_code, rc, in zcrypt_rsa_modexpo()
1495 struct ica_rsa_modexpo mex; in icarsamodexpo_ioctl() local
[all …]
Dzcrypt_msgtype50.h23 int get_rsa_modex_fc(struct ica_rsa_modexpo *mex, int *fc);