summaryrefslogtreecommitdiff
path: root/vmac.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-10 02:56:19 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-10 02:56:19 +0000
commitcc319dc33cc73b0ec368864a4220604170acb674 (patch)
tree1c52d52d455d3b48e60bfc8b075f4d611068be14 /vmac.cpp
parent77d342339b3149f02aaa3521a27b6216468d43dc (diff)
downloadcryptopp-cc319dc33cc73b0ec368864a4220604170acb674.tar.gz
add x86/x64 assembly for SHA-256,
add DEFAULT_CHANNEL and AAD_CHANNEL, fix macChannel for AuthenticatedEncryptionFilter git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@440 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'vmac.cpp')
-rwxr-xr-xvmac.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/vmac.cpp b/vmac.cpp
index f71bafb..6b490f9 100755
--- a/vmac.cpp
+++ b/vmac.cpp
@@ -57,12 +57,8 @@ void VMAC_Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, con
/* Fill nh key */
in[0] = 0x80;
- for (i = 0; i < m_nhKeySize()*sizeof(word64); i += blockSize)
- {
- cipher.ProcessBlock(in, out.BytePtr());
- ConditionalByteReverse(BIG_ENDIAN_ORDER, m_nhKey()+i/sizeof(word64), out.begin(), blockSize);
- in[15]++;
- }
+ cipher.AdvancedProcessBlocks(in, NULL, (byte *)m_nhKey(), m_nhKeySize()*sizeof(word64), cipher.BT_InBlockIsCounter);
+ ConditionalByteReverse<word64>(BIG_ENDIAN_ORDER, m_nhKey(), m_nhKey(), m_nhKeySize()*sizeof(word64));
/* Fill poly key */
in[0] = 0xC0;
@@ -137,6 +133,7 @@ void VMAC_Base::Resynchronize(const byte *nonce, int len)
void VMAC_Base::HashEndianCorrectedBlock(const word64 *data)
{
assert(false);
+ throw 0;
}
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && CRYPTOPP_BOOL_X86