1 .\" Copyright (c) 2019-2022 Yubico AB. All rights reserved.
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions are
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in
11 .\" the documentation and/or other materials provided with the
14 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18 .\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\" SPDX-License-Identifier: BSD-2-Clause
28 .Dd $Mdocdate: July 15 2022 $
34 .Nm eddsa_pk_from_EVP_PKEY ,
35 .Nm eddsa_pk_from_ptr ,
36 .Nm eddsa_pk_to_EVP_PKEY
37 .Nd FIDO2 COSE EDDSA API
42 .Fn eddsa_pk_new "void"
44 .Fn eddsa_pk_free "eddsa_pk_t **pkp"
46 .Fn eddsa_pk_from_EVP_PKEY "eddsa_pk_t *pk" "const EVP_PKEY *pkey"
48 .Fn eddsa_pk_from_ptr "eddsa_pk_t *pk" "const void *ptr" "size_t len"
50 .Fn eddsa_pk_to_EVP_PKEY "const eddsa_pk_t *pk"
52 EDDSA is the name given in the CBOR Object Signing and Encryption
53 (COSE) RFC to EDDSA over Curve25519 with SHA-512.
56 is an auxiliary API with routines to convert between the different
57 EDDSA public key types used in
64 EDDSA public keys are abstracted by the
70 function returns a pointer to a newly allocated, empty
73 If memory cannot be allocated, NULL is returned.
77 function releases the memory backing
81 must have been previously allocated by
90 may be NULL, in which case
95 .Fn eddsa_pk_from_EVP_PKEY
105 .Fn eddsa_pk_from_ptr
120 .Fn eddsa_pk_to_EVP_PKEY
125 type with a reference count of 1.
126 No internal references to the returned pointer are kept.
128 .Fn eddsa_pk_to_EVP_PKEY
132 .Fn eddsa_pk_from_EVP_PKEY
134 .Fn eddsa_pk_from_ptr
138 On error, a different error code defined in
144 .Xr fido_assert_verify 3 ,
145 .Xr fido_cred_pubkey_ptr 3 ,