Lines Matching refs:privkey

105     if (ecxkey == NULL || ecxkey->privkey == NULL) {  in ecx_priv_encode()
110 oct.data = ecxkey->privkey; in ecx_priv_encode()
173 if (ecxkey == NULL || ecxkey->privkey == NULL) { in ecx_key_print()
182 if (ASN1_buf_print(bp, ecxkey->privkey, KEYLEN(pkey), in ecx_key_print()
307 || key->privkey == NULL in ecx_get_priv_key()
312 memcpy(priv, key->privkey, *len); in ecx_get_priv_key()
365 if (key->privkey != NULL) { in ecx_pkey_export_to()
368 key->privkey, key->keylen)) in ecx_pkey_export_to()
725 const unsigned char **privkey, in validate_ecx_derive() argument
736 if (ecxkey == NULL || ecxkey->privkey == NULL) { in validate_ecx_derive()
744 *privkey = ecxkey->privkey; in validate_ecx_derive()
753 const unsigned char *privkey, *pubkey; in pkey_ecx_derive25519() local
755 if (!validate_ecx_derive(ctx, key, keylen, &privkey, &pubkey) in pkey_ecx_derive25519()
757 && ossl_x25519(key, privkey, pubkey) == 0)) in pkey_ecx_derive25519()
766 const unsigned char *privkey, *pubkey; in pkey_ecx_derive448() local
768 if (!validate_ecx_derive(ctx, key, keylen, &privkey, &pubkey) in pkey_ecx_derive448()
770 && ossl_x448(key, privkey, pubkey) == 0)) in pkey_ecx_derive448()
824 if (ossl_ed25519_sign(sig, tbs, tbslen, edkey->pubkey, edkey->privkey, in pkey_ecd_digestsign25519()
854 edkey->privkey, NULL, 0, 0, edkey->propq) == 0) in pkey_ecd_digestsign448()
948 unsigned char *privkey = NULL, *pubkey; in s390x_pkey_ecx_keygen25519() local
957 privkey = ossl_ecx_key_allocate_privkey(key); in s390x_pkey_ecx_keygen25519()
958 if (privkey == NULL) { in s390x_pkey_ecx_keygen25519()
963 if (RAND_priv_bytes_ex(ctx->libctx, privkey, X25519_KEYLEN, 0) <= 0) in s390x_pkey_ecx_keygen25519()
966 privkey[0] &= 248; in s390x_pkey_ecx_keygen25519()
967 privkey[31] &= 127; in s390x_pkey_ecx_keygen25519()
968 privkey[31] |= 64; in s390x_pkey_ecx_keygen25519()
970 if (s390x_x25519_mul(pubkey, generator, privkey) != 1) in s390x_pkey_ecx_keygen25519()
991 unsigned char *privkey = NULL, *pubkey; in s390x_pkey_ecx_keygen448() local
1000 privkey = ossl_ecx_key_allocate_privkey(key); in s390x_pkey_ecx_keygen448()
1001 if (privkey == NULL) { in s390x_pkey_ecx_keygen448()
1006 if (RAND_priv_bytes_ex(ctx->libctx, privkey, X448_KEYLEN, 0) <= 0) in s390x_pkey_ecx_keygen448()
1009 privkey[0] &= 252; in s390x_pkey_ecx_keygen448()
1010 privkey[55] |= 128; in s390x_pkey_ecx_keygen448()
1012 if (s390x_x448_mul(pubkey, generator, privkey) != 1) in s390x_pkey_ecx_keygen448()
1037 unsigned char *privkey = NULL, *pubkey; in s390x_pkey_ecd_keygen25519() local
1049 privkey = ossl_ecx_key_allocate_privkey(key); in s390x_pkey_ecd_keygen25519()
1050 if (privkey == NULL) { in s390x_pkey_ecd_keygen25519()
1055 if (RAND_priv_bytes_ex(ctx->libctx, privkey, ED25519_KEYLEN, 0) <= 0) in s390x_pkey_ecd_keygen25519()
1062 rv = EVP_Digest(privkey, 32, buff, &sz, md, NULL); in s390x_pkey_ecd_keygen25519()
1103 unsigned char *privkey = NULL, *pubkey; in s390x_pkey_ecd_keygen448() local
1115 privkey = ossl_ecx_key_allocate_privkey(key); in s390x_pkey_ecd_keygen448()
1116 if (privkey == NULL) { in s390x_pkey_ecd_keygen448()
1121 if (RAND_priv_bytes_ex(ctx->libctx, privkey, ED448_KEYLEN, 0) <= 0) in s390x_pkey_ecd_keygen448()
1137 if (EVP_DigestUpdate(hashctx, privkey, 57) != 1) in s390x_pkey_ecd_keygen448()
1164 const unsigned char *privkey, *pubkey; in s390x_pkey_ecx_derive25519() local
1166 if (!validate_ecx_derive(ctx, key, keylen, &privkey, &pubkey) in s390x_pkey_ecx_derive25519()
1168 && s390x_x25519_mul(key, privkey, pubkey) == 0)) in s390x_pkey_ecx_derive25519()
1177 const unsigned char *privkey, *pubkey; in s390x_pkey_ecx_derive448() local
1179 if (!validate_ecx_derive(ctx, key, keylen, &privkey, &pubkey) in s390x_pkey_ecx_derive448()
1181 && s390x_x448_mul(key, pubkey, privkey) == 0)) in s390x_pkey_ecx_derive448()
1218 memcpy(param.ed25519.priv, edkey->privkey, sizeof(param.ed25519.priv)); in s390x_pkey_ecd_digestsign25519()
1263 memcpy(param.ed448.priv + 64 - 57, edkey->privkey, 57); in s390x_pkey_ecd_digestsign448()