/kernel/linux/linux-5.10/drivers/s390/crypto/ |
H A D | zcrypt_cca_key.h | 97 * @mex: pointer to user input data 102 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 in zcrypt_type6_mex_key_en() [all...] |
H A D | zcrypt_msgtype50.c | 159 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() 196 * @mex: pointer to user input data 202 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type50MEX_msg() 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 in ICAMEX_msg_to_type50MEX_msg() 200 ICAMEX_msg_to_type50MEX_msg(struct zcrypt_queue *zq, struct ap_message *ap_msg, struct ica_rsa_modexpo *mex) ICAMEX_msg_to_type50MEX_msg() argument 463 zcrypt_cex2a_modexpo(struct zcrypt_queue *zq, struct ica_rsa_modexpo *mex, struct ap_message *ap_msg) zcrypt_cex2a_modexpo() argument [all...] |
H A D | zcrypt_api.c | 636 struct ica_rsa_modexpo *mex) in zcrypt_rsa_modexpo() 646 trace_s390_zcrypt_req(mex, TP_ICARSAMODEXPO); in zcrypt_rsa_modexpo() 655 if (mex->outputdatalength < mex->inputdatalength) { in zcrypt_rsa_modexpo() 666 mex->outputdatalength = mex->inputdatalength; in zcrypt_rsa_modexpo() 668 rc = get_rsa_modex_fc(mex, &func_code); in zcrypt_rsa_modexpo() 681 if (zc->min_mod_size > mex->inputdatalength || in zcrypt_rsa_modexpo() 682 zc->max_mod_size < mex->inputdatalength) in zcrypt_rsa_modexpo() 725 rc = pref_zq->ops->rsa_modexpo(pref_zq, mex, in zcrypt_rsa_modexpo() 634 zcrypt_rsa_modexpo(struct ap_perms *perms, struct zcrypt_track *tr, struct ica_rsa_modexpo *mex) zcrypt_rsa_modexpo() argument 1410 struct ica_rsa_modexpo mex; icarsamodexpo_ioctl() local [all...] |
H A D | zcrypt_msgtype6.c | 244 * @mex: pointer to user input data 250 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type6MEX_msgX() 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() 1017 * @mex 248 ICAMEX_msg_to_type6MEX_msgX(struct zcrypt_queue *zq, struct ap_message *ap_msg, struct ica_rsa_modexpo *mex) ICAMEX_msg_to_type6MEX_msgX() argument 1019 zcrypt_msgtype6_modexpo(struct zcrypt_queue *zq, struct ica_rsa_modexpo *mex, struct ap_message *ap_msg) zcrypt_msgtype6_modexpo() argument [all...] |
/kernel/linux/linux-6.6/drivers/s390/crypto/ |
H A D | zcrypt_cca_key.h | 94 * @mex: pointer to user input data 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 in zcrypt_type6_mex_key_en() [all...] |
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() 191 * @mex: pointer to user input data 197 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type50MEX_msg() 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 in ICAMEX_msg_to_type50MEX_msg() 195 ICAMEX_msg_to_type50MEX_msg(struct zcrypt_queue *zq, struct ap_message *ap_msg, struct ica_rsa_modexpo *mex) ICAMEX_msg_to_type50MEX_msg() argument 453 zcrypt_msgtype50_modexpo(struct zcrypt_queue *zq, struct ica_rsa_modexpo *mex, struct ap_message *ap_msg) zcrypt_msgtype50_modexpo() argument [all...] |
H A D | zcrypt_msgtype6.c | 187 * @mex: pointer to user input data 193 struct ica_rsa_modexpo *mex) in icamex_msg_to_type6mex_msgx() 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() 968 * @mex 191 icamex_msg_to_type6mex_msgx(struct zcrypt_queue *zq, struct ap_message *ap_msg, struct ica_rsa_modexpo *mex) icamex_msg_to_type6mex_msgx() argument 970 zcrypt_msgtype6_modexpo(struct zcrypt_queue *zq, struct ica_rsa_modexpo *mex, struct ap_message *ap_msg) zcrypt_msgtype6_modexpo() argument [all...] |
H A D | zcrypt_api.c | 639 struct ica_rsa_modexpo *mex) in zcrypt_rsa_modexpo() 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() 725 rc = pref_zq->ops->rsa_modexpo(pref_zq, mex, in zcrypt_rsa_modexpo() 637 zcrypt_rsa_modexpo(struct ap_perms *perms, struct zcrypt_track *tr, struct ica_rsa_modexpo *mex) zcrypt_rsa_modexpo() argument 1425 struct ica_rsa_modexpo mex; icarsamodexpo_ioctl() local [all...] |
H A D | zcrypt_msgtype50.h | 22 int get_rsa_modex_fc(struct ica_rsa_modexpo *mex, int *fc);
|