aboutsummaryrefslogtreecommitdiff
path: root/vendor/doc/html/crypto_lock_auth_ad.html
blob: 312c5421ef938fb592dfcc797f609ead5bc6140a (plain)
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
<!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_LOCK_INIT(3MONOCYPHER)</title>
</head>
<body>
<table class="head">
  <tr>
    <td class="head-ltitle">CRYPTO_LOCK_INIT(3MONOCYPHER)</td>
    <td class="head-vol">3MONOCYPHER</td>
    <td class="head-rtitle">CRYPTO_LOCK_INIT(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_lock_init</b>,
  <b class="Nm" title="Nm">crypto_lock_auth_ad</b>,
  <b class="Nm" title="Nm">crypto_lock_auth_message</b>,
  <b class="Nm" title="Nm">crypto_lock_update</b>,
  <b class="Nm" title="Nm">crypto_lock_final</b>,
  <b class="Nm" title="Nm">crypto_unlock_init</b>,
  <b class="Nm" title="Nm">crypto_unlock_auth_ad</b>,
  <b class="Nm" title="Nm">crypto_unlock_auth_message</b>,
  <b class="Nm" title="Nm">crypto_unlock_update</b>,
  <b class="Nm" title="Nm">crypto_unlock_final</b> &#x2014;
  <span class="Nd" title="Nd">incremental authenticated encryption with
  additional data</span>
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<b class="In" title="In">#include
  &lt;<a class="In" title="In">monocypher.h</a>&gt;</b>
<div class="Pp"></div>
<var class="Ft" title="Ft">void</var>
<br/>
<b class="Fn" title="Fn">crypto_lock_init</b>(<var class="Fa" title="Fa">crypto_lock_ctx
  *ctx</var>, <var class="Fa" title="Fa">const uint8_t key[32]</var>,
  <var class="Fa" title="Fa">const uint8_t nonce[24]</var>);
<div class="Pp"></div>
<var class="Ft" title="Ft">void</var>
<br/>
<b class="Fn" title="Fn">crypto_lock_auth_ad</b>(<var class="Fa" title="Fa">crypto_lock_ctx
  *ctx</var>, <var class="Fa" title="Fa">const uint8_t *ad</var>,
  <var class="Fa" title="Fa">size_t ad_size</var>);
<div class="Pp"></div>
<var class="Ft" title="Ft">void</var>
<br/>
<b class="Fn" title="Fn">crypto_lock_auth_message</b>(<var class="Fa" title="Fa">crypto_lock_ctx
  *ctx</var>, <var class="Fa" title="Fa">const uint8_t *plain_text</var>,
  <var class="Fa" title="Fa">size_t text_size</var>);
<div class="Pp"></div>
<var class="Ft" title="Ft">void</var>
<br/>
<b class="Fn" title="Fn">crypto_lock_update</b>(<var class="Fa" title="Fa">crypto_lock_ctx
  *ctx</var>, <var class="Fa" title="Fa">uint8_t *cipher_text</var>,
  <var class="Fa" title="Fa">const uint8_t *plain_text</var>,
  <var class="Fa" title="Fa">size_t text_size</var>);
<div class="Pp"></div>
<var class="Ft" title="Ft">void</var>
<br/>
<b class="Fn" title="Fn">crypto_lock_final</b>(<var class="Fa" title="Fa">crypto_lock_ctx
  *ctx</var>, <var class="Fa" title="Fa">uint8_t mac[16]</var>);
<div class="Pp"></div>
<var class="Ft" title="Ft">void</var>
<br/>
<b class="Fn" title="Fn">crypto_unlock_init</b>(<var class="Fa" title="Fa">crypto_unlock_ctx
  *ctx</var>, <var class="Fa" title="Fa">const uint8_t key[32]</var>,
  <var class="Fa" title="Fa">const uint8_t nonce[24]</var>);
<div class="Pp"></div>
<var class="Ft" title="Ft">void</var>
<br/>
<b class="Fn" title="Fn">crypto_unlock_auth_ad</b>(<var class="Fa" title="Fa">crypto_unlock_ctx
  *ctx</var>, <var class="Fa" title="Fa">const uint8_t *ad</var>,
  <var class="Fa" title="Fa">size_t ad_size</var>);
<div class="Pp"></div>
<var class="Ft" title="Ft">void</var>
<br/>
<b class="Fn" title="Fn">crypto_unlock_auth_message</b>(<var class="Fa" title="Fa">crypto_unlock_ctx
  *ctx</var>, <var class="Fa" title="Fa">const uint8_t *plain_text</var>,
  <var class="Fa" title="Fa">size_t text_size</var>);
<div class="Pp"></div>
<var class="Ft" title="Ft">void</var>
<br/>
<b class="Fn" title="Fn">crypto_unlock_update</b>(<var class="Fa" title="Fa">crypto_unlock_ctx
  *ctx</var>, <var class="Fa" title="Fa">uint8_t *plain_text</var>,
  <var class="Fa" title="Fa">const uint8_t *cipher_text</var>,
  <var class="Fa" title="Fa">size_t text_size</var>);
<div class="Pp"></div>
<var class="Ft" title="Ft">int</var>
<br/>
<b class="Fn" title="Fn">crypto_unlock_final</b>(<var class="Fa" title="Fa">crypto_unlock_ctx
  *ctx</var>, <var class="Fa" title="Fa">const uint8_t mac[16]</var>);
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1>
These functions were variants of
  <a class="Xr" title="Xr" href="crypto_lock.html">crypto_lock(3monocypher)</a>,
  <a class="Xr" title="Xr" href="crypto_unlock.html">crypto_unlock(3monocypher)</a>,
  <a class="Xr" title="Xr" href="crypto_lock_aead.html">crypto_lock_aead(3monocypher)</a>
  and
  <a class="Xr" title="Xr" href="crypto_unlock_aead.html">crypto_unlock_aead(3monocypher)</a>.
  They are deprecated in favor of those simpler functions.
<div class="Pp"></div>
Change your protocol so that it does not rely on the removed functions, namely
  by splitting the data into chunks that you can individually use
  <a class="Xr" title="Xr" href="crypto_lock.html">crypto_lock(3monocypher)</a>
  and
  <a class="Xr" title="Xr" href="crypto_unlock.html">crypto_unlock(3monocypher)</a>
  on.
<div class="Pp"></div>
For files in particular, you may alternatively (and suboptimally) attempt to use
  <b class="Fn" title="Fn">mmap</b>() (on *NIX) or
  <b class="Fn" title="Fn">MapViewOfFile</b>() (on Windows) and pass the files
  as mapped memory into
  <a class="Xr" title="Xr" href="crypto_lock.html">crypto_lock(3monocypher)</a>
  and
  <a class="Xr" title="Xr" href="crypto_unlock.html">crypto_unlock(3monocypher)</a>
  instead.
<h1 class="Sh" title="Sh" id="RETURN_VALUES"><a class="selflink" href="#RETURN_VALUES">RETURN
  VALUES</a></h1>
<b class="Fn" title="Fn">crypto_lock_init</b>(),
  <b class="Fn" title="Fn">crypto_unlock_init</b>(),
  <b class="Fn" title="Fn">crypto_lock_auth_ad</b>(),
  <b class="Fn" title="Fn">crypto_unlock_auth_ad</b>(),
  <b class="Fn" title="Fn">crypto_lock_auth_message</b>(),
  <b class="Fn" title="Fn">crypto_unlock_auth_message</b>(),
  <b class="Fn" title="Fn">crypto_lock_update</b>(),
  <b class="Fn" title="Fn">crypto_unlock_update</b>(), and
  <b class="Fn" title="Fn">crypto_lock_final</b>() return nothing.
<div class="Pp"></div>
<b class="Fn" title="Fn">crypto_unlock_final</b>() returns 0 on success or -1 if
  the message was corrupted. Corruption can be caused by transmission errors,
  programmer error, or an attacker's interference.
  <i class="Em" title="Em">Always check the return value</i>.
<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_key_exchange.html">crypto_key_exchange(3monocypher)</a>,
  <a class="Xr" title="Xr" href="crypto_lock.html">crypto_lock(3monocypher)</a>,
  <a class="Xr" title="Xr" href="crypto_lock_aead.html">crypto_lock_aead(3monocypher)</a>,
  <a class="Xr" title="Xr" href="crypto_unlock.html">crypto_unlock(3monocypher)</a>,
  <a class="Xr" title="Xr" href="crypto_unlock_aead.html">crypto_unlock_aead(3monocypher)</a>,
  <a class="Xr" title="Xr" href="crypto_wipe.html">crypto_wipe(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_lock_init</b>(),
  <b class="Fn" title="Fn">crypto_lock_auth_ad</b>(),
  <b class="Fn" title="Fn">crypto_lock_auth_message</b>(),
  <b class="Fn" title="Fn">crypto_lock_update</b>(),
  <b class="Fn" title="Fn">crypto_lock_final</b>(),
  <b class="Fn" title="Fn">crypto_unlock_init</b>(),
  <b class="Fn" title="Fn">crypto_unlock_auth_ad</b>(),
  <b class="Fn" title="Fn">crypto_unlock_auth_message</b>(),
  <b class="Fn" title="Fn">crypto_unlock_update</b>(), and
  <b class="Fn" title="Fn">crypto_unlock_final</b>() functions first appeared in
  Monocypher 1.1.0. <b class="Fn" title="Fn">crypto_lock_aead_auth</b>() and
  <b class="Fn" title="Fn">crypto_unlock_aead_auth</b>() were renamed to
  <b class="Fn" title="Fn">crypto_lock_auth_ad</b>() and
  <b class="Fn" title="Fn">crypto_unlock_auth_ad</b>() respectively in
  Monocypher 2.0.0. They were deprecated in Monocypher 3.0.0 and will be removed
  in Monocypher 4.0.0.</div>
<table class="foot">
  <tr>
    <td class="foot-date">December 12, 2019</td>
    <td class="foot-os">Linux 4.15.0-106-generic</td>
  </tr>
</table>
</body>
</html>