430 lines
18 KiB
HTML
430 lines
18 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.2"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>CRS: /home/steaky/git/CRS/src/EllipticCurves/auxiliary.c File Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="475805_1_En_14_Fig2_HTML.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">CRS
|
|
</div>
|
|
<div id="projectbrief">Isogeny-based post-quantum Diffie-Hellman protocol.</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.2 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_97be7e3b2e8c3a17ca81f31233de3221.html">EllipticCurves</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle"><div class="title">auxiliary.c File Reference</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><code>#include "auxiliary.h"</code><br />
|
|
</div><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:ae2c59310b917e14466c1e46c0725bac9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="auxiliary_8c.html#ae2c59310b917e14466c1e46c0725bac9">fq_set_str</a> (fq_t rop, char *s, const fq_ctx_t F)</td></tr>
|
|
<tr class="separator:ae2c59310b917e14466c1e46c0725bac9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a362bd9d12b830d5c6e53d699e2087b59"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="auxiliary_8c.html#a362bd9d12b830d5c6e53d699e2087b59">fq_add_ui</a> (fq_t rop, fq_t op, ulong x, const fq_ctx_t F)</td></tr>
|
|
<tr class="separator:a362bd9d12b830d5c6e53d699e2087b59"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a93b523dfb5e05dbaa7b8df7e284223a4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="auxiliary_8c.html#a93b523dfb5e05dbaa7b8df7e284223a4">fq_add_si</a> (fq_t rop, fq_t op, slong x, const fq_ctx_t F)</td></tr>
|
|
<tr class="separator:a93b523dfb5e05dbaa7b8df7e284223a4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a27c85c9e98f099507babd001784fbae2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="auxiliary_8c.html#a27c85c9e98f099507babd001784fbae2">fq_sub_ui</a> (fq_t rop, fq_t op, ulong x, const fq_ctx_t F)</td></tr>
|
|
<tr class="separator:a27c85c9e98f099507babd001784fbae2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3161c8670760f8fe8795a76eeba26b87"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="auxiliary_8c.html#a3161c8670760f8fe8795a76eeba26b87">fq_sub_si</a> (fq_t rop, fq_t op, slong x, const fq_ctx_t F)</td></tr>
|
|
<tr class="separator:a3161c8670760f8fe8795a76eeba26b87"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a742c1a52d2b2b74b4ad8bb62a7453bc8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="auxiliary_8c.html#a742c1a52d2b2b74b4ad8bb62a7453bc8">fq_div_si</a> (fq_t rop, fq_t op, slong x, const fq_ctx_t F)</td></tr>
|
|
<tr class="separator:a742c1a52d2b2b74b4ad8bb62a7453bc8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4810af5f74404b372d810201b8c29bd2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="auxiliary_8c.html#a4810af5f74404b372d810201b8c29bd2">fq_div_ui</a> (fq_t rop, fq_t op, ulong x, const fq_ctx_t F)</td></tr>
|
|
<tr class="separator:a4810af5f74404b372d810201b8c29bd2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa8df535c19f295d7bf776c31aa2f2633"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="auxiliary_8c.html#aa8df535c19f295d7bf776c31aa2f2633">fq_inv_ui</a> (fq_t rop, ulong op, const fq_ctx_t F)</td></tr>
|
|
<tr class="separator:aa8df535c19f295d7bf776c31aa2f2633"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a93989cc7977a784f186ded0d2f426514"><td class="memItemLeft" align="right" valign="top"><a id="a93989cc7977a784f186ded0d2f426514" name="a93989cc7977a784f186ded0d2f426514"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><b>fmpz_pow</b> (fmpz_t rop, fmpz_t op, fmpz_t n)</td></tr>
|
|
<tr class="separator:a93989cc7977a784f186ded0d2f426514"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7b5e50c7eced842a9530c1ef4021b67d"><td class="memItemLeft" align="right" valign="top"><a id="a7b5e50c7eced842a9530c1ef4021b67d" name="a7b5e50c7eced842a9530c1ef4021b67d"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><b>fmpz_val</b> (fmpz_t rop, fmpz_t op1, fmpz_t op2)</td></tr>
|
|
<tr class="separator:a7b5e50c7eced842a9530c1ef4021b67d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5802d86b1bfcf9fa8bfd5d7f93279a8c"><td class="memItemLeft" align="right" valign="top"><a id="a5802d86b1bfcf9fa8bfd5d7f93279a8c" name="a5802d86b1bfcf9fa8bfd5d7f93279a8c"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><b>fmpz_val_q</b> (fmpz_t rop1, fmpz_t rop2, fmpz_t op1, fmpz_t op2)</td></tr>
|
|
<tr class="separator:a5802d86b1bfcf9fa8bfd5d7f93279a8c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="a93b523dfb5e05dbaa7b8df7e284223a4" name="a93b523dfb5e05dbaa7b8df7e284223a4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a93b523dfb5e05dbaa7b8df7e284223a4">◆ </a></span>fq_add_si()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void fq_add_si </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>rop</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>op</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">slong </td>
|
|
<td class="paramname"><em>x</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const fq_ctx_t </td>
|
|
<td class="paramname"><em>F</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p >Sets rop to the sum of op and x, where x is a slong considered as an element of F. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a362bd9d12b830d5c6e53d699e2087b59" name="a362bd9d12b830d5c6e53d699e2087b59"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a362bd9d12b830d5c6e53d699e2087b59">◆ </a></span>fq_add_ui()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void fq_add_ui </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>rop</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>op</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">ulong </td>
|
|
<td class="paramname"><em>x</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const fq_ctx_t </td>
|
|
<td class="paramname"><em>F</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p >Sets rop to the sum of op and x, where x is an ulong considered as an element of F. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a742c1a52d2b2b74b4ad8bb62a7453bc8" name="a742c1a52d2b2b74b4ad8bb62a7453bc8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a742c1a52d2b2b74b4ad8bb62a7453bc8">◆ </a></span>fq_div_si()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void fq_div_si </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>rop</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>op</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">slong </td>
|
|
<td class="paramname"><em>x</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const fq_ctx_t </td>
|
|
<td class="paramname"><em>F</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p >Sets rop to the quotient of op and x, reducing the output in the given context. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4810af5f74404b372d810201b8c29bd2" name="a4810af5f74404b372d810201b8c29bd2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4810af5f74404b372d810201b8c29bd2">◆ </a></span>fq_div_ui()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void fq_div_ui </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>rop</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>op</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">ulong </td>
|
|
<td class="paramname"><em>x</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const fq_ctx_t </td>
|
|
<td class="paramname"><em>F</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p >Sets rop to the quotient of op and x, reducing the output in the given context. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa8df535c19f295d7bf776c31aa2f2633" name="aa8df535c19f295d7bf776c31aa2f2633"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa8df535c19f295d7bf776c31aa2f2633">◆ </a></span>fq_inv_ui()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void fq_inv_ui </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>rop</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">ulong </td>
|
|
<td class="paramname"><em>op</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const fq_ctx_t </td>
|
|
<td class="paramname"><em>F</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p >Sets rop to the inverse of op, reducing the output in the given context. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae2c59310b917e14466c1e46c0725bac9" name="ae2c59310b917e14466c1e46c0725bac9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae2c59310b917e14466c1e46c0725bac9">◆ </a></span>fq_set_str()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void fq_set_str </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>rop</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"><em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const fq_ctx_t </td>
|
|
<td class="paramname"><em>F</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p >Sets rop to the sum of op and x, where x is a string considered as an element of F. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a3161c8670760f8fe8795a76eeba26b87" name="a3161c8670760f8fe8795a76eeba26b87"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3161c8670760f8fe8795a76eeba26b87">◆ </a></span>fq_sub_si()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void fq_sub_si </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>rop</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>op</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">slong </td>
|
|
<td class="paramname"><em>x</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const fq_ctx_t </td>
|
|
<td class="paramname"><em>F</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p >Sets rop to the sum of op and x, where x is a slong considered as an element of F. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a27c85c9e98f099507babd001784fbae2" name="a27c85c9e98f099507babd001784fbae2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a27c85c9e98f099507babd001784fbae2">◆ </a></span>fq_sub_ui()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void fq_sub_ui </td>
|
|
<td>(</td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>rop</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">fq_t </td>
|
|
<td class="paramname"><em>op</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">ulong </td>
|
|
<td class="paramname"><em>x</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const fq_ctx_t </td>
|
|
<td class="paramname"><em>F</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p >Sets rop to the difference of op and x, where x is an ulong considered as an element of F. </p>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2
|
|
</small></address>
|
|
</body>
|
|
</html>
|