EC_GFP_SIMPLE_METHOD(3ossl)
๐ 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 definingOPENSSL_API_COMPATwith a suitable version value, seeopenssl_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_methodbuilds onEC_GFp_simple_methodbut adds the use of montgomery multiplication (seeBN_mod_mul_montgomery(3)) ๐งฎEC_GFp_nist_methodoffers an implementation optimised for use with NIST recommended curves (NIST curves are available throughEC_GROUP_new_by_curve_nameas described inEC_GROUP_new(3)) ๐
And then the fancy trio:
EC_GFp_nistp224_method,EC_GFp_nistp256_methodandEC_GFp_nistp521_methodoffer 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 ๐
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
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 ยท Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms