Lines Matching refs:privkey
138 ok = ok && key->privkey != NULL;
173 const unsigned char *pa = key1->privkey;
174 const unsigned char *pb = key2->privkey;
221 && key->privkey != NULL
224 key->privkey, key->keylen))
408 OPENSSL_clear_free(ecxkey->privkey, ecxkey->keylen);
409 ecxkey->privkey = NULL;
579 unsigned char *privkey;
593 if ((privkey = ossl_ecx_key_allocate_privkey(key)) == NULL) {
597 if (RAND_priv_bytes_ex(gctx->libctx, privkey, key->keylen, 0) <= 0)
601 privkey[0] &= 248;
602 privkey[X25519_KEYLEN - 1] &= 127;
603 privkey[X25519_KEYLEN - 1] |= 64;
604 ossl_x25519_public_from_private(key->pubkey, privkey);
607 privkey[0] &= 252;
608 privkey[X448_KEYLEN - 1] |= 128;
609 ossl_x448_public_from_private(key->pubkey, privkey);
612 if (!ossl_ed25519_public_from_private(gctx->libctx, key->pubkey, privkey,
617 if (!ossl_ed448_public_from_private(gctx->libctx, key->pubkey, privkey,
725 ossl_x25519_public_from_private(pub, ecx->privkey);
728 ossl_x448_public_from_private(pub, ecx->privkey);
731 if (!ossl_ed25519_public_from_private(ecx->libctx, pub, ecx->privkey,
736 if (!ossl_ed448_public_from_private(ecx->libctx, pub, ecx->privkey,
766 ok = ok && ecx->privkey != NULL;
837 unsigned char *privkey = NULL, *pubkey;
850 privkey = ossl_ecx_key_allocate_privkey(key);
851 if (privkey == NULL) {
856 if (RAND_priv_bytes_ex(gctx->libctx, privkey, X25519_KEYLEN, 0) <= 0)
859 privkey[0] &= 248;
860 privkey[31] &= 127;
861 privkey[31] |= 64;
863 if (s390x_x25519_mul(pubkey, generator, privkey) != 1)
883 unsigned char *privkey = NULL, *pubkey;
896 privkey = ossl_ecx_key_allocate_privkey(key);
897 if (privkey == NULL) {
902 if (RAND_priv_bytes_ex(gctx->libctx, privkey, X448_KEYLEN, 0) <= 0)
905 privkey[0] &= 252;
906 privkey[55] |= 128;
908 if (s390x_x448_mul(pubkey, generator, privkey) != 1)
932 unsigned char *privkey = NULL, *pubkey;
948 privkey = ossl_ecx_key_allocate_privkey(key);
949 if (privkey == NULL) {
954 if (RAND_priv_bytes_ex(gctx->libctx, privkey, ED25519_KEYLEN, 0) <= 0)
960 j = EVP_Digest(privkey, 32, buff, &sz, sha, NULL);
1000 unsigned char *privkey = NULL, *pubkey;
1015 privkey = ossl_ecx_key_allocate_privkey(key);
1016 if (privkey == NULL) {
1024 if (RAND_priv_bytes_ex(gctx->libctx, privkey, ED448_KEYLEN, 0) <= 0)
1032 if (EVP_DigestUpdate(hashctx, privkey, 57) != 1)