Lines Matching refs:preqparm
323 } __packed * preqparm; in cca_genseckey() local
348 preqparm = (struct kgreqparm __force *)preqcblk->req_parmb; in cca_genseckey()
349 memcpy(preqparm->subfunc_code, "KG", 2); in cca_genseckey()
350 preqparm->rule_array_len = sizeof(preqparm->rule_array_len); in cca_genseckey()
351 preqparm->lv1.len = sizeof(struct lv1); in cca_genseckey()
352 memcpy(preqparm->lv1.key_form, "OP ", 8); in cca_genseckey()
357 memcpy(preqparm->lv1.key_length, "KEYLN16 ", 8); in cca_genseckey()
362 memcpy(preqparm->lv1.key_length, "KEYLN24 ", 8); in cca_genseckey()
367 memcpy(preqparm->lv1.key_length, "KEYLN32 ", 8); in cca_genseckey()
375 memcpy(preqparm->lv1.key_type1, "AESDATA ", 8); in cca_genseckey()
376 preqparm->lv2.len = sizeof(struct lv2); in cca_genseckey()
378 preqparm->lv2.keyid[i].len = sizeof(struct keyid); in cca_genseckey()
379 preqparm->lv2.keyid[i].attr = (i == 2 ? 0x30 : 0x10); in cca_genseckey()
456 } __packed * preqparm; in cca_clr2seckey() local
489 preqparm = (struct cmreqparm __force *)preqcblk->req_parmb; in cca_clr2seckey()
490 memcpy(preqparm->subfunc_code, "CM", 2); in cca_clr2seckey()
491 memcpy(preqparm->rule_array, "AES ", 8); in cca_clr2seckey()
492 preqparm->rule_array_len = in cca_clr2seckey()
493 sizeof(preqparm->rule_array_len) + sizeof(preqparm->rule_array); in cca_clr2seckey()
513 preqparm->lv1.len = sizeof(struct lv1) + keysize; in cca_clr2seckey()
514 memcpy(preqparm->lv1.clrkey, clrkey, keysize); in cca_clr2seckey()
515 plv2 = (struct lv2 *)(((u8 *)preqparm) + sizeof(*preqparm) + keysize); in cca_clr2seckey()
519 preqcblk->req_parml = sizeof(*preqparm) + keysize + sizeof(*plv2); in cca_clr2seckey()
601 } __packed * preqparm; in cca_sec2protkey() local
635 preqparm = (struct uskreqparm __force *)preqcblk->req_parmb; in cca_sec2protkey()
636 memcpy(preqparm->subfunc_code, "US", 2); in cca_sec2protkey()
637 preqparm->rule_array_len = sizeof(preqparm->rule_array_len); in cca_sec2protkey()
638 preqparm->lv1.len = sizeof(struct lv1); in cca_sec2protkey()
639 preqparm->lv1.attr_len = sizeof(struct lv1) - sizeof(preqparm->lv1.len); in cca_sec2protkey()
640 preqparm->lv1.attr_flags = 0x0001; in cca_sec2protkey()
641 preqparm->lv2.len = sizeof(struct lv2) + SECKEYBLOBSIZE; in cca_sec2protkey()
642 preqparm->lv2.attr_len = sizeof(struct lv2) in cca_sec2protkey()
643 - sizeof(preqparm->lv2.len) + SECKEYBLOBSIZE; in cca_sec2protkey()
644 preqparm->lv2.attr_flags = 0x0000; in cca_sec2protkey()
645 memcpy(preqparm->lv2.token, seckey, SECKEYBLOBSIZE); in cca_sec2protkey()
802 } __packed * preqparm; in cca_gencipherkey() local
830 preqparm = (struct gkreqparm __force *)preqcblk->req_parmb; in cca_gencipherkey()
831 memcpy(preqparm->subfunc_code, "GK", 2); in cca_gencipherkey()
832 preqparm->rule_array_len = sizeof(uint16_t) + 2 * 8; in cca_gencipherkey()
833 memcpy(preqparm->rule_array, "AES OP ", 2 * 8); in cca_gencipherkey()
836 preqparm->vud.len = sizeof(preqparm->vud); in cca_gencipherkey()
849 preqparm->vud.clear_key_bit_len = keybitsize; in cca_gencipherkey()
850 memcpy(preqparm->vud.key_type_1, "TOKEN ", 8); in cca_gencipherkey()
851 memset(preqparm->vud.key_type_2, ' ', sizeof(preqparm->vud.key_type_2)); in cca_gencipherkey()
854 preqparm->kb.len = sizeof(preqparm->kb); in cca_gencipherkey()
855 preqparm->kb.tlv1.len = sizeof(preqparm->kb.tlv1); in cca_gencipherkey()
856 preqparm->kb.tlv1.flag = 0x0030; in cca_gencipherkey()
857 preqparm->kb.tlv2.len = sizeof(preqparm->kb.tlv2); in cca_gencipherkey()
858 preqparm->kb.tlv2.flag = 0x0030; in cca_gencipherkey()
859 preqparm->kb.tlv3.len = sizeof(preqparm->kb.tlv3); in cca_gencipherkey()
860 preqparm->kb.tlv3.flag = 0x0030; in cca_gencipherkey()
861 memcpy(preqparm->kb.tlv3.gen_key_id_1, in cca_gencipherkey()
863 preqparm->kb.tlv4.len = sizeof(preqparm->kb.tlv4); in cca_gencipherkey()
864 preqparm->kb.tlv4.flag = 0x0030; in cca_gencipherkey()
865 preqparm->kb.tlv5.len = sizeof(preqparm->kb.tlv5); in cca_gencipherkey()
866 preqparm->kb.tlv5.flag = 0x0030; in cca_gencipherkey()
867 preqparm->kb.tlv6.len = sizeof(preqparm->kb.tlv6); in cca_gencipherkey()
868 preqparm->kb.tlv6.flag = 0x0030; in cca_gencipherkey()
872 t = (struct cipherkeytoken *)preqparm->kb.tlv3.gen_key_id_1; in cca_gencipherkey()
1206 } __packed * preqparm; in cca_cipher2protkey() local
1244 preqparm = (struct aureqparm __force *)preqcblk->req_parmb; in cca_cipher2protkey()
1245 memcpy(preqparm->subfunc_code, "AU", 2); in cca_cipher2protkey()
1246 preqparm->rule_array_len = in cca_cipher2protkey()
1247 sizeof(preqparm->rule_array_len) in cca_cipher2protkey()
1248 + sizeof(preqparm->rule_array); in cca_cipher2protkey()
1249 memcpy(preqparm->rule_array, "EXPT-SK ", 8); in cca_cipher2protkey()
1251 preqparm->vud.len = sizeof(preqparm->vud); in cca_cipher2protkey()
1252 preqparm->vud.tk_blob_len = sizeof(preqparm->vud.tk_blob) in cca_cipher2protkey()
1254 preqparm->vud.tk_blob_tag = 0x00C2; in cca_cipher2protkey()
1256 preqparm->kb.len = keytoklen + 3 * sizeof(uint16_t); in cca_cipher2protkey()
1257 preqparm->kb.cca_key_token_len = keytoklen + 2 * sizeof(uint16_t); in cca_cipher2protkey()
1258 memcpy(preqparm->kb.cca_key_token, ckey, keytoklen); in cca_cipher2protkey()
1375 } __packed * preqparm; in cca_ecc2protkey() local
1411 preqparm = (struct aureqparm __force *)preqcblk->req_parmb; in cca_ecc2protkey()
1412 memcpy(preqparm->subfunc_code, "AU", 2); in cca_ecc2protkey()
1413 preqparm->rule_array_len = in cca_ecc2protkey()
1414 sizeof(preqparm->rule_array_len) in cca_ecc2protkey()
1415 + sizeof(preqparm->rule_array); in cca_ecc2protkey()
1416 memcpy(preqparm->rule_array, "EXPT-SK ", 8); in cca_ecc2protkey()
1418 preqparm->vud.len = sizeof(preqparm->vud); in cca_ecc2protkey()
1419 preqparm->vud.tk_blob_len = sizeof(preqparm->vud.tk_blob) in cca_ecc2protkey()
1421 preqparm->vud.tk_blob_tag = 0x00C2; in cca_ecc2protkey()
1423 preqparm->kb.len = keylen + 3 * sizeof(uint16_t); in cca_ecc2protkey()
1424 preqparm->kb.cca_key_token_len = keylen + 2 * sizeof(uint16_t); in cca_ecc2protkey()
1425 memcpy(preqparm->kb.cca_key_token, key, keylen); in cca_ecc2protkey()
1522 } __packed * preqparm; in cca_query_crypto_facility() local
1538 preqparm = (struct fqreqparm __force *)preqcblk->req_parmb; in cca_query_crypto_facility()
1539 memcpy(preqparm->subfunc_code, "FQ", 2); in cca_query_crypto_facility()
1540 memcpy(preqparm->rule_array, keyword, sizeof(preqparm->rule_array)); in cca_query_crypto_facility()
1541 preqparm->rule_array_len = in cca_query_crypto_facility()
1542 sizeof(preqparm->rule_array_len) + sizeof(preqparm->rule_array); in cca_query_crypto_facility()
1543 preqparm->lv1.len = sizeof(preqparm->lv1); in cca_query_crypto_facility()
1544 preqparm->dummylen = sizeof(preqparm->dummylen); in cca_query_crypto_facility()