This file is indexed.

/usr/share/doc/libgcrypt11-doc/html/Calculations.html is in libgcrypt11-doc 1.5.3-2ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This manual is for Libgcrypt
(version 1.5.3, 17 December 2013),
which is GNU's library of cryptographic building blocks.

Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. The text of the license can be found in the
section entitled "GNU General Public License". -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>The Libgcrypt Reference Manual: Calculations</title>

<meta name="description" content="The Libgcrypt Reference Manual: Calculations">
<meta name="keywords" content="The Libgcrypt Reference Manual: Calculations">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="MPI-library.html#MPI-library" rel="up" title="MPI library">
<link href="Comparisons.html#Comparisons" rel="next" title="Comparisons">
<link href="MPI-formats.html#MPI-formats" rel="prev" title="MPI formats">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Calculations"></a>
<div class="header">
<p>
Next: <a href="Comparisons.html#Comparisons" accesskey="n" rel="next">Comparisons</a>, Previous: <a href="MPI-formats.html#MPI-formats" accesskey="p" rel="prev">MPI formats</a>, Up: <a href="MPI-library.html#MPI-library" accesskey="u" rel="up">MPI library</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Calculations-1"></a>
<h3 class="section">11.4 Calculations</h3>

<p>Basic arithmetic operations:
</p>
<dl>
<dt><a name="index-gcry_005fmpi_005fadd"></a>Function: <em>void</em> <strong>gcry_mpi_add</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>v</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> + <var>v</var></em>.
</p></dd></dl>


<dl>
<dt><a name="index-gcry_005fmpi_005fadd_005fui"></a>Function: <em>void</em> <strong>gcry_mpi_add_ui</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, unsigned&nbsp;long&nbsp;<var>v</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> + <var>v</var></em>.  Note that <var>v</var> is an unsigned integer.
</p></dd></dl>


<dl>
<dt><a name="index-gcry_005fmpi_005faddm"></a>Function: <em>void</em> <strong>gcry_mpi_addm</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>v</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>m</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> + <var>v</var> \bmod <var>m</var></em>.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fsub"></a>Function: <em>void</em> <strong>gcry_mpi_sub</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>v</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> - <var>v</var></em>.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fsub_005fui"></a>Function: <em>void</em> <strong>gcry_mpi_sub_ui</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, unsigned&nbsp;long&nbsp;<var>v</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> - <var>v</var></em>.  <var>v</var> is an unsigned integer.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fsubm"></a>Function: <em>void</em> <strong>gcry_mpi_subm</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>v</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>m</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> - <var>v</var> \bmod <var>m</var></em>.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fmul"></a>Function: <em>void</em> <strong>gcry_mpi_mul</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>v</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> * <var>v</var></em>.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fmul_005fui"></a>Function: <em>void</em> <strong>gcry_mpi_mul_ui</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, unsigned&nbsp;long&nbsp;<var>v</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> * <var>v</var></em>.  <var>v</var> is an unsigned integer.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fmulm"></a>Function: <em>void</em> <strong>gcry_mpi_mulm</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>v</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>m</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> * <var>v</var> \bmod <var>m</var></em>.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fmul_005f2exp"></a>Function: <em>void</em> <strong>gcry_mpi_mul_2exp</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>u</var><!-- /@w -->, unsigned&nbsp;long&nbsp;<var>e</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>u</var> * 2^e</em>.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fdiv"></a>Function: <em>void</em> <strong>gcry_mpi_div</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>q</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>r</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>dividend</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>divisor</var><!-- /@w -->, int&nbsp;<var>round</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>q</var> = <var>dividend</var> / <var>divisor</var></em>, <em><var>r</var> =
<var>dividend</var> \bmod <var>divisor</var></em>.  <var>q</var> and <var>r</var> may be passed
as <code>NULL</code>.  <var>round</var> should be negative or 0.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fmod"></a>Function: <em>void</em> <strong>gcry_mpi_mod</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>r</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>dividend</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>divisor</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>r</var> = <var>dividend</var> \bmod <var>divisor</var></em>.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fpowm"></a>Function: <em>void</em> <strong>gcry_mpi_powm</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>w</var><!-- /@w -->, const&nbsp;<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>b</var><!-- /@w -->, const&nbsp;<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>e</var><!-- /@w -->, const&nbsp;<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>m</var><!-- /@w -->)</em></dt>
<dd>
<p><em><var>w</var> = <var>b</var>^e \bmod <var>m</var></em>.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005fgcd"></a>Function: <em>int</em> <strong>gcry_mpi_gcd</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>g</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>a</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>b</var><!-- /@w -->)</em></dt>
<dd>
<p>Set <var>g</var> to the greatest common divisor of <var>a</var> and <var>b</var>.
Return true if the <var>g</var> is 1.
</p></dd></dl>

<dl>
<dt><a name="index-gcry_005fmpi_005finvm"></a>Function: <em>int</em> <strong>gcry_mpi_invm</strong> <em>(<span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>x</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>a</var><!-- /@w -->, <span class="nolinebreak">gcry_mpi_t</span>&nbsp;<var>m</var><!-- /@w -->)</em></dt>
<dd>
<p>Set <var>x</var> to the multiplicative inverse of <em><var>a</var> \bmod <var>m</var></em>.
Return true if the inverse exists.
</p></dd></dl>


<hr>
<div class="header">
<p>
Next: <a href="Comparisons.html#Comparisons" accesskey="n" rel="next">Comparisons</a>, Previous: <a href="MPI-formats.html#MPI-formats" accesskey="p" rel="prev">MPI formats</a>, Up: <a href="MPI-library.html#MPI-library" accesskey="u" rel="up">MPI library</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>