diff --git a/OpenCL/inc_hash_functions.cl b/OpenCL/inc_hash_functions.cl index f87012162..c356d8244 100644 --- a/OpenCL/inc_hash_functions.cl +++ b/OpenCL/inc_hash_functions.cl @@ -244,6 +244,11 @@ #define SHIFT_RIGHT_64(x,n) ((x) >> (n)) +#define SHA384_S0_S(x) (rotr64_S ((x), 28) ^ rotr64_S ((x), 34) ^ rotr64_S ((x), 39)) +#define SHA384_S1_S(x) (rotr64_S ((x), 14) ^ rotr64_S ((x), 18) ^ rotr64_S ((x), 41)) +#define SHA384_S2_S(x) (rotr64_S ((x), 1) ^ rotr64_S ((x), 8) ^ SHIFT_RIGHT_64 ((x), 7)) +#define SHA384_S3_S(x) (rotr64_S ((x), 19) ^ rotr64_S ((x), 61) ^ SHIFT_RIGHT_64 ((x), 6)) + #define SHA384_S0(x) (rotr64 ((x), 28) ^ rotr64 ((x), 34) ^ rotr64 ((x), 39)) #define SHA384_S1(x) (rotr64 ((x), 14) ^ rotr64 ((x), 18) ^ rotr64 ((x), 41)) #define SHA384_S2(x) (rotr64 ((x), 1) ^ rotr64 ((x), 8) ^ SHIFT_RIGHT_64 ((x), 7)) diff --git a/OpenCL/inc_hash_sha384.cl b/OpenCL/inc_hash_sha384.cl index 5f7e0e64c..01ca04f90 100644 --- a/OpenCL/inc_hash_sha384.cl +++ b/OpenCL/inc_hash_sha384.cl @@ -1326,7 +1326,7 @@ void sha384_hmac_init_global (sha384_hmac_ctx_t *ctx, __global const u32 *w, con sha384_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha256_hmac_init_global_swap (sha256_hmac_ctx_t *ctx, __global const u32 *w, const int len) +void sha384_hmac_init_global_swap (sha256_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4];