EVP_EC_GEN(3ssl)

πŸ“¦ version 4.1.0, in nixos 26.05, nixpkgs unstable

πŸ’… 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 OpenSSL 3.0.
  • EVP_EC_affine2oct() was added in OpenSSL 4.1.

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 OpenSSL 4.1.0, dated 2026-10-23, and it's the EVP_EC_GEN(3ssl) manual. periodt. πŸ’–
πŸ“¦ where this page comes from