Home
last modified time | relevance | path

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

/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 unsigned int get_rsa_modex_fc(struct ica_rsa_modexpo *mex, int *fcode) in get_rsa_modex_fc() argument
162 if (!mex->inputdatalength) in get_rsa_modex_fc()
165 if (mex->inputdatalength <= 128) /* 1024 bit */ in get_rsa_modex_fc()
167 else if (mex->inputdatalength <= 256) /* 2048 bit */ in get_rsa_modex_fc()
202 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type50MEX_msg() argument
207 mod_len = mex->inputdatalength; in ICAMEX_msg_to_type50MEX_msg()
245 if (copy_from_user(mod, mex->n_modulus, mod_len) || in ICAMEX_msg_to_type50MEX_msg()
246 copy_from_user(exp, mex->b_key, mod_len) || in ICAMEX_msg_to_type50MEX_msg()
247 copy_from_user(inp, mex->inputdata, mod_len)) in ICAMEX_msg_to_type50MEX_msg()
468 struct ica_rsa_modexpo *mex, in zcrypt_cex2a_modexpo() argument
[all …]
Dzcrypt_msgtype6.c250 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type6MEX_msgX() argument
277 if (WARN_ON_ONCE(mex->inputdatalength > PAGE_SIZE)) in ICAMEX_msg_to_type6MEX_msgX()
281 msg->length = mex->inputdatalength + 2; in ICAMEX_msg_to_type6MEX_msgX()
282 if (copy_from_user(msg->text, mex->inputdata, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msgX()
286 size = zcrypt_type6_mex_key_en(mex, msg->text+mex->inputdatalength); in ICAMEX_msg_to_type6MEX_msgX()
289 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.c635 struct ica_rsa_modexpo *mex) in zcrypt_rsa_modexpo() argument
645 trace_s390_zcrypt_req(mex, TP_ICARSAMODEXPO); in zcrypt_rsa_modexpo()
654 if (mex->outputdatalength < mex->inputdatalength) { in zcrypt_rsa_modexpo()
665 mex->outputdatalength = mex->inputdatalength; in zcrypt_rsa_modexpo()
667 rc = get_rsa_modex_fc(mex, &func_code); in zcrypt_rsa_modexpo()
680 if (zc->min_mod_size > mex->inputdatalength || in zcrypt_rsa_modexpo()
681 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()
1415 struct ica_rsa_modexpo mex; in icarsamodexpo_ioctl() local
[all …]