Skip to content

Commit 49aaacd

Browse files
There is no need to set IV for AES
1 parent 5063a1e commit 49aaacd

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Src/FinderOuter/Services/CorePassService.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public unsafe void MainLoop(int firstItem, ParallelLoopState loopState)
4545
{
4646
// Compute SHA512(pass | salt) iteration times
4747
// AES key is first 32 bytes of hash state
48-
// AES IV is the next 16 bytes
4948
// If decrypted result ^ XOR == 16 the password was correct
5049

5150
using Aes aes = Aes.Create();
@@ -125,14 +124,6 @@ public unsafe void MainLoop(int firstItem, ParallelLoopState loopState)
125124
Sha512Fo.Compress64(ptr, wPt);
126125
}
127126

128-
aes.IV = new byte[16]
129-
{
130-
(byte)(ptr[4] >> 56), (byte)(ptr[4] >> 48), (byte)(ptr[4] >> 40), (byte)(ptr[4] >> 32),
131-
(byte)(ptr[4] >> 24), (byte)(ptr[4] >> 16), (byte)(ptr[4] >> 8), (byte)ptr[4],
132-
133-
(byte)(ptr[5] >> 56), (byte)(ptr[5] >> 48), (byte)(ptr[5] >> 40), (byte)(ptr[5] >> 32),
134-
(byte)(ptr[5] >> 24), (byte)(ptr[5] >> 16), (byte)(ptr[5] >> 8), (byte)ptr[5],
135-
};
136127
aes.Key = new byte[32]
137128
{
138129
(byte)(ptr[0] >> 56), (byte)(ptr[0] >> 48), (byte)(ptr[0] >> 40), (byte)(ptr[0] >> 32),

0 commit comments

Comments
 (0)