Lines Matching refs:protkey
73 u8 protkey[MAXPROTKEYSIZE]; /* the protected key blob */ member
106 u8 *protkey, u32 *protkeylen, u32 *protkeytype) in pkey_clr2protkey() argument
198 memcpy(protkey, paramblock, *protkeylen); in pkey_clr2protkey()
207 static int pkey_skey2pkey(const u8 *key, u8 *protkey, in pkey_skey2pkey() argument
232 protkey, protkeylen, protkeytype); in pkey_skey2pkey()
236 protkey, protkeylen, in pkey_skey2pkey()
294 u8 *protkey, u32 *protkeylen, u32 *protkeytype) in pkey_ep11key2pkey() argument
315 protkey, protkeylen, protkeytype); in pkey_ep11key2pkey()
373 static int pkey_genprotkey(u32 keytype, u8 *protkey, in pkey_genprotkey() argument
392 protkey, protkeylen, protkeytype); in pkey_genprotkey()
397 get_random_bytes(protkey, keysize); in pkey_genprotkey()
405 static int pkey_verifyprotkey(const u8 *protkey, u32 protkeylen, in pkey_verifyprotkey() argument
444 memcpy(param.key, protkey, protkeylen); in pkey_verifyprotkey()
458 u8 *protkey, u32 *protkeylen, u32 *protkeytype) in nonccatokaes2pkey() argument
479 protkey, protkeylen, protkeytype); in nonccatokaes2pkey()
492 protkey, protkeylen, protkeytype); in nonccatokaes2pkey()
503 protkey, protkeylen, protkeytype); in nonccatokaes2pkey()
517 u8 *protkey, u32 *protkeylen, u32 *protkeytype) in nonccatokecc2pkey() argument
552 protkey, protkeylen, protkeytype); in nonccatokecc2pkey()
565 u8 *protkey, u32 *protkeylen, u32 *protkeytype) in pkey_nonccatok2pkey() argument
577 rc = pkey_verifyprotkey(t->protkey, t->len, t->keytype); in pkey_nonccatok2pkey()
580 memcpy(protkey, t->protkey, t->len); in pkey_nonccatok2pkey()
595 rc = nonccatokaes2pkey(t, protkey, in pkey_nonccatok2pkey()
603 rc = nonccatokecc2pkey(t, protkey, in pkey_nonccatok2pkey()
619 protkey, protkeylen, protkeytype); in pkey_nonccatok2pkey()
628 protkey, protkeylen, protkeytype); in pkey_nonccatok2pkey()
643 u8 *protkey, u32 *protkeylen, u32 *protkeytype) in pkey_ccainttok2pkey() argument
662 return pkey_skey2pkey(key, protkey, protkeylen, protkeytype); in pkey_ccainttok2pkey()
669 u8 *protkey, u32 *protkeylen, u32 *protkeytype) in pkey_keyblob2pkey() argument
682 protkey, protkeylen, protkeytype); in pkey_keyblob2pkey()
686 protkey, protkeylen, protkeytype); in pkey_keyblob2pkey()
968 u8 *protkey, u32 *protkeylen, u32 *protkeytype) in pkey_keyblob2pkey2() argument
1006 protkey, protkeylen, in pkey_keyblob2pkey2()
1024 protkey, protkeylen, protkeytype); in pkey_keyblob2pkey2()
1028 protkey, protkeylen, in pkey_keyblob2pkey2()
1032 protkey, protkeylen, in pkey_keyblob2pkey2()
1221 u8 *protkey, u32 *protkeylen, u32 *protkeytype) in pkey_keyblob2pkey3() argument
1277 protkey, protkeylen, protkeytype); in pkey_keyblob2pkey3()
1293 protkey, protkeylen, in pkey_keyblob2pkey3()
1299 protkey, protkeylen, in pkey_keyblob2pkey3()
1303 rc = cca_sec2protkey(card, dom, key, protkey, in pkey_keyblob2pkey3()
1307 rc = cca_cipher2protkey(card, dom, key, protkey, in pkey_keyblob2pkey3()
1310 rc = cca_ecc2protkey(card, dom, key, protkey, in pkey_keyblob2pkey3()
1382 ksp.protkey.len = sizeof(ksp.protkey.protkey); in pkey_unlocked_ioctl()
1384 ksp.seckey.seckey, ksp.protkey.protkey, in pkey_unlocked_ioctl()
1385 &ksp.protkey.len, &ksp.protkey.type); in pkey_unlocked_ioctl()
1399 kcp.protkey.len = sizeof(kcp.protkey.protkey); in pkey_unlocked_ioctl()
1401 kcp.protkey.protkey, in pkey_unlocked_ioctl()
1402 &kcp.protkey.len, &kcp.protkey.type); in pkey_unlocked_ioctl()
1432 ksp.protkey.len = sizeof(ksp.protkey.protkey); in pkey_unlocked_ioctl()
1433 rc = pkey_skey2pkey(ksp.seckey.seckey, ksp.protkey.protkey, in pkey_unlocked_ioctl()
1434 &ksp.protkey.len, &ksp.protkey.type); in pkey_unlocked_ioctl()
1463 kgp.protkey.len = sizeof(kgp.protkey.protkey); in pkey_unlocked_ioctl()
1464 rc = pkey_genprotkey(kgp.keytype, kgp.protkey.protkey, in pkey_unlocked_ioctl()
1465 &kgp.protkey.len, &kgp.protkey.type); in pkey_unlocked_ioctl()
1479 rc = pkey_verifyprotkey(kvp.protkey.protkey, in pkey_unlocked_ioctl()
1480 kvp.protkey.len, kvp.protkey.type); in pkey_unlocked_ioctl()
1494 ktp.protkey.len = sizeof(ktp.protkey.protkey); in pkey_unlocked_ioctl()
1495 rc = pkey_keyblob2pkey(kkey, ktp.keylen, ktp.protkey.protkey, in pkey_unlocked_ioctl()
1496 &ktp.protkey.len, &ktp.protkey.type); in pkey_unlocked_ioctl()
1628 ktp.protkey.len = sizeof(ktp.protkey.protkey); in pkey_unlocked_ioctl()
1631 ktp.protkey.protkey, &ktp.protkey.len, in pkey_unlocked_ioctl()
1632 &ktp.protkey.type); in pkey_unlocked_ioctl()
1739 u8 *kkey, *protkey; in pkey_unlocked_ioctl() local
1751 protkey = kmalloc(protkeylen, GFP_KERNEL); in pkey_unlocked_ioctl()
1752 if (!protkey) { in pkey_unlocked_ioctl()
1759 protkey, &protkeylen, &ktp.pkeytype); in pkey_unlocked_ioctl()
1765 kfree(protkey); in pkey_unlocked_ioctl()
1770 kfree(protkey); in pkey_unlocked_ioctl()
1773 if (copy_to_user(ktp.pkey, protkey, protkeylen)) { in pkey_unlocked_ioctl()
1774 kfree(protkey); in pkey_unlocked_ioctl()
1778 kfree(protkey); in pkey_unlocked_ioctl()
1806 struct pkey_protkey protkey; in pkey_protkey_aes_attr_read() local
1820 protkey.len = sizeof(protkey.protkey); in pkey_protkey_aes_attr_read()
1822 protkey.protkey, &protkey.len, &protkey.type); in pkey_protkey_aes_attr_read()
1826 protkeytoken.len = protkey.len; in pkey_protkey_aes_attr_read()
1827 memcpy(&protkeytoken.protkey, &protkey.protkey, protkey.len); in pkey_protkey_aes_attr_read()
1833 protkey.len = sizeof(protkey.protkey); in pkey_protkey_aes_attr_read()
1835 protkey.protkey, &protkey.len, &protkey.type); in pkey_protkey_aes_attr_read()
1839 protkeytoken.len = protkey.len; in pkey_protkey_aes_attr_read()
1840 memcpy(&protkeytoken.protkey, &protkey.protkey, protkey.len); in pkey_protkey_aes_attr_read()