Lines Matching refs:preqparm
318 } __packed * preqparm; in cca_genseckey() local
343 preqparm = (struct kgreqparm __force *)preqcblk->req_parmb; in cca_genseckey()
344 memcpy(preqparm->subfunc_code, "KG", 2); in cca_genseckey()
345 preqparm->rule_array_len = sizeof(preqparm->rule_array_len); in cca_genseckey()
346 preqparm->lv1.len = sizeof(struct lv1); in cca_genseckey()
347 memcpy(preqparm->lv1.key_form, "OP ", 8); in cca_genseckey()
352 memcpy(preqparm->lv1.key_length, "KEYLN16 ", 8); in cca_genseckey()
357 memcpy(preqparm->lv1.key_length, "KEYLN24 ", 8); in cca_genseckey()
362 memcpy(preqparm->lv1.key_length, "KEYLN32 ", 8); in cca_genseckey()
370 memcpy(preqparm->lv1.key_type1, "AESDATA ", 8); in cca_genseckey()
371 preqparm->lv2.len = sizeof(struct lv2); in cca_genseckey()
373 preqparm->lv2.keyid[i].len = sizeof(struct keyid); in cca_genseckey()
374 preqparm->lv2.keyid[i].attr = (i == 2 ? 0x30 : 0x10); in cca_genseckey()
451 } __packed * preqparm; in cca_clr2seckey() local
484 preqparm = (struct cmreqparm __force *)preqcblk->req_parmb; in cca_clr2seckey()
485 memcpy(preqparm->subfunc_code, "CM", 2); in cca_clr2seckey()
486 memcpy(preqparm->rule_array, "AES ", 8); in cca_clr2seckey()
487 preqparm->rule_array_len = in cca_clr2seckey()
488 sizeof(preqparm->rule_array_len) + sizeof(preqparm->rule_array); in cca_clr2seckey()
508 preqparm->lv1.len = sizeof(struct lv1) + keysize; in cca_clr2seckey()
509 memcpy(preqparm->lv1.clrkey, clrkey, keysize); in cca_clr2seckey()
510 plv2 = (struct lv2 *)(((u8 *)preqparm) + sizeof(*preqparm) + keysize); in cca_clr2seckey()
514 preqcblk->req_parml = sizeof(*preqparm) + keysize + sizeof(*plv2); in cca_clr2seckey()
596 } __packed * preqparm; in cca_sec2protkey() local
630 preqparm = (struct uskreqparm __force *)preqcblk->req_parmb; in cca_sec2protkey()
631 memcpy(preqparm->subfunc_code, "US", 2); in cca_sec2protkey()
632 preqparm->rule_array_len = sizeof(preqparm->rule_array_len); in cca_sec2protkey()
633 preqparm->lv1.len = sizeof(struct lv1); in cca_sec2protkey()
634 preqparm->lv1.attr_len = sizeof(struct lv1) - sizeof(preqparm->lv1.len); in cca_sec2protkey()
635 preqparm->lv1.attr_flags = 0x0001; in cca_sec2protkey()
636 preqparm->lv2.len = sizeof(struct lv2) + SECKEYBLOBSIZE; in cca_sec2protkey()
637 preqparm->lv2.attr_len = sizeof(struct lv2) in cca_sec2protkey()
638 - sizeof(preqparm->lv2.len) + SECKEYBLOBSIZE; in cca_sec2protkey()
639 preqparm->lv2.attr_flags = 0x0000; in cca_sec2protkey()
640 memcpy(preqparm->lv2.token, seckey, SECKEYBLOBSIZE); in cca_sec2protkey()
797 } __packed * preqparm; in cca_gencipherkey() local
825 preqparm = (struct gkreqparm __force *)preqcblk->req_parmb; in cca_gencipherkey()
826 memcpy(preqparm->subfunc_code, "GK", 2); in cca_gencipherkey()
827 preqparm->rule_array_len = sizeof(uint16_t) + 2 * 8; in cca_gencipherkey()
828 memcpy(preqparm->rule_array, "AES OP ", 2 * 8); in cca_gencipherkey()
831 preqparm->vud.len = sizeof(preqparm->vud); in cca_gencipherkey()
843 preqparm->vud.clear_key_bit_len = keybitsize; in cca_gencipherkey()
844 memcpy(preqparm->vud.key_type_1, "TOKEN ", 8); in cca_gencipherkey()
845 memset(preqparm->vud.key_type_2, ' ', sizeof(preqparm->vud.key_type_2)); in cca_gencipherkey()
848 preqparm->kb.len = sizeof(preqparm->kb); in cca_gencipherkey()
849 preqparm->kb.tlv1.len = sizeof(preqparm->kb.tlv1); in cca_gencipherkey()
850 preqparm->kb.tlv1.flag = 0x0030; in cca_gencipherkey()
851 preqparm->kb.tlv2.len = sizeof(preqparm->kb.tlv2); in cca_gencipherkey()
852 preqparm->kb.tlv2.flag = 0x0030; in cca_gencipherkey()
853 preqparm->kb.tlv3.len = sizeof(preqparm->kb.tlv3); in cca_gencipherkey()
854 preqparm->kb.tlv3.flag = 0x0030; in cca_gencipherkey()
855 memcpy(preqparm->kb.tlv3.gen_key_id_1, in cca_gencipherkey()
857 preqparm->kb.tlv4.len = sizeof(preqparm->kb.tlv4); in cca_gencipherkey()
858 preqparm->kb.tlv4.flag = 0x0030; in cca_gencipherkey()
859 preqparm->kb.tlv5.len = sizeof(preqparm->kb.tlv5); in cca_gencipherkey()
860 preqparm->kb.tlv5.flag = 0x0030; in cca_gencipherkey()
861 preqparm->kb.tlv6.len = sizeof(preqparm->kb.tlv6); in cca_gencipherkey()
862 preqparm->kb.tlv6.flag = 0x0030; in cca_gencipherkey()
866 t = (struct cipherkeytoken *)preqparm->kb.tlv3.gen_key_id_1; in cca_gencipherkey()
1192 } __packed * preqparm; in cca_cipher2protkey() local
1230 preqparm = (struct aureqparm __force *)preqcblk->req_parmb; in cca_cipher2protkey()
1231 memcpy(preqparm->subfunc_code, "AU", 2); in cca_cipher2protkey()
1232 preqparm->rule_array_len = in cca_cipher2protkey()
1233 sizeof(preqparm->rule_array_len) in cca_cipher2protkey()
1234 + sizeof(preqparm->rule_array); in cca_cipher2protkey()
1235 memcpy(preqparm->rule_array, "EXPT-SK ", 8); in cca_cipher2protkey()
1237 preqparm->vud.len = sizeof(preqparm->vud); in cca_cipher2protkey()
1238 preqparm->vud.tk_blob_len = sizeof(preqparm->vud.tk_blob) in cca_cipher2protkey()
1240 preqparm->vud.tk_blob_tag = 0x00C2; in cca_cipher2protkey()
1242 preqparm->kb.len = keytoklen + 3 * sizeof(uint16_t); in cca_cipher2protkey()
1243 preqparm->kb.cca_key_token_len = keytoklen + 2 * sizeof(uint16_t); in cca_cipher2protkey()
1244 memcpy(preqparm->kb.cca_key_token, ckey, keytoklen); in cca_cipher2protkey()
1357 } __packed * preqparm; in cca_ecc2protkey() local
1393 preqparm = (struct aureqparm __force *)preqcblk->req_parmb; in cca_ecc2protkey()
1394 memcpy(preqparm->subfunc_code, "AU", 2); in cca_ecc2protkey()
1395 preqparm->rule_array_len = in cca_ecc2protkey()
1396 sizeof(preqparm->rule_array_len) in cca_ecc2protkey()
1397 + sizeof(preqparm->rule_array); in cca_ecc2protkey()
1398 memcpy(preqparm->rule_array, "EXPT-SK ", 8); in cca_ecc2protkey()
1400 preqparm->vud.len = sizeof(preqparm->vud); in cca_ecc2protkey()
1401 preqparm->vud.tk_blob_len = sizeof(preqparm->vud.tk_blob) in cca_ecc2protkey()
1403 preqparm->vud.tk_blob_tag = 0x00C2; in cca_ecc2protkey()
1405 preqparm->kb.len = keylen + 3 * sizeof(uint16_t); in cca_ecc2protkey()
1406 preqparm->kb.cca_key_token_len = keylen + 2 * sizeof(uint16_t); in cca_ecc2protkey()
1407 memcpy(preqparm->kb.cca_key_token, key, keylen); in cca_ecc2protkey()
1500 } __packed * preqparm; in cca_query_crypto_facility() local
1516 preqparm = (struct fqreqparm __force *)preqcblk->req_parmb; in cca_query_crypto_facility()
1517 memcpy(preqparm->subfunc_code, "FQ", 2); in cca_query_crypto_facility()
1518 memcpy(preqparm->rule_array, keyword, sizeof(preqparm->rule_array)); in cca_query_crypto_facility()
1519 preqparm->rule_array_len = in cca_query_crypto_facility()
1520 sizeof(preqparm->rule_array_len) + sizeof(preqparm->rule_array); in cca_query_crypto_facility()
1521 preqparm->lv1.len = sizeof(preqparm->lv1); in cca_query_crypto_facility()
1522 preqparm->dummylen = sizeof(preqparm->dummylen); in cca_query_crypto_facility()