diff options
author | Jack Lloyd <[email protected]> | 2020-12-11 11:26:57 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2020-12-11 12:03:37 -0500 |
commit | 884a22fa2ade86bb12e503d6ef37784de7fe6f36 (patch) | |
tree | 5ad38f4218e416352a6d5cd28c100b15cc3c929f /src/lib/block/seed | |
parent | 9bcc30f212bc502e51bcc386e0bd9ed65adf36a7 (diff) |
Incrase the alignment of all lookup tables
We had done this in an ad-hoc way in the past for eg the AES tables
but given how easy C++'s alignas is to use we should apply it
universally.
Use 256 byte alignment for larger tables since that heads of any
possible issues that arise from machines with large cache lines.
Diffstat (limited to 'src/lib/block/seed')
-rw-r--r-- | src/lib/block/seed/seed.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/block/seed/seed.cpp b/src/lib/block/seed/seed.cpp index eb37abbd7..5cfd6ac6d 100644 --- a/src/lib/block/seed/seed.cpp +++ b/src/lib/block/seed/seed.cpp @@ -12,7 +12,7 @@ namespace Botan { namespace { -const uint8_t SEED_S0[256] = { +alignas(256) const uint8_t SEED_S0[256] = { 0xA9, 0x85, 0xD6, 0xD3, 0x54, 0x1D, 0xAC, 0x25, 0x5D, 0x43, 0x18, 0x1E, 0x51, 0xFC, 0xCA, 0x63, 0x28, 0x44, 0x20, 0x9D, 0xE0, 0xE2, 0xC8, 0x17, 0xA5, 0x8F, 0x03, 0x7B, 0xBB, 0x13, 0xD2, 0xEE, 0x70, 0x8C, 0x3F, 0xA8, 0x32, 0xDD, 0xF6, 0x74, 0xEC, 0x95, 0x0B, 0x57, 0x5C, 0x5B, 0xBD, 0x01, @@ -31,7 +31,7 @@ const uint8_t SEED_S0[256] = { 0x16, 0x3A, 0x58, 0xD4, 0x62, 0x29, 0x07, 0x33, 0xE8, 0x1B, 0x05, 0x79, 0x90, 0x6A, 0x2A, 0x9A, }; -const uint8_t SEED_S1[256] = { +alignas(256) const uint8_t SEED_S1[256] = { 0x38, 0xE8, 0x2D, 0xA6, 0xCF, 0xDE, 0xB3, 0xB8, 0xAF, 0x60, 0x55, 0xC7, 0x44, 0x6F, 0x6B, 0x5B, 0xC3, 0x62, 0x33, 0xB5, 0x29, 0xA0, 0xE2, 0xA7, 0xD3, 0x91, 0x11, 0x06, 0x1C, 0xBC, 0x36, 0x4B, 0xEF, 0x88, 0x6C, 0xA8, 0x17, 0xC4, 0x16, 0xF4, 0xC2, 0x45, 0xE1, 0xD6, 0x3F, 0x3D, 0x8E, 0x98, |