diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-06-22 23:42:03 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-06-22 23:43:08 +0200 |
commit | fc5e06a19c090d98620a735e33b57aee7c43107d (patch) | |
tree | 51a100e764435bf040335be6eb58b47b5e0ef15f /src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c | |
parent | 388855affd9bdf679f007e4461fb2c7fa12123e0 (diff) | |
download | fastd-fc5e06a19c090d98620a735e33b57aee7c43107d.tar fastd-fc5e06a19c090d98620a735e33b57aee7c43107d.zip |
salsa20{,12}/xmm: avoid symbol conflicts with libnacl
Also remove some dead code
Diffstat (limited to 'src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c')
-rw-r--r-- | src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c b/src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c index 25f7bb0..1e07d6e 100644 --- a/src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c +++ b/src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c @@ -42,17 +42,8 @@ #define KEYBYTES 32 -#ifdef __x86_64__ -#define crypto_stream_salsa2012_xor crypto_stream_salsa2012_amd64_xmm6_xor -#endif - -#ifdef __i386__ -#define crypto_stream_salsa2012_xor crypto_stream_salsa2012_x86_xmm5_xor -#endif - - /** The actual Salsa20/12 assembly implementation */ -int crypto_stream_salsa2012_xor(unsigned char *c, const unsigned char *m, unsigned long long mlen, const unsigned char *n, const unsigned char *k); +int fastd_salsa2012_xmm_xor(unsigned char *c, const unsigned char *m, unsigned long long mlen, const unsigned char *n, const unsigned char *k); /** The cipher state */ @@ -76,7 +67,7 @@ static fastd_cipher_state_t * salsa2012_init(const uint8_t *key) { /** XORs data with the Salsa20/12 cipher stream */ static bool salsa2012_crypt(const fastd_cipher_state_t *state, fastd_block128_t *out, const fastd_block128_t *in, size_t len, const uint8_t *iv) { - crypto_stream_salsa2012_xor(out->b, in->b, len, iv, state->key); + fastd_salsa2012_xmm_xor(out->b, in->b, len, iv, state->key); return true; } |