mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-20 05:12:16 +00:00
Use default alignment for GetBlock
This commit is contained in:
parent
afd3b5c596
commit
f5c86217c0
20
simon.cpp
20
simon.cpp
@ -236,7 +236,7 @@ void SIMON64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength,
|
||||
m_wspace.New(4U);
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word32, LittleEndian, false> KeyBlock;
|
||||
typedef GetBlock<word32, LittleEndian> KeyBlock;
|
||||
KeyBlock kblk(userKey);
|
||||
|
||||
switch (m_kwords)
|
||||
@ -259,7 +259,7 @@ void SIMON64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength,
|
||||
void SIMON64::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word32, LittleEndian, false> InBlock;
|
||||
typedef GetBlock<word32, LittleEndian> InBlock;
|
||||
InBlock iblk(inBlock); iblk(m_wspace[1])(m_wspace[0]);
|
||||
|
||||
switch (m_rounds)
|
||||
@ -275,14 +275,14 @@ void SIMON64::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
|
||||
}
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef PutBlock<word32, LittleEndian, false> OutBlock;
|
||||
typedef PutBlock<word32, LittleEndian> OutBlock;
|
||||
OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[3])(m_wspace[2]);
|
||||
}
|
||||
|
||||
void SIMON64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word32, LittleEndian, false> InBlock;
|
||||
typedef GetBlock<word32, LittleEndian> InBlock;
|
||||
InBlock iblk(inBlock); iblk(m_wspace[1])(m_wspace[0]);
|
||||
|
||||
switch (m_rounds)
|
||||
@ -298,7 +298,7 @@ void SIMON64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
|
||||
}
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef PutBlock<word32, LittleEndian, false> OutBlock;
|
||||
typedef PutBlock<word32, LittleEndian> OutBlock;
|
||||
OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[3])(m_wspace[2]);
|
||||
}
|
||||
|
||||
@ -315,7 +315,7 @@ void SIMON128::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength
|
||||
m_wspace.New(4U);
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word64, LittleEndian, false> KeyBlock;
|
||||
typedef GetBlock<word64, LittleEndian> KeyBlock;
|
||||
KeyBlock kblk(userKey);
|
||||
|
||||
switch (m_kwords)
|
||||
@ -343,7 +343,7 @@ void SIMON128::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength
|
||||
void SIMON128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word64, LittleEndian, false> InBlock;
|
||||
typedef GetBlock<word64, LittleEndian> InBlock;
|
||||
InBlock iblk(inBlock); iblk(m_wspace[1])(m_wspace[0]);
|
||||
|
||||
switch (m_rounds)
|
||||
@ -362,14 +362,14 @@ void SIMON128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
|
||||
}
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef PutBlock<word64, LittleEndian, false> OutBlock;
|
||||
typedef PutBlock<word64, LittleEndian> OutBlock;
|
||||
OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[3])(m_wspace[2]);
|
||||
}
|
||||
|
||||
void SIMON128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word64, LittleEndian, false> InBlock;
|
||||
typedef GetBlock<word64, LittleEndian> InBlock;
|
||||
InBlock iblk(inBlock); iblk(m_wspace[1])(m_wspace[0]);
|
||||
|
||||
switch (m_rounds)
|
||||
@ -388,7 +388,7 @@ void SIMON128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
|
||||
}
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef PutBlock<word64, LittleEndian, false> OutBlock;
|
||||
typedef PutBlock<word64, LittleEndian> OutBlock;
|
||||
OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[3])(m_wspace[2]);
|
||||
}
|
||||
|
||||
|
20
speck.cpp
20
speck.cpp
@ -211,7 +211,7 @@ void SPECK64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength,
|
||||
m_wspace.New(4U);
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word32, LittleEndian, false> KeyBlock;
|
||||
typedef GetBlock<word32, LittleEndian> KeyBlock;
|
||||
KeyBlock kblk(userKey);
|
||||
|
||||
switch (m_kwords)
|
||||
@ -234,7 +234,7 @@ void SPECK64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength,
|
||||
void SPECK64::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word32, LittleEndian, false> InBlock;
|
||||
typedef GetBlock<word32, LittleEndian> InBlock;
|
||||
InBlock iblk(inBlock); iblk(m_wspace[1])(m_wspace[0]);
|
||||
|
||||
switch (m_rounds)
|
||||
@ -250,14 +250,14 @@ void SPECK64::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
|
||||
}
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef PutBlock<word32, LittleEndian, false> OutBlock;
|
||||
typedef PutBlock<word32, LittleEndian> OutBlock;
|
||||
OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[3])(m_wspace[2]);
|
||||
}
|
||||
|
||||
void SPECK64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word32, LittleEndian, false> InBlock;
|
||||
typedef GetBlock<word32, LittleEndian> InBlock;
|
||||
InBlock iblk(inBlock); iblk(m_wspace[1])(m_wspace[0]);
|
||||
|
||||
switch (m_rounds)
|
||||
@ -273,7 +273,7 @@ void SPECK64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
|
||||
}
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef PutBlock<word32, LittleEndian, false> OutBlock;
|
||||
typedef PutBlock<word32, LittleEndian> OutBlock;
|
||||
OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[3])(m_wspace[2]);
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ void SPECK128::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength
|
||||
m_wspace.New(4U);
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word64, LittleEndian, false> KeyBlock;
|
||||
typedef GetBlock<word64, LittleEndian> KeyBlock;
|
||||
KeyBlock kblk(userKey);
|
||||
|
||||
switch (m_kwords)
|
||||
@ -318,7 +318,7 @@ void SPECK128::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength
|
||||
void SPECK128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word64, LittleEndian, false> InBlock;
|
||||
typedef GetBlock<word64, LittleEndian> InBlock;
|
||||
InBlock iblk(inBlock); iblk(m_wspace[1])(m_wspace[0]);
|
||||
|
||||
switch (m_rounds)
|
||||
@ -337,14 +337,14 @@ void SPECK128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
|
||||
}
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef PutBlock<word64, LittleEndian, false> OutBlock;
|
||||
typedef PutBlock<word64, LittleEndian> OutBlock;
|
||||
OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[3])(m_wspace[2]);
|
||||
}
|
||||
|
||||
void SPECK128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||
{
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef GetBlock<word64, LittleEndian, false> InBlock;
|
||||
typedef GetBlock<word64, LittleEndian> InBlock;
|
||||
InBlock iblk(inBlock); iblk(m_wspace[1])(m_wspace[0]);
|
||||
|
||||
switch (m_rounds)
|
||||
@ -363,7 +363,7 @@ void SPECK128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
|
||||
}
|
||||
|
||||
// Do the endian gyrations from the paper and align pointers
|
||||
typedef PutBlock<word64, LittleEndian, false> OutBlock;
|
||||
typedef PutBlock<word64, LittleEndian> OutBlock;
|
||||
OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[3])(m_wspace[2]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user