diff --git a/ChangeLog b/ChangeLog index 427ad879b81f9484eccedfcce923a1aeab68857c..adfe5a572e5daac0da0a1ab8281a85e45b0f6828 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * aes-internal.h: Delete name mangling of internal symbols. Update all internal references to use _nettle prefix. + * camellia-internal.h: Likewise. 2020-11-26 Niels Möller <nisse@lysator.liu.se> diff --git a/camellia-absorb.c b/camellia-absorb.c index d865dc6df0fb9de45f19d0992a6dfd24a4c59e9b..60646dcdae00a4c44b44e82e2db724f2d014c627 100644 --- a/camellia-absorb.c +++ b/camellia-absorb.c @@ -55,7 +55,7 @@ #include "macros.h" void -_camellia_absorb(unsigned nkeys, uint64_t *dst, uint64_t *subkey) +_nettle_camellia_absorb(unsigned nkeys, uint64_t *dst, uint64_t *subkey) { uint64_t kw2, kw4; uint32_t dw, tl, tr; diff --git a/camellia-crypt-internal.c b/camellia-crypt-internal.c index 6e2727b8f800d7e95f2470fec6aa13b7569e282b..1816d768d308e459904d8ccc2b8c2ae81791a3f7 100644 --- a/camellia-crypt-internal.c +++ b/camellia-crypt-internal.c @@ -135,11 +135,11 @@ #endif void -_camellia_crypt(unsigned nkeys, - const uint64_t *keys, - const struct camellia_table *T, - size_t length, uint8_t *dst, - const uint8_t *src) +_nettle_camellia_crypt(unsigned nkeys, + const uint64_t *keys, + const struct camellia_table *T, + size_t length, uint8_t *dst, + const uint8_t *src) { FOR_BLOCKS(length, dst, src, CAMELLIA_BLOCK_SIZE) { diff --git a/camellia-internal.h b/camellia-internal.h index e09ef11454864dc912f060dbb2cb23b155face35..3a9b17121aee43989a34fc63910152b3b4347c71 100644 --- a/camellia-internal.h +++ b/camellia-internal.h @@ -48,12 +48,6 @@ #include "camellia.h" -/* Name mangling */ -#define _camellia_crypt _nettle_camellia_crypt -#define _camellia_absorb _nettle_camellia_absorb -#define _camellia_invert_key _nettle_camellia_invert_key -#define _camellia_table _nettle_camellia_table - /* * macros */ @@ -117,21 +111,21 @@ struct camellia_table #endif void -_camellia_crypt(unsigned nkeys, const uint64_t *keys, - const struct camellia_table *T, - size_t length, uint8_t *dst, - const uint8_t *src); +_nettle_camellia_crypt(unsigned nkeys, const uint64_t *keys, + const struct camellia_table *T, + size_t length, uint8_t *dst, + const uint8_t *src); /* The initial NKEYS + 2 subkeys in SUBKEY are reduced to the final NKEYS subkeys stored in DST. SUBKEY data is modified in the process. */ void -_camellia_absorb(unsigned nkeys, uint64_t *dst, uint64_t *subkey); +_nettle_camellia_absorb(unsigned nkeys, uint64_t *dst, uint64_t *subkey); void -_camellia_invert_key(unsigned nkeys, - uint64_t *dst, const uint64_t *src); +_nettle_camellia_invert_key(unsigned nkeys, + uint64_t *dst, const uint64_t *src); -extern const struct camellia_table _camellia_table; +extern const struct camellia_table _nettle_camellia_table; #endif /* NETTLE_CAMELLIA_INTERNAL_H_INCLUDED */ diff --git a/camellia-invert-key.c b/camellia-invert-key.c index 2edbfdbda432f21a954acc43c1613c3106b20521..5461e44e15508557fcb2e4cb4f189eecbcff5b31 100644 --- a/camellia-invert-key.c +++ b/camellia-invert-key.c @@ -41,8 +41,8 @@ do { uint64_t t_swap = (a); (a) = (b); (b) = t_swap; } while(0) void -_camellia_invert_key(unsigned nkeys, - uint64_t *dst, const uint64_t *src) +_nettle_camellia_invert_key(unsigned nkeys, + uint64_t *dst, const uint64_t *src) { unsigned i; if (dst == src) diff --git a/camellia-table.c b/camellia-table.c index 834ac4dc4943311204e20311d72aad70052c552a..2fec93b6c217d1f90ece16e63c51974c4b4f0407 100644 --- a/camellia-table.c +++ b/camellia-table.c @@ -49,7 +49,7 @@ #include "camellia-internal.h" -const struct camellia_table _camellia_table = { +const struct camellia_table _nettle_camellia_table = { /* sp1110 */ { 0x70707000,0x82828200,0x2c2c2c00,0xececec00, diff --git a/camellia128-crypt.c b/camellia128-crypt.c index a9395f260439db59ab3c3a62feb3af484551dea3..64bcda61690b1c6ea5e10948bb732fe2b009dc06 100644 --- a/camellia128-crypt.c +++ b/camellia128-crypt.c @@ -48,7 +48,7 @@ camellia128_crypt(const struct camellia128_ctx *ctx, const uint8_t *src) { assert(!(length % CAMELLIA_BLOCK_SIZE) ); - _camellia_crypt(_CAMELLIA128_NKEYS, ctx->keys, - &_camellia_table, - length, dst, src); + _nettle_camellia_crypt(_CAMELLIA128_NKEYS, ctx->keys, + &_nettle_camellia_table, + length, dst, src); } diff --git a/camellia128-set-decrypt-key.c b/camellia128-set-decrypt-key.c index 96050f62b5837493bc941b0dd87398bfce558912..2e38cf1e12a650f3b735647947b2d472175b58f3 100644 --- a/camellia128-set-decrypt-key.c +++ b/camellia128-set-decrypt-key.c @@ -41,7 +41,7 @@ void camellia128_invert_key(struct camellia128_ctx *dst, const struct camellia128_ctx *src) { - _camellia_invert_key (_CAMELLIA128_NKEYS, dst->keys, src->keys); + _nettle_camellia_invert_key (_CAMELLIA128_NKEYS, dst->keys, src->keys); } void diff --git a/camellia128-set-encrypt-key.c b/camellia128-set-encrypt-key.c index 66d8a66f02c1421b78cbf159b3702b2ba12990c5..5eccd9b8ecef8c2b92f88af3ea01c2931eb25423 100644 --- a/camellia128-set-encrypt-key.c +++ b/camellia128-set-encrypt-key.c @@ -120,5 +120,5 @@ camellia128_set_encrypt_key (struct camellia128_ctx *ctx, subkey[24] = k0; subkey[25] = k1; /* Common final processing */ - _camellia_absorb (_CAMELLIA128_NKEYS, ctx->keys, subkey); + _nettle_camellia_absorb (_CAMELLIA128_NKEYS, ctx->keys, subkey); } diff --git a/camellia256-crypt.c b/camellia256-crypt.c index dc5b11c4b32ec7a46819a45ff413063960fe6b85..31ba988784875760ae51652fed5e1a8207e421c5 100644 --- a/camellia256-crypt.c +++ b/camellia256-crypt.c @@ -48,7 +48,7 @@ camellia256_crypt(const struct camellia256_ctx *ctx, const uint8_t *src) { assert(!(length % CAMELLIA_BLOCK_SIZE) ); - _camellia_crypt(_CAMELLIA256_NKEYS, ctx->keys, - &_camellia_table, - length, dst, src); + _nettle_camellia_crypt(_CAMELLIA256_NKEYS, ctx->keys, + &_nettle_camellia_table, + length, dst, src); } diff --git a/camellia256-set-decrypt-key.c b/camellia256-set-decrypt-key.c index 70da7c5cc1ea73afb8149a99d37539ea5959116f..1026901de9be382511ba994137517bc834da0954 100644 --- a/camellia256-set-decrypt-key.c +++ b/camellia256-set-decrypt-key.c @@ -41,7 +41,7 @@ void camellia256_invert_key(struct camellia256_ctx *dst, const struct camellia256_ctx *src) { - _camellia_invert_key (_CAMELLIA256_NKEYS, dst->keys, src->keys); + _nettle_camellia_invert_key (_CAMELLIA256_NKEYS, dst->keys, src->keys); } void diff --git a/camellia256-set-encrypt-key.c b/camellia256-set-encrypt-key.c index 608224e761710e224cc5248f44a7a108ba23e7fb..4c96e56804e55fe05860e94c134a38d443d0ef36 100644 --- a/camellia256-set-encrypt-key.c +++ b/camellia256-set-encrypt-key.c @@ -139,7 +139,7 @@ _camellia256_set_encrypt_key (struct camellia256_ctx *ctx, subkey[32] = k2; subkey[33] = k3; /* Common final processing */ - _camellia_absorb (_CAMELLIA256_NKEYS, ctx->keys, subkey); + _nettle_camellia_absorb (_CAMELLIA256_NKEYS, ctx->keys, subkey); } void