Sindbad~EG File Manager

Current Path : /usr/local/share/doc/libfido2/html/
Upload File :
Current File : //usr/local/share/doc/libfido2/html/es384_pk_from_EC_KEY.html

<!DOCTYPE html>
<html>
<!-- This is an automatically generated file.  Do not edit.
   Copyright (c) 2022 Yubico AB. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are
   met:
  
      1. Redistributions of source code must retain the above copyright
         notice, this list of conditions and the following disclaimer.
      2. Redistributions in binary form must reproduce the above copyright
         notice, this list of conditions and the following disclaimer in
         the documentation and/or other materials provided with the
         distribution.
  
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   SPDX-License-Identifier: BSD-2-Clause
   -->
<head>
  <meta charset="utf-8"/>
  <link rel="stylesheet" href="style.css" type="text/css" media="all"/>
  <title>ES384_PK_NEW(3)</title>
</head>
<body>
<table class="head">
  <tr>
    <td class="head-ltitle">ES384_PK_NEW(3)</td>
    <td class="head-vol">FreeBSD Library Functions Manual</td>
    <td class="head-rtitle">ES384_PK_NEW(3)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<code class="Nm">es384_pk_new</code>, <code class="Nm">es384_pk_free</code>,
  <code class="Nm">es384_pk_from_EC_KEY</code>,
  <code class="Nm">es384_pk_from_EVP_PKEY</code>,
  <code class="Nm">es384_pk_from_ptr</code>,
  <code class="Nm">es384_pk_to_EVP_PKEY</code> &#x2014;
<div class="Nd">FIDO2 COSE ES384 API</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<code class="In">#include &lt;<a class="In">openssl/ec.h</a>&gt;</code>
<br/>
<code class="In">#include &lt;<a class="In">fido/es384.h</a>&gt;</code>
<p class="Pp"><var class="Ft">es384_pk_t *</var>
  <br/>
  <code class="Fn">es384_pk_new</code>(<var class="Fa" style="white-space: nowrap;">void</var>);</p>
<p class="Pp"><var class="Ft">void</var>
  <br/>
  <code class="Fn">es384_pk_free</code>(<var class="Fa" style="white-space: nowrap;">es384_pk_t
    **pkp</var>);</p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">es384_pk_from_EC_KEY</code>(<var class="Fa" style="white-space: nowrap;">es384_pk_t
    *pk</var>, <var class="Fa" style="white-space: nowrap;">const EC_KEY
    *ec</var>);</p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">es384_pk_from_EVP_PKEY</code>(<var class="Fa" style="white-space: nowrap;">es384_pk_t
    *pk</var>, <var class="Fa" style="white-space: nowrap;">const EVP_PKEY
    *pkey</var>);</p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">es384_pk_from_ptr</code>(<var class="Fa" style="white-space: nowrap;">es384_pk_t
    *pk</var>, <var class="Fa" style="white-space: nowrap;">const void
    *ptr</var>, <var class="Fa" style="white-space: nowrap;">size_t
  len</var>);</p>
<p class="Pp"><var class="Ft">EVP_PKEY *</var>
  <br/>
  <code class="Fn">es384_pk_to_EVP_PKEY</code>(<var class="Fa" style="white-space: nowrap;">const
    es384_pk_t *pk</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
ES384 is the name given in the CBOR Object Signing and Encryption (COSE) RFC to
  ECDSA over P-384 with SHA-384. The COSE ES384 API of
  <i class="Em">libfido2</i> is an auxiliary API with routines to convert
  between the different ECDSA public key types used in
  <i class="Em">libfido2</i> and <i class="Em">OpenSSL</i>.
<p class="Pp">In <i class="Em">libfido2</i>, ES384 public keys are abstracted by
    the <var class="Vt">es384_pk_t</var> type.</p>
<p class="Pp">The <code class="Fn">es384_pk_new</code>() function returns a
    pointer to a newly allocated, empty <var class="Vt">es384_pk_t</var> type.
    If memory cannot be allocated, NULL is returned.</p>
<p class="Pp">The <code class="Fn">es384_pk_free</code>() function releases the
    memory backing <var class="Fa">*pkp</var>, where <var class="Fa">*pkp</var>
    must have been previously allocated by
    <code class="Fn">es384_pk_new</code>(). On return,
    <var class="Fa">*pkp</var> is set to NULL. Either <var class="Fa">pkp</var>
    or <var class="Fa">*pkp</var> may be NULL, in which case
    <code class="Fn">es384_pk_free</code>() is a NOP.</p>
<p class="Pp">The <code class="Fn">es384_pk_from_EC_KEY</code>() function fills
    <var class="Fa">pk</var> with the contents of <var class="Fa">ec</var>. No
    references to <var class="Fa">ec</var> are kept.</p>
<p class="Pp">The <code class="Fn">es384_pk_from_EVP_PKEY</code>() function
    fills <var class="Fa">pk</var> with the contents of
    <var class="Fa">pkey</var>. No references to <var class="Fa">pkey</var> are
    kept.</p>
<p class="Pp">The <code class="Fn">es384_pk_from_ptr</code>() function fills
    <var class="Fa">pk</var> with the contents of <var class="Fa">ptr</var>,
    where <var class="Fa">ptr</var> points to <var class="Fa">len</var> bytes.
    The <var class="Fa">ptr</var> pointer may point to an uncompressed point, or
    to the concatenation of the x and y coordinates. No references to
    <var class="Fa">ptr</var> are kept.</p>
<p class="Pp">The <code class="Fn">es384_pk_to_EVP_PKEY</code>() function
    converts <var class="Fa">pk</var> to a newly allocated
    <var class="Fa">EVP_PKEY</var> type with a reference count of 1. No internal
    references to the returned pointer are kept. If an error occurs,
    <code class="Fn">es384_pk_to_EVP_PKEY</code>() returns NULL.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
  VALUES</a></h1>
The <code class="Fn">es384_pk_from_EC_KEY</code>(),
  <code class="Fn">es384_pk_from_EVP_PKEY</code>(), and
  <code class="Fn">es384_pk_from_ptr</code>() functions return
  <code class="Dv">FIDO_OK</code> on success. On error, a different error code
  defined in <code class="In">&lt;<a class="In">fido/err.h</a>&gt;</code> is
  returned.
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<a class="Xr" href="eddsa_pk_new.html">eddsa_pk_new(3)</a>,
  <a class="Xr" href="es256_pk_new.html">es256_pk_new(3)</a>,
  <a class="Xr" href="fido_assert_verify.html">fido_assert_verify(3)</a>,
  <a class="Xr" href="fido_cred_pubkey_ptr.html">fido_cred_pubkey_ptr(3)</a>,
  <a class="Xr" href="rs256_pk_new.html">rs256_pk_new(3)</a>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">July 15, 2022</td>
    <td class="foot-os">Yubico&#x00A0;AB</td>
  </tr>
</table>
</body>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists