Lines Matching refs:pk
112 struct pkey_protkey pk; member
119 struct pkey_protkey pk[2]; member
125 struct pkey_protkey *pk) in __paes_keyblob2pkey() argument
131 ret = pkey_keyblob2pkey(kb->key, kb->keylen, pk); in __paes_keyblob2pkey()
147 memcpy(&ctx->pk, &pkey, sizeof(pkey)); in __paes_convert_key()
178 fc = (ctx->pk.type == PKEY_KEYTYPE_AES_128) ? CPACF_KM_PAES_128 : in __ecb_paes_set_key()
179 (ctx->pk.type == PKEY_KEYTYPE_AES_192) ? CPACF_KM_PAES_192 : in __ecb_paes_set_key()
180 (ctx->pk.type == PKEY_KEYTYPE_AES_256) ? CPACF_KM_PAES_256 : 0; in __ecb_paes_set_key()
218 memcpy(param.key, ctx->pk.protkey, MAXPROTKEYSIZE); in ecb_paes_crypt()
232 memcpy(param.key, ctx->pk.protkey, MAXPROTKEYSIZE); in ecb_paes_crypt()
291 fc = (ctx->pk.type == PKEY_KEYTYPE_AES_128) ? CPACF_KMC_PAES_128 : in __cbc_paes_set_key()
292 (ctx->pk.type == PKEY_KEYTYPE_AES_192) ? CPACF_KMC_PAES_192 : in __cbc_paes_set_key()
293 (ctx->pk.type == PKEY_KEYTYPE_AES_256) ? CPACF_KMC_PAES_256 : 0; in __cbc_paes_set_key()
333 memcpy(param.key, ctx->pk.protkey, MAXPROTKEYSIZE); in cbc_paes_crypt()
349 memcpy(param.key, ctx->pk.protkey, MAXPROTKEYSIZE); in cbc_paes_crypt()
412 memcpy(&ctx->pk[0], &pkey0, sizeof(pkey0)); in __xts_paes_convert_key()
413 memcpy(&ctx->pk[1], &pkey1, sizeof(pkey1)); in __xts_paes_convert_key()
426 if (ctx->pk[0].type != ctx->pk[1].type) in __xts_paes_set_key()
430 fc = (ctx->pk[0].type == PKEY_KEYTYPE_AES_128) ? CPACF_KM_PXTS_128 : in __xts_paes_set_key()
431 (ctx->pk[0].type == PKEY_KEYTYPE_AES_256) ? in __xts_paes_set_key()
471 ckey_len = (ctx->pk[0].type == PKEY_KEYTYPE_AES_128) ? in xts_paes_set_key()
473 memcpy(ckey, ctx->pk[0].protkey, ckey_len); in xts_paes_set_key()
474 memcpy(ckey + ckey_len, ctx->pk[1].protkey, ckey_len); in xts_paes_set_key()
501 keylen = (ctx->pk[0].type == PKEY_KEYTYPE_AES_128) ? 48 : 64; in xts_paes_crypt()
502 offset = (ctx->pk[0].type == PKEY_KEYTYPE_AES_128) ? 16 : 0; in xts_paes_crypt()
507 memcpy(pcc_param.key + offset, ctx->pk[1].protkey, keylen); in xts_paes_crypt()
508 memcpy(xts_param.key + offset, ctx->pk[0].protkey, keylen); in xts_paes_crypt()
525 ctx->pk[0].protkey, keylen); in xts_paes_crypt()
586 fc = (ctx->pk.type == PKEY_KEYTYPE_AES_128) ? CPACF_KMCTR_PAES_128 : in __ctr_paes_set_key()
587 (ctx->pk.type == PKEY_KEYTYPE_AES_192) ? CPACF_KMCTR_PAES_192 : in __ctr_paes_set_key()
588 (ctx->pk.type == PKEY_KEYTYPE_AES_256) ? in __ctr_paes_set_key()
643 memcpy(param.key, ctx->pk.protkey, MAXPROTKEYSIZE); in ctr_paes_crypt()
669 memcpy(param.key, ctx->pk.protkey, MAXPROTKEYSIZE); in ctr_paes_crypt()
689 memcpy(param.key, ctx->pk.protkey, MAXPROTKEYSIZE); in ctr_paes_crypt()