From fc5e06a19c090d98620a735e33b57aee7c43107d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 22 Jun 2015 23:42:03 +0200 Subject: salsa20{,12}/xmm: avoid symbol conflicts with libnacl Also remove some dead code --- src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c') 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; } -- cgit v1.2.3