Add proper declaration for Kalyna tables; and split from definitions

This commit is contained in:
Jeffrey Walton 2018-10-28 06:09:46 -04:00
parent 1d0c6dd916
commit 1ff6f39ec6
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 7 additions and 6 deletions

View File

@ -7,7 +7,11 @@
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(KalynaTab)
CRYPTOPP_TABLE
extern const word64 T[8][256]; // Columns
extern const word64 IT[8][256]; // Inverse
extern const byte S[4][256]; // Substitution
extern const byte IS[4][256]; // Inverse
const word64 T[8][256] =
{
{
@ -540,7 +544,6 @@ const word64 T[8][256] =
}
};
CRYPTOPP_TABLE
const word64 IT[8][256] =
{
{
@ -1073,7 +1076,6 @@ const word64 IT[8][256] =
}
};
CRYPTOPP_TABLE
const byte S[4][256] =
{
{
@ -1150,7 +1152,6 @@ const byte S[4][256] =
}
};
CRYPTOPP_TABLE
const byte IS[4][256] =
{
{

View File

@ -73,11 +73,11 @@ extern void SHA256_HashMultipleBlocks_POWER8(word32 *state, const word32 *data,
extern void SHA512_HashMultipleBlocks_POWER8(word64 *state, const word64 *data, size_t length, ByteOrder order);
#endif
// We add extern to export table to sha-simd.cpp, but it
// cleared http://github.com/weidai11/cryptopp/issues/502
extern const word32 SHA256_K[64];
extern const word64 SHA512_K[80];
// We add extern to export table to sha-simd.cpp, but it
// cleared http://github.com/weidai11/cryptopp/issues/502
CRYPTOPP_ALIGN_DATA(16)
const word64 SHA512_K[80] = {
W64LIT(0x428a2f98d728ae22), W64LIT(0x7137449123ef65cd),