1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 15:18:16 +00:00

Fixed minor error in offset calculation.

This commit is contained in:
DoZ10 2017-05-15 22:49:44 -04:00
parent 264ec951c2
commit f31f057113
3 changed files with 15 additions and 3 deletions

View File

@ -111,7 +111,7 @@ void chacha20_transform (const u32x w0[4], const u32x w1[4], const u32 position[
x[14] += ctx[14]; x[14] += ctx[14];
x[15] += ctx[15]; x[15] += ctx[15];
if (offset > 36) if (offset > 56)
{ {
/** /**
* Generate a second 64 byte keystream * Generate a second 64 byte keystream
@ -171,6 +171,10 @@ void chacha20_transform (const u32x w0[4], const u32x w1[4], const u32 position[
x[31] += ctx[15]; x[31] += ctx[15];
} }
/**
* Encrypt plaintext with keystream
*/
u32 index = offset / 4; u32 index = offset / 4;
u32 remain = offset % 4; u32 remain = offset % 4;

View File

@ -111,7 +111,7 @@ void chacha20_transform (const u32x w0[4], const u32x w1[4], const u32 position[
x[14] += ctx[14]; x[14] += ctx[14];
x[15] += ctx[15]; x[15] += ctx[15];
if (offset > 36) if (offset > 56)
{ {
/** /**
* Generate a second 64 byte keystream * Generate a second 64 byte keystream
@ -171,6 +171,10 @@ void chacha20_transform (const u32x w0[4], const u32x w1[4], const u32 position[
x[31] += ctx[15]; x[31] += ctx[15];
} }
/**
* Encrypt plaintext with keystream
*/
u32 index = offset / 4; u32 index = offset / 4;
u32 remain = offset % 4; u32 remain = offset % 4;

View File

@ -109,7 +109,7 @@ void chacha20_transform (const u32x w0[4], const u32x w1[4], const u32 position[
x[14] += ctx[14]; x[14] += ctx[14];
x[15] += ctx[15]; x[15] += ctx[15];
if (offset > 36) if (offset > 56)
{ {
/** /**
* Generate a second 64 byte keystream * Generate a second 64 byte keystream
@ -169,6 +169,10 @@ void chacha20_transform (const u32x w0[4], const u32x w1[4], const u32 position[
x[31] += ctx[15]; x[31] += ctx[15];
} }
/**
* Encrypt plaintext with keystream
*/
u32 index = offset / 4; u32 index = offset / 4;
u32 remain = offset % 4; u32 remain = offset % 4;