EC_GFP_SIMPLE_METHOD(3SSL)

πŸ’– EC_GFP_SIMPLE_METHOD(3SSL) πŸ’–

okay bestie, welcome to the EC_GFp_simple_method page from the OpenSSL fam β€” manual section 3SSL, the elliptic curve method-gettin' zone πŸ’…


✨ 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 β€” literally just functions that hand you EC_METHOD objects πŸŽ€


✨ SYNOPSIS ✨

#include <openssl/ec.h>

so here's the tea: the following functions have been deprecated since OpenSSL 3.0 😭 and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value β€” peep openssl_user_macros(7) for that:

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_METHOD *EC_GFp_nistp224_method(void);
const EC_METHOD *EC_GFp_nistp256_method(void);
const EC_METHOD *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 first thing, no cap: all 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 "we moved on".

The Elliptic Curve library ships a bunch of different implementations through one single common interface. When you construct a curve using EC_GROUP_new (see EC_GROUP_new(3)) you gotta provide an implementation method. Every function on this page returns a const pointer to an EC_METHOD structure that you can pass straight to EC_GROUP_NEW. And bestie, it is important that you use the correct implementation type for the form of curve you selected β€” like, don't mix and match, it's not that kind of party 🌸

For F2^m curves there's literally only one implementation choice, i.e. EC_GF2_simple_method. One option, no drama, iconic.

For Fp curves, the lowest common denominator implementation is the EC_GFp_simple_method implementation. All the other ones are built on top of it β€” the blueprint, the mother, the main character πŸ‘‘

  • 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)) πŸ’œ

Then there's the little trio of speedy ones: 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 β€” and this is the important part β€” these implementations are not available on all platforms πŸ™ˆ so vibe check your target first.

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)) β€” glow up, bestie ✨


✨ RETURN VALUES ✨

All the 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 πŸ”’


✨ SEE ALSO ✨

crypto(7), EC_GROUP_new(3), EC_GROUP_copy(3), EC_POINT_new(3), EC_POINT_add(3), EC_KEY_new(3), d2i_ECPKParameters(3), BN_mod_mul_montgomery(3) β€” go read these, they're the 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 all deprecated in OpenSSL 3.0. the whole squad, gone together 😭 periodt.


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>.


⚠️ quick reminder bestie: deprecated means deprecated β€” it still exists, but the library is side-eyeing you and you should be using the newer replacements wherever this page says so. don't build new stuff on it, fr fr.

okay that's the whole page, mwah πŸ’‹ this was OpenSSL 4.0.3, dated 2026-09-29, and it's been a pleasure serving you the EC_GFP_SIMPLE_METHOD(3SSL) tea πŸ“πŸ’œπŸ«Ά

πŸ“¦ where this page comes from