summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/modes/ctr128.c
diff options
context:
space:
mode:
authorjsing <>2025-05-18 09:05:59 +0000
committerjsing <>2025-05-18 09:05:59 +0000
commit6479fe39635e5e3f16ef7f9c5f84b7e4ed4c156e (patch)
tree54a864104bc0a796ddb2dd6600b7ec570965e978 /src/lib/libcrypto/modes/ctr128.c
parent3309fb148483f475d601ff252f5597f60caa434b (diff)
downloadopenbsd-6479fe39635e5e3f16ef7f9c5f84b7e4ed4c156e.tar.gz
openbsd-6479fe39635e5e3f16ef7f9c5f84b7e4ed4c156e.tar.bz2
openbsd-6479fe39635e5e3f16ef7f9c5f84b7e4ed4c156e.zip
Use stdint types instead of u64/u32/u8.
No change in generated assembly.
Diffstat (limited to 'src/lib/libcrypto/modes/ctr128.c')
-rw-r--r--src/lib/libcrypto/modes/ctr128.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/modes/ctr128.c b/src/lib/libcrypto/modes/ctr128.c
index 30563ed6e3..87d9abb355 100644
--- a/src/lib/libcrypto/modes/ctr128.c
+++ b/src/lib/libcrypto/modes/ctr128.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ctr128.c,v 1.17 2025/04/23 10:09:08 jsing Exp $ */ 1/* $OpenBSD: ctr128.c,v 1.18 2025/05/18 09:05:59 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2008 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -63,8 +63,8 @@
63static void 63static void
64ctr128_inc(unsigned char *counter) 64ctr128_inc(unsigned char *counter)
65{ 65{
66 u32 n = 16; 66 uint32_t n = 16;
67 u8 c; 67 uint8_t c;
68 68
69 do { 69 do {
70 --n; 70 --n;
@@ -175,8 +175,8 @@ LCRYPTO_ALIAS(CRYPTO_ctr128_encrypt);
175static void 175static void
176ctr96_inc(unsigned char *counter) 176ctr96_inc(unsigned char *counter)
177{ 177{
178 u32 n = 12; 178 uint32_t n = 12;
179 u8 c; 179 uint8_t c;
180 180
181 do { 181 do {
182 --n; 182 --n;
@@ -223,7 +223,7 @@ CRYPTO_ctr128_encrypt_ctr32(const unsigned char *in, unsigned char *out,
223 * overflow, which is then handled by limiting the 223 * overflow, which is then handled by limiting the
224 * amount of blocks to the exact overflow point... 224 * amount of blocks to the exact overflow point...
225 */ 225 */
226 ctr32 += (u32)blocks; 226 ctr32 += (uint32_t)blocks;
227 if (ctr32 < blocks) { 227 if (ctr32 < blocks) {
228 blocks -= ctr32; 228 blocks -= ctr32;
229 ctr32 = 0; 229 ctr32 = 0;