EVP_EC_GEN(3ssl)
π
EVP_EC_GEN β welcome to the 3ssl OpenSSL manual page, bestie π
okay so this is the EVP_EC_GEN(3ssl) page, and it's literally all about the EVP routines for EC keys. It's giving crypto-key generation with a side of coordinate glow-up, no cap. β¨
πΈ NAME πΈ
EVP_EC_gen,EVP_EC_affine2octβ EVP routines for EC keys π
π¦ SYNOPSIS π¦
#include <openssl/evp.h>
EVP_PKEY *EVP_EC_gen(const char *curve);
int EVP_EC_affine2oct(const BIGNUM *x, const BIGNUM *y, size_t field_len,
unsigned char **pbuf, size_t *pbsize);
β¨ DESCRIPTION β¨
EVP_EC_gen() generates a new EC key pair on the given curve. Main character energy: you pass the curve, it makes you a fresh key pair. π«Ά
EVP_EC_affine2oct() converts affine coordinates <code>x</code> and <code>y</code> of an EC point to an octet string conforming to Sec. 2.3.4 of the SECG SEC 1 ("Elliptic Curve Cryptography") standard. That octet string can further be passed to OSSL_PARAM_BLD_push_octet_string(). The length of the field degree representation (in bytes) must be passed to field_len. The function allocates a buffer for octet string and places a pointer to *pbuf. It's the caller's responsibility to free this buffer with OPENSSL_free(). π
bestie, do not forget that OPENSSL_free() cleanup β it's iconic and also required. π
π₯ RETURN VALUES π₯
EVP_EC_gen() returns the EC key pair generated or NULL on error. π
EVP_EC_affine2oct() returns 1 on success or 0 on error. Slay. β
π HISTORY π
EVP_EC_gen()was added in OpenSSL3.0.EVP_EC_affine2oct()was added in OpenSSL4.1.
π COPYRIGHT π
Copyright 2013-2026 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
π cute sign-off: this page is from OpenSSL4.1.0, dated2026-10-23, and it's theEVP_EC_GEN(3ssl)manual. periodt. π
π¦ where this page comes from
- nixos 26.05: openssl 4.1.0
- nixpkgs unstable: openssl 4.1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms