diff options
Diffstat (limited to 'src/lib/libcrypto/chacha/chacha.c')
-rw-r--r-- | src/lib/libcrypto/chacha/chacha.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libcrypto/chacha/chacha.c b/src/lib/libcrypto/chacha/chacha.c index 0ce4545186..b60e3c4f27 100644 --- a/src/lib/libcrypto/chacha/chacha.c +++ b/src/lib/libcrypto/chacha/chacha.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: chacha.c,v 1.9 2022/08/20 18:44:58 jsing Exp $ */ | 1 | /* $OpenBSD: chacha.c,v 1.10 2023/07/05 16:17:20 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -27,6 +27,7 @@ ChaCha_set_key(ChaCha_ctx *ctx, const unsigned char *key, uint32_t keybits) | |||
27 | chacha_keysetup((chacha_ctx *)ctx, key, keybits); | 27 | chacha_keysetup((chacha_ctx *)ctx, key, keybits); |
28 | ctx->unused = 0; | 28 | ctx->unused = 0; |
29 | } | 29 | } |
30 | LCRYPTO_ALIAS(ChaCha_set_key); | ||
30 | 31 | ||
31 | void | 32 | void |
32 | ChaCha_set_iv(ChaCha_ctx *ctx, const unsigned char *iv, | 33 | ChaCha_set_iv(ChaCha_ctx *ctx, const unsigned char *iv, |
@@ -35,6 +36,7 @@ ChaCha_set_iv(ChaCha_ctx *ctx, const unsigned char *iv, | |||
35 | chacha_ivsetup((chacha_ctx *)ctx, iv, counter); | 36 | chacha_ivsetup((chacha_ctx *)ctx, iv, counter); |
36 | ctx->unused = 0; | 37 | ctx->unused = 0; |
37 | } | 38 | } |
39 | LCRYPTO_ALIAS(ChaCha_set_iv); | ||
38 | 40 | ||
39 | void | 41 | void |
40 | ChaCha(ChaCha_ctx *ctx, unsigned char *out, const unsigned char *in, size_t len) | 42 | ChaCha(ChaCha_ctx *ctx, unsigned char *out, const unsigned char *in, size_t len) |
@@ -64,6 +66,7 @@ ChaCha(ChaCha_ctx *ctx, unsigned char *out, const unsigned char *in, size_t len) | |||
64 | len -= n; | 66 | len -= n; |
65 | } | 67 | } |
66 | } | 68 | } |
69 | LCRYPTO_ALIAS(ChaCha); | ||
67 | 70 | ||
68 | void | 71 | void |
69 | CRYPTO_chacha_20(unsigned char *out, const unsigned char *in, size_t len, | 72 | CRYPTO_chacha_20(unsigned char *out, const unsigned char *in, size_t len, |
@@ -95,6 +98,7 @@ CRYPTO_chacha_20(unsigned char *out, const unsigned char *in, size_t len, | |||
95 | len -= n; | 98 | len -= n; |
96 | } | 99 | } |
97 | } | 100 | } |
101 | LCRYPTO_ALIAS(CRYPTO_chacha_20); | ||
98 | 102 | ||
99 | void | 103 | void |
100 | CRYPTO_xchacha_20(unsigned char *out, const unsigned char *in, size_t len, | 104 | CRYPTO_xchacha_20(unsigned char *out, const unsigned char *in, size_t len, |
@@ -105,3 +109,4 @@ CRYPTO_xchacha_20(unsigned char *out, const unsigned char *in, size_t len, | |||
105 | CRYPTO_hchacha_20(subkey, key, iv); | 109 | CRYPTO_hchacha_20(subkey, key, iv); |
106 | CRYPTO_chacha_20(out, in, len, subkey, iv + 16, 0); | 110 | CRYPTO_chacha_20(out, in, len, subkey, iv + 16, 0); |
107 | } | 111 | } |
112 | LCRYPTO_ALIAS(CRYPTO_xchacha_20); | ||