Debian Codegraph @

lib/kcapi-md.c

raw symbols SCIP
1 /* Kernel crypto API AF_ALG Message Digest API
2 *
3 * Copyright (C) 2016 - 2022, Stephan Mueller <[email protected]>
4 *
5 * License: see COPYING file in root directory
6 *
7 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
8 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
9 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
10 * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
11 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
12 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
13 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
14 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
15 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
16 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
17 * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
18 * DAMAGE.
19 */
20
21 #include "internal.h"cxx . . $ `<file>/lib/internal.h`/
22 #include "kcapi.h"cxx . . $ `<file>/lib/kcapi.h`/
23
24 int kcapi_md_initcxx . . $ kcapi_md_init(b54728dab28c239a).(struct kcapi_handlecxx . . $ kcapi_handle# **handle, const char *ciphername,
25 uint32_tcxx . . $ uint32_t# flags)
26 {
27 return _kcapi_handle_initcxx . . $ _kcapi_handle_init(db986b7fadb21840).(handle, "hash", ciphername, flags);
28 }
29
30 void kcapi_md_destroycxx . . $ kcapi_md_destroy(aba29416d24fdd59).(struct kcapi_handlecxx . . $ kcapi_handle# *handle)
31 {
32 _kcapi_handle_destroycxx . . $ _kcapi_handle_destroy(aba29416d24fdd59).(handle);
33 }
34
35 int kcapi_md_setkeycxx . . $ kcapi_md_setkey(4d0e261613a805ee).(struct kcapi_handlecxx . . $ kcapi_handle# *handle,
36 const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen)
37 {
38 return _kcapi_common_setkeycxx . . $ _kcapi_common_setkey(4d0e261613a805ee).(handle, key, keylen);
39 }
40
41 static inline ssize_tcxx . . $ ssize_t# _kcapi_md_updatecxx . . $ _kcapi_md_update(1f5d0f6abfafb9e8).(struct kcapi_handlecxx . . $ kcapi_handle# *handle,
42 const uint8_tcxx . . $ uint8_t# *buffer, size_t len)
43 {
44 ssize_tcxx . . $ ssize_t# ret = 0;
45
46 if (len > INT_MAXcxx . . $ `<external>/67164224788392828/limits.h:120:9`!)
47 return -EMSGSIZEcxx . . $ `<external>/17922322188510340118/errno.h:74:9`!;
48
49 /* zero buffer length cannot be handled via splice */
50 if (len < (1<<15)) {
51 ret = _kcapi_common_acceptcxx . . $ _kcapi_common_accept(cad780c06c088da8).(handle);
52 if (ret)
53 return ret;
54 ret = sendcxx . . $ send(4e364047dcdcb5ca).(*_kcapi_get_opfdcxx . . $ _kcapi_get_opfd(f39930546eae134b).(handle), buffer, len, MSG_MOREcxx . . $ `<external>/8962547315054503424/socket.h:244:9`!);
55 } else {
56 ret = _kcapi_common_vmsplice_chunkcxx . . $ _kcapi_common_vmsplice_chunk(1f8f8f1822879a).(handle, buffer, len,
57 SPLICE_F_MOREcxx . . $ `<external>/14578502075116107718/fcntl-linux.h:350:10`!);
58 }
59
60 if (ret < 0)
61 return ret;
62 if ((uint32_tcxx . . $ uint32_t#)ret < len)
63 return -EIOcxx . . $ `<external>/8987895939074593727/errno-base.h:9:9`!;
64
65 handle->processed_sgcxx . . $ kcapi_handle#processed_sg. += 1;
66 return 0;
67 }
68
69 ssize_tcxx . . $ ssize_t# kcapi_md_updatecxx . . $ kcapi_md_update(1f5d0f6abfafb9e8).(struct kcapi_handlecxx . . $ kcapi_handle# *handle,
70 const uint8_tcxx . . $ uint8_t# *buffer, size_t len)
71 {
72 return _kcapi_md_updatecxx . . $ _kcapi_md_update(1f5d0f6abfafb9e8).(handle, buffer, len);
73 }
74
75 static ssize_tcxx . . $ ssize_t# _kcapi_md_finalcxx . . $ _kcapi_md_final(e37e70272ed35378).(struct kcapi_handlecxx . . $ kcapi_handle# *handle,
76 uint8_tcxx . . $ uint8_t# *buffer, size_t len)
77 {
78 struct ioveccxx . . $ iovec# iov;
79 struct kcapi_handle_tfmcxx . . $ kcapi_handle_tfm# *tfm = handle->tfmcxx . . $ kcapi_handle#tfm.;
80
81 if (!buffer || !len) {
82 kcapi_dologcxx . . $ kcapi_dolog(5f46d8f16dd28dce).(KCAPI_LOG_ERRcxx . . $ KCAPI_LOG_ERR.,
83 "Message digest: output buffer too small (seen %lu - required %u)",
84 (unsigned long)len, tfm->infocxx . . $ kcapi_handle_tfm#info..hash_digestsizecxx . . $ kcapi_cipher_info#hash_digestsize.);
85 return -EINVALcxx . . $ `<external>/8987895939074593727/errno-base.h:26:9`!;
86 }
87
88 /* Work around zero-sized hashing bug in pre-4.9 kernels: */
89 if (!handle->flagscxx . . $ kcapi_handle#flags..ge_v4_9cxx . . $ kcapi_flags#ge_v4_9. && !handle->processed_sgcxx . . $ kcapi_handle#processed_sg.)
90 _kcapi_md_updatecxx . . $ _kcapi_md_update(1f5d0f6abfafb9e8).(handle, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0);
91
92 iov.iov_basecxx . . $ iovec#iov_base. = (void*)(uintptr_tcxx . . $ uintptr_t#)buffer;
93 iov.iov_lencxx . . $ iovec#iov_len. = len;
94 return _kcapi_common_recv_datacxx . . $ _kcapi_common_recv_data(8a8f5b62e036cb66).(handle, &iov, 1);
95 }
96
97 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_final, "1.3.1")
98 ssize_tcxx . . $ ssize_t# impl_md_finalcxx . . $ impl_md_final(e37e70272ed35378).(struct kcapi_handlecxx . . $ kcapi_handle# *handle,
99 uint8_tcxx . . $ uint8_t# *buffer, size_t len)
100 {
101 return _kcapi_md_finalcxx . . $ _kcapi_md_final(e37e70272ed35378).(handle, buffer, len);
102 }
103
104 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_final, "0.12.0")
105 int32_tcxx . . $ int32_t# orig_md_finalcxx . . $ orig_md_final(1245f63d3d64d4aa).(struct kcapi_handlecxx . . $ kcapi_handle# *handle,
106 uint8_tcxx . . $ uint8_t# *buffer, uint32_tcxx . . $ uint32_t# len)
107 {
108 return (int32_tcxx . . $ int32_t#)_kcapi_md_finalcxx . . $ _kcapi_md_final(e37e70272ed35378).(handle, buffer, len);
109 }
110
111 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_digest, "1.3.1")
112 ssize_tcxx . . $ ssize_t# impl_md_digestcxx . . $ impl_md_digest(6368db0609283dea).(struct kcapi_handlecxx . . $ kcapi_handle# *handle,
113 const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
114 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
115 {
116 ssize_tcxx . . $ ssize_t# ret = 0;
117
118 ret = _kcapi_md_updatecxx . . $ _kcapi_md_update(1f5d0f6abfafb9e8).(handle, in, inlen);
119 if (0 > ret)
120 return ret;
121 return _kcapi_md_finalcxx . . $ _kcapi_md_final(e37e70272ed35378).(handle, out, outlen);
122 }
123
124 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_digest, "0.12.0")
125 int32_tcxx . . $ int32_t# orig_md_digestcxx . . $ orig_md_digest(176ccef7f2585128).(struct kcapi_handlecxx . . $ kcapi_handle# *handle,
126 const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
127 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
128 {
129 return (int32_tcxx . . $ int32_t#)impl_md_digestcxx . . $ impl_md_digest(6368db0609283dea).(handle, in, inlen, out, outlen);
130 }
131
132 uint32_tcxx . . $ uint32_t# kcapi_md_digestsizecxx . . $ kcapi_md_digestsize(994c7fcc3809be77).(struct kcapi_handlecxx . . $ kcapi_handle# *handle)
133 {
134 struct kcapi_handle_tfmcxx . . $ kcapi_handle_tfm# *tfm = handle->tfmcxx . . $ kcapi_handle#tfm.;
135
136 return tfm->infocxx . . $ kcapi_handle_tfm#info..hash_digestsizecxx . . $ kcapi_cipher_info#hash_digestsize.;
137 }
138
139 uint32_tcxx . . $ uint32_t# kcapi_md_blocksizecxx . . $ kcapi_md_blocksize(994c7fcc3809be77).(struct kcapi_handlecxx . . $ kcapi_handle# *handle)
140 {
141 struct kcapi_handle_tfmcxx . . $ kcapi_handle_tfm# *tfm = handle->tfmcxx . . $ kcapi_handle#tfm.;
142
143 return tfm->infocxx . . $ kcapi_handle_tfm#info..blocksizecxx . . $ kcapi_cipher_info#blocksize.;
144 }
145
146 static inline ssize_tcxx . . $ ssize_t# kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).(const char *name,
147 const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
148 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
149 {
150 struct kcapi_handlecxx . . $ kcapi_handle# *handle;
151 ssize_tcxx . . $ ssize_t# ret = _kcapi_handle_initcxx . . $ _kcapi_handle_init(db986b7fadb21840).(&handle, "hash", name, 0);
152
153 if (ret)
154 return ret;
155
156 ret = kcapi_md_digestcxx . . $ kcapi_md_digest(6368db0609283dea).(handle, in, inlen, out, outlen);
157
158 _kcapi_handle_destroycxx . . $ _kcapi_handle_destroy(aba29416d24fdd59).(handle);
159
160 return ret;
161 }
162
163 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_sha1, "1.3.1")
164 ssize_tcxx . . $ ssize_t# impl_md_sha1cxx . . $ impl_md_sha1(238794e3f4f6fd4d).(const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
165 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
166 {
167 return kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha1", in, inlen, out, outlen);
168 }
169
170 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_sha1, "1.0.0")
171 int32_tcxx . . $ int32_t# orig_md_sha1cxx . . $ orig_md_sha1(9af98eb523bd8fe0).(const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
172 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
173 {
174 return (int32_tcxx . . $ int32_t#)kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha1", in, inlen, out, outlen);
175 }
176
177 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_sha224, "1.3.1")
178 ssize_tcxx . . $ ssize_t# impl_md_sha224cxx . . $ impl_md_sha224(238794e3f4f6fd4d).(const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
179 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
180 {
181 return kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha224", in, inlen, out, outlen);
182 }
183
184 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_sha224, "1.0.0")
185 int32_tcxx . . $ int32_t# orig_md_sha224cxx . . $ orig_md_sha224(9af98eb523bd8fe0).(const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
186 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
187 {
188 return (int32_tcxx . . $ int32_t#)kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha224", in, inlen, out, outlen);
189 }
190
191 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_sha256, "1.3.1")
192 ssize_tcxx . . $ ssize_t# impl_md_sha256cxx . . $ impl_md_sha256(238794e3f4f6fd4d).(const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
193 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
194 {
195 return kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha256", in, inlen, out, outlen);
196 }
197
198 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_sha256, "1.0.0")
199 ssize_tcxx . . $ ssize_t# orig_md_sha256cxx . . $ orig_md_sha256(8bca5f1da1cb5096).(const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
200 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
201 {
202 return (int32_tcxx . . $ int32_t#)kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha256", in, inlen, out, outlen);
203 }
204
205 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_sha384, "1.3.1")
206 ssize_tcxx . . $ ssize_t# impl_md_sha384cxx . . $ impl_md_sha384(238794e3f4f6fd4d).(const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
207 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
208 {
209 return kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha384", in, inlen, out, outlen);
210 }
211
212 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_sha384, "1.0.0")
213 int32_tcxx . . $ int32_t# orig_md_sha384cxx . . $ orig_md_sha384(9af98eb523bd8fe0).(const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
214 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
215 {
216 return (int32_tcxx . . $ int32_t#)kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha384", in, inlen, out, outlen);
217 }
218
219 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_sha512, "1.3.1")
220 ssize_tcxx . . $ ssize_t# impl_md_sha512cxx . . $ impl_md_sha512(238794e3f4f6fd4d).(const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
221 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
222 {
223 return kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha512", in, inlen, out, outlen);
224 }
225
226 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_sha512, "1.0.0")
227 int32_tcxx . . $ int32_t# orig_md_sha512cxx . . $ orig_md_sha512(9af98eb523bd8fe0).(const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
228 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
229 {
230 return (int32_tcxx . . $ int32_t#)kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sha512", in, inlen, out, outlen);
231 }
232
233 ssize_tcxx . . $ ssize_t# kcapi_md_sm3cxx . . $ kcapi_md_sm3(238794e3f4f6fd4d).(const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
234 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
235 {
236 return kcapi_md_conv_commoncxx . . $ kcapi_md_conv_common(4ee8f5a610ce7621).("sm3", in, inlen, out, outlen);
237 }
238
239 static inline ssize_tcxx . . $ ssize_t# kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).(const char *name,
240 const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
241 const uint8_tcxx . . $ uint8_t# *in, size_t inlen, uint8_tcxx . . $ uint8_t# *out, size_t outlen)
242 {
243 struct kcapi_handlecxx . . $ kcapi_handle# *handle;
244 ssize_tcxx . . $ ssize_t# ret = _kcapi_handle_initcxx . . $ _kcapi_handle_init(db986b7fadb21840).(&handle, "hash", name, 0);
245
246 if (ret)
247 return ret;
248
249 ret = kcapi_md_setkeycxx . . $ kcapi_md_setkey(4d0e261613a805ee).(handle, key, keylen);
250 if (ret)
251 goto out;
252
253 ret = kcapi_md_digestcxx . . $ kcapi_md_digest(6368db0609283dea).(handle, in, inlen, out, outlen);
254
255 out:
256 _kcapi_handle_destroycxx . . $ _kcapi_handle_destroy(aba29416d24fdd59).(handle);
257 return ret;
258 }
259
260 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_hmac_sha1, "1.3.1")
261 ssize_tcxx . . $ ssize_t# impl_md_hmac_sha1cxx . . $ impl_md_hmac_sha1(533748020b1119fc).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
262 const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
263 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
264 {
265 return kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha1)", key, keylen, in, inlen,
266 out, outlen);
267 }
268
269 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_hmac_sha1, "1.0.0")
270 int32_tcxx . . $ int32_t# orig_md_hmac_sha1cxx . . $ orig_md_hmac_sha1(198852e281ed5e6a).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
271 const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
272 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
273 {
274 return (int32_tcxx . . $ int32_t#)kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha1)", key, keylen,
275 in, inlen, out, outlen);
276 }
277
278 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_hmac_sha224, "1.3.1")
279 ssize_tcxx . . $ ssize_t# impl_md_hmac_sha224cxx . . $ impl_md_hmac_sha224(533748020b1119fc).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
280 const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
281 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
282 {
283 return kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha224)", key, keylen, in, inlen,
284 out, outlen);
285 }
286
287 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_hmac_sha224, "1.0.0")
288 int32_tcxx . . $ int32_t# orig_md_hmac_sha224cxx . . $ orig_md_hmac_sha224(198852e281ed5e6a).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
289 const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
290 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
291 {
292 return (int32_tcxx . . $ int32_t#)kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha224)", key, keylen,
293 in, inlen, out, outlen);
294 }
295
296 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_hmac_sha256, "1.3.1")
297 ssize_tcxx . . $ ssize_t# impl_md_hmac_sha256cxx . . $ impl_md_hmac_sha256(533748020b1119fc).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
298 const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
299 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
300 {
301 return kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha256)", key, keylen, in, inlen,
302 out, outlen);
303 }
304
305 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_hmac_sha256, "1.0.0")
306 int32_tcxx . . $ int32_t# orig_md_hmac_sha256cxx . . $ orig_md_hmac_sha256(198852e281ed5e6a).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
307 const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
308 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
309 {
310 return (int32_tcxx . . $ int32_t#)kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha256)", key, keylen,
311 in, inlen, out, outlen);
312 }
313
314 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_hmac_sha384, "1.3.1")
315 ssize_tcxx . . $ ssize_t# impl_md_hmac_sha384cxx . . $ impl_md_hmac_sha384(533748020b1119fc).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
316 const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
317 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
318 {
319 return kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha384)", key, keylen, in, inlen,
320 out, outlen);
321 }
322
323 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_hmac_sha384, "1.0.0")
324 int32_tcxx . . $ int32_t# orig_md_hmac_sha384cxx . . $ orig_md_hmac_sha384(198852e281ed5e6a).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
325 const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
326 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
327 {
328 return (int32_tcxx . . $ int32_t#)kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha384)", key, keylen,
329 in, inlen, out, outlen);
330 }
331
332 IMPL_SYMVERcxx . . $ `lib/internal.h:363:10`!(md_hmac_sha512, "1.3.1")
333 ssize_tcxx . . $ ssize_t# impl_md_hmac_sha512cxx . . $ impl_md_hmac_sha512(533748020b1119fc).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
334 const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
335 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
336 {
337 return kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha512)", key, keylen, in, inlen,
338 out, outlen);
339 }
340
341 ORIG_SYMVERcxx . . $ `lib/internal.h:366:10`!(md_hmac_sha512, "1.0.0")
342 int32_tcxx . . $ int32_t# orig_md_hmac_sha512cxx . . $ orig_md_hmac_sha512(198852e281ed5e6a).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
343 const uint8_tcxx . . $ uint8_t# *in, uint32_tcxx . . $ uint32_t# inlen,
344 uint8_tcxx . . $ uint8_t# *out, uint32_tcxx . . $ uint32_t# outlen)
345 {
346 return (int32_tcxx . . $ int32_t#)kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sha512)", key, keylen,
347 in, inlen, out, outlen);
348 }
349
350 ssize_tcxx . . $ ssize_t# kcapi_md_hmac_sm3cxx . . $ kcapi_md_hmac_sm3(533748020b1119fc).(const uint8_tcxx . . $ uint8_t# *key, uint32_tcxx . . $ uint32_t# keylen,
351 const uint8_tcxx . . $ uint8_t# *in, size_t inlen,
352 uint8_tcxx . . $ uint8_t# *out, size_t outlen)
353 {
354 return kcapi_md_mac_conv_commoncxx . . $ kcapi_md_mac_conv_common(d9613aa292308514).("hmac(sm3)", key, keylen, in, inlen,
355 out, outlen);
356 }