aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-08 16:38:51 -0400
committerJack Lloyd <[email protected]>2018-08-08 16:38:51 -0400
commit2029ea0a633ef3060d4a2b819c60ca97e9d9512d (patch)
tree24960c2b231389832e37f2f2acb5705d5e07885e /src/lib/block
parent7caa583948f0f247d1ff6254228c1686c78981ed (diff)
Remove unnecessary accessors for Threefish-512
Diffstat (limited to 'src/lib/block')
-rw-r--r--src/lib/block/threefish_512/threefish_512.h2
-rw-r--r--src/lib/block/threefish_512/threefish_512_avx2/threefish_512_avx2.cpp8
2 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/block/threefish_512/threefish_512.h b/src/lib/block/threefish_512/threefish_512.h
index 24f15190c..8b39c75c5 100644
--- a/src/lib/block/threefish_512/threefish_512.h
+++ b/src/lib/block/threefish_512/threefish_512.h
@@ -30,8 +30,6 @@ class BOTAN_PUBLIC_API(2,0) Threefish_512 final : public Block_Cipher_Fixed_Para
size_t parallelism() const override;
private:
- const secure_vector<uint64_t>& get_T() const { return m_T; }
- const secure_vector<uint64_t>& get_K() const { return m_K; }
#if defined(BOTAN_HAS_THREEFISH_512_AVX2)
void avx2_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const;
diff --git a/src/lib/block/threefish_512/threefish_512_avx2/threefish_512_avx2.cpp b/src/lib/block/threefish_512/threefish_512_avx2/threefish_512_avx2.cpp
index 26dc40095..7aabf120a 100644
--- a/src/lib/block/threefish_512/threefish_512_avx2/threefish_512_avx2.cpp
+++ b/src/lib/block/threefish_512/threefish_512_avx2/threefish_512_avx2.cpp
@@ -77,8 +77,8 @@ inline void rotate_keys(__m256i& R0, __m256i& R1, __m256i R2)
BOTAN_FUNC_ISA("avx2")
void Threefish_512::avx2_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- const uint64_t* K = &get_K()[0];
- const uint64_t* T_64 = &get_T()[0];
+ const uint64_t* K = m_K.data();
+ const uint64_t* T_64 = m_T.data();
const __m256i ROTATE_1 = _mm256_set_epi64x(37,19,36,46);
const __m256i ROTATE_2 = _mm256_set_epi64x(42,14,27,33);
@@ -252,8 +252,8 @@ void Threefish_512::avx2_encrypt_n(const uint8_t in[], uint8_t out[], size_t blo
BOTAN_FUNC_ISA("avx2")
void Threefish_512::avx2_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- const uint64_t* K = &get_K()[0];
- const uint64_t* T_64 = &get_T()[0];
+ const uint64_t* K = m_K.data();
+ const uint64_t* T_64 = m_T.data();
const __m256i ROTATE_1 = _mm256_set_epi64x(37,19,36,46);
const __m256i ROTATE_2 = _mm256_set_epi64x(42,14,27,33);