EC_GFP_SIMPLE_METHOD(3ossl)

๐Ÿ“ฆ version 3.5.0, in opensuse-leap 16.0

๐Ÿ’… EC_GFP_SIMPLE_METHOD โ€” the OpenSSL 3ossl one ๐ŸŽ€

okay bestie, so this page is literally all about how you get your hands on one of those EC_METHOD objects โœจ It's <pink>EC_GFp_simple_method(3ossl)</pink> in the OpenSSL manual, and it's giving very much "the lore behind the elliptic curve backend choices" energy. Buckle up ๐Ÿฆ‹


โœจ 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 โ€” these are the functions for obtaining EC_METHOD objects ๐Ÿซถ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <openssl/ec.h>
โš ๏ธ heads up bestie โ€” 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, see openssl_user_macros(7):
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. All the const EC_METHOD *EC_GF* functions were deprecated in OpenSSL 3.0, because EC_METHOD is literally no longer a public concept. iconic behaviour of them to just demote it like that ๐Ÿ’€

The Elliptic Curve library serves up a bunch of different implementations behind one single common interface โœจ When you construct a curve using EC_GROUP_new (peep EC_GROUP_new(3)), an implementation method must be provided. All the functions here return a const pointer to an EC_METHOD structure that you can pass to EC_GROUP_NEW. And likeโ€ฆ it's genuinely important that you use the correct implementation type for the form of curve you selected, no cap ๐Ÿ”ฅ

For F2^m curves there's only one implementation choice, i.e. EC_GF2_simple_method โ€” one option, no decisions, main character only ๐Ÿ‘‘

For Fp curves, the lowest common denominator implementation is the EC_GFp_simple_method implementation โ€” everything else is built on top of it, it's the blueprint fr fr. Specifically:

  • 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 the fancy trio:

  • 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 vibe check your target before you commit, bestie.

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


๐ŸŽ€ RETURN VALUES ๐ŸŽ€

All EC_GFp* functions and EC_GF2m_simple_method always return a const pointer to an EC_METHOD structure ๐Ÿ’ซ

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) ๐ŸŒˆ


โญ 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 ๐Ÿ’€


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


and that's the whole page bestie, mwah ๐Ÿ’‹ โ€” this one's from OpenSSL 3.5.0, dated 2026-09-25, page EC_GFP_SIMPLE_METHOD(3ossl). go forth and pick your curve implementation wisely ๐Ÿงšโ€โ™€๏ธ๐Ÿ’–

๐Ÿ“ฆ where this page comes from