diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-11-13 02:08:51 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-11-13 02:08:51 +0100 |
commit | cb973512503bd7f0ea525db89cb20fa83b25f216 (patch) | |
tree | ee65a77befed695711b0f380258776d23da1c603 /src/Crypto/chacha-xmm.c | |
parent | ec4b44c238b47e11eee327a8dc4d74b90175eab2 (diff) | |
download | VeraCrypt-cb973512503bd7f0ea525db89cb20fa83b25f216.tar.gz VeraCrypt-cb973512503bd7f0ea525db89cb20fa83b25f216.zip |
Windows: Remove support for 32-bit driver code. Set build target as Windows 10. Simplify code and fix all warnings in driver.
Diffstat (limited to 'src/Crypto/chacha-xmm.c')
-rw-r--r-- | src/Crypto/chacha-xmm.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/Crypto/chacha-xmm.c b/src/Crypto/chacha-xmm.c index 54c3680c..980c2c81 100644 --- a/src/Crypto/chacha-xmm.c +++ b/src/Crypto/chacha-xmm.c @@ -81,45 +81,6 @@ static void salsa20_wordtobyte(uint8 output[64],const uint32 input[16], unsigned for (i = 0;i < 16;++i) U32TO8_LITTLE(output + 4 * i,x[i]); } -void chacha_ECRYPT_init(void) -{ - return; -} - -static const char sigma[17] = "expand 32-byte k"; -static const char tau[17] = "expand 16-byte k"; - -void chacha_ECRYPT_keysetup(uint32* input,const uint8 *k,uint32 kbits,uint32 ivbits) -{ - const char *constants; - - input[4] = U8TO32_LITTLE(k + 0); - input[5] = U8TO32_LITTLE(k + 4); - input[6] = U8TO32_LITTLE(k + 8); - input[7] = U8TO32_LITTLE(k + 12); - if (kbits == 256) { /* recommended */ - k += 16; - constants = sigma; - } else { /* kbits == 128 */ - constants = tau; - } - input[8] = U8TO32_LITTLE(k + 0); - input[9] = U8TO32_LITTLE(k + 4); - input[10] = U8TO32_LITTLE(k + 8); - input[11] = U8TO32_LITTLE(k + 12); - input[0] = U8TO32_LITTLE(constants + 0); - input[1] = U8TO32_LITTLE(constants + 4); - input[2] = U8TO32_LITTLE(constants + 8); - input[3] = U8TO32_LITTLE(constants + 12); -} - -void chacha_ECRYPT_ivsetup(uint32* input,const uint8 *iv) -{ - input[12] = 0; - input[13] = 0; - input[14] = U8TO32_LITTLE(iv + 0); - input[15] = U8TO32_LITTLE(iv + 4); -} void chacha_ECRYPT_encrypt_bytes(size_t bytes, uint32* x, const uint8* m, uint8* out, uint8* output, unsigned int r) { |