Make SPECK-64 more symmetrical

This commit is contained in:
Jeffrey Walton 2018-08-14 06:19:34 -04:00
parent f1b190740c
commit d8c28bdc2b
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 9 additions and 9 deletions

View File

@ -1811,7 +1811,7 @@ inline size_t AdvancedProcessBlocks64_6x2_ALTIVEC(F2 func2, F6 func6,
const uint32x4_p s_one = {1,0,0,0};
const uint32x4_p s_two = {2,0,2,0};
#else
enum {LowOffset=0, HighOffset=8};
enum {LowOffset=8, HighOffset=0};
const uint32x4_p s_one = {0,0,0,1};
const uint32x4_p s_two = {0,2,0,2};
#endif

View File

@ -897,8 +897,8 @@ void SPECK64_Enc_Block(uint32x4_p &block0, uint32x4_p &block1,
}
#if defined(CRYPTOPP_BIG_ENDIAN)
const uint8x16_p m3 = {19,18,17,16, 3,2,1,0, 23,22,21,20, 7,6,5,4};
const uint8x16_p m4 = {27,26,25,24, 11,10,9,8, 31,30,29,28, 15,14,13,12};
const uint8x16_p m3 = {11,10,9,8, 27,26,25,24, 15,14,13,12, 31,30,29,28};
const uint8x16_p m4 = {3,2,1,0, 19,18,17,16, 7,6,5,4, 23,22,21,20};
#else
const uint8x16_p m3 = {3,2,1,0, 19,18,17,16, 7,6,5,4, 23,22,21,20};
const uint8x16_p m4 = {11,10,9,8, 27,26,25,24, 15,14,13,12, 31,30,29,28};
@ -937,8 +937,8 @@ void SPECK64_Dec_Block(uint32x4_p &block0, uint32x4_p &block1,
}
#if defined(CRYPTOPP_BIG_ENDIAN)
const uint8x16_p m3 = {19,18,17,16, 3,2,1,0, 23,22,21,20, 7,6,5,4};
const uint8x16_p m4 = {27,26,25,24, 11,10,9,8, 31,30,29,28, 15,14,13,12};
const uint8x16_p m3 = {11,10,9,8, 27,26,25,24, 15,14,13,12, 31,30,29,28};
const uint8x16_p m4 = {3,2,1,0, 19,18,17,16, 7,6,5,4, 23,22,21,20};
#else
const uint8x16_p m3 = {3,2,1,0, 19,18,17,16, 7,6,5,4, 23,22,21,20};
const uint8x16_p m4 = {11,10,9,8, 27,26,25,24, 15,14,13,12, 31,30,29,28};
@ -995,8 +995,8 @@ void SPECK64_Enc_6_Blocks(uint32x4_p &block0, uint32x4_p &block1,
}
#if defined(CRYPTOPP_BIG_ENDIAN)
const uint8x16_p m3 = {19,18,17,16, 3,2,1,0, 23,22,21,20, 7,6,5,4};
const uint8x16_p m4 = {27,26,25,24, 11,10,9,8, 31,30,29,28, 15,14,13,12};
const uint8x16_p m3 = {11,10,9,8, 27,26,25,24, 15,14,13,12, 31,30,29,28};
const uint8x16_p m4 = {3,2,1,0, 19,18,17,16, 7,6,5,4, 23,22,21,20};
#else
const uint8x16_p m3 = {3,2,1,0, 19,18,17,16, 7,6,5,4, 23,22,21,20};
const uint8x16_p m4 = {11,10,9,8, 27,26,25,24, 15,14,13,12, 31,30,29,28};
@ -1057,8 +1057,8 @@ void SPECK64_Dec_6_Blocks(uint32x4_p &block0, uint32x4_p &block1,
}
#if defined(CRYPTOPP_BIG_ENDIAN)
const uint8x16_p m3 = {19,18,17,16, 3,2,1,0, 23,22,21,20, 7,6,5,4};
const uint8x16_p m4 = {27,26,25,24, 11,10,9,8, 31,30,29,28, 15,14,13,12};
const uint8x16_p m3 = {11,10,9,8, 27,26,25,24, 15,14,13,12, 31,30,29,28};
const uint8x16_p m4 = {3,2,1,0, 19,18,17,16, 7,6,5,4, 23,22,21,20};
#else
const uint8x16_p m3 = {3,2,1,0, 19,18,17,16, 7,6,5,4, 23,22,21,20};
const uint8x16_p m4 = {11,10,9,8, 27,26,25,24, 15,14,13,12, 31,30,29,28};