mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 04:07:49 +02:00
ChiperBlock XOR
This commit is contained in:
parent
9372b33c2c
commit
37c3a9dcf1
2 changed files with 5 additions and 6 deletions
6
aes.cpp
6
aes.cpp
|
@ -165,8 +165,7 @@ namespace crypto
|
|||
{
|
||||
for (int i = 0; i < numBlocks; i++)
|
||||
{
|
||||
m_LastBlock.ll[0] ^= in[i].ll[0];
|
||||
m_LastBlock.ll[1] ^= in[i].ll[1];
|
||||
m_LastBlock ^= in[i];
|
||||
m_ECBEncryption.Encrypt (&m_LastBlock, &m_LastBlock);
|
||||
out[i] = m_LastBlock;
|
||||
}
|
||||
|
@ -186,8 +185,7 @@ namespace crypto
|
|||
{
|
||||
ChipherBlock tmp = in[i];
|
||||
m_ECBDecryption.Decrypt (in + i, out + i);
|
||||
out[i].ll[0] ^= m_IV.ll[0];
|
||||
out[i].ll[1] ^= m_IV.ll[1];
|
||||
out[i] ^= m_IV;
|
||||
m_IV = tmp;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue