86 lines
3.8 KiB
HTML
86 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<style>
|
|
table.head, table.foot { width: 100%; }
|
|
td.head-rtitle, td.foot-os { text-align: right; }
|
|
td.head-vol { text-align: center; }
|
|
div.Pp { margin: 1ex 0ex; }
|
|
</style>
|
|
<link rel="stylesheet" href="style.css" type="text/css" media="all"/>
|
|
<title>CRYPTO_X25519_INVERSE(3MONOCYPHER)</title>
|
|
</head>
|
|
<body>
|
|
<table class="head">
|
|
<tr>
|
|
<td class="head-ltitle">CRYPTO_X25519_INVERSE(3MONOCYPHER)</td>
|
|
<td class="head-vol">3MONOCYPHER</td>
|
|
<td class="head-rtitle">CRYPTO_X25519_INVERSE(3MONOCYPHER)</td>
|
|
</tr>
|
|
</table>
|
|
<div class="manual-text">
|
|
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1>
|
|
<b class="Nm" title="Nm">crypto_x25519_inverse</b> —
|
|
<span class="Nd" title="Nd">X25519 scalar multiplication with the
|
|
multiplicative inverse of a scalar</span>
|
|
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1>
|
|
<b class="In" title="In">#include
|
|
<<a class="In" title="In">monocypher.h</a>></b>
|
|
<div class="Pp"></div>
|
|
<var class="Ft" title="Ft">void</var>
|
|
<br/>
|
|
<b class="Fn" title="Fn">crypto_x25519_inverse</b>(<var class="Fa" title="Fa">uint8_t
|
|
blind_salt[32]</var>, <var class="Fa" title="Fa">const uint8_t
|
|
private_key[32]</var>, <var class="Fa" title="Fa">const uint8_t
|
|
curve_point</var>);
|
|
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1>
|
|
The <b class="Fn" title="Fn">crypto_x25519_inverse</b>() function performs
|
|
scalar multiplication of the multiplicative inverse of a scalar for X25519.
|
|
<b class="Sy" title="Sy">This is a highly advanced, specialized feature</b>;
|
|
unless you are implementing a protocol that requires this specifically,
|
|
<b class="Sy" title="Sy">you likely have no reason to be using these
|
|
functions</b> and are probably looking for
|
|
<a class="Xr" title="Xr" href="crypto_key_exchange.html">crypto_key_exchange(3monocypher)</a>
|
|
or
|
|
<a class="Xr" title="Xr" href="crypto_x25519.html">crypto_x25519(3monocypher)</a>
|
|
instead. Expect elliptic curve jargon on this page.
|
|
<div class="Pp"></div>
|
|
This function is used, for example, with exponential blinding in oblivious
|
|
pseudo-random functions (OPRFs). The arguments are:
|
|
<dl class="Bl-tag">
|
|
<dt class="It-tag"> </dt>
|
|
<dd class="It-tag"> </dd>
|
|
<dt class="It-tag"><var class="Fa" title="Fa">blind_salt</var></dt>
|
|
<dd class="It-tag">The output point.</dd>
|
|
<dt class="It-tag"> </dt>
|
|
<dd class="It-tag"> </dd>
|
|
<dt class="It-tag"><var class="Fa" title="Fa">private_key</var></dt>
|
|
<dd class="It-tag">The private key (scalar) to use. First, the value is
|
|
clamped; then the clamped value's multiplicative inverse (modulo the curve
|
|
order) is determined; the clamped value's multiplicative inverse then has
|
|
its cofactor cleared, and that final value is then used for scalar
|
|
multiplication.</dd>
|
|
<dt class="It-tag"> </dt>
|
|
<dd class="It-tag"> </dd>
|
|
<dt class="It-tag"><var class="Fa" title="Fa">curve_point</var></dt>
|
|
<dd class="It-tag">The curve point on X25519 to multiply with the
|
|
multiplicative inverse (modulo the curve order) of
|
|
<var class="Fa" title="Fa">private_key</var>.</dd>
|
|
</dl>
|
|
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE
|
|
ALSO</a></h1>
|
|
<a class="Xr" title="Xr" href="crypto_x25519.html">crypto_x25519(3monocypher)</a>,
|
|
<a class="Xr" title="Xr" href="intro.html">intro(3monocypher)</a>
|
|
<h1 class="Sh" title="Sh" id="HISTORY"><a class="selflink" href="#HISTORY">HISTORY</a></h1>
|
|
The <b class="Fn" title="Fn">crypto_x25519_inverse</b>() function first appeared
|
|
in Monocypher 3.1.0.</div>
|
|
<table class="foot">
|
|
<tr>
|
|
<td class="foot-date">March 24, 2020</td>
|
|
<td class="foot-os">Linux 4.15.0-106-generic</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|