Lines Matching refs:pxorctx
232 PROV_XOR_CTX *pxorctx = OPENSSL_zalloc(sizeof(PROV_XOR_CTX)); in xor_newctx() local
234 if (pxorctx == NULL) in xor_newctx()
237 pxorctx->provctx = provctx; in xor_newctx()
239 return pxorctx; in xor_newctx()
245 PROV_XOR_CTX *pxorctx = (PROV_XOR_CTX *)vpxorctx; in xor_init() local
247 if (pxorctx == NULL || vkey == NULL) in xor_init()
249 pxorctx->key = vkey; in xor_init()
255 PROV_XOR_CTX *pxorctx = (PROV_XOR_CTX *)vpxorctx; in xor_set_peer() local
257 if (pxorctx == NULL || vpeerkey == NULL) in xor_set_peer()
259 pxorctx->peerkey = vpeerkey; in xor_set_peer()
266 PROV_XOR_CTX *pxorctx = (PROV_XOR_CTX *)vpxorctx; in xor_derive() local
269 if (pxorctx->key == NULL || pxorctx->peerkey == NULL) in xor_derive()
280 secret[i] = pxorctx->key->privkey[i] ^ pxorctx->peerkey->pubkey[i]; in xor_derive()
285 static void xor_freectx(void *pxorctx) in xor_freectx() argument
287 OPENSSL_free(pxorctx); in xor_freectx()
343 PROV_XOR_CTX *pxorctx = vpxorctx; in xor_encapsulate() local
358 genctx = xor_gen_init(pxorctx->provctx, OSSL_KEYMGMT_SELECT_KEYPAIR, NULL); in xor_encapsulate()
370 derivectx = xor_newctx(pxorctx->provctx); in xor_encapsulate()
373 || !xor_set_peer(derivectx, pxorctx->key) in xor_encapsulate()
399 PROV_XOR_CTX *pxorctx = vpxorctx; in xor_decapsulate() local
411 peerkey = xor_newdata(pxorctx->provctx); in xor_decapsulate()
417 derivectx = xor_newctx(pxorctx->provctx); in xor_decapsulate()
419 || !xor_init(derivectx, pxorctx->key, NULL) in xor_decapsulate()