ES384_PK_NEW(3)
π ES384_PK_NEW β bestie edition π
okay so this is the manual for es384_pk_new(3) and friends, living happily in the Library Functions Manual section. it's the FIDO2 COSE ES384 API and it's literally just a little squad of functions that help you move ECDSA public keys between libfido2 and OpenSSL. no cap. π
β¨ NAME β¨
es384_pk_new, es384_pk_free, es384_pk_from_EC_KEY, es384_pk_from_EVP_PKEY, es384_pk_from_ptr, es384_pk_to_EVP_PKEY β the FIDO2 COSE ES384 API π¦
πΈ SYNOPSIS πΈ
#include <openssl/ec.h>
#include <fido/es384.h>
es384_pk_t *
es384_pk_new(void);
void
es384_pk_free(es384_pk_t **pkp);
int
es384_pk_from_EC_KEY(es384_pk_t *pk, const EC_KEY *ec);
int
es384_pk_from_EVP_PKEY(es384_pk_t *pk, const EVP_PKEY *pkey);
int
es384_pk_from_ptr(es384_pk_t *pk, const void *ptr, size_t len);
EVP_PKEY *
es384_pk_to_EVP_PKEY(const es384_pk_t *pk);
π DESCRIPTION π
so ES384 is the name the CBOR Object Signing and Encryption (COSE) RFC gave to ECDSA over P-384 with SHA-384. and the COSE ES384 API in libfido2? it's an auxiliary API β a lil sidekick β with routines that convert between the different ECDSA public key types floating around in libfido2 and OpenSSL. it's giving translator energy fr fr. π«Ά
in libfido2, ES384 public keys are abstracted by the es384_pk_t type. that's the moment. π
es384_pk_new()β hands you back a pointer to a freshly allocated, emptyes384_pk_t. if memory can't be allocated, you getNULLback. sad but true. πes384_pk_free()β releases the memory backing*pkp, and bestie,*pkpmust have been previously allocated byes384_pk_new(). on return,*pkpis set toNULL. and here's the chill part: eitherpkpor*pkpmay beNULL, and in that casees384_pk_free()is a NOP. no drama, no crash. β¨es384_pk_from_EC_KEY()β fillspkwith the contents ofec. no references toecare kept β it's a copy situation, not a situationship. πes384_pk_from_EVP_PKEY()β fillspkwith the contents ofpkey. again, no references topkeyare kept. π¦es384_pk_from_ptr()β fillspkwith the contents ofptr, whereptrpoints tolenbytes. andptrcan point to either an uncompressed point or the concatenation of the x and y coordinates β both are valid, she contains multitudes. no references toptrare kept. πΈes384_pk_to_EVP_PKEY()β convertspkinto a newly allocatedEVP_PKEYtype with a reference count of 1. no internal references to the returned pointer are kept. and if something goes wrong? it returnsNULL. π
π RETURN VALUES π
es384_pk_from_EC_KEY(), es384_pk_from_EVP_PKEY(), and es384_pk_from_ptr() all return FIDO_OK when they succeed. when they don't, you get a different error code defined over in <fido/err.h>. check it, bestie, it'll tell you what went down. π
lowkey important: FIDO_OK is the only happy answer here β anything else means something went sideways.
π SEE ALSO π
go read those too, they're the rest of the friend group. π«Ά
and that's the whole page, bestie!! this one shipped from Debian and it's dated July 15, 2022 β iconic vintage behavior honestly. now go forth and convert those keys. slay. π β¨π
π¦ where this page comes from
- alpine 3.22: libfido2-doc 1.16.0-r0 Β· BSD-2-Clause
- alpine 3.23: libfido2-doc 1.16.0-r2 Β· BSD-2-Clause
- alpine 3.24: libfido2-doc 1.16.0-r4 Β· BSD-2-Clause
- arch rolling: libfido2 1.17.0-1 Β· BSD-2-Clause
- centos-stream 10: libfido2-devel 1.14.0-7.el10 Β· BSD-2-Clause
- centos-stream 9: libfido2-devel 1.13.0-2.el9 Β· BSD
- centos-stream 9: libfido2-devel 1.13.0-2.el9 Β· BSD
- debian bookworm: libfido2-doc 1.12.0-2 Β· BSD-2-Clause
- debian trixie: libfido2-doc 1.15.0-1 Β· BSD-2-Clause
- fedora 43: libfido2-devel 1.16.0-3.fc43 Β· BSD-2-Clause
- fedora 43: libfido2-devel 1.16.0-3.fc43 Β· BSD-2-Clause
- fedora 44: libfido2-devel 1.16.0-5.fc44 Β· BSD-2-Clause
- fedora 44: libfido2-devel 1.16.0-5.fc44 Β· BSD-2-Clause
- nixos 26.05: fido2-manage 0-unstable-2025-06-06
- nixpkgs unstable: fido2-manage 0-unstable-2025-06-06
- nixpkgs unstable: libfido2 1.17.0
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- ubuntu noble: libfido2-doc 1.14.0-1build3 Β· BSD-2-Clause
- ubuntu questing: libfido2-doc 1.16.0-2
- ubuntu resolute: libfido2-doc 1.16.0-2build1 Β· BSD-2-Clause
- ubuntu stonking: libfido2-doc 1.17.0-2build1 Β· BSD-2-Clause
- π the page's license: BSD-2-Clause
- Copyright (c) 2022 Yubico AB. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms