Lines Matching +full:256 +full:kb

113 static int ep11_kb_split(const u8 *kb, size_t kblen, u32 kbver,  in ep11_kb_split()  argument
124 hdr = (struct ep11kblob_header *)kb; in ep11_kb_split()
141 pl = (u8 *)kb + hdrsize; in ep11_kb_split()
157 static int ep11_kb_decode(const u8 *kb, size_t kblen, in ep11_kb_decode() argument
169 tmph = (struct ep11kblob_header *)kb; in ep11_kb_decode()
175 if (ep11_kb_split(kb, kblen, tmph->version, in ep11_kb_decode()
208 struct ep11keyblob *kb; in ep11_kb_wkvp() local
210 if (ep11_kb_decode(keyblob, keybloblen, NULL, NULL, &kb, NULL)) in ep11_kb_wkvp()
212 return kb->wkvp; in ep11_kb_wkvp()
223 struct ep11keyblob *kb = (struct ep11keyblob *)(key + sizeof(*hdr)); in ep11_check_aes_key_with_hdr() local
227 if (keylen < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_aes_key_with_hdr()
229 __func__, keylen, sizeof(*hdr) + sizeof(*kb)); in ep11_check_aes_key_with_hdr()
257 if (hdr->len < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_aes_key_with_hdr()
260 __func__, (int)hdr->len, sizeof(*hdr) + sizeof(*kb)); in ep11_check_aes_key_with_hdr()
264 if (kb->version != EP11_STRUCT_MAGIC) { in ep11_check_aes_key_with_hdr()
267 __func__, (int)kb->version, EP11_STRUCT_MAGIC); in ep11_check_aes_key_with_hdr()
270 if (checkcpacfexp && !(kb->attr & EP11_BLOB_PKEY_EXTRACTABLE)) { in ep11_check_aes_key_with_hdr()
290 struct ep11keyblob *kb = (struct ep11keyblob *)(key + sizeof(*hdr)); in ep11_check_ecc_key_with_hdr() local
294 if (keylen < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_ecc_key_with_hdr()
296 __func__, keylen, sizeof(*hdr) + sizeof(*kb)); in ep11_check_ecc_key_with_hdr()
324 if (hdr->len < sizeof(*hdr) + sizeof(*kb)) { in ep11_check_ecc_key_with_hdr()
327 __func__, (int)hdr->len, sizeof(*hdr) + sizeof(*kb)); in ep11_check_ecc_key_with_hdr()
331 if (kb->version != EP11_STRUCT_MAGIC) { in ep11_check_ecc_key_with_hdr()
334 __func__, (int)kb->version, EP11_STRUCT_MAGIC); in ep11_check_ecc_key_with_hdr()
337 if (checkcpacfexp && !(kb->attr & EP11_BLOB_PKEY_EXTRACTABLE)) { in ep11_check_ecc_key_with_hdr()
357 struct ep11keyblob *kb = (struct ep11keyblob *)key; in ep11_check_aes_key() local
361 if (keylen < sizeof(*kb)) { in ep11_check_aes_key()
363 __func__, keylen, sizeof(*kb)); in ep11_check_aes_key()
367 if (kb->head.type != TOKTYPE_NON_CCA) { in ep11_check_aes_key()
370 __func__, (int)kb->head.type, TOKTYPE_NON_CCA); in ep11_check_aes_key()
373 if (kb->head.version != TOKVER_EP11_AES) { in ep11_check_aes_key()
376 __func__, (int)kb->head.version, TOKVER_EP11_AES); in ep11_check_aes_key()
379 if (kb->head.len > keylen) { in ep11_check_aes_key()
382 __func__, (int)kb->head.len, keylen); in ep11_check_aes_key()
385 if (kb->head.len < sizeof(*kb)) { in ep11_check_aes_key()
388 __func__, (int)kb->head.len, sizeof(*kb)); in ep11_check_aes_key()
392 if (kb->version != EP11_STRUCT_MAGIC) { in ep11_check_aes_key()
395 __func__, (int)kb->version, EP11_STRUCT_MAGIC); in ep11_check_aes_key()
398 if (checkcpacfexp && !(kb->attr & EP11_BLOB_PKEY_EXTRACTABLE)) { in ep11_check_aes_key()
833 case 256: in _ep11_genaeskey()
1422 if (keybitsize == 128 || keybitsize == 192 || keybitsize == 256) { in ep11_clr2keyblob()
1438 /* Step 1: generate AES 256 bit random kek key */ in ep11_clr2keyblob()
1439 rc = _ep11_genaeskey(card, domain, 256, in ep11_clr2keyblob()
1540 /* AES 256 protected key */ in ep11_kblob2protkey()
1598 /* allocate 1k space for up to 256 apqns */ in ep11_findcard2()
1599 _apqns = kmalloc_array(256, sizeof(u32), GFP_KERNEL); in ep11_findcard2()
1641 if (_nr_apqns < 256) in ep11_findcard2()