diff options
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/serpent_x86_32/info.txt (renamed from src/block/serpent_ia32/info.txt) | 6 | ||||
-rw-r--r-- | src/block/serpent_x86_32/serp_x86_32.cpp (renamed from src/block/serpent_ia32/serp_ia32.cpp) | 22 | ||||
-rw-r--r-- | src/block/serpent_x86_32/serp_x86_32.h (renamed from src/block/serpent_ia32/serp_ia32.h) | 12 | ||||
-rw-r--r-- | src/block/serpent_x86_32/serp_x86_32_imp.S (renamed from src/block/serpent_ia32/serp_ia32_imp.S) | 18 |
4 files changed, 29 insertions, 29 deletions
diff --git a/src/block/serpent_ia32/info.txt b/src/block/serpent_x86_32/info.txt index 3a1dd5919..b9c993546 100644 --- a/src/block/serpent_ia32/info.txt +++ b/src/block/serpent_x86_32/info.txt @@ -1,12 +1,12 @@ -define SERPENT_IA32 +define SERPENT_X86_32 load_on asm_ok <arch> -ia32 +x86_32 </arch> <requires> -asm_ia32 +asm_x86_32 serpent </requires> diff --git a/src/block/serpent_ia32/serp_ia32.cpp b/src/block/serpent_x86_32/serp_x86_32.cpp index d2f8adb62..4cefe1d65 100644 --- a/src/block/serpent_ia32/serp_ia32.cpp +++ b/src/block/serpent_x86_32/serp_x86_32.cpp @@ -1,11 +1,11 @@ /* -* IA-32 Serpent +* Serpent in x86-32 * (C) 1999-2007 Jack Lloyd * * Distributed under the terms of the Botan license */ -#include <botan/serp_ia32.h> +#include <botan/serp_x86_32.h> #include <botan/loadstor.h> namespace Botan { @@ -18,7 +18,7 @@ extern "C" { * @param out the output block * @param ks the key schedule */ -void botan_serpent_ia32_encrypt(const byte in[16], +void botan_serpent_x86_32_encrypt(const byte in[16], byte out[16], const u32bit ks[132]); @@ -28,7 +28,7 @@ void botan_serpent_ia32_encrypt(const byte in[16], * @param out the output block * @param ks the key schedule */ -void botan_serpent_ia32_decrypt(const byte in[16], +void botan_serpent_x86_32_decrypt(const byte in[16], byte out[16], const u32bit ks[132]); @@ -37,18 +37,18 @@ void botan_serpent_ia32_decrypt(const byte in[16], * @param ks holds the initial working key (padded), and is set to the final key schedule */ -void botan_serpent_ia32_key_schedule(u32bit ks[140]); +void botan_serpent_x86_32_key_schedule(u32bit ks[140]); } /* * Serpent Encryption */ -void Serpent_IA32::encrypt_n(const byte in[], byte out[], size_t blocks) const +void Serpent_X86_32::encrypt_n(const byte in[], byte out[], size_t blocks) const { for(size_t i = 0; i != blocks; ++i) { - botan_serpent_ia32_encrypt(in, out, this->get_round_keys()); + botan_serpent_x86_32_encrypt(in, out, this->get_round_keys()); in += BLOCK_SIZE; out += BLOCK_SIZE; } @@ -57,11 +57,11 @@ void Serpent_IA32::encrypt_n(const byte in[], byte out[], size_t blocks) const /* * Serpent Decryption */ -void Serpent_IA32::decrypt_n(const byte in[], byte out[], size_t blocks) const +void Serpent_X86_32::decrypt_n(const byte in[], byte out[], size_t blocks) const { for(size_t i = 0; i != blocks; ++i) { - botan_serpent_ia32_decrypt(in, out, this->get_round_keys()); + botan_serpent_x86_32_decrypt(in, out, this->get_round_keys()); in += BLOCK_SIZE; out += BLOCK_SIZE; } @@ -70,14 +70,14 @@ void Serpent_IA32::decrypt_n(const byte in[], byte out[], size_t blocks) const /* * Serpent Key Schedule */ -void Serpent_IA32::key_schedule(const byte key[], size_t length) +void Serpent_X86_32::key_schedule(const byte key[], size_t length) { SecureVector<u32bit> W(140); for(size_t i = 0; i != length / 4; ++i) W[i] = load_le<u32bit>(key, i); W[length / 4] |= u32bit(1) << ((length%4)*8); - botan_serpent_ia32_key_schedule(W); + botan_serpent_x86_32_key_schedule(W); this->set_round_keys(W + 8); } diff --git a/src/block/serpent_ia32/serp_ia32.h b/src/block/serpent_x86_32/serp_x86_32.h index d7b5bedc7..f6c4d564a 100644 --- a/src/block/serpent_ia32/serp_ia32.h +++ b/src/block/serpent_x86_32/serp_x86_32.h @@ -1,27 +1,27 @@ /* -* Serpent (IA-32) +* Serpent in x86-32 asm * (C) 1999-2007 Jack Lloyd * * Distributed under the terms of the Botan license */ -#ifndef BOTAN_SERPENT_IA32_H__ -#define BOTAN_SERPENT_IA32_H__ +#ifndef BOTAN_SERPENT_X86_32_H__ +#define BOTAN_SERPENT_X86_32_H__ #include <botan/serpent.h> namespace Botan { /** -* Serpent implementation in x86 assembly +* Serpent implementation in x86-32 assembly */ -class BOTAN_DLL Serpent_IA32 : public Serpent +class BOTAN_DLL Serpent_X86_32 : public Serpent { public: void encrypt_n(const byte in[], byte out[], size_t blocks) const; void decrypt_n(const byte in[], byte out[], size_t blocks) const; - BlockCipher* clone() const { return new Serpent_IA32; } + BlockCipher* clone() const { return new Serpent_X86_32; } private: void key_schedule(const byte[], size_t); }; diff --git a/src/block/serpent_ia32/serp_ia32_imp.S b/src/block/serpent_x86_32/serp_x86_32_imp.S index 5308173bf..e2549a099 100644 --- a/src/block/serpent_ia32/serp_ia32_imp.S +++ b/src/block/serpent_x86_32/serp_x86_32_imp.S @@ -1,13 +1,13 @@ /* -* Serpent in IA-32 assembler +* Serpent in x86-32 assembler * (C) 1999-2007 Jack Lloyd * * Distributed under the terms of the Botan license */ -#include <botan/internal/asm_macr_ia32.h> +#include <botan/internal/asm_x86_32.h> -START_LISTING(serp_ia32.S) +START_LISTING(serp_x86_32.S) #define SBOX_E1(A, B, C, D, T) \ XOR(D, A) ; \ @@ -441,7 +441,7 @@ START_LISTING(serp_ia32.S) /* * Serpent Encryption */ -START_FUNCTION(botan_serpent_ia32_encrypt) +START_FUNCTION(botan_serpent_x86_32_encrypt) SPILL_REGS() #define PUSHED 4 @@ -507,12 +507,12 @@ START_FUNCTION(botan_serpent_ia32_encrypt) RESTORE_REGS() #undef PUSHED -END_FUNCTION(botan_serpent_ia32_encrypt) +END_FUNCTION(botan_serpent_x86_32_encrypt) /* * Serpent Decryption */ -START_FUNCTION(botan_serpent_ia32_decrypt) +START_FUNCTION(botan_serpent_x86_32_decrypt) SPILL_REGS() #define PUSHED 4 @@ -578,12 +578,12 @@ START_FUNCTION(botan_serpent_ia32_decrypt) RESTORE_REGS() #undef PUSHED -END_FUNCTION(botan_serpent_ia32_decrypt) +END_FUNCTION(botan_serpent_x86_32_decrypt) /* * Serpent Key Schedule */ -START_FUNCTION(botan_serpent_ia32_key_schedule) +START_FUNCTION(botan_serpent_x86_32_key_schedule) SPILL_REGS() #define PUSHED 4 @@ -666,4 +666,4 @@ LOOP_UNTIL_EQ(ESI, 140, .L_SERP_EXPANSION) RESTORE_REGS() #undef PUSHED -END_FUNCTION(botan_serpent_ia32_key_schedule) +END_FUNCTION(botan_serpent_x86_32_key_schedule) |