EC_GFP_SIMPLE_METHOD(3ossl)

πŸ’– EC_GFP_SIMPLE_METHOD πŸ’–

okay bestie, welcome to the OpenSSL section 3ossl manual page for all the EC_GF* method-getter girlies πŸŽ€ this one is short but it's got lore, it's got deprecation drama, it's got NIST curves looking cute. let's get into it ✨


✨ NAME ✨

EC_GFp_simple_method, EC_GFp_mont_method, EC_GFp_nist_method, EC_GFp_nistp224_method, EC_GFp_nistp256_method, EC_GFp_nistp521_method, EC_GF2m_simple_method, EC_METHOD_get_field_type β€” the functions for obtaining EC_METHOD objects πŸ¦‹

basically they're the little matchmakers that hand you the right implementation object. periodt.


✨ SYNOPSIS ✨

first thing, the include. iconic behavior:

#include <openssl/ec.h>
🚨 okay so listen. the following functions have been deprecated since OpenSSL 3.0, and can be hidden entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7). so if you can't find them, that's why bestie, they're in hiding πŸ™ˆ
const EC_METHOD *EC_GFp_simple_method(void);
const EC_METHOD *EC_GFp_mont_method(void);
const EC_METHOD *EC_GFp_nist_method(void);
const EC_GFp_nistp224_method(void);
const EC_GFp_nistp256_method(void);
const EC_GFp_nistp521_method(void);

const EC_METHOD *EC_GF2m_simple_method(void);

int EC_METHOD_get_field_type(const EC_METHOD *meth);

✨ DESCRIPTION ✨

so the tea β˜•: all of the const EC_METHOD *EC_GF* functions were deprecated in OpenSSL 3.0, because EC_METHOD is no longer a public concept. it's giving retired celebrity. it still exists, but nobody's supposed to be meeting it in public anymore πŸ’…

the Elliptic Curve library ships a bunch of different implementations behind one single common interface β€” like, one menu, many kitchens πŸ“. when you're constructing a curve using EC_GROUP_new (peep EC_GROUP_new(3)) you must hand it an implementation method. the functions described here all return a const pointer to an EC_METHOD structure that you can pass to EC_GROUP_NEW. and it's important that the correct implementation type for the form of curve you selected is the one you actually use. matching vibes only, no mismatches ✨

for F2^m curves there's literally only one implementation choice, i.e. EC_GF2_simple_method. one option, no decision fatigue, slay.

for Fp curves the lowest common denominator implementation is the EC_GFp_simple_method implementation. every other implementation is built on top of it, like a base layer of a really good outfit:

  • EC_GFp_mont_method builds on EC_GFp_simple_method but adds the use of montgomery multiplication (see BN_mod_mul_montgomery(3)).
  • EC_GFp_nist_method offers an implementation optimised for use with NIST recommended curves (NIST curves are available through EC_GROUP_new_by_curve_name as described in EC_GROUP_new(3)).

and then we have the glow-up squad 🌈:

  • EC_GFp_nistp224_method, EC_GFp_nistp256_method and EC_GFp_nistp521_method offer 64 bit optimised implementations for the NIST P224, P256 and P521 curves respectively.
😭 note, however, that these implementations are not available on all platforms. so don't come for me if your platform said no, it's not personal, it's portability.

EC_METHOD_get_field_type() was deprecated in OpenSSL 3.0 too. applications should use EC_GROUP_get_field_type() as a replacement (see EC_GROUP_copy(3)). upgrade your fave, it's what she deserves 🫢


✨ RETURN VALUES ✨

  • all EC_GFp* functions and EC_GF2m_simple_method always return a const pointer to an EC_METHOD structure. always. no cap.
  • EC_METHOD_get_field_type returns an integer that identifies the type of field the EC_METHOD structure supports. it's giving "what's your type" but for fields πŸ’œ

✨ SEE ALSO ✨

the whole friend group πŸ’ž:


✨ HISTORY ✨

EC_GFp_simple_method(), EC_GFp_mont_method(void), EC_GFp_nist_method(), EC_GFp_nistp224_method(), EC_GFp_nistp256_method(), EC_GFp_nistp521_method(), EC_GF2m_simple_method(), and EC_METHOD_get_field_type() were deprecated in OpenSSL 3.0. the whole crew, all at once. it was a mass retirement party πŸŽ‰


Copyright 2013-2020 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>. read the license bestie, it's the rules πŸŽ€


and that's the whole page, mwah πŸ’‹ this was version 3.5.9, dated 2026-09-29, filed under EC_GFP_SIMPLE_METHOD(3ossl) in the OpenSSL collection. go forth and pick the right EC_METHOD, i believe in you πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from