Restored all cn/2 based algorithms, except cn/r.
This commit is contained in:
parent
235cda1051
commit
9b6ab55936
5 changed files with 1228 additions and 1676 deletions
|
@ -503,9 +503,15 @@ __kernel void cn1(__global ulong *input, __global uint4 *Scratchpad, __global ul
|
|||
c = AES_Round(AES0, AES1, AES2, AES3, c, ((uint4 *)a)[0]);
|
||||
|
||||
{
|
||||
# if (ALGO == ALGO_CN_RWZ)
|
||||
const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(3));
|
||||
const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
|
||||
const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(1));
|
||||
# else
|
||||
const ulong2 chunk1 = as_ulong2(SCRATCHPAD_CHUNK(1));
|
||||
const ulong2 chunk2 = as_ulong2(SCRATCHPAD_CHUNK(2));
|
||||
const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
|
||||
# endif
|
||||
|
||||
SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
|
||||
SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
|
||||
|
@ -544,9 +550,15 @@ __kernel void cn1(__global ulong *input, __global uint4 *Scratchpad, __global ul
|
|||
t ^= chunk2;
|
||||
const ulong2 chunk3 = as_ulong2(SCRATCHPAD_CHUNK(3));
|
||||
|
||||
# if (ALGO == ALGO_CN_RWZ)
|
||||
SCRATCHPAD_CHUNK(1) = as_uint4(chunk1 + bx1);
|
||||
SCRATCHPAD_CHUNK(2) = as_uint4(chunk3 + bx0);
|
||||
SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
|
||||
# else
|
||||
SCRATCHPAD_CHUNK(1) = as_uint4(chunk3 + bx1);
|
||||
SCRATCHPAD_CHUNK(2) = as_uint4(chunk1 + bx0);
|
||||
SCRATCHPAD_CHUNK(3) = as_uint4(chunk2 + ((ulong2 *)a)[0]);
|
||||
# endif
|
||||
}
|
||||
|
||||
a[1] += t.s1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue