* 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>
#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;
#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)
{
#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
*/
#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 */
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)
#include "camellia-internal.h"
-const struct camellia_table _camellia_table = {
+const struct camellia_table _nettle_camellia_table = {
/* sp1110 */
{
0x70707000,0x82828200,0x2c2c2c00,0xececec00,
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);
}
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
subkey[24] = k0; subkey[25] = k1;
/* Common final processing */
- _camellia_absorb (_CAMELLIA128_NKEYS, ctx->keys, subkey);
+ _nettle_camellia_absorb (_CAMELLIA128_NKEYS, ctx->keys, subkey);
}
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);
}
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
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