summaryrefslogtreecommitdiff
path: root/libbb/pw_encrypt_des.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/pw_encrypt_des.c')
-rw-r--r--libbb/pw_encrypt_des.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libbb/pw_encrypt_des.c b/libbb/pw_encrypt_des.c
index 19a9ab1..c6fc328 100644
--- a/libbb/pw_encrypt_des.c
+++ b/libbb/pw_encrypt_des.c
@@ -65,25 +65,25 @@
/* A pile of data */
-static const uint8_t IP[64] = {
+static const uint8_t IP[64] ALIGN1 = {
58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4,
62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8,
57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3,
61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7
};
-static const uint8_t key_perm[56] = {
+static const uint8_t key_perm[56] ALIGN1 = {
57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18,
10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36,
63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22,
14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4
};
-static const uint8_t key_shifts[16] = {
+static const uint8_t key_shifts[16] ALIGN1 = {
1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1
};
-static const uint8_t comp_perm[48] = {
+static const uint8_t comp_perm[48] ALIGN1 = {
14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10,
23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2,
41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
@@ -181,13 +181,12 @@ static const uint8_t u_sbox[8][32] = {
};
#endif
-static const uint8_t pbox[32] = {
+static const uint8_t pbox[32] ALIGN1 = {
16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10,
2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25
};
-static const uint32_t bits32[32] =
-{
+static const uint32_t bits32[32] ALIGN4 = {
0x80000000, 0x40000000, 0x20000000, 0x10000000,
0x08000000, 0x04000000, 0x02000000, 0x01000000,
0x00800000, 0x00400000, 0x00200000, 0x00100000,
@@ -198,7 +197,7 @@ static const uint32_t bits32[32] =
0x00000008, 0x00000004, 0x00000002, 0x00000001
};
-static const uint8_t bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
+static const uint8_t bits8[8] ALIGN1 = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
static int