EVP_PKEY_GET_FIELD_TYPE(3ossl)
π EVP_PKEY_GET_FIELD_TYPE π
okay bestie, welcome to the OpenSSL manual for EVP_PKEY_GET_FIELD_TYPE(3ossl) β yes that's the whole squad name up there, and honestly? iconic of them to give two functions one page. sit down, grab a boba, we're learning crypto key internals π§β¨
β¨ NAME β¨
EVP_PKEY_get_field_type, EVP_PKEY_get_ec_point_conv_form β get the field type or the point conversion form of a key π
πΈ SYNOPSIS πΈ
#include <openssl/evp.h>
int EVP_PKEY_get_field_type(const EVP_PKEY *pkey);
int EVP_PKEY_get_ec_point_conv_form(const EVP_PKEY *pkey);
like, two lil functions, both taking a const EVP_PKEY *pkey, both returning an int. no cap, that's the whole vibe π«Ά
π¦ DESCRIPTION π¦
so EVP_PKEY_get_field_type() returns the field type NID of the pkey, if pkey's key type supports it. the types the built-in OpenSSL providers currently support are either:
NID_X9_62_prime_fieldβ for prime curves π₯NID_X9_62_characteristic_two_fieldβ for binary curves π
and those values are defined in the <openssl/obj_mac.h> header file, iykyk.
meanwhile EVP_PKEY_get_ec_point_conv_form() returns the point conversion format of the pkey, again if pkey's key type supports it. that's it. that's the function. main character energy fr π
π NOTES π
among the standard OpenSSL key types, this is only supported for EC and SM2 keys. like, those two. that's the list.
but β plot twist β other providers may support this for additional key types, so don't come for me if your third-party provider is doing its own thing π
π RETURN VALUES π
EVP_PKEY_get_field_type()β returns the field type NID, or0on error πEVP_PKEY_get_ec_point_conv_form()β returns the point conversion format number (peepEC_GROUP_copy(3)for that one), or0on error π
bestie,0means error in both cases. don't be out here treating0as a real value. it is not. π
π SEE ALSO π
β HISTORY β
these functions were added in OpenSSL 3.0 β¨ so if you're on something ancient, that's a you problem, bestie.
π COPYRIGHT π
Copyright 2021 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>.
okay that's the whole page, you ate that π go forth and get your field types. and just so you know where this all came from: this was the OpenSSL 3.5.9 manual page, dated 2026-09-29. slay, bye ππ¦β¨
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms