/drivers/s390/crypto/ |
D | zcrypt_cca_key.h | 138 static inline int zcrypt_type6_mex_key_de(struct ica_rsa_modexpo *mex, in zcrypt_type6_mex_key_de() argument 186 sizeof(key->pvtMeSec.exponent) - mex->inputdatalength; in zcrypt_type6_mex_key_de() 187 if (copy_from_user(temp, mex->b_key, mex->inputdatalength)) in zcrypt_type6_mex_key_de() 192 sizeof(key->pvtMeSec.modulus) - mex->inputdatalength; in zcrypt_type6_mex_key_de() 193 if (copy_from_user(temp, mex->n_modulus, mex->inputdatalength)) in zcrypt_type6_mex_key_de() 195 key->pubMeSec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_de() 210 static inline int zcrypt_type6_mex_key_en(struct ica_rsa_modexpo *mex, in zcrypt_type6_mex_key_en() argument 235 if (copy_from_user(temp, mex->b_key, mex->inputdatalength)) in zcrypt_type6_mex_key_en() 238 for (i = 0; i < mex->inputdatalength; i++) in zcrypt_type6_mex_key_en() 241 if (i >= mex->inputdatalength) in zcrypt_type6_mex_key_en() [all …]
|
D | zcrypt_pcicc.c | 156 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type6MEX_msg() argument 180 if (copy_from_user(msg->text, mex->inputdata, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msg() 183 if (is_PKCS11_padded(msg->text, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msg() 190 if (is_PKCS12_padded(msg->text, mex->inputdatalength)) { in ICAMEX_msg_to_type6MEX_msg() 192 pad_len = strnlen(msg->text + 2, mex->inputdatalength - 2) + 3; in ICAMEX_msg_to_type6MEX_msg() 193 if (pad_len <= 9 || pad_len >= mex->inputdatalength) in ICAMEX_msg_to_type6MEX_msg() 195 vud_len = mex->inputdatalength - pad_len; in ICAMEX_msg_to_type6MEX_msg() 200 size = zcrypt_type6_mex_key_en(mex, msg->text + vud_len, 0); in ICAMEX_msg_to_type6MEX_msg() 205 vud_len = mex->inputdatalength; in ICAMEX_msg_to_type6MEX_msg() 212 size = zcrypt_type6_mex_key_de(mex, msg->text + vud_len, 0); in ICAMEX_msg_to_type6MEX_msg() [all …]
|
D | zcrypt_pcica.c | 86 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type4MEX_msg() argument 91 mod_len = mex->inputdatalength; in ICAMEX_msg_to_type4MEX_msg() 117 if (copy_from_user(modulus, mex->n_modulus, mod_len) || in ICAMEX_msg_to_type4MEX_msg() 118 copy_from_user(exponent, mex->b_key, mod_len) || in ICAMEX_msg_to_type4MEX_msg() 119 copy_from_user(message, mex->inputdata, mod_len)) in ICAMEX_msg_to_type4MEX_msg() 277 struct ica_rsa_modexpo *mex) in zcrypt_pcica_modexpo() argument 290 rc = ICAMEX_msg_to_type4MEX_msg(zdev, &ap_msg, mex); in zcrypt_pcica_modexpo() 297 rc = convert_response(zdev, &ap_msg, mex->outputdata, in zcrypt_pcica_modexpo() 298 mex->outputdatalength); in zcrypt_pcica_modexpo()
|
D | zcrypt_cex2a.c | 96 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type50MEX_msg() argument 101 mod_len = mex->inputdatalength; in ICAMEX_msg_to_type50MEX_msg() 136 if (copy_from_user(mod, mex->n_modulus, mod_len) || in ICAMEX_msg_to_type50MEX_msg() 137 copy_from_user(exp, mex->b_key, mod_len) || in ICAMEX_msg_to_type50MEX_msg() 138 copy_from_user(inp, mex->inputdata, mod_len)) in ICAMEX_msg_to_type50MEX_msg() 339 struct ica_rsa_modexpo *mex) in zcrypt_cex2a_modexpo() argument 355 rc = ICAMEX_msg_to_type50MEX_msg(zdev, &ap_msg, mex); in zcrypt_cex2a_modexpo() 362 rc = convert_response(zdev, &ap_msg, mex->outputdata, in zcrypt_cex2a_modexpo() 363 mex->outputdatalength); in zcrypt_cex2a_modexpo()
|
D | zcrypt_pcixcc.c | 131 struct ica_rsa_modexpo *mex) in ICAMEX_msg_to_type6MEX_msgX() argument 159 msg->length = mex->inputdatalength + 2; in ICAMEX_msg_to_type6MEX_msgX() 160 if (copy_from_user(msg->text, mex->inputdata, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msgX() 164 size = zcrypt_type6_mex_key_en(mex, msg->text+mex->inputdatalength, 1); in ICAMEX_msg_to_type6MEX_msgX() 167 size += sizeof(*msg) + mex->inputdatalength; in ICAMEX_msg_to_type6MEX_msgX() 689 struct ica_rsa_modexpo *mex) in zcrypt_pcixcc_modexpo() argument 704 rc = ICAMEX_msg_to_type6MEX_msgX(zdev, &ap_msg, mex); in zcrypt_pcixcc_modexpo() 711 rc = convert_response_ica(zdev, &ap_msg, mex->outputdata, in zcrypt_pcixcc_modexpo() 712 mex->outputdatalength); in zcrypt_pcixcc_modexpo()
|
D | zcrypt_api.c | 321 static long zcrypt_rsa_modexpo(struct ica_rsa_modexpo *mex) in zcrypt_rsa_modexpo() argument 326 if (mex->outputdatalength < mex->inputdatalength) in zcrypt_rsa_modexpo() 333 mex->outputdatalength = mex->inputdatalength; in zcrypt_rsa_modexpo() 339 zdev->min_mod_size > mex->inputdatalength || in zcrypt_rsa_modexpo() 340 zdev->max_mod_size < mex->inputdatalength) in zcrypt_rsa_modexpo() 348 rc = zdev->ops->rsa_modexpo(zdev, mex); in zcrypt_rsa_modexpo() 639 struct ica_rsa_modexpo mex; in zcrypt_unlocked_ioctl() local 640 if (copy_from_user(&mex, umex, sizeof(mex))) in zcrypt_unlocked_ioctl() 643 rc = zcrypt_rsa_modexpo(&mex); in zcrypt_unlocked_ioctl() 647 return put_user(mex.outputdatalength, &umex->outputdatalength); in zcrypt_unlocked_ioctl()
|
/drivers/staging/media/easycap/ |
D | easycap_main.c | 1208 int kex, kad, mex, mad, rex, rad, rad2; in field2frame() local 1269 kex = peasycap->field_read; mex = 0; in field2frame() 1324 if ((mex + 1) < FIELD_BUFFER_SIZE / PAGE_SIZE) in field2frame() 1325 margin = *((u8 *)(peasycap->field_buffer[kex][mex + 1].pgo)); in field2frame() 1341 [kex][mex].input, kex, mex, in field2frame() 1356 mex++; in field2frame() 1357 pex = peasycap->field_buffer[kex][mex].pgo; in field2frame() 1359 if (peasycap->field_buffer[kex][mex].input != (0x08|peasycap->input)) in field2frame() 1437 if ((mex + 1) < FIELD_BUFFER_SIZE / PAGE_SIZE) in field2frame() 1438 margin = *((u8 *)(peasycap->field_buffer[kex][mex + 1].pgo)); in field2frame() [all …]
|