EC_GFP_SIMPLE_METHOD(3ossl)
π NAME π
Okay bestie, so this page is all about getting your hands on EC_METHOD objects β¨ β here's the whole squad: 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, and EC_METHOD_get_field_type.
(Fr fr, the manpage name is EC_GFP_SIMPLE_METHOD, name 3ossl β iconic, no notes π)
πΈ SYNOPSIS πΈ
#include <openssl/ec.h>
Soβ¦ 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 β¨
Lowkey big news first: all those const EC_METHOD *EC_GF* functions got deprecated in OpenSSL 3.0, because EC_METHOD is no longer a public concept. Rip to a real one π
So here's the vibe π« β the Elliptic Curve library serves up a bunch of different implementations through one single common interface. When you're constructing a curve using EC_GROUP_new (peep EC_GROUP_new(3)), you must provide an implementation method. All the functions described here return a const pointer to an EC_METHOD structure that can be passed to EC_GROUP_NEW. And it's important β like, actually important β that you use the correct implementation type for the form of curve you selected. Main character energy only π
For F2^m curves there's literally only one implementation choice, i.e. EC_GF2_simple_method. Slay, no decisions to make π
For Fp curves, the lowest common denominator implementation is the EC_GFp_simple_method implementation β and all the other implementations are based on this one π§
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 64-bit 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. π« Not me getting excited for nothing on some architectures.
Also EC_METHOD_get_field_type() was deprecated in OpenSSL 3.0. Applications should use EC_GROUP_get_field_type() as a replacement (see EC_GROUP_copy(3)). Upgrade your faves, bestie π
π¦ RETURN VALUES π¦
All EC_GFp* functions and EC_GF2m_simple_method always return a const pointer to an EC_METHOD structure. Every single time. No surprises, we love consistency β¨
EC_METHOD_get_field_type returns an integer that identifies the type of field the EC_METHOD structure supports. It's giving "just an int" but make it meaningful π
π 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 them, iykyk π
π 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. That's the whole history section, periodt π
π 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!! this one came from OpenSSL 3.5.6, dated 2026-04-07, and it's filed underEC_GFP_SIMPLE_METHOD(3ossl)β go forth and pick the rightEC_METHOD, ily, bye πβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms