diff --git a/OpenCL/inc_cipher_aes.cl b/OpenCL/inc_cipher_aes.cl index 19dd17d6f..732cae2a6 100644 --- a/OpenCL/inc_cipher_aes.cl +++ b/OpenCL/inc_cipher_aes.cl @@ -698,7 +698,7 @@ __constant u32a rcon[] = // 128 bit key -void aes128_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void aes128_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { ks[0] = ukey[0]; ks[1] = ukey[1]; @@ -724,7 +724,7 @@ void aes128_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u } } -void aes128_InvertKey (u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes128_InvertKey (u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { for (u32 i = 0, j = 40; i < 20; i += 4, j -= 4) { @@ -764,7 +764,7 @@ void aes128_InvertKey (u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TY } } -void aes128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void aes128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ukey_s[4]; @@ -776,7 +776,7 @@ void aes128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_ aes128_ExpandKey (ks, ukey_s, s_te0, s_te1, s_te2, s_te3, s_te4); } -void aes128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ukey_s[4]; @@ -790,7 +790,7 @@ void aes128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_ aes128_InvertKey (ks, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); } -void aes128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void aes128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { const u32 in_s0 = swap32_S (in[0]); const u32 in_s1 = swap32_S (in[1]); @@ -853,7 +853,7 @@ void aes128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0 out[3] = swap32_S (out[3]); } -void aes128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 in_s0 = swap32_S (in[0]); const u32 in_s1 = swap32_S (in[1]); @@ -918,7 +918,7 @@ void aes128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0 // 256 bit key -void aes256_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void aes256_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { ks[0] = ukey[0]; ks[1] = ukey[1]; @@ -963,7 +963,7 @@ void aes256_ExpandKey (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u } } -void aes256_InvertKey (u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes256_InvertKey (u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { for (u32 i = 0, j = 56; i < 28; i += 4, j -= 4) { @@ -1003,7 +1003,7 @@ void aes256_InvertKey (u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TY } } -void aes256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void aes256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ukey_s[8]; @@ -1019,7 +1019,7 @@ void aes256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_ aes256_ExpandKey (ks, ukey_s, s_te0, s_te1, s_te2, s_te3, s_te4); } -void aes256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ukey_s[8]; @@ -1037,7 +1037,7 @@ void aes256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_ aes256_InvertKey (ks, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); } -void aes256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void aes256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { const u32 in_s0 = swap32_S (in[0]); const u32 in_s1 = swap32_S (in[1]); @@ -1100,7 +1100,7 @@ void aes256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0 out[3] = swap32_S (out[3]); } -void aes256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 in_s0 = swap32_S (in[0]); const u32 in_s1 = swap32_S (in[1]); @@ -1165,7 +1165,7 @@ void aes256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0 // wrapper to avoid swap32_S() confusion in the kernel code -void AES128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void AES128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ukey_s[4]; @@ -1177,7 +1177,7 @@ void AES128_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_ aes128_set_encrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3, s_te4); } -void AES128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void AES128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ukey_s[4]; @@ -1189,7 +1189,7 @@ void AES128_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_ aes128_set_decrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); } -void AES128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void AES128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 in_s[4]; @@ -1208,7 +1208,7 @@ void AES128_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0 out[3] = swap32_S (out_s[3]); } -void AES128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void AES128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 in_s[4]; @@ -1227,7 +1227,7 @@ void AES128_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0 out[3] = swap32_S (out_s[3]); } -void AES256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void AES256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ukey_s[8]; @@ -1243,7 +1243,7 @@ void AES256_set_encrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_ aes256_set_encrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3, s_te4); } -void AES256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void AES256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ukey_s[8]; @@ -1259,7 +1259,7 @@ void AES256_set_decrypt_key (u32 *ks, const u32 *ukey, SHM_TYPE u32 *s_te0, SHM_ aes256_set_decrypt_key (ks, ukey_s, s_te0, s_te1, s_te2, s_te3, s_te4, s_td0, s_td1, s_td2, s_td3, s_td4); } -void AES256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +static void AES256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 in_s[4]; @@ -1278,7 +1278,7 @@ void AES256_encrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0 out[3] = swap32_S (out_s[3]); } -void AES256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void AES256_decrypt (const u32 *ks, const u32 *in, u32 *out, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 in_s[4]; diff --git a/OpenCL/inc_cipher_serpent.cl b/OpenCL/inc_cipher_serpent.cl index 783ad5738..9fdccf3fd 100644 --- a/OpenCL/inc_cipher_serpent.cl +++ b/OpenCL/inc_cipher_serpent.cl @@ -403,7 +403,7 @@ // 128 bit key -void serpent128_set_key (u32 *ks, const u32 *ukey) +static void serpent128_set_key (u32 *ks, const u32 *ukey) { #ifdef _unroll #pragma unroll @@ -469,7 +469,7 @@ void serpent128_set_key (u32 *ks, const u32 *ukey) k_set(32,a,b,c,d); sb3(a,b,c,d,e,f,g,h); k_get(32,e,f,g,h); } -void serpent128_encrypt (const u32 *ks, const u32 *in, u32 *out) +static void serpent128_encrypt (const u32 *ks, const u32 *in, u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; @@ -519,7 +519,7 @@ void serpent128_encrypt (const u32 *ks, const u32 *in, u32 *out) out[3] = d; } -void serpent128_decrypt (const u32 *ks, const u32 *in, u32 *out) +static void serpent128_decrypt (const u32 *ks, const u32 *in, u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; @@ -571,7 +571,7 @@ void serpent128_decrypt (const u32 *ks, const u32 *in, u32 *out) // 256 bit key -void serpent256_set_key (u32 *ks, const u32 *ukey) +static void serpent256_set_key (u32 *ks, const u32 *ukey) { #ifdef _unroll #pragma unroll @@ -627,7 +627,7 @@ void serpent256_set_key (u32 *ks, const u32 *ukey) k_set(32,a,b,c,d); sb3(a,b,c,d,e,f,g,h); k_get(32,e,f,g,h); } -void serpent256_encrypt (const u32 *ks, const u32 *in, u32 *out) +static void serpent256_encrypt (const u32 *ks, const u32 *in, u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; @@ -677,7 +677,7 @@ void serpent256_encrypt (const u32 *ks, const u32 *in, u32 *out) out[3] = d; } -void serpent256_decrypt (const u32 *ks, const u32 *in, u32 *out) +static void serpent256_decrypt (const u32 *ks, const u32 *in, u32 *out) { u32 a,b,c,d,e,f,g,h; u32 t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16; diff --git a/OpenCL/inc_cipher_twofish.cl b/OpenCL/inc_cipher_twofish.cl index a81611cc8..017c86410 100644 --- a/OpenCL/inc_cipher_twofish.cl +++ b/OpenCL/inc_cipher_twofish.cl @@ -266,7 +266,7 @@ __constant u32a m_tab[4][256] = #define q42(x,k) q (1, q (0, q (0, q (0, x) ^ extract_byte (k[3], 2)) ^ extract_byte (k[2], 2)) ^ extract_byte (k[1], 2)) ^ extract_byte (k[0], 2) #define q43(x,k) q (1, q (1, q (0, q (1, x) ^ extract_byte (k[3], 3)) ^ extract_byte (k[2], 3)) ^ extract_byte (k[1], 3)) ^ extract_byte (k[0], 3) -u32 mds_rem (u32 p0, u32 p1) +static u32 mds_rem (u32 p0, u32 p1) { #define G_MOD 0x14d @@ -332,7 +332,7 @@ u32 mds_rem (u32 p0, u32 p1) data[1] = rotr32_S (data[1] ^ (t2 + 2 * t3 + lk[4 * (i) + 9]), 1); \ } -u32 h_fun128 (u32 *sk, u32 *lk, const u32 x, const u32 *key) +static u32 h_fun128 (u32 *sk, u32 *lk, const u32 x, const u32 *key) { u32 b0, b1, b2, b3; @@ -349,7 +349,7 @@ u32 h_fun128 (u32 *sk, u32 *lk, const u32 x, const u32 *key) return mds (0, b0) ^ mds (1, b1) ^ mds (2, b2) ^ mds (3, b3); } -void twofish128_set_key (u32 *sk, u32 *lk, const u32 *ukey) +static void twofish128_set_key (u32 *sk, u32 *lk, const u32 *ukey) { u32 me_key[2]; @@ -379,7 +379,7 @@ void twofish128_set_key (u32 *sk, u32 *lk, const u32 *ukey) } } -void twofish128_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +static void twofish128_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) { u32 data[4]; @@ -403,7 +403,7 @@ void twofish128_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) out[3] = data[1] ^ lk[7]; } -void twofish128_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +static void twofish128_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) { u32 data[4]; @@ -465,7 +465,7 @@ void twofish128_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) data[1] = rotr32_S (data[1] ^ (t2 + 2 * t3 + lk[4 * (i) + 9]), 1); \ } -u32 h_fun256 (u32 *sk, u32 *lk, const u32 x, const u32 *key) +static u32 h_fun256 (u32 *sk, u32 *lk, const u32 x, const u32 *key) { u32 b0, b1, b2, b3; @@ -492,7 +492,7 @@ u32 h_fun256 (u32 *sk, u32 *lk, const u32 x, const u32 *key) return mds (0, b0) ^ mds (1, b1) ^ mds (2, b2) ^ mds (3, b3); } -void twofish256_set_key (u32 *sk, u32 *lk, const u32 *ukey) +static void twofish256_set_key (u32 *sk, u32 *lk, const u32 *ukey) { u32 me_key[4]; @@ -528,7 +528,7 @@ void twofish256_set_key (u32 *sk, u32 *lk, const u32 *ukey) } } -void twofish256_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +static void twofish256_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) { u32 data[4]; @@ -552,7 +552,7 @@ void twofish256_encrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) out[3] = data[1] ^ lk[7]; } -void twofish256_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) +static void twofish256_decrypt (const u32 *sk, const u32 *lk, const u32 *in, u32 *out) { u32 data[4]; diff --git a/OpenCL/inc_common.cl b/OpenCL/inc_common.cl index df4beee06..29e84092b 100644 --- a/OpenCL/inc_common.cl +++ b/OpenCL/inc_common.cl @@ -7,7 +7,7 @@ * pure scalar functions */ -int ffz (const u32 v) +static int ffz (const u32 v) { #ifdef _unroll #pragma unroll @@ -22,7 +22,7 @@ int ffz (const u32 v) return -1; } -int hash_comp (const u32 d1[4], __global const u32 *d2) +static int hash_comp (const u32 d1[4], __global const u32 *d2) { if (d1[3] > d2[DGST_R3]) return ( 1); if (d1[3] < d2[DGST_R3]) return (-1); @@ -36,7 +36,7 @@ int hash_comp (const u32 d1[4], __global const u32 *d2) return (0); } -int find_hash (const u32 digest[4], const u32 digests_cnt, __global const digest_t *digests_buf) +static int find_hash (const u32 digest[4], const u32 digests_cnt, __global const digest_t *digests_buf) { for (u32 l = 0, r = digests_cnt; r; r >>= 1) { @@ -59,12 +59,12 @@ int find_hash (const u32 digest[4], const u32 digests_cnt, __global const digest return (-1); } -u32 check_bitmap (__global const u32 *bitmap, const u32 bitmap_mask, const u32 bitmap_shift, const u32 digest) +static u32 check_bitmap (__global const u32 *bitmap, const u32 bitmap_mask, const u32 bitmap_shift, const u32 digest) { return (bitmap[(digest >> bitmap_shift) & bitmap_mask] & (1 << (digest & 0x1f))); } -u32 check (const u32 digest[4], __global const u32 *bitmap_s1_a, __global const u32 *bitmap_s1_b, __global const u32 *bitmap_s1_c, __global const u32 *bitmap_s1_d, __global const u32 *bitmap_s2_a, __global const u32 *bitmap_s2_b, __global const u32 *bitmap_s2_c, __global const u32 *bitmap_s2_d, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2) +static u32 check (const u32 digest[4], __global const u32 *bitmap_s1_a, __global const u32 *bitmap_s1_b, __global const u32 *bitmap_s1_c, __global const u32 *bitmap_s1_d, __global const u32 *bitmap_s2_a, __global const u32 *bitmap_s2_b, __global const u32 *bitmap_s2_c, __global const u32 *bitmap_s2_d, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2) { if (check_bitmap (bitmap_s1_a, bitmap_mask, bitmap_shift1, digest[0]) == 0) return (0); if (check_bitmap (bitmap_s1_b, bitmap_mask, bitmap_shift1, digest[1]) == 0) return (0); @@ -79,7 +79,7 @@ u32 check (const u32 digest[4], __global const u32 *bitmap_s1_a, __global const return (1); } -void mark_hash (__global plain_t *plains_buf, __global u32 *d_result, const u32 salt_pos, const u32 digests_cnt, const u32 digest_pos, const u32 hash_pos, const u32 gid, const u32 il_pos) +static void mark_hash (__global plain_t *plains_buf, __global u32 *d_result, const u32 salt_pos, const u32 digests_cnt, const u32 digest_pos, const u32 hash_pos, const u32 gid, const u32 il_pos) { const u32 idx = atomic_inc (d_result); @@ -100,7 +100,7 @@ void mark_hash (__global plain_t *plains_buf, __global u32 *d_result, const u32 plains_buf[idx].il_pos = il_pos; } -int count_char (const u32 *buf, const int elems, const u32 c) +static int count_char (const u32 *buf, const int elems, const u32 c) { int r = 0; @@ -117,7 +117,7 @@ int count_char (const u32 *buf, const int elems, const u32 c) return r; } -float get_entropy (const u32 *buf, const int elems) +static float get_entropy (const u32 *buf, const int elems) { const int length = elems * 4; @@ -144,7 +144,7 @@ float get_entropy (const u32 *buf, const int elems) * vector functions */ -void truncate_block_4x4_le (u32x w0[4], const u32 len) +static void truncate_block_4x4_le (u32x w0[4], const u32 len) { switch (len) { @@ -254,7 +254,7 @@ void truncate_block_4x4_le (u32x w0[4], const u32 len) } } -void truncate_block_16x4_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 len) +static void truncate_block_16x4_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 len) { switch (len) { @@ -1060,7 +1060,7 @@ void truncate_block_16x4_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], con } } -void truncate_block_4x4_be (u32x w0[4], const u32 len) +static void truncate_block_4x4_be (u32x w0[4], const u32 len) { switch (len) { @@ -1170,7 +1170,7 @@ void truncate_block_4x4_be (u32x w0[4], const u32 len) } } -void truncate_block_16x4_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 len) +static void truncate_block_16x4_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 len) { switch (len) { @@ -1976,7 +1976,7 @@ void truncate_block_16x4_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], con } } -void make_utf16be (const u32x in[4], u32x out1[4], u32x out2[4]) +static void make_utf16be (const u32x in[4], u32x out1[4], u32x out2[4]) { #ifdef IS_NV out2[3] = __byte_perm (in[3], 0, 0x3727); @@ -2001,7 +2001,7 @@ void make_utf16be (const u32x in[4], u32x out1[4], u32x out2[4]) #endif } -void make_utf16beN (const u32x in[4], u32x out1[4], u32x out2[4]) +static void make_utf16beN (const u32x in[4], u32x out1[4], u32x out2[4]) { #ifdef IS_NV out2[3] = __byte_perm (in[3], 0, 0x1707); @@ -2026,7 +2026,7 @@ void make_utf16beN (const u32x in[4], u32x out1[4], u32x out2[4]) #endif } -void make_utf16le (const u32x in[4], u32x out1[4], u32x out2[4]) +static void make_utf16le (const u32x in[4], u32x out1[4], u32x out2[4]) { #ifdef IS_NV out2[3] = __byte_perm (in[3], 0, 0x7372); @@ -2051,7 +2051,7 @@ void make_utf16le (const u32x in[4], u32x out1[4], u32x out2[4]) #endif } -void make_utf16leN (const u32x in[4], u32x out1[4], u32x out2[4]) +static void make_utf16leN (const u32x in[4], u32x out1[4], u32x out2[4]) { #ifdef IS_NV out2[3] = __byte_perm (in[3], 0, 0x7170); @@ -2076,7 +2076,7 @@ void make_utf16leN (const u32x in[4], u32x out1[4], u32x out2[4]) #endif } -void undo_utf16be (const u32x in1[4], const u32x in2[4], u32x out[4]) +static void undo_utf16be (const u32x in1[4], const u32x in2[4], u32x out[4]) { #ifdef IS_NV out[0] = __byte_perm (in1[0], in1[1], 0x4602); @@ -2097,7 +2097,7 @@ void undo_utf16be (const u32x in1[4], const u32x in2[4], u32x out[4]) #endif } -void undo_utf16le (const u32x in1[4], const u32x in2[4], u32x out[4]) +static void undo_utf16le (const u32x in1[4], const u32x in2[4], u32x out[4]) { #ifdef IS_NV out[0] = __byte_perm (in1[0], in1[1], 0x6420); @@ -2118,7 +2118,7 @@ void undo_utf16le (const u32x in1[4], const u32x in2[4], u32x out[4]) #endif } -void append_0x80_1x4 (u32x w0[4], const u32 offset) +static void append_0x80_1x4 (u32x w0[4], const u32 offset) { const u32 tmp = 0x80 << ((offset & 3) * 8); @@ -2128,7 +2128,7 @@ void append_0x80_1x4 (u32x w0[4], const u32 offset) w0[3] |= (offset >= 12) ? tmp : 0; } -void append_0x80_2x4 (u32x w0[4], u32x w1[4], const u32 offset) +static void append_0x80_2x4 (u32x w0[4], u32x w1[4], const u32 offset) { const u32 tmp = 0x80 << ((offset & 3) * 8); @@ -2142,7 +2142,7 @@ void append_0x80_2x4 (u32x w0[4], u32x w1[4], const u32 offset) w1[3] |= (offset >= 28) ? tmp : 0; } -void append_0x80_3x4 (u32x w0[4], u32x w1[4], u32x w2[4], const u32 offset) +static void append_0x80_3x4 (u32x w0[4], u32x w1[4], u32x w2[4], const u32 offset) { const u32 tmp = 0x80 << ((offset & 3) * 8); @@ -2160,7 +2160,7 @@ void append_0x80_3x4 (u32x w0[4], u32x w1[4], u32x w2[4], const u32 offset) w2[3] |= (offset >= 44) ? tmp : 0; } -void append_0x80_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 offset) +static void append_0x80_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 offset) { const u32 tmp = 0x80 << ((offset & 3) * 8); @@ -2182,7 +2182,7 @@ void append_0x80_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 w3[3] |= (offset >= 60) ? tmp : 0; } -void append_0x80_8x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32 offset) +static void append_0x80_8x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32 offset) { switch (offset) { @@ -2700,7 +2700,7 @@ void append_0x80_8x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4] } } -void append_0x80_1x16 (u32x w[16], const u32 offset) +static void append_0x80_1x16 (u32x w[16], const u32 offset) { switch (offset) { @@ -2962,7 +2962,7 @@ void append_0x80_1x16 (u32x w[16], const u32 offset) } } -void switch_buffer_by_offset_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 offset) +static void switch_buffer_by_offset_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 offset) { const int offset_mod_4 = offset & 3; @@ -3655,7 +3655,7 @@ void switch_buffer_by_offset_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], #endif } -void switch_buffer_by_offset_carry_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x c0[4], u32x c1[4], u32x c2[4], u32x c3[4], const u32 offset) +static void switch_buffer_by_offset_carry_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x c0[4], u32x c1[4], u32x c2[4], u32x c3[4], const u32 offset) { const int offset_mod_4 = offset & 3; @@ -4971,7 +4971,7 @@ void switch_buffer_by_offset_carry_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x #endif } -void switch_buffer_by_offset_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 offset) +static void switch_buffer_by_offset_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -5626,7 +5626,7 @@ void switch_buffer_by_offset_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], #endif } -void switch_buffer_by_offset_carry_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x c0[4], u32x c1[4], u32x c2[4], u32x c3[4], const u32 offset) +static void switch_buffer_by_offset_carry_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x c0[4], u32x c1[4], u32x c2[4], u32x c3[4], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -6553,7 +6553,7 @@ void switch_buffer_by_offset_carry_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x #endif } -void switch_buffer_by_offset_8x4_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32 offset) +static void switch_buffer_by_offset_8x4_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32 offset) { const int offset_mod_4 = offset & 3; @@ -8350,7 +8350,7 @@ void switch_buffer_by_offset_8x4_le (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3 #endif } -void switch_buffer_by_offset_8x4_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32 offset) +static void switch_buffer_by_offset_8x4_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -10669,7 +10669,7 @@ void switch_buffer_by_offset_8x4_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3 #endif } -void switch_buffer_by_offset_8x4_carry_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], u32x c0[4], u32x c1[4], u32x c2[4], u32x c3[4], u32x c4[4], u32x c5[4], u32x c6[4], u32x c7[4], const u32 offset) +static void switch_buffer_by_offset_8x4_carry_be (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], u32x c0[4], u32x c1[4], u32x c2[4], u32x c3[4], u32x c4[4], u32x c5[4], u32x c6[4], u32x c7[4], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -14044,7 +14044,7 @@ void switch_buffer_by_offset_8x4_carry_be (u32x w0[4], u32x w1[4], u32x w2[4], u #endif } -void switch_buffer_by_offset_1x64_le (u32x w[64], const u32 offset) +static void switch_buffer_by_offset_1x64_le (u32x w[64], const u32 offset) { const int offset_mod_4 = offset & 3; @@ -22775,7 +22775,7 @@ void switch_buffer_by_offset_1x64_le (u32x w[64], const u32 offset) #endif } -void switch_buffer_by_offset_1x64_be (u32x w[64], const u32 offset) +static void switch_buffer_by_offset_1x64_be (u32x w[64], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -31494,7 +31494,7 @@ void switch_buffer_by_offset_1x64_be (u32x w[64], const u32 offset) #endif } -void overwrite_at_le (u32x sw[16], const u32x w0, const u32 salt_len) +static void overwrite_at_le (u32x sw[16], const u32x w0, const u32 salt_len) { #if defined cl_amd_media_ops switch (salt_len) @@ -31683,7 +31683,7 @@ void overwrite_at_le (u32x sw[16], const u32x w0, const u32 salt_len) #endif } -void overwrite_at_be (u32x sw[16], const u32x w0, const u32 salt_len) +static void overwrite_at_be (u32x sw[16], const u32x w0, const u32 salt_len) { // would be nice to have optimization based on amd_bytealign as with _le counterpart @@ -31780,7 +31780,7 @@ void overwrite_at_be (u32x sw[16], const u32x w0, const u32 salt_len) } } -void overwrite_at_le_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32x wx, const u32 salt_len) +static void overwrite_at_le_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32x wx, const u32 salt_len) { #if defined cl_amd_media_ops switch (salt_len) @@ -32145,7 +32145,7 @@ void overwrite_at_le_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const #endif } -void overwrite_at_be_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32x wx, const u32 salt_len) +static void overwrite_at_be_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32x wx, const u32 salt_len) { // would be nice to have optimization based on amd_bytealign as with _le counterpart @@ -32334,7 +32334,7 @@ void overwrite_at_be_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const * vector functions as scalar (for outer loop usage) */ -void append_0x01_2x4_S (u32 w0[4], u32 w1[4], const u32 offset) +static void append_0x01_2x4_S (u32 w0[4], u32 w1[4], const u32 offset) { const u32 tmp = 0x01 << ((offset & 3) * 8); @@ -32348,7 +32348,7 @@ void append_0x01_2x4_S (u32 w0[4], u32 w1[4], const u32 offset) w1[3] |= (offset >= 28) ? tmp : 0; } -void append_0x80_1x4_S (u32 w0[4], const u32 offset) +static void append_0x80_1x4_S (u32 w0[4], const u32 offset) { const u32 tmp = 0x80 << ((offset & 3) * 8); @@ -32358,7 +32358,7 @@ void append_0x80_1x4_S (u32 w0[4], const u32 offset) w0[3] |= (offset >= 12) ? tmp : 0; } -void append_0x80_2x4_S (u32 w0[4], u32 w1[4], const u32 offset) +static void append_0x80_2x4_S (u32 w0[4], u32 w1[4], const u32 offset) { const u32 tmp = 0x80 << ((offset & 3) * 8); @@ -32372,7 +32372,7 @@ void append_0x80_2x4_S (u32 w0[4], u32 w1[4], const u32 offset) w1[3] |= (offset >= 28) ? tmp : 0; } -void append_0x80_3x4_S (u32 w0[4], u32 w1[4], u32 w2[4], const u32 offset) +static void append_0x80_3x4_S (u32 w0[4], u32 w1[4], u32 w2[4], const u32 offset) { const u32 tmp = 0x80 << ((offset & 3) * 8); @@ -32390,7 +32390,7 @@ void append_0x80_3x4_S (u32 w0[4], u32 w1[4], u32 w2[4], const u32 offset) w2[3] |= (offset >= 44) ? tmp : 0; } -void append_0x80_4x4_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset) +static void append_0x80_4x4_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset) { const u32 tmp = 0x80 << ((offset & 3) * 8); @@ -32412,7 +32412,7 @@ void append_0x80_4x4_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 of w3[3] |= (offset >= 60) ? tmp : 0; } -void append_0x80_8x4_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const u32 offset) +static void append_0x80_8x4_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const u32 offset) { switch (offset) { @@ -32930,7 +32930,7 @@ void append_0x80_8x4_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u } } -void make_utf16be_S (const u32 in[4], u32 out1[4], u32 out2[4]) +static void make_utf16be_S (const u32 in[4], u32 out1[4], u32 out2[4]) { #ifdef IS_NV out2[3] = __byte_perm_S (in[3], 0, 0x3727); @@ -32955,7 +32955,7 @@ void make_utf16be_S (const u32 in[4], u32 out1[4], u32 out2[4]) #endif } -void make_utf16le_S (const u32 in[4], u32 out1[4], u32 out2[4]) +static void make_utf16le_S (const u32 in[4], u32 out1[4], u32 out2[4]) { #ifdef IS_NV out2[3] = __byte_perm_S (in[3], 0, 0x7372); @@ -32980,7 +32980,7 @@ void make_utf16le_S (const u32 in[4], u32 out1[4], u32 out2[4]) #endif } -void undo_utf16be_S (const u32 in1[4], const u32 in2[4], u32 out[4]) +static void undo_utf16be_S (const u32 in1[4], const u32 in2[4], u32 out[4]) { #ifdef IS_NV out[0] = __byte_perm_S (in1[0], in1[1], 0x4602); @@ -33001,7 +33001,7 @@ void undo_utf16be_S (const u32 in1[4], const u32 in2[4], u32 out[4]) #endif } -void undo_utf16le_S (const u32 in1[4], const u32 in2[4], u32 out[4]) +static void undo_utf16le_S (const u32 in1[4], const u32 in2[4], u32 out[4]) { #ifdef IS_NV out[0] = __byte_perm_S (in1[0], in1[1], 0x6420); @@ -33022,7 +33022,7 @@ void undo_utf16le_S (const u32 in1[4], const u32 in2[4], u32 out[4]) #endif } -void switch_buffer_by_offset_le_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset) +static void switch_buffer_by_offset_le_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset) { const int offset_mod_4 = offset & 3; @@ -33715,7 +33715,7 @@ void switch_buffer_by_offset_le_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], c #endif } -void switch_buffer_by_offset_carry_le_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 c0[4], u32 c1[4], u32 c2[4], u32 c3[4], const u32 offset) +static void switch_buffer_by_offset_carry_le_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 c0[4], u32 c1[4], u32 c2[4], u32 c3[4], const u32 offset) { const int offset_mod_4 = offset & 3; @@ -35031,7 +35031,7 @@ void switch_buffer_by_offset_carry_le_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3 #endif } -void switch_buffer_by_offset_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset) +static void switch_buffer_by_offset_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -35686,7 +35686,7 @@ void switch_buffer_by_offset_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], c #endif } -void switch_buffer_by_offset_carry_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 c0[4], u32 c1[4], u32 c2[4], u32 c3[4], const u32 offset) +static void switch_buffer_by_offset_carry_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 c0[4], u32 c1[4], u32 c2[4], u32 c3[4], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -36613,7 +36613,7 @@ void switch_buffer_by_offset_carry_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3 #endif } -void switch_buffer_by_offset_8x4_le_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const u32 offset) +static void switch_buffer_by_offset_8x4_le_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const u32 offset) { const int offset_mod_4 = offset & 3; @@ -38410,7 +38410,7 @@ void switch_buffer_by_offset_8x4_le_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4 #endif } -void switch_buffer_by_offset_8x4_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const u32 offset) +static void switch_buffer_by_offset_8x4_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -40729,7 +40729,7 @@ void switch_buffer_by_offset_8x4_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4 #endif } -void switch_buffer_by_offset_8x4_carry_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], u32 c0[4], u32 c1[4], u32 c2[4], u32 c3[4], u32 c4[4], u32 c5[4], u32 c6[4], u32 c7[4], const u32 offset) +static void switch_buffer_by_offset_8x4_carry_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], u32 c0[4], u32 c1[4], u32 c2[4], u32 c3[4], u32 c4[4], u32 c5[4], u32 c6[4], u32 c7[4], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -44104,7 +44104,7 @@ void switch_buffer_by_offset_8x4_carry_be_S (u32 w0[4], u32 w1[4], u32 w2[4], u3 #endif } -void switch_buffer_by_offset_1x64_le_S (u32 w[64], const u32 offset) +static void switch_buffer_by_offset_1x64_le_S (u32 w[64], const u32 offset) { const int offset_mod_4 = offset & 3; @@ -52835,7 +52835,7 @@ void switch_buffer_by_offset_1x64_le_S (u32 w[64], const u32 offset) #endif } -void switch_buffer_by_offset_1x64_be_S (u32 w[64], const u32 offset) +static void switch_buffer_by_offset_1x64_be_S (u32 w[64], const u32 offset) { #if defined IS_AMD || defined IS_GENERIC switch (offset / 4) @@ -61618,7 +61618,7 @@ void switch_buffer_by_offset_1x64_be_S (u32 w[64], const u32 offset) PACKSV4 (s6, v6, e); \ PACKSV4 (s7, v7, e); -void switch_buffer_by_offset_le_VV (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32x offset) +static void switch_buffer_by_offset_le_VV (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32x offset) { #if VECT_SIZE == 1 @@ -61678,7 +61678,7 @@ void switch_buffer_by_offset_le_VV (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[ #endif } -void switch_buffer_by_offset_8x4_le_VV (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32x offset) +static void switch_buffer_by_offset_8x4_le_VV (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32x offset) { #if VECT_SIZE == 1 @@ -61858,7 +61858,7 @@ void switch_buffer_by_offset_8x4_le_VV (u32x w0[4], u32x w1[4], u32x w2[4], u32x #endif } -void append_0x01_2x4_VV (u32x w0[4], u32x w1[4], const u32x offset) +static void append_0x01_2x4_VV (u32x w0[4], u32x w1[4], const u32x offset) { #if VECT_SIZE == 1 @@ -61916,7 +61916,7 @@ void append_0x01_2x4_VV (u32x w0[4], u32x w1[4], const u32x offset) #endif } -void append_0x80_2x4_VV (u32x w0[4], u32x w1[4], const u32x offset) +static void append_0x80_2x4_VV (u32x w0[4], u32x w1[4], const u32x offset) { #if VECT_SIZE == 1 @@ -61974,7 +61974,7 @@ void append_0x80_2x4_VV (u32x w0[4], u32x w1[4], const u32x offset) #endif } -void append_0x80_4x4_VV (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32x offset) +static void append_0x80_4x4_VV (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32x offset) { #if VECT_SIZE == 1 diff --git a/OpenCL/inc_hash_md4.cl b/OpenCL/inc_hash_md4.cl index 5bc5d5978..9176a1d4e 100644 --- a/OpenCL/inc_hash_md4.cl +++ b/OpenCL/inc_hash_md4.cl @@ -17,7 +17,7 @@ typedef struct md4_ctx } md4_ctx_t; -void md4_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[4]) +static void md4_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[4]) { u32 a = digest[0]; u32 b = digest[1]; @@ -81,7 +81,7 @@ void md4_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 digest[3] += d; } -void md4_init (md4_ctx_t *ctx) +static void md4_init (md4_ctx_t *ctx) { ctx->h[0] = MD4M_A; ctx->h[1] = MD4M_B; @@ -108,7 +108,7 @@ void md4_init (md4_ctx_t *ctx) ctx->len = 0; } -void md4_update_64 (md4_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void md4_update_64 (md4_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -186,7 +186,7 @@ void md4_update_64 (md4_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], } } -void md4_update (md4_ctx_t *ctx, const u32 *w, const int len) +static void md4_update (md4_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -238,7 +238,7 @@ void md4_update (md4_ctx_t *ctx, const u32 *w, const int len) md4_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md4_update_swap (md4_ctx_t *ctx, const u32 *w, const int len) +static void md4_update_swap (md4_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -324,7 +324,7 @@ void md4_update_swap (md4_ctx_t *ctx, const u32 *w, const int len) md4_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md4_update_utf16le (md4_ctx_t *ctx, const u32 *w, const int len) +static void md4_update_utf16le (md4_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -366,7 +366,7 @@ void md4_update_utf16le (md4_ctx_t *ctx, const u32 *w, const int len) md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md4_update_utf16le_swap (md4_ctx_t *ctx, const u32 *w, const int len) +static void md4_update_utf16le_swap (md4_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -442,7 +442,7 @@ void md4_update_utf16le_swap (md4_ctx_t *ctx, const u32 *w, const int len) md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md4_update_global (md4_ctx_t *ctx, const __global u32 *w, const int len) +static void md4_update_global (md4_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -494,7 +494,7 @@ void md4_update_global (md4_ctx_t *ctx, const __global u32 *w, const int len) md4_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md4_update_global_swap (md4_ctx_t *ctx, const __global u32 *w, const int len) +static void md4_update_global_swap (md4_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -580,7 +580,7 @@ void md4_update_global_swap (md4_ctx_t *ctx, const __global u32 *w, const int le md4_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md4_update_global_utf16le (md4_ctx_t *ctx, const __global u32 *w, const int len) +static void md4_update_global_utf16le (md4_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -622,7 +622,7 @@ void md4_update_global_utf16le (md4_ctx_t *ctx, const __global u32 *w, const int md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md4_update_global_utf16le_swap (md4_ctx_t *ctx, const __global u32 *w, const int len) +static void md4_update_global_utf16le_swap (md4_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -698,7 +698,7 @@ void md4_update_global_utf16le_swap (md4_ctx_t *ctx, const __global u32 *w, cons md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md4_final (md4_ctx_t *ctx) +static void md4_final (md4_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -741,7 +741,7 @@ typedef struct md4_hmac_ctx } md4_hmac_ctx_t; -void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) +static void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) { u32 t0[4]; u32 t1[4]; @@ -795,7 +795,7 @@ void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], co md4_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void md4_hmac_init (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md4_hmac_init (md4_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -852,7 +852,7 @@ void md4_hmac_init (md4_hmac_ctx_t *ctx, const u32 *w, const int len) md4_hmac_init_64 (ctx, w0, w1, w2, w3); } -void md4_hmac_init_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md4_hmac_init_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -909,7 +909,7 @@ void md4_hmac_init_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) md4_hmac_init_64 (ctx, w0, w1, w2, w3); } -void md4_hmac_init_global (md4_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void md4_hmac_init_global (md4_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -966,7 +966,7 @@ void md4_hmac_init_global (md4_hmac_ctx_t *ctx, __global const u32 *w, const int md4_hmac_init_64 (ctx, w0, w1, w2, w3); } -void md4_hmac_init_global_swap (md4_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void md4_hmac_init_global_swap (md4_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1023,52 +1023,52 @@ void md4_hmac_init_global_swap (md4_hmac_ctx_t *ctx, __global const u32 *w, cons md4_hmac_init_64 (ctx, w0, w1, w2, w3); } -void md4_hmac_update_64 (md4_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void md4_hmac_update_64 (md4_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { md4_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void md4_hmac_update (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md4_hmac_update (md4_hmac_ctx_t *ctx, const u32 *w, const int len) { md4_update (&ctx->ipad, w, len); } -void md4_hmac_update_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md4_hmac_update_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) { md4_update_swap (&ctx->ipad, w, len); } -void md4_hmac_update_utf16le (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md4_hmac_update_utf16le (md4_hmac_ctx_t *ctx, const u32 *w, const int len) { md4_update_utf16le (&ctx->ipad, w, len); } -void md4_hmac_update_utf16le_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md4_hmac_update_utf16le_swap (md4_hmac_ctx_t *ctx, const u32 *w, const int len) { md4_update_utf16le_swap (&ctx->ipad, w, len); } -void md4_hmac_update_global (md4_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void md4_hmac_update_global (md4_hmac_ctx_t *ctx, const __global u32 *w, const int len) { md4_update_global (&ctx->ipad, w, len); } -void md4_hmac_update_global_swap (md4_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void md4_hmac_update_global_swap (md4_hmac_ctx_t *ctx, const __global u32 *w, const int len) { md4_update_global_swap (&ctx->ipad, w, len); } -void md4_hmac_update_global_utf16le (md4_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void md4_hmac_update_global_utf16le (md4_hmac_ctx_t *ctx, const __global u32 *w, const int len) { md4_update_global_utf16le (&ctx->ipad, w, len); } -void md4_hmac_update_global_utf16le_swap (md4_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void md4_hmac_update_global_utf16le_swap (md4_hmac_ctx_t *ctx, const __global u32 *w, const int len) { md4_update_global_utf16le_swap (&ctx->ipad, w, len); } -void md4_hmac_final (md4_hmac_ctx_t *ctx) +static void md4_hmac_final (md4_hmac_ctx_t *ctx) { md4_final (&ctx->ipad); @@ -1114,7 +1114,7 @@ typedef struct md4_ctx_vector } md4_ctx_vector_t; -void md4_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[4]) +static void md4_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[4]) { u32x a = digest[0]; u32x b = digest[1]; @@ -1178,7 +1178,7 @@ void md4_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], digest[3] += d; } -void md4_init_vector (md4_ctx_vector_t *ctx) +static void md4_init_vector (md4_ctx_vector_t *ctx) { ctx->h[0] = MD4M_A; ctx->h[1] = MD4M_B; @@ -1205,7 +1205,7 @@ void md4_init_vector (md4_ctx_vector_t *ctx) ctx->len = 0; } -void md4_init_vector_from_scalar (md4_ctx_vector_t *ctx, md4_ctx_t *ctx0) +static void md4_init_vector_from_scalar (md4_ctx_vector_t *ctx, md4_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1232,7 +1232,7 @@ void md4_init_vector_from_scalar (md4_ctx_vector_t *ctx, md4_ctx_t *ctx0) ctx->len = ctx0->len; } -void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -1310,7 +1310,7 @@ void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w } } -void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int len) +static void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1362,7 +1362,7 @@ void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int len) md4_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md4_update_vector_swap (md4_ctx_vector_t *ctx, const u32x *w, const int len) +static void md4_update_vector_swap (md4_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1448,7 +1448,7 @@ void md4_update_vector_swap (md4_ctx_vector_t *ctx, const u32x *w, const int len md4_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md4_update_vector_utf16le (md4_ctx_vector_t *ctx, const u32x *w, const int len) +static void md4_update_vector_utf16le (md4_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1490,7 +1490,7 @@ void md4_update_vector_utf16le (md4_ctx_vector_t *ctx, const u32x *w, const int md4_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md4_update_vector_utf16le_swap (md4_ctx_vector_t *ctx, const u32x *w, const int len) +static void md4_update_vector_utf16le_swap (md4_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1566,7 +1566,7 @@ void md4_update_vector_utf16le_swap (md4_ctx_vector_t *ctx, const u32x *w, const md4_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md4_final_vector (md4_ctx_vector_t *ctx) +static void md4_final_vector (md4_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1609,7 +1609,7 @@ typedef struct md4_hmac_ctx_vector } md4_hmac_ctx_vector_t; -void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) +static void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) { u32x t0[4]; u32x t1[4]; @@ -1663,7 +1663,7 @@ void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x w0[4], cons md4_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void md4_hmac_init_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void md4_hmac_init_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1720,17 +1720,17 @@ void md4_hmac_init_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int md4_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -void md4_hmac_update_vector_64 (md4_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void md4_hmac_update_vector_64 (md4_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { md4_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void md4_hmac_update_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void md4_hmac_update_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { md4_update_vector (&ctx->ipad, w, len); } -void md4_hmac_final_vector (md4_hmac_ctx_vector_t *ctx) +static void md4_hmac_final_vector (md4_hmac_ctx_vector_t *ctx) { md4_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_md5.cl b/OpenCL/inc_hash_md5.cl index 95e06cbef..99bb61793 100644 --- a/OpenCL/inc_hash_md5.cl +++ b/OpenCL/inc_hash_md5.cl @@ -17,7 +17,7 @@ typedef struct md5_ctx } md5_ctx_t; -void md5_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[4]) +static void md5_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[4]) { u32 a = digest[0]; u32 b = digest[1]; @@ -115,7 +115,7 @@ void md5_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 digest[3] += d; } -void md5_init (md5_ctx_t *ctx) +static void md5_init (md5_ctx_t *ctx) { ctx->h[0] = MD5M_A; ctx->h[1] = MD5M_B; @@ -142,7 +142,7 @@ void md5_init (md5_ctx_t *ctx) ctx->len = 0; } -void md5_update_64 (md5_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void md5_update_64 (md5_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -220,7 +220,7 @@ void md5_update_64 (md5_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], } } -void md5_update (md5_ctx_t *ctx, const u32 *w, const int len) +static void md5_update (md5_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -272,7 +272,7 @@ void md5_update (md5_ctx_t *ctx, const u32 *w, const int len) md5_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md5_update_swap (md5_ctx_t *ctx, const u32 *w, const int len) +static void md5_update_swap (md5_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -358,7 +358,7 @@ void md5_update_swap (md5_ctx_t *ctx, const u32 *w, const int len) md5_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md5_update_utf16le (md5_ctx_t *ctx, const u32 *w, const int len) +static void md5_update_utf16le (md5_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -400,7 +400,7 @@ void md5_update_utf16le (md5_ctx_t *ctx, const u32 *w, const int len) md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md5_update_utf16le_swap (md5_ctx_t *ctx, const u32 *w, const int len) +static void md5_update_utf16le_swap (md5_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -476,7 +476,7 @@ void md5_update_utf16le_swap (md5_ctx_t *ctx, const u32 *w, const int len) md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md5_update_global (md5_ctx_t *ctx, const __global u32 *w, const int len) +static void md5_update_global (md5_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -528,7 +528,7 @@ void md5_update_global (md5_ctx_t *ctx, const __global u32 *w, const int len) md5_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md5_update_global_swap (md5_ctx_t *ctx, const __global u32 *w, const int len) +static void md5_update_global_swap (md5_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -614,7 +614,7 @@ void md5_update_global_swap (md5_ctx_t *ctx, const __global u32 *w, const int le md5_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md5_update_global_utf16le (md5_ctx_t *ctx, const __global u32 *w, const int len) +static void md5_update_global_utf16le (md5_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -656,7 +656,7 @@ void md5_update_global_utf16le (md5_ctx_t *ctx, const __global u32 *w, const int md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md5_update_global_utf16le_swap (md5_ctx_t *ctx, const __global u32 *w, const int len) +static void md5_update_global_utf16le_swap (md5_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -732,7 +732,7 @@ void md5_update_global_utf16le_swap (md5_ctx_t *ctx, const __global u32 *w, cons md5_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md5_final (md5_ctx_t *ctx) +static void md5_final (md5_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -775,7 +775,7 @@ typedef struct md5_hmac_ctx } md5_hmac_ctx_t; -void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) +static void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) { u32 t0[4]; u32 t1[4]; @@ -829,7 +829,7 @@ void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], co md5_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void md5_hmac_init (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md5_hmac_init (md5_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -886,7 +886,7 @@ void md5_hmac_init (md5_hmac_ctx_t *ctx, const u32 *w, const int len) md5_hmac_init_64 (ctx, w0, w1, w2, w3); } -void md5_hmac_init_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md5_hmac_init_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -943,7 +943,7 @@ void md5_hmac_init_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) md5_hmac_init_64 (ctx, w0, w1, w2, w3); } -void md5_hmac_init_global (md5_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void md5_hmac_init_global (md5_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1000,7 +1000,7 @@ void md5_hmac_init_global (md5_hmac_ctx_t *ctx, __global const u32 *w, const int md5_hmac_init_64 (ctx, w0, w1, w2, w3); } -void md5_hmac_init_global_swap (md5_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void md5_hmac_init_global_swap (md5_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1057,52 +1057,52 @@ void md5_hmac_init_global_swap (md5_hmac_ctx_t *ctx, __global const u32 *w, cons md5_hmac_init_64 (ctx, w0, w1, w2, w3); } -void md5_hmac_update_64 (md5_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void md5_hmac_update_64 (md5_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { md5_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void md5_hmac_update (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md5_hmac_update (md5_hmac_ctx_t *ctx, const u32 *w, const int len) { md5_update (&ctx->ipad, w, len); } -void md5_hmac_update_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md5_hmac_update_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) { md5_update_swap (&ctx->ipad, w, len); } -void md5_hmac_update_utf16le (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md5_hmac_update_utf16le (md5_hmac_ctx_t *ctx, const u32 *w, const int len) { md5_update_utf16le (&ctx->ipad, w, len); } -void md5_hmac_update_utf16le_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) +static void md5_hmac_update_utf16le_swap (md5_hmac_ctx_t *ctx, const u32 *w, const int len) { md5_update_utf16le_swap (&ctx->ipad, w, len); } -void md5_hmac_update_global (md5_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void md5_hmac_update_global (md5_hmac_ctx_t *ctx, const __global u32 *w, const int len) { md5_update_global (&ctx->ipad, w, len); } -void md5_hmac_update_global_swap (md5_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void md5_hmac_update_global_swap (md5_hmac_ctx_t *ctx, const __global u32 *w, const int len) { md5_update_global_swap (&ctx->ipad, w, len); } -void md5_hmac_update_global_utf16le (md5_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void md5_hmac_update_global_utf16le (md5_hmac_ctx_t *ctx, const __global u32 *w, const int len) { md5_update_global_utf16le (&ctx->ipad, w, len); } -void md5_hmac_update_global_utf16le_swap (md5_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void md5_hmac_update_global_utf16le_swap (md5_hmac_ctx_t *ctx, const __global u32 *w, const int len) { md5_update_global_utf16le_swap (&ctx->ipad, w, len); } -void md5_hmac_final (md5_hmac_ctx_t *ctx) +static void md5_hmac_final (md5_hmac_ctx_t *ctx) { md5_final (&ctx->ipad); @@ -1148,7 +1148,7 @@ typedef struct md5_ctx_vector } md5_ctx_vector_t; -void md5_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[4]) +static void md5_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[4]) { u32x a = digest[0]; u32x b = digest[1]; @@ -1246,7 +1246,7 @@ void md5_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], digest[3] += d; } -void md5_init_vector (md5_ctx_vector_t *ctx) +static void md5_init_vector (md5_ctx_vector_t *ctx) { ctx->h[0] = MD5M_A; ctx->h[1] = MD5M_B; @@ -1273,7 +1273,7 @@ void md5_init_vector (md5_ctx_vector_t *ctx) ctx->len = 0; } -void md5_init_vector_from_scalar (md5_ctx_vector_t *ctx, md5_ctx_t *ctx0) +static void md5_init_vector_from_scalar (md5_ctx_vector_t *ctx, md5_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1300,7 +1300,7 @@ void md5_init_vector_from_scalar (md5_ctx_vector_t *ctx, md5_ctx_t *ctx0) ctx->len = ctx0->len; } -void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -1378,7 +1378,7 @@ void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w } } -void md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len) +static void md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1430,7 +1430,7 @@ void md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len) md5_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md5_update_vector_swap (md5_ctx_vector_t *ctx, const u32x *w, const int len) +static void md5_update_vector_swap (md5_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1516,7 +1516,7 @@ void md5_update_vector_swap (md5_ctx_vector_t *ctx, const u32x *w, const int len md5_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void md5_update_vector_utf16le (md5_ctx_vector_t *ctx, const u32x *w, const int len) +static void md5_update_vector_utf16le (md5_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1558,7 +1558,7 @@ void md5_update_vector_utf16le (md5_ctx_vector_t *ctx, const u32x *w, const int md5_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md5_update_vector_utf16le_swap (md5_ctx_vector_t *ctx, const u32x *w, const int len) +static void md5_update_vector_utf16le_swap (md5_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1634,7 +1634,7 @@ void md5_update_vector_utf16le_swap (md5_ctx_vector_t *ctx, const u32x *w, const md5_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void md5_final_vector (md5_ctx_vector_t *ctx) +static void md5_final_vector (md5_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1677,7 +1677,7 @@ typedef struct md5_hmac_ctx_vector } md5_hmac_ctx_vector_t; -void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) +static void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) { u32x t0[4]; u32x t1[4]; @@ -1731,7 +1731,7 @@ void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x w0[4], cons md5_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void md5_hmac_init_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void md5_hmac_init_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1788,17 +1788,17 @@ void md5_hmac_init_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int md5_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -void md5_hmac_update_vector_64 (md5_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void md5_hmac_update_vector_64 (md5_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { md5_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void md5_hmac_update_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void md5_hmac_update_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { md5_update_vector (&ctx->ipad, w, len); } -void md5_hmac_final_vector (md5_hmac_ctx_vector_t *ctx) +static void md5_hmac_final_vector (md5_hmac_ctx_vector_t *ctx) { md5_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_ripemd160.cl b/OpenCL/inc_hash_ripemd160.cl index 709ad3eb2..2b2c07ab0 100644 --- a/OpenCL/inc_hash_ripemd160.cl +++ b/OpenCL/inc_hash_ripemd160.cl @@ -17,7 +17,7 @@ typedef struct ripemd160_ctx } ripemd160_ctx_t; -void ripemd160_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[5]) +static void ripemd160_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[5]) { u32 a1 = digest[0]; u32 b1 = digest[1]; @@ -214,7 +214,7 @@ void ripemd160_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], con digest[4] = e; } -void ripemd160_init (ripemd160_ctx_t *ctx) +static void ripemd160_init (ripemd160_ctx_t *ctx) { ctx->h[0] = RIPEMD160M_A; ctx->h[1] = RIPEMD160M_B; @@ -242,7 +242,7 @@ void ripemd160_init (ripemd160_ctx_t *ctx) ctx->len = 0; } -void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -320,7 +320,7 @@ void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], } } -void ripemd160_update (ripemd160_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_update (ripemd160_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -372,7 +372,7 @@ void ripemd160_update (ripemd160_ctx_t *ctx, const u32 *w, const int len) ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void ripemd160_update_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_update_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -458,7 +458,7 @@ void ripemd160_update_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len) ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void ripemd160_update_utf16le (ripemd160_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_update_utf16le (ripemd160_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -500,7 +500,7 @@ void ripemd160_update_utf16le (ripemd160_ctx_t *ctx, const u32 *w, const int len ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void ripemd160_update_utf16le_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_update_utf16le_swap (ripemd160_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -576,7 +576,7 @@ void ripemd160_update_utf16le_swap (ripemd160_ctx_t *ctx, const u32 *w, const in ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void ripemd160_update_global (ripemd160_ctx_t *ctx, const __global u32 *w, const int len) +static void ripemd160_update_global (ripemd160_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -628,7 +628,7 @@ void ripemd160_update_global (ripemd160_ctx_t *ctx, const __global u32 *w, const ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void ripemd160_update_global_swap (ripemd160_ctx_t *ctx, const __global u32 *w, const int len) +static void ripemd160_update_global_swap (ripemd160_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -714,7 +714,7 @@ void ripemd160_update_global_swap (ripemd160_ctx_t *ctx, const __global u32 *w, ripemd160_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void ripemd160_update_global_utf16le (ripemd160_ctx_t *ctx, const __global u32 *w, const int len) +static void ripemd160_update_global_utf16le (ripemd160_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -756,7 +756,7 @@ void ripemd160_update_global_utf16le (ripemd160_ctx_t *ctx, const __global u32 * ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void ripemd160_update_global_utf16le_swap (ripemd160_ctx_t *ctx, const __global u32 *w, const int len) +static void ripemd160_update_global_utf16le_swap (ripemd160_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -832,7 +832,7 @@ void ripemd160_update_global_utf16le_swap (ripemd160_ctx_t *ctx, const __global ripemd160_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void ripemd160_final (ripemd160_ctx_t *ctx) +static void ripemd160_final (ripemd160_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -875,7 +875,7 @@ typedef struct ripemd160_hmac_ctx } ripemd160_hmac_ctx_t; -void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) +static void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) { u32 t0[4]; u32 t1[4]; @@ -929,7 +929,7 @@ void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 w0[4], const u ripemd160_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void ripemd160_hmac_init (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_hmac_init (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -986,7 +986,7 @@ void ripemd160_hmac_init (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3); } -void ripemd160_hmac_init_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_hmac_init_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1043,7 +1043,7 @@ void ripemd160_hmac_init_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const in ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3); } -void ripemd160_hmac_init_global (ripemd160_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void ripemd160_hmac_init_global (ripemd160_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1100,7 +1100,7 @@ void ripemd160_hmac_init_global (ripemd160_hmac_ctx_t *ctx, __global const u32 * ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3); } -void ripemd160_hmac_init_global_swap (ripemd160_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void ripemd160_hmac_init_global_swap (ripemd160_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1157,52 +1157,52 @@ void ripemd160_hmac_init_global_swap (ripemd160_hmac_ctx_t *ctx, __global const ripemd160_hmac_init_64 (ctx, w0, w1, w2, w3); } -void ripemd160_hmac_update_64 (ripemd160_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void ripemd160_hmac_update_64 (ripemd160_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { ripemd160_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void ripemd160_hmac_update (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_hmac_update (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) { ripemd160_update (&ctx->ipad, w, len); } -void ripemd160_hmac_update_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_hmac_update_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) { ripemd160_update_swap (&ctx->ipad, w, len); } -void ripemd160_hmac_update_utf16le (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_hmac_update_utf16le (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) { ripemd160_update_utf16le (&ctx->ipad, w, len); } -void ripemd160_hmac_update_utf16le_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) +static void ripemd160_hmac_update_utf16le_swap (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) { ripemd160_update_utf16le_swap (&ctx->ipad, w, len); } -void ripemd160_hmac_update_global (ripemd160_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void ripemd160_hmac_update_global (ripemd160_hmac_ctx_t *ctx, const __global u32 *w, const int len) { ripemd160_update_global (&ctx->ipad, w, len); } -void ripemd160_hmac_update_global_swap (ripemd160_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void ripemd160_hmac_update_global_swap (ripemd160_hmac_ctx_t *ctx, const __global u32 *w, const int len) { ripemd160_update_global_swap (&ctx->ipad, w, len); } -void ripemd160_hmac_update_global_utf16le (ripemd160_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void ripemd160_hmac_update_global_utf16le (ripemd160_hmac_ctx_t *ctx, const __global u32 *w, const int len) { ripemd160_update_global_utf16le (&ctx->ipad, w, len); } -void ripemd160_hmac_update_global_utf16le_swap (ripemd160_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void ripemd160_hmac_update_global_utf16le_swap (ripemd160_hmac_ctx_t *ctx, const __global u32 *w, const int len) { ripemd160_update_global_utf16le_swap (&ctx->ipad, w, len); } -void ripemd160_hmac_final (ripemd160_hmac_ctx_t *ctx) +static void ripemd160_hmac_final (ripemd160_hmac_ctx_t *ctx) { ripemd160_final (&ctx->ipad); @@ -1248,7 +1248,7 @@ typedef struct ripemd160_ctx_vector } ripemd160_ctx_vector_t; -void ripemd160_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[5]) +static void ripemd160_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[5]) { u32x a1 = digest[0]; u32x b1 = digest[1]; @@ -1445,7 +1445,7 @@ void ripemd160_transform_vector (const u32x w0[4], const u32x w1[4], const u32x digest[4] = e; } -void ripemd160_init_vector (ripemd160_ctx_vector_t *ctx) +static void ripemd160_init_vector (ripemd160_ctx_vector_t *ctx) { ctx->h[0] = RIPEMD160M_A; ctx->h[1] = RIPEMD160M_B; @@ -1473,7 +1473,7 @@ void ripemd160_init_vector (ripemd160_ctx_vector_t *ctx) ctx->len = 0; } -void ripemd160_init_vector_from_scalar (ripemd160_ctx_vector_t *ctx, ripemd160_ctx_t *ctx0) +static void ripemd160_init_vector_from_scalar (ripemd160_ctx_vector_t *ctx, ripemd160_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1501,7 +1501,7 @@ void ripemd160_init_vector_from_scalar (ripemd160_ctx_vector_t *ctx, ripemd160_c ctx->len = ctx0->len; } -void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -1579,7 +1579,7 @@ void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x w0[4], u32x w } } -void ripemd160_update_vector (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) +static void ripemd160_update_vector (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1631,7 +1631,7 @@ void ripemd160_update_vector (ripemd160_ctx_vector_t *ctx, const u32x *w, const ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void ripemd160_update_vector_swap (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) +static void ripemd160_update_vector_swap (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1717,7 +1717,7 @@ void ripemd160_update_vector_swap (ripemd160_ctx_vector_t *ctx, const u32x *w, c ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void ripemd160_update_vector_utf16le (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) +static void ripemd160_update_vector_utf16le (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1759,7 +1759,7 @@ void ripemd160_update_vector_utf16le (ripemd160_ctx_vector_t *ctx, const u32x *w ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void ripemd160_update_vector_utf16le_swap (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) +static void ripemd160_update_vector_utf16le_swap (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1835,7 +1835,7 @@ void ripemd160_update_vector_utf16le_swap (ripemd160_ctx_vector_t *ctx, const u3 ripemd160_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void ripemd160_final_vector (ripemd160_ctx_vector_t *ctx) +static void ripemd160_final_vector (ripemd160_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1878,7 +1878,7 @@ typedef struct ripemd160_hmac_ctx_vector } ripemd160_hmac_ctx_vector_t; -void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) +static void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) { u32x t0[4]; u32x t1[4]; @@ -1932,7 +1932,7 @@ void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, const u32x ripemd160_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void ripemd160_hmac_init_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void ripemd160_hmac_init_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1989,17 +1989,17 @@ void ripemd160_hmac_init_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w ripemd160_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -void ripemd160_hmac_update_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void ripemd160_hmac_update_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { ripemd160_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void ripemd160_hmac_update_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void ripemd160_hmac_update_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { ripemd160_update_vector (&ctx->ipad, w, len); } -void ripemd160_hmac_final_vector (ripemd160_hmac_ctx_vector_t *ctx) +static void ripemd160_hmac_final_vector (ripemd160_hmac_ctx_vector_t *ctx) { ripemd160_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha1.cl b/OpenCL/inc_hash_sha1.cl index 4cf6c280f..ca83180d0 100644 --- a/OpenCL/inc_hash_sha1.cl +++ b/OpenCL/inc_hash_sha1.cl @@ -17,7 +17,7 @@ typedef struct sha1_ctx } sha1_ctx_t; -void sha1_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[5]) +static void sha1_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[5]) { u32 a = digest[0]; u32 b = digest[1]; @@ -146,7 +146,7 @@ void sha1_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u3 digest[4] += e; } -void sha1_init (sha1_ctx_t *ctx) +static void sha1_init (sha1_ctx_t *ctx) { ctx->h[0] = SHA1M_A; ctx->h[1] = SHA1M_B; @@ -174,7 +174,7 @@ void sha1_init (sha1_ctx_t *ctx) ctx->len = 0; } -void sha1_update_64 (sha1_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void sha1_update_64 (sha1_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -252,7 +252,7 @@ void sha1_update_64 (sha1_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4] } } -void sha1_update (sha1_ctx_t *ctx, const u32 *w, const int len) +static void sha1_update (sha1_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -304,7 +304,7 @@ void sha1_update (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha1_update_swap (sha1_ctx_t *ctx, const u32 *w, const int len) +static void sha1_update_swap (sha1_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -390,7 +390,7 @@ void sha1_update_swap (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha1_update_utf16le (sha1_ctx_t *ctx, const u32 *w, const int len) +static void sha1_update_utf16le (sha1_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -432,7 +432,7 @@ void sha1_update_utf16le (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_utf16le_swap (sha1_ctx_t *ctx, const u32 *w, const int len) +static void sha1_update_utf16le_swap (sha1_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -508,7 +508,7 @@ void sha1_update_utf16le_swap (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_utf16be (sha1_ctx_t *ctx, const u32 *w, const int len) +static void sha1_update_utf16be (sha1_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -550,7 +550,7 @@ void sha1_update_utf16be (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_utf16be_swap (sha1_ctx_t *ctx, const u32 *w, const int len) +static void sha1_update_utf16be_swap (sha1_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -626,7 +626,7 @@ void sha1_update_utf16be_swap (sha1_ctx_t *ctx, const u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_global (sha1_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_update_global (sha1_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -678,7 +678,7 @@ void sha1_update_global (sha1_ctx_t *ctx, const __global u32 *w, const int len) sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha1_update_global_swap (sha1_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_update_global_swap (sha1_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -764,7 +764,7 @@ void sha1_update_global_swap (sha1_ctx_t *ctx, const __global u32 *w, const int sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha1_update_global_utf16le (sha1_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_update_global_utf16le (sha1_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -806,7 +806,7 @@ void sha1_update_global_utf16le (sha1_ctx_t *ctx, const __global u32 *w, const i sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -882,7 +882,7 @@ void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, const __global u32 *w, co sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_global_utf16be (sha1_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_update_global_utf16be (sha1_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -924,7 +924,7 @@ void sha1_update_global_utf16be (sha1_ctx_t *ctx, const __global u32 *w, const i sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_global_utf16be_swap (sha1_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_update_global_utf16be_swap (sha1_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1000,7 +1000,7 @@ void sha1_update_global_utf16be_swap (sha1_ctx_t *ctx, const __global u32 *w, co sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_final (sha1_ctx_t *ctx) +static void sha1_final (sha1_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -1043,7 +1043,7 @@ typedef struct sha1_hmac_ctx } sha1_hmac_ctx_t; -void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) +static void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) { u32 t0[4]; u32 t1[4]; @@ -1097,7 +1097,7 @@ void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], sha1_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void sha1_hmac_init (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha1_hmac_init (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1154,7 +1154,7 @@ void sha1_hmac_init (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) sha1_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha1_hmac_init_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha1_hmac_init_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1211,7 +1211,7 @@ void sha1_hmac_init_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) sha1_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha1_hmac_init_global (sha1_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha1_hmac_init_global (sha1_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1268,7 +1268,7 @@ void sha1_hmac_init_global (sha1_hmac_ctx_t *ctx, __global const u32 *w, const i sha1_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha1_hmac_init_global_swap (sha1_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha1_hmac_init_global_swap (sha1_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1325,52 +1325,52 @@ void sha1_hmac_init_global_swap (sha1_hmac_ctx_t *ctx, __global const u32 *w, co sha1_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha1_hmac_update_64 (sha1_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void sha1_hmac_update_64 (sha1_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { sha1_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void sha1_hmac_update (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha1_hmac_update (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) { sha1_update (&ctx->ipad, w, len); } -void sha1_hmac_update_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha1_hmac_update_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) { sha1_update_swap (&ctx->ipad, w, len); } -void sha1_hmac_update_utf16le (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha1_hmac_update_utf16le (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) { sha1_update_utf16le (&ctx->ipad, w, len); } -void sha1_hmac_update_utf16le_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha1_hmac_update_utf16le_swap (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) { sha1_update_utf16le_swap (&ctx->ipad, w, len); } -void sha1_hmac_update_global (sha1_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_hmac_update_global (sha1_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha1_update_global (&ctx->ipad, w, len); } -void sha1_hmac_update_global_swap (sha1_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_hmac_update_global_swap (sha1_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha1_update_global_swap (&ctx->ipad, w, len); } -void sha1_hmac_update_global_utf16le (sha1_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_hmac_update_global_utf16le (sha1_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha1_update_global_utf16le (&ctx->ipad, w, len); } -void sha1_hmac_update_global_utf16le_swap (sha1_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha1_hmac_update_global_utf16le_swap (sha1_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha1_update_global_utf16le_swap (&ctx->ipad, w, len); } -void sha1_hmac_final (sha1_hmac_ctx_t *ctx) +static void sha1_hmac_final (sha1_hmac_ctx_t *ctx) { sha1_final (&ctx->ipad); @@ -1416,7 +1416,7 @@ typedef struct sha1_ctx_vector } sha1_ctx_vector_t; -void sha1_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[5]) +static void sha1_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[5]) { u32x a = digest[0]; u32x b = digest[1]; @@ -1545,7 +1545,7 @@ void sha1_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4] digest[4] += e; } -void sha1_init_vector (sha1_ctx_vector_t *ctx) +static void sha1_init_vector (sha1_ctx_vector_t *ctx) { ctx->h[0] = SHA1M_A; ctx->h[1] = SHA1M_B; @@ -1573,7 +1573,7 @@ void sha1_init_vector (sha1_ctx_vector_t *ctx) ctx->len = 0; } -void sha1_init_vector_from_scalar (sha1_ctx_vector_t *ctx, sha1_ctx_t *ctx0) +static void sha1_init_vector_from_scalar (sha1_ctx_vector_t *ctx, sha1_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1601,7 +1601,7 @@ void sha1_init_vector_from_scalar (sha1_ctx_vector_t *ctx, sha1_ctx_t *ctx0) ctx->len = ctx0->len; } -void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -1679,7 +1679,7 @@ void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x } } -void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1731,7 +1731,7 @@ void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const int len) sha1_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha1_update_vector_swap (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha1_update_vector_swap (sha1_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1817,7 +1817,7 @@ void sha1_update_vector_swap (sha1_ctx_vector_t *ctx, const u32x *w, const int l sha1_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha1_update_vector_utf16le (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha1_update_vector_utf16le (sha1_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1859,7 +1859,7 @@ void sha1_update_vector_utf16le (sha1_ctx_vector_t *ctx, const u32x *w, const in sha1_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_vector_utf16le_swap (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha1_update_vector_utf16le_swap (sha1_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1935,7 +1935,7 @@ void sha1_update_vector_utf16le_swap (sha1_ctx_vector_t *ctx, const u32x *w, con sha1_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_vector_utf16leN (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha1_update_vector_utf16leN (sha1_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1977,7 +1977,7 @@ void sha1_update_vector_utf16leN (sha1_ctx_vector_t *ctx, const u32x *w, const i sha1_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_update_vector_utf16beN (sha1_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha1_update_vector_utf16beN (sha1_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2019,7 +2019,7 @@ void sha1_update_vector_utf16beN (sha1_ctx_vector_t *ctx, const u32x *w, const i sha1_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha1_final_vector (sha1_ctx_vector_t *ctx) +static void sha1_final_vector (sha1_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -2062,7 +2062,7 @@ typedef struct sha1_hmac_ctx_vector } sha1_hmac_ctx_vector_t; -void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) +static void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) { u32x t0[4]; u32x t1[4]; @@ -2116,7 +2116,7 @@ void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x w0[4], co sha1_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void sha1_hmac_init_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha1_hmac_init_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2173,17 +2173,17 @@ void sha1_hmac_init_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const in sha1_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -void sha1_hmac_update_vector_64 (sha1_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void sha1_hmac_update_vector_64 (sha1_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { sha1_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void sha1_hmac_update_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha1_hmac_update_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { sha1_update_vector (&ctx->ipad, w, len); } -void sha1_hmac_final_vector (sha1_hmac_ctx_vector_t *ctx) +static void sha1_hmac_final_vector (sha1_hmac_ctx_vector_t *ctx) { sha1_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha224.cl b/OpenCL/inc_hash_sha224.cl index 553397f6c..40451d804 100644 --- a/OpenCL/inc_hash_sha224.cl +++ b/OpenCL/inc_hash_sha224.cl @@ -37,7 +37,7 @@ typedef struct sha224_ctx } sha224_ctx_t; -void sha224_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[8]) +static void sha224_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[8]) { u32 a = digest[0]; u32 b = digest[1]; @@ -128,7 +128,7 @@ void sha224_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const digest[7] += h; } -void sha224_init (sha224_ctx_t *ctx) +static void sha224_init (sha224_ctx_t *ctx) { ctx->h[0] = SHA224M_A; ctx->h[1] = SHA224M_B; @@ -159,7 +159,7 @@ void sha224_init (sha224_ctx_t *ctx) ctx->len = 0; } -void sha224_update_64 (sha224_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void sha224_update_64 (sha224_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -237,7 +237,7 @@ void sha224_update_64 (sha224_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w } } -void sha224_update (sha224_ctx_t *ctx, const u32 *w, const int len) +static void sha224_update (sha224_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -289,7 +289,7 @@ void sha224_update (sha224_ctx_t *ctx, const u32 *w, const int len) sha224_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha224_update_swap (sha224_ctx_t *ctx, const u32 *w, const int len) +static void sha224_update_swap (sha224_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -375,7 +375,7 @@ void sha224_update_swap (sha224_ctx_t *ctx, const u32 *w, const int len) sha224_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha224_update_utf16le (sha224_ctx_t *ctx, const u32 *w, const int len) +static void sha224_update_utf16le (sha224_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -417,7 +417,7 @@ void sha224_update_utf16le (sha224_ctx_t *ctx, const u32 *w, const int len) sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha224_update_utf16le_swap (sha224_ctx_t *ctx, const u32 *w, const int len) +static void sha224_update_utf16le_swap (sha224_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -493,7 +493,7 @@ void sha224_update_utf16le_swap (sha224_ctx_t *ctx, const u32 *w, const int len) sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha224_update_global (sha224_ctx_t *ctx, const __global u32 *w, const int len) +static void sha224_update_global (sha224_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -545,7 +545,7 @@ void sha224_update_global (sha224_ctx_t *ctx, const __global u32 *w, const int l sha224_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha224_update_global_swap (sha224_ctx_t *ctx, const __global u32 *w, const int len) +static void sha224_update_global_swap (sha224_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -631,7 +631,7 @@ void sha224_update_global_swap (sha224_ctx_t *ctx, const __global u32 *w, const sha224_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha224_update_global_utf16le (sha224_ctx_t *ctx, const __global u32 *w, const int len) +static void sha224_update_global_utf16le (sha224_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -673,7 +673,7 @@ void sha224_update_global_utf16le (sha224_ctx_t *ctx, const __global u32 *w, con sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha224_update_global_utf16le_swap (sha224_ctx_t *ctx, const __global u32 *w, const int len) +static void sha224_update_global_utf16le_swap (sha224_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -749,7 +749,7 @@ void sha224_update_global_utf16le_swap (sha224_ctx_t *ctx, const __global u32 *w sha224_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha224_final (sha224_ctx_t *ctx) +static void sha224_final (sha224_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -792,7 +792,7 @@ typedef struct sha224_hmac_ctx } sha224_hmac_ctx_t; -void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) +static void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) { u32 t0[4]; u32 t1[4]; @@ -846,7 +846,7 @@ void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[ sha224_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void sha224_hmac_init (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha224_hmac_init (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -903,7 +903,7 @@ void sha224_hmac_init (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) sha224_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha224_hmac_init_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha224_hmac_init_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -960,7 +960,7 @@ void sha224_hmac_init_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) sha224_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha224_hmac_init_global (sha224_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha224_hmac_init_global (sha224_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1017,7 +1017,7 @@ void sha224_hmac_init_global (sha224_hmac_ctx_t *ctx, __global const u32 *w, con sha224_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha224_hmac_init_global_swap (sha224_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha224_hmac_init_global_swap (sha224_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1074,52 +1074,52 @@ void sha224_hmac_init_global_swap (sha224_hmac_ctx_t *ctx, __global const u32 *w sha224_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha224_hmac_update_64 (sha224_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void sha224_hmac_update_64 (sha224_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { sha224_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void sha224_hmac_update (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha224_hmac_update (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) { sha224_update (&ctx->ipad, w, len); } -void sha224_hmac_update_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha224_hmac_update_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) { sha224_update_swap (&ctx->ipad, w, len); } -void sha224_hmac_update_utf16le (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha224_hmac_update_utf16le (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) { sha224_update_utf16le (&ctx->ipad, w, len); } -void sha224_hmac_update_utf16le_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha224_hmac_update_utf16le_swap (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) { sha224_update_utf16le_swap (&ctx->ipad, w, len); } -void sha224_hmac_update_global (sha224_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha224_hmac_update_global (sha224_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha224_update_global (&ctx->ipad, w, len); } -void sha224_hmac_update_global_swap (sha224_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha224_hmac_update_global_swap (sha224_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha224_update_global_swap (&ctx->ipad, w, len); } -void sha224_hmac_update_global_utf16le (sha224_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha224_hmac_update_global_utf16le (sha224_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha224_update_global_utf16le (&ctx->ipad, w, len); } -void sha224_hmac_update_global_utf16le_swap (sha224_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha224_hmac_update_global_utf16le_swap (sha224_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha224_update_global_utf16le_swap (&ctx->ipad, w, len); } -void sha224_hmac_final (sha224_hmac_ctx_t *ctx) +static void sha224_hmac_final (sha224_hmac_ctx_t *ctx) { sha224_final (&ctx->ipad); @@ -1165,7 +1165,7 @@ typedef struct sha224_ctx_vector } sha224_ctx_vector_t; -void sha224_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[8]) +static void sha224_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[8]) { u32x a = digest[0]; u32x b = digest[1]; @@ -1256,7 +1256,7 @@ void sha224_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[ digest[7] += h; } -void sha224_init_vector (sha224_ctx_vector_t *ctx) +static void sha224_init_vector (sha224_ctx_vector_t *ctx) { ctx->h[0] = SHA224M_A; ctx->h[1] = SHA224M_B; @@ -1287,7 +1287,7 @@ void sha224_init_vector (sha224_ctx_vector_t *ctx) ctx->len = 0; } -void sha224_init_vector_from_scalar (sha224_ctx_vector_t *ctx, sha224_ctx_t *ctx0) +static void sha224_init_vector_from_scalar (sha224_ctx_vector_t *ctx, sha224_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1318,7 +1318,7 @@ void sha224_init_vector_from_scalar (sha224_ctx_vector_t *ctx, sha224_ctx_t *ctx ctx->len = ctx0->len; } -void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -1396,7 +1396,7 @@ void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], } } -void sha224_update_vector (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha224_update_vector (sha224_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1448,7 +1448,7 @@ void sha224_update_vector (sha224_ctx_vector_t *ctx, const u32x *w, const int le sha224_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha224_update_vector_swap (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha224_update_vector_swap (sha224_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1534,7 +1534,7 @@ void sha224_update_vector_swap (sha224_ctx_vector_t *ctx, const u32x *w, const i sha224_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha224_update_vector_utf16le (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha224_update_vector_utf16le (sha224_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1576,7 +1576,7 @@ void sha224_update_vector_utf16le (sha224_ctx_vector_t *ctx, const u32x *w, cons sha224_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha224_update_vector_utf16le_swap (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha224_update_vector_utf16le_swap (sha224_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1652,7 +1652,7 @@ void sha224_update_vector_utf16le_swap (sha224_ctx_vector_t *ctx, const u32x *w, sha224_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha224_update_vector_utf16beN (sha224_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha224_update_vector_utf16beN (sha224_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1694,7 +1694,7 @@ void sha224_update_vector_utf16beN (sha224_ctx_vector_t *ctx, const u32x *w, con sha224_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha224_final_vector (sha224_ctx_vector_t *ctx) +static void sha224_final_vector (sha224_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1737,7 +1737,7 @@ typedef struct sha224_hmac_ctx_vector } sha224_hmac_ctx_vector_t; -void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) +static void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) { u32x t0[4]; u32x t1[4]; @@ -1791,7 +1791,7 @@ void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u32x w0[4] sha224_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void sha224_hmac_init_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha224_hmac_init_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1848,17 +1848,17 @@ void sha224_hmac_init_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, cons sha224_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -void sha224_hmac_update_vector_64 (sha224_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void sha224_hmac_update_vector_64 (sha224_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { sha224_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void sha224_hmac_update_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha224_hmac_update_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { sha224_update_vector (&ctx->ipad, w, len); } -void sha224_hmac_final_vector (sha224_hmac_ctx_vector_t *ctx) +static void sha224_hmac_final_vector (sha224_hmac_ctx_vector_t *ctx) { sha224_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha256.cl b/OpenCL/inc_hash_sha256.cl index 92b35b579..24b452a0f 100644 --- a/OpenCL/inc_hash_sha256.cl +++ b/OpenCL/inc_hash_sha256.cl @@ -37,7 +37,7 @@ typedef struct sha256_ctx } sha256_ctx_t; -void sha256_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[8]) +static void sha256_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[8]) { u32 a = digest[0]; u32 b = digest[1]; @@ -128,7 +128,7 @@ void sha256_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const digest[7] += h; } -void sha256_init (sha256_ctx_t *ctx) +static void sha256_init (sha256_ctx_t *ctx) { ctx->h[0] = SHA256M_A; ctx->h[1] = SHA256M_B; @@ -159,7 +159,7 @@ void sha256_init (sha256_ctx_t *ctx) ctx->len = 0; } -void sha256_update_64 (sha256_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void sha256_update_64 (sha256_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -237,7 +237,7 @@ void sha256_update_64 (sha256_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w } } -void sha256_update (sha256_ctx_t *ctx, const u32 *w, const int len) +static void sha256_update (sha256_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -289,7 +289,7 @@ void sha256_update (sha256_ctx_t *ctx, const u32 *w, const int len) sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha256_update_swap (sha256_ctx_t *ctx, const u32 *w, const int len) +static void sha256_update_swap (sha256_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -375,7 +375,7 @@ void sha256_update_swap (sha256_ctx_t *ctx, const u32 *w, const int len) sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha256_update_utf16le (sha256_ctx_t *ctx, const u32 *w, const int len) +static void sha256_update_utf16le (sha256_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -417,7 +417,7 @@ void sha256_update_utf16le (sha256_ctx_t *ctx, const u32 *w, const int len) sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha256_update_utf16le_swap (sha256_ctx_t *ctx, const u32 *w, const int len) +static void sha256_update_utf16le_swap (sha256_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -493,7 +493,7 @@ void sha256_update_utf16le_swap (sha256_ctx_t *ctx, const u32 *w, const int len) sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha256_update_global (sha256_ctx_t *ctx, const __global u32 *w, const int len) +static void sha256_update_global (sha256_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -545,7 +545,7 @@ void sha256_update_global (sha256_ctx_t *ctx, const __global u32 *w, const int l sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha256_update_global_swap (sha256_ctx_t *ctx, const __global u32 *w, const int len) +static void sha256_update_global_swap (sha256_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -631,7 +631,7 @@ void sha256_update_global_swap (sha256_ctx_t *ctx, const __global u32 *w, const sha256_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha256_update_global_utf16le (sha256_ctx_t *ctx, const __global u32 *w, const int len) +static void sha256_update_global_utf16le (sha256_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -673,7 +673,7 @@ void sha256_update_global_utf16le (sha256_ctx_t *ctx, const __global u32 *w, con sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha256_update_global_utf16le_swap (sha256_ctx_t *ctx, const __global u32 *w, const int len) +static void sha256_update_global_utf16le_swap (sha256_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -749,7 +749,7 @@ void sha256_update_global_utf16le_swap (sha256_ctx_t *ctx, const __global u32 *w sha256_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha256_final (sha256_ctx_t *ctx) +static void sha256_final (sha256_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -792,7 +792,7 @@ typedef struct sha256_hmac_ctx } sha256_hmac_ctx_t; -void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) +static void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4]) { u32 t0[4]; u32 t1[4]; @@ -846,7 +846,7 @@ void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[ sha256_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void sha256_hmac_init (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha256_hmac_init (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -903,7 +903,7 @@ void sha256_hmac_init (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) sha256_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha256_hmac_init_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha256_hmac_init_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -960,7 +960,7 @@ void sha256_hmac_init_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) sha256_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha256_hmac_init_global (sha256_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha256_hmac_init_global (sha256_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1017,7 +1017,7 @@ void sha256_hmac_init_global (sha256_hmac_ctx_t *ctx, __global const u32 *w, con sha256_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha256_hmac_init_global_swap (sha256_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha256_hmac_init_global_swap (sha256_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1074,52 +1074,52 @@ void sha256_hmac_init_global_swap (sha256_hmac_ctx_t *ctx, __global const u32 *w sha256_hmac_init_64 (ctx, w0, w1, w2, w3); } -void sha256_hmac_update_64 (sha256_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void sha256_hmac_update_64 (sha256_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { sha256_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void sha256_hmac_update (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha256_hmac_update (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) { sha256_update (&ctx->ipad, w, len); } -void sha256_hmac_update_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha256_hmac_update_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) { sha256_update_swap (&ctx->ipad, w, len); } -void sha256_hmac_update_utf16le (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha256_hmac_update_utf16le (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) { sha256_update_utf16le (&ctx->ipad, w, len); } -void sha256_hmac_update_utf16le_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha256_hmac_update_utf16le_swap (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) { sha256_update_utf16le_swap (&ctx->ipad, w, len); } -void sha256_hmac_update_global (sha256_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha256_hmac_update_global (sha256_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha256_update_global (&ctx->ipad, w, len); } -void sha256_hmac_update_global_swap (sha256_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha256_hmac_update_global_swap (sha256_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha256_update_global_swap (&ctx->ipad, w, len); } -void sha256_hmac_update_global_utf16le (sha256_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha256_hmac_update_global_utf16le (sha256_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha256_update_global_utf16le (&ctx->ipad, w, len); } -void sha256_hmac_update_global_utf16le_swap (sha256_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha256_hmac_update_global_utf16le_swap (sha256_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha256_update_global_utf16le_swap (&ctx->ipad, w, len); } -void sha256_hmac_final (sha256_hmac_ctx_t *ctx) +static void sha256_hmac_final (sha256_hmac_ctx_t *ctx) { sha256_final (&ctx->ipad); @@ -1165,7 +1165,7 @@ typedef struct sha256_ctx_vector } sha256_ctx_vector_t; -void sha256_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[8]) +static void sha256_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[8]) { u32x a = digest[0]; u32x b = digest[1]; @@ -1256,7 +1256,7 @@ void sha256_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[ digest[7] += h; } -void sha256_init_vector (sha256_ctx_vector_t *ctx) +static void sha256_init_vector (sha256_ctx_vector_t *ctx) { ctx->h[0] = SHA256M_A; ctx->h[1] = SHA256M_B; @@ -1287,7 +1287,7 @@ void sha256_init_vector (sha256_ctx_vector_t *ctx) ctx->len = 0; } -void sha256_init_vector_from_scalar (sha256_ctx_vector_t *ctx, sha256_ctx_t *ctx0) +static void sha256_init_vector_from_scalar (sha256_ctx_vector_t *ctx, sha256_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -1318,7 +1318,7 @@ void sha256_init_vector_from_scalar (sha256_ctx_vector_t *ctx, sha256_ctx_t *ctx ctx->len = ctx0->len; } -void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -1396,7 +1396,7 @@ void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], } } -void sha256_update_vector (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha256_update_vector (sha256_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1448,7 +1448,7 @@ void sha256_update_vector (sha256_ctx_vector_t *ctx, const u32x *w, const int le sha256_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha256_update_vector_swap (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha256_update_vector_swap (sha256_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1534,7 +1534,7 @@ void sha256_update_vector_swap (sha256_ctx_vector_t *ctx, const u32x *w, const i sha256_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void sha256_update_vector_utf16le (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha256_update_vector_utf16le (sha256_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1576,7 +1576,7 @@ void sha256_update_vector_utf16le (sha256_ctx_vector_t *ctx, const u32x *w, cons sha256_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha256_update_vector_utf16le_swap (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha256_update_vector_utf16le_swap (sha256_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1652,7 +1652,7 @@ void sha256_update_vector_utf16le_swap (sha256_ctx_vector_t *ctx, const u32x *w, sha256_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha256_update_vector_utf16beN (sha256_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha256_update_vector_utf16beN (sha256_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1694,7 +1694,7 @@ void sha256_update_vector_utf16beN (sha256_ctx_vector_t *ctx, const u32x *w, con sha256_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void sha256_final_vector (sha256_ctx_vector_t *ctx) +static void sha256_final_vector (sha256_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -1737,7 +1737,7 @@ typedef struct sha256_hmac_ctx_vector } sha256_hmac_ctx_vector_t; -void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) +static void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4]) { u32x t0[4]; u32x t1[4]; @@ -1791,7 +1791,7 @@ void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u32x w0[4] sha256_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void sha256_hmac_init_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha256_hmac_init_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -1848,17 +1848,17 @@ void sha256_hmac_init_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, cons sha256_hmac_init_vector_64 (ctx, w0, w1, w2, w3); } -void sha256_hmac_update_vector_64 (sha256_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void sha256_hmac_update_vector_64 (sha256_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { sha256_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void sha256_hmac_update_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha256_hmac_update_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { sha256_update_vector (&ctx->ipad, w, len); } -void sha256_hmac_final_vector (sha256_hmac_ctx_vector_t *ctx) +static void sha256_hmac_final_vector (sha256_hmac_ctx_vector_t *ctx) { sha256_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha384.cl b/OpenCL/inc_hash_sha384.cl index 0800b253a..0d4d5ede6 100644 --- a/OpenCL/inc_hash_sha384.cl +++ b/OpenCL/inc_hash_sha384.cl @@ -45,7 +45,7 @@ typedef struct sha384_ctx } sha384_ctx_t; -void sha384_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], const u32 w4[4], const u32 w5[4], const u32 w6[4], const u32 w7[4], u64 digest[8]) +static void sha384_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], const u32 w4[4], const u32 w5[4], const u32 w6[4], const u32 w7[4], u64 digest[8]) { u64 a = digest[0]; u64 b = digest[1]; @@ -136,7 +136,7 @@ void sha384_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const digest[7] += h; } -void sha384_init (sha384_ctx_t *ctx) +static void sha384_init (sha384_ctx_t *ctx) { ctx->h[0] = SHA384M_A; ctx->h[1] = SHA384M_B; @@ -183,7 +183,7 @@ void sha384_init (sha384_ctx_t *ctx) ctx->len = 0; } -void sha384_update_128 (sha384_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len) +static void sha384_update_128 (sha384_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 127; @@ -313,7 +313,7 @@ void sha384_update_128 (sha384_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 } } -void sha384_update (sha384_ctx_t *ctx, const u32 *w, const int len) +static void sha384_update (sha384_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -401,7 +401,7 @@ void sha384_update (sha384_ctx_t *ctx, const u32 *w, const int len) sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha384_update_swap (sha384_ctx_t *ctx, const u32 *w, const int len) +static void sha384_update_swap (sha384_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -555,7 +555,7 @@ void sha384_update_swap (sha384_ctx_t *ctx, const u32 *w, const int len) sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha384_update_utf16le (sha384_ctx_t *ctx, const u32 *w, const int len) +static void sha384_update_utf16le (sha384_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -621,7 +621,7 @@ void sha384_update_utf16le (sha384_ctx_t *ctx, const u32 *w, const int len) sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha384_update_utf16le_swap (sha384_ctx_t *ctx, const u32 *w, const int len) +static void sha384_update_utf16le_swap (sha384_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -753,7 +753,7 @@ void sha384_update_utf16le_swap (sha384_ctx_t *ctx, const u32 *w, const int len) sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha384_update_global (sha384_ctx_t *ctx, const __global u32 *w, const int len) +static void sha384_update_global (sha384_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -841,7 +841,7 @@ void sha384_update_global (sha384_ctx_t *ctx, const __global u32 *w, const int l sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha384_update_global_swap (sha384_ctx_t *ctx, const __global u32 *w, const int len) +static void sha384_update_global_swap (sha384_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -995,7 +995,7 @@ void sha384_update_global_swap (sha384_ctx_t *ctx, const __global u32 *w, const sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha384_update_global_utf16le (sha384_ctx_t *ctx, const __global u32 *w, const int len) +static void sha384_update_global_utf16le (sha384_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1061,7 +1061,7 @@ void sha384_update_global_utf16le (sha384_ctx_t *ctx, const __global u32 *w, con sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha384_update_global_utf16le_swap (sha384_ctx_t *ctx, const __global u32 *w, const int len) +static void sha384_update_global_utf16le_swap (sha384_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1193,7 +1193,7 @@ void sha384_update_global_utf16le_swap (sha384_ctx_t *ctx, const __global u32 *w sha384_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha384_final (sha384_ctx_t *ctx) +static void sha384_final (sha384_ctx_t *ctx) { const int pos = ctx->len & 127; @@ -1252,7 +1252,7 @@ typedef struct sha384_hmac_ctx } sha384_hmac_ctx_t; -void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], const u32 w4[4], const u32 w5[4], const u32 w6[4], const u32 w7[4]) +static void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], const u32 w4[4], const u32 w5[4], const u32 w6[4], const u32 w7[4]) { u32 t0[4]; u32 t1[4]; @@ -1342,7 +1342,7 @@ void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1 sha384_update_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); } -void sha384_hmac_init (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha384_hmac_init (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1435,7 +1435,7 @@ void sha384_hmac_init (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) sha384_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha384_hmac_init_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha384_hmac_init_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1528,7 +1528,7 @@ void sha384_hmac_init_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) sha384_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha384_hmac_init_global (sha384_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha384_hmac_init_global (sha384_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1621,7 +1621,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 sha384_hmac_init_global_swap (sha384_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha384_hmac_init_global_swap (sha384_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1714,52 +1714,52 @@ void sha384_hmac_init_global_swap (sha384_hmac_ctx_t *ctx, __global const u32 *w sha384_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha384_hmac_update_128 (sha384_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len) +static void sha384_hmac_update_128 (sha384_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len) { sha384_update_128 (&ctx->ipad, w0, w1, w2, w3, w4, w5, w6, w7, len); } -void sha384_hmac_update (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha384_hmac_update (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) { sha384_update (&ctx->ipad, w, len); } -void sha384_hmac_update_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha384_hmac_update_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) { sha384_update_swap (&ctx->ipad, w, len); } -void sha384_hmac_update_utf16le (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha384_hmac_update_utf16le (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) { sha384_update_utf16le (&ctx->ipad, w, len); } -void sha384_hmac_update_utf16le_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha384_hmac_update_utf16le_swap (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) { sha384_update_utf16le_swap (&ctx->ipad, w, len); } -void sha384_hmac_update_global (sha384_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha384_hmac_update_global (sha384_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha384_update_global (&ctx->ipad, w, len); } -void sha384_hmac_update_global_swap (sha384_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha384_hmac_update_global_swap (sha384_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha384_update_global_swap (&ctx->ipad, w, len); } -void sha384_hmac_update_global_utf16le (sha384_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha384_hmac_update_global_utf16le (sha384_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha384_update_global_utf16le (&ctx->ipad, w, len); } -void sha384_hmac_update_global_utf16le_swap (sha384_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha384_hmac_update_global_utf16le_swap (sha384_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha384_update_global_utf16le_swap (&ctx->ipad, w, len); } -void sha384_hmac_final (sha384_hmac_ctx_t *ctx) +static void sha384_hmac_final (sha384_hmac_ctx_t *ctx) { sha384_final (&ctx->ipad); @@ -1829,7 +1829,7 @@ typedef struct sha384_ctx_vector } sha384_ctx_vector_t; -void sha384_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], const u32x w4[4], const u32x w5[4], const u32x w6[4], const u32x w7[4], u64x digest[8]) +static void sha384_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], const u32x w4[4], const u32x w5[4], const u32x w6[4], const u32x w7[4], u64x digest[8]) { u64x a = digest[0]; u64x b = digest[1]; @@ -1920,7 +1920,7 @@ void sha384_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[ digest[7] += h; } -void sha384_init_vector (sha384_ctx_vector_t *ctx) +static void sha384_init_vector (sha384_ctx_vector_t *ctx) { ctx->h[0] = SHA384M_A; ctx->h[1] = SHA384M_B; @@ -1967,7 +1967,7 @@ void sha384_init_vector (sha384_ctx_vector_t *ctx) ctx->len = 0; } -void sha384_init_vector_from_scalar (sha384_ctx_vector_t *ctx, sha384_ctx_t *ctx0) +static void sha384_init_vector_from_scalar (sha384_ctx_vector_t *ctx, sha384_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -2014,7 +2014,7 @@ void sha384_init_vector_from_scalar (sha384_ctx_vector_t *ctx, sha384_ctx_t *ctx ctx->len = ctx0->len; } -void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len) +static void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 127; @@ -2144,7 +2144,7 @@ void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], } } -void sha384_update_vector (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha384_update_vector (sha384_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2232,7 +2232,7 @@ void sha384_update_vector (sha384_ctx_vector_t *ctx, const u32x *w, const int le sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha384_update_vector_swap (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha384_update_vector_swap (sha384_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2386,7 +2386,7 @@ void sha384_update_vector_swap (sha384_ctx_vector_t *ctx, const u32x *w, const i sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha384_update_vector_utf16le (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha384_update_vector_utf16le (sha384_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2452,7 +2452,7 @@ void sha384_update_vector_utf16le (sha384_ctx_vector_t *ctx, const u32x *w, cons sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha384_update_vector_utf16le_swap (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha384_update_vector_utf16le_swap (sha384_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2584,7 +2584,7 @@ void sha384_update_vector_utf16le_swap (sha384_ctx_vector_t *ctx, const u32x *w, sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha384_update_vector_utf16beN (sha384_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha384_update_vector_utf16beN (sha384_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2650,7 +2650,7 @@ void sha384_update_vector_utf16beN (sha384_ctx_vector_t *ctx, const u32x *w, con sha384_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha384_final_vector (sha384_ctx_vector_t *ctx) +static void sha384_final_vector (sha384_ctx_vector_t *ctx) { const int pos = ctx->len & 127; @@ -2709,7 +2709,7 @@ typedef struct sha384_hmac_ctx_vector } sha384_hmac_ctx_vector_t; -void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], const u32x w4[4], const u32x w5[4], const u32x w6[4], const u32x w7[4]) +static void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], const u32x w4[4], const u32x w5[4], const u32x w6[4], const u32x w7[4]) { u32x t0[4]; u32x t1[4]; @@ -2799,7 +2799,7 @@ void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const u32x w0[4 sha384_update_vector_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); } -void sha384_hmac_init_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha384_hmac_init_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2892,17 +2892,17 @@ void sha384_hmac_init_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, cons sha384_hmac_init_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha384_hmac_update_vector_128 (sha384_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len) +static void sha384_hmac_update_vector_128 (sha384_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len) { sha384_update_vector_128 (&ctx->ipad, w0, w1, w2, w3, w4, w5, w6, w7, len); } -void sha384_hmac_update_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha384_hmac_update_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { sha384_update_vector (&ctx->ipad, w, len); } -void sha384_hmac_final_vector (sha384_hmac_ctx_vector_t *ctx) +static void sha384_hmac_final_vector (sha384_hmac_ctx_vector_t *ctx) { sha384_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_sha512.cl b/OpenCL/inc_hash_sha512.cl index 61c6e143d..1a3338f8d 100644 --- a/OpenCL/inc_hash_sha512.cl +++ b/OpenCL/inc_hash_sha512.cl @@ -45,7 +45,7 @@ typedef struct sha512_ctx } sha512_ctx_t; -void sha512_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], const u32 w4[4], const u32 w5[4], const u32 w6[4], const u32 w7[4], u64 digest[8]) +static void sha512_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], const u32 w4[4], const u32 w5[4], const u32 w6[4], const u32 w7[4], u64 digest[8]) { u64 a = digest[0]; u64 b = digest[1]; @@ -136,7 +136,7 @@ void sha512_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const digest[7] += h; } -void sha512_init (sha512_ctx_t *ctx) +static void sha512_init (sha512_ctx_t *ctx) { ctx->h[0] = SHA512M_A; ctx->h[1] = SHA512M_B; @@ -183,7 +183,7 @@ void sha512_init (sha512_ctx_t *ctx) ctx->len = 0; } -void sha512_update_128 (sha512_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len) +static void sha512_update_128 (sha512_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 127; @@ -313,7 +313,7 @@ void sha512_update_128 (sha512_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 } } -void sha512_update (sha512_ctx_t *ctx, const u32 *w, const int len) +static void sha512_update (sha512_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -401,7 +401,7 @@ void sha512_update (sha512_ctx_t *ctx, const u32 *w, const int len) sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha512_update_swap (sha512_ctx_t *ctx, const u32 *w, const int len) +static void sha512_update_swap (sha512_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -555,7 +555,7 @@ void sha512_update_swap (sha512_ctx_t *ctx, const u32 *w, const int len) sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha512_update_utf16le (sha512_ctx_t *ctx, const u32 *w, const int len) +static void sha512_update_utf16le (sha512_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -621,7 +621,7 @@ void sha512_update_utf16le (sha512_ctx_t *ctx, const u32 *w, const int len) sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha512_update_utf16le_swap (sha512_ctx_t *ctx, const u32 *w, const int len) +static void sha512_update_utf16le_swap (sha512_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -753,7 +753,7 @@ void sha512_update_utf16le_swap (sha512_ctx_t *ctx, const u32 *w, const int len) sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha512_update_global (sha512_ctx_t *ctx, const __global u32 *w, const int len) +static void sha512_update_global (sha512_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -841,7 +841,7 @@ void sha512_update_global (sha512_ctx_t *ctx, const __global u32 *w, const int l sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha512_update_global_swap (sha512_ctx_t *ctx, const __global u32 *w, const int len) +static void sha512_update_global_swap (sha512_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -995,7 +995,7 @@ void sha512_update_global_swap (sha512_ctx_t *ctx, const __global u32 *w, const sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha512_update_global_utf16le (sha512_ctx_t *ctx, const __global u32 *w, const int len) +static void sha512_update_global_utf16le (sha512_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1061,7 +1061,7 @@ void sha512_update_global_utf16le (sha512_ctx_t *ctx, const __global u32 *w, con sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha512_update_global_utf16le_swap (sha512_ctx_t *ctx, const __global u32 *w, const int len) +static void sha512_update_global_utf16le_swap (sha512_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1193,7 +1193,7 @@ void sha512_update_global_utf16le_swap (sha512_ctx_t *ctx, const __global u32 *w sha512_update_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha512_final (sha512_ctx_t *ctx) +static void sha512_final (sha512_ctx_t *ctx) { const int pos = ctx->len & 127; @@ -1252,7 +1252,7 @@ typedef struct sha512_hmac_ctx } sha512_hmac_ctx_t; -void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], const u32 w4[4], const u32 w5[4], const u32 w6[4], const u32 w7[4]) +static void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], const u32 w4[4], const u32 w5[4], const u32 w6[4], const u32 w7[4]) { u32 t0[4]; u32 t1[4]; @@ -1342,7 +1342,7 @@ void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1 sha512_update_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); } -void sha512_hmac_init (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha512_hmac_init (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1435,7 +1435,7 @@ void sha512_hmac_init (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha512_hmac_init_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha512_hmac_init_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1528,7 +1528,7 @@ void sha512_hmac_init_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha512_hmac_init_global (sha512_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha512_hmac_init_global (sha512_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1621,7 +1621,7 @@ void sha512_hmac_init_global (sha512_hmac_ctx_t *ctx, __global const u32 *w, con sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha512_hmac_init_global_swap (sha512_hmac_ctx_t *ctx, __global const u32 *w, const int len) +static void sha512_hmac_init_global_swap (sha512_hmac_ctx_t *ctx, __global const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1714,52 +1714,52 @@ void sha512_hmac_init_global_swap (sha512_hmac_ctx_t *ctx, __global const u32 *w sha512_hmac_init_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha512_hmac_update_128 (sha512_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len) +static void sha512_hmac_update_128 (sha512_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u32 w4[4], u32 w5[4], u32 w6[4], u32 w7[4], const int len) { sha512_update_128 (&ctx->ipad, w0, w1, w2, w3, w4, w5, w6, w7, len); } -void sha512_hmac_update (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha512_hmac_update (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) { sha512_update (&ctx->ipad, w, len); } -void sha512_hmac_update_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha512_hmac_update_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) { sha512_update_swap (&ctx->ipad, w, len); } -void sha512_hmac_update_utf16le (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha512_hmac_update_utf16le (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) { sha512_update_utf16le (&ctx->ipad, w, len); } -void sha512_hmac_update_utf16le_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) +static void sha512_hmac_update_utf16le_swap (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) { sha512_update_utf16le_swap (&ctx->ipad, w, len); } -void sha512_hmac_update_global (sha512_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha512_hmac_update_global (sha512_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha512_update_global (&ctx->ipad, w, len); } -void sha512_hmac_update_global_swap (sha512_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha512_hmac_update_global_swap (sha512_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha512_update_global_swap (&ctx->ipad, w, len); } -void sha512_hmac_update_global_utf16le (sha512_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha512_hmac_update_global_utf16le (sha512_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha512_update_global_utf16le (&ctx->ipad, w, len); } -void sha512_hmac_update_global_utf16le_swap (sha512_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void sha512_hmac_update_global_utf16le_swap (sha512_hmac_ctx_t *ctx, const __global u32 *w, const int len) { sha512_update_global_utf16le_swap (&ctx->ipad, w, len); } -void sha512_hmac_final (sha512_hmac_ctx_t *ctx) +static void sha512_hmac_final (sha512_hmac_ctx_t *ctx) { sha512_final (&ctx->ipad); @@ -1829,7 +1829,7 @@ typedef struct sha512_ctx_vector } sha512_ctx_vector_t; -void sha512_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], const u32x w4[4], const u32x w5[4], const u32x w6[4], const u32x w7[4], u64x digest[8]) +static void sha512_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], const u32x w4[4], const u32x w5[4], const u32x w6[4], const u32x w7[4], u64x digest[8]) { u64x a = digest[0]; u64x b = digest[1]; @@ -1920,7 +1920,7 @@ void sha512_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[ digest[7] += h; } -void sha512_init_vector (sha512_ctx_vector_t *ctx) +static void sha512_init_vector (sha512_ctx_vector_t *ctx) { ctx->h[0] = SHA512M_A; ctx->h[1] = SHA512M_B; @@ -1967,7 +1967,7 @@ void sha512_init_vector (sha512_ctx_vector_t *ctx) ctx->len = 0; } -void sha512_init_vector_from_scalar (sha512_ctx_vector_t *ctx, sha512_ctx_t *ctx0) +static void sha512_init_vector_from_scalar (sha512_ctx_vector_t *ctx, sha512_ctx_t *ctx0) { ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; @@ -2014,7 +2014,7 @@ void sha512_init_vector_from_scalar (sha512_ctx_vector_t *ctx, sha512_ctx_t *ctx ctx->len = ctx0->len; } -void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len) +static void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 127; @@ -2144,7 +2144,7 @@ void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], } } -void sha512_update_vector (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha512_update_vector (sha512_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2232,7 +2232,7 @@ void sha512_update_vector (sha512_ctx_vector_t *ctx, const u32x *w, const int le sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha512_update_vector_swap (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha512_update_vector_swap (sha512_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2386,7 +2386,7 @@ void sha512_update_vector_swap (sha512_ctx_vector_t *ctx, const u32x *w, const i sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1); } -void sha512_update_vector_utf16le (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha512_update_vector_utf16le (sha512_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2452,7 +2452,7 @@ void sha512_update_vector_utf16le (sha512_ctx_vector_t *ctx, const u32x *w, cons sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha512_update_vector_utf16le_swap (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha512_update_vector_utf16le_swap (sha512_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2584,7 +2584,7 @@ void sha512_update_vector_utf16le_swap (sha512_ctx_vector_t *ctx, const u32x *w, sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha512_update_vector_utf16beN (sha512_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha512_update_vector_utf16beN (sha512_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2650,7 +2650,7 @@ void sha512_update_vector_utf16beN (sha512_ctx_vector_t *ctx, const u32x *w, con sha512_update_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, (len - pos1) * 2); } -void sha512_final_vector (sha512_ctx_vector_t *ctx) +static void sha512_final_vector (sha512_ctx_vector_t *ctx) { const int pos = ctx->len & 127; @@ -2709,7 +2709,7 @@ typedef struct sha512_hmac_ctx_vector } sha512_hmac_ctx_vector_t; -void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], const u32x w4[4], const u32x w5[4], const u32x w6[4], const u32x w7[4]) +static void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], const u32x w4[4], const u32x w5[4], const u32x w6[4], const u32x w7[4]) { u32x t0[4]; u32x t1[4]; @@ -2799,7 +2799,7 @@ void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const u32x w0[4 sha512_update_vector_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); } -void sha512_hmac_init_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha512_hmac_init_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2892,17 +2892,17 @@ void sha512_hmac_init_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, cons sha512_hmac_init_vector_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7); } -void sha512_hmac_update_vector_128 (sha512_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len) +static void sha512_hmac_update_vector_128 (sha512_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const int len) { sha512_update_vector_128 (&ctx->ipad, w0, w1, w2, w3, w4, w5, w6, w7, len); } -void sha512_hmac_update_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void sha512_hmac_update_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { sha512_update_vector (&ctx->ipad, w, len); } -void sha512_hmac_final_vector (sha512_hmac_ctx_vector_t *ctx) +static void sha512_hmac_final_vector (sha512_hmac_ctx_vector_t *ctx) { sha512_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_hash_whirlpool.cl b/OpenCL/inc_hash_whirlpool.cl index 800649eeb..8afa1adbf 100644 --- a/OpenCL/inc_hash_whirlpool.cl +++ b/OpenCL/inc_hash_whirlpool.cl @@ -1130,7 +1130,7 @@ typedef struct whirlpool_ctx } whirlpool_ctx_t; -void whirlpool_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { u32 Kh[8]; u32 Kl[8]; @@ -1300,7 +1300,7 @@ void whirlpool_transform (const u32 w0[4], const u32 w1[4], const u32 w2[4], con digest[15] ^= statel[7] ^ w3[3]; } -void whirlpool_init (whirlpool_ctx_t *ctx, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_init (whirlpool_ctx_t *ctx, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { ctx->h[ 0] = 0; ctx->h[ 1] = 0; @@ -1342,7 +1342,7 @@ void whirlpool_init (whirlpool_ctx_t *ctx, __local u32 (*s_Ch)[256], __local u32 ctx->s_Cl = s_Cl; } -void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -1420,7 +1420,7 @@ void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], } } -void whirlpool_update (whirlpool_ctx_t *ctx, const u32 *w, const int len) +static void whirlpool_update (whirlpool_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1472,7 +1472,7 @@ void whirlpool_update (whirlpool_ctx_t *ctx, const u32 *w, const int len) whirlpool_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void whirlpool_update_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len) +static void whirlpool_update_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1558,7 +1558,7 @@ void whirlpool_update_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len) whirlpool_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void whirlpool_update_utf16le (whirlpool_ctx_t *ctx, const u32 *w, const int len) +static void whirlpool_update_utf16le (whirlpool_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1600,7 +1600,7 @@ void whirlpool_update_utf16le (whirlpool_ctx_t *ctx, const u32 *w, const int len whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void whirlpool_update_utf16le_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len) +static void whirlpool_update_utf16le_swap (whirlpool_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1676,7 +1676,7 @@ void whirlpool_update_utf16le_swap (whirlpool_ctx_t *ctx, const u32 *w, const in whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void whirlpool_update_global (whirlpool_ctx_t *ctx, const __global u32 *w, const int len) +static void whirlpool_update_global (whirlpool_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1728,7 +1728,7 @@ void whirlpool_update_global (whirlpool_ctx_t *ctx, const __global u32 *w, const whirlpool_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void whirlpool_update_global_swap (whirlpool_ctx_t *ctx, const __global u32 *w, const int len) +static void whirlpool_update_global_swap (whirlpool_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1814,7 +1814,7 @@ void whirlpool_update_global_swap (whirlpool_ctx_t *ctx, const __global u32 *w, whirlpool_update_64 (ctx, w0, w1, w2, w3, len - pos1); } -void whirlpool_update_global_utf16le (whirlpool_ctx_t *ctx, const __global u32 *w, const int len) +static void whirlpool_update_global_utf16le (whirlpool_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1856,7 +1856,7 @@ void whirlpool_update_global_utf16le (whirlpool_ctx_t *ctx, const __global u32 * whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void whirlpool_update_global_utf16le_swap (whirlpool_ctx_t *ctx, const __global u32 *w, const int len) +static void whirlpool_update_global_utf16le_swap (whirlpool_ctx_t *ctx, const __global u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -1932,7 +1932,7 @@ void whirlpool_update_global_utf16le_swap (whirlpool_ctx_t *ctx, const __global whirlpool_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void whirlpool_final (whirlpool_ctx_t *ctx) +static void whirlpool_final (whirlpool_ctx_t *ctx) { const int pos = ctx->len & 63; @@ -1975,7 +1975,7 @@ typedef struct whirlpool_hmac_ctx } whirlpool_hmac_ctx_t; -void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { u32 t0[4]; u32 t1[4]; @@ -2029,7 +2029,7 @@ void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 w0[4], const u whirlpool_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void whirlpool_hmac_init (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_hmac_init (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { u32 w0[4]; u32 w1[4]; @@ -2086,7 +2086,7 @@ void whirlpool_hmac_init (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len whirlpool_hmac_init_64 (ctx, w0, w1, w2, w3, s_Ch, s_Cl); } -void whirlpool_hmac_init_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_hmac_init_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { u32 w0[4]; u32 w1[4]; @@ -2143,7 +2143,7 @@ void whirlpool_hmac_init_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const in whirlpool_hmac_init_64 (ctx, w0, w1, w2, w3, s_Ch, s_Cl); } -void whirlpool_hmac_init_global (whirlpool_hmac_ctx_t *ctx, __global const u32 *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_hmac_init_global (whirlpool_hmac_ctx_t *ctx, __global const u32 *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { u32 w0[4]; u32 w1[4]; @@ -2200,7 +2200,7 @@ void whirlpool_hmac_init_global (whirlpool_hmac_ctx_t *ctx, __global const u32 * whirlpool_hmac_init_64 (ctx, w0, w1, w2, w3, s_Ch, s_Cl); } -void whirlpool_hmac_init_global_swap (whirlpool_hmac_ctx_t *ctx, __global const u32 *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_hmac_init_global_swap (whirlpool_hmac_ctx_t *ctx, __global const u32 *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { u32 w0[4]; u32 w1[4]; @@ -2257,52 +2257,52 @@ void whirlpool_hmac_init_global_swap (whirlpool_hmac_ctx_t *ctx, __global const whirlpool_hmac_init_64 (ctx, w0, w1, w2, w3, s_Ch, s_Cl); } -void whirlpool_hmac_update_64 (whirlpool_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) +static void whirlpool_hmac_update_64 (whirlpool_hmac_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const int len) { whirlpool_update_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void whirlpool_hmac_update (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) +static void whirlpool_hmac_update (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) { whirlpool_update (&ctx->ipad, w, len); } -void whirlpool_hmac_update_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) +static void whirlpool_hmac_update_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) { whirlpool_update_swap (&ctx->ipad, w, len); } -void whirlpool_hmac_update_utf16le (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) +static void whirlpool_hmac_update_utf16le (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) { whirlpool_update_utf16le (&ctx->ipad, w, len); } -void whirlpool_hmac_update_utf16le_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) +static void whirlpool_hmac_update_utf16le_swap (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len) { whirlpool_update_utf16le_swap (&ctx->ipad, w, len); } -void whirlpool_hmac_update_global (whirlpool_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void whirlpool_hmac_update_global (whirlpool_hmac_ctx_t *ctx, const __global u32 *w, const int len) { whirlpool_update_global (&ctx->ipad, w, len); } -void whirlpool_hmac_update_global_swap (whirlpool_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void whirlpool_hmac_update_global_swap (whirlpool_hmac_ctx_t *ctx, const __global u32 *w, const int len) { whirlpool_update_global_swap (&ctx->ipad, w, len); } -void whirlpool_hmac_update_global_utf16le (whirlpool_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void whirlpool_hmac_update_global_utf16le (whirlpool_hmac_ctx_t *ctx, const __global u32 *w, const int len) { whirlpool_update_global_utf16le (&ctx->ipad, w, len); } -void whirlpool_hmac_update_global_utf16le_swap (whirlpool_hmac_ctx_t *ctx, const __global u32 *w, const int len) +static void whirlpool_hmac_update_global_utf16le_swap (whirlpool_hmac_ctx_t *ctx, const __global u32 *w, const int len) { whirlpool_update_global_utf16le_swap (&ctx->ipad, w, len); } -void whirlpool_hmac_final (whirlpool_hmac_ctx_t *ctx) +static void whirlpool_hmac_final (whirlpool_hmac_ctx_t *ctx) { whirlpool_final (&ctx->ipad); @@ -2351,7 +2351,7 @@ typedef struct whirlpool_ctx_vector } whirlpool_ctx_vector_t; -void whirlpool_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_transform_vector (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u32x digest[16], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { u32x Kh[8]; u32x Kl[8]; @@ -2521,7 +2521,7 @@ void whirlpool_transform_vector (const u32x w0[4], const u32x w1[4], const u32x digest[15] ^= statel[7] ^ w3[3]; } -void whirlpool_init_vector (whirlpool_ctx_vector_t *ctx, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_init_vector (whirlpool_ctx_vector_t *ctx, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { ctx->h[ 0] = 0; ctx->h[ 1] = 0; @@ -2563,7 +2563,7 @@ void whirlpool_init_vector (whirlpool_ctx_vector_t *ctx, __local u32 (*s_Ch)[256 ctx->s_Cl = s_Cl; } -void whirlpool_init_vector_from_scalar (whirlpool_ctx_vector_t *ctx, whirlpool_ctx_t *ctx0) +static void whirlpool_init_vector_from_scalar (whirlpool_ctx_vector_t *ctx, whirlpool_ctx_t *ctx0) { ctx->h[ 0] = ctx0->h[ 0]; ctx->h[ 1] = ctx0->h[ 1]; @@ -2605,7 +2605,7 @@ void whirlpool_init_vector_from_scalar (whirlpool_ctx_vector_t *ctx, whirlpool_c ctx->s_Cl = ctx0->s_Cl; } -void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -2683,7 +2683,7 @@ void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x w0[4], u32x w } } -void whirlpool_update_vector (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) +static void whirlpool_update_vector (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2735,7 +2735,7 @@ void whirlpool_update_vector (whirlpool_ctx_vector_t *ctx, const u32x *w, const whirlpool_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void whirlpool_update_vector_swap (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) +static void whirlpool_update_vector_swap (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2821,7 +2821,7 @@ void whirlpool_update_vector_swap (whirlpool_ctx_vector_t *ctx, const u32x *w, c whirlpool_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1); } -void whirlpool_update_vector_utf16le (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) +static void whirlpool_update_vector_utf16le (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2863,7 +2863,7 @@ void whirlpool_update_vector_utf16le (whirlpool_ctx_vector_t *ctx, const u32x *w whirlpool_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void whirlpool_update_vector_utf16le_swap (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) +static void whirlpool_update_vector_utf16le_swap (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -2939,7 +2939,7 @@ void whirlpool_update_vector_utf16le_swap (whirlpool_ctx_vector_t *ctx, const u3 whirlpool_update_vector_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2); } -void whirlpool_final_vector (whirlpool_ctx_vector_t *ctx) +static void whirlpool_final_vector (whirlpool_ctx_vector_t *ctx) { const int pos = ctx->len & 63; @@ -2982,7 +2982,7 @@ typedef struct whirlpool_hmac_ctx_vector } whirlpool_hmac_ctx_vector_t; -void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { u32x t0[4]; u32x t1[4]; @@ -3036,7 +3036,7 @@ void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, const u32x whirlpool_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } -void whirlpool_hmac_init_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) +static void whirlpool_hmac_init_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w, const int len, __local u32 (*s_Ch)[256], __local u32 (*s_Cl)[256]) { u32x w0[4]; u32x w1[4]; @@ -3093,17 +3093,17 @@ void whirlpool_hmac_init_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w whirlpool_hmac_init_vector_64 (ctx, w0, w1, w2, w3, s_Ch, s_Cl); } -void whirlpool_hmac_update_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) +static void whirlpool_hmac_update_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const int len) { whirlpool_update_vector_64 (&ctx->ipad, w0, w1, w2, w3, len); } -void whirlpool_hmac_update_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w, const int len) +static void whirlpool_hmac_update_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w, const int len) { whirlpool_update_vector (&ctx->ipad, w, len); } -void whirlpool_hmac_final_vector (whirlpool_hmac_ctx_vector_t *ctx) +static void whirlpool_hmac_final_vector (whirlpool_hmac_ctx_vector_t *ctx) { whirlpool_final_vector (&ctx->ipad); diff --git a/OpenCL/inc_luks_aes.cl b/OpenCL/inc_luks_aes.cl index a72a1f83d..3b8499820 100644 --- a/OpenCL/inc_luks_aes.cl +++ b/OpenCL/inc_luks_aes.cl @@ -1,7 +1,7 @@ // cbc-essiv -void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes128_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -16,7 +16,7 @@ void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SH essiv[3] = in[3]; } -void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes256_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -31,7 +31,7 @@ void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SH essiv[3] = in[3]; } -void luks_decrypt_sector_aes_cbc_essiv128 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv128 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -65,7 +65,7 @@ void luks_decrypt_sector_aes_cbc_essiv128 (__global u32 *in, u32 *out, const u32 } } -void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -102,7 +102,7 @@ void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1 (__global u32 *in, u32 *mk, co } } -void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -162,7 +162,7 @@ void luks_decrypt_sector_aes_cbc_essiv128_mk_sha1_final (__global u32 *in, u32 * } } -void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -199,7 +199,7 @@ void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -259,7 +259,7 @@ void luks_decrypt_sector_aes_cbc_essiv128_mk_sha256_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -296,7 +296,7 @@ void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -356,7 +356,7 @@ void luks_decrypt_sector_aes_cbc_essiv128_mk_sha512_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -393,7 +393,7 @@ void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160 (__global u32 *in, u32 *m } } -void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -453,7 +453,7 @@ void luks_decrypt_sector_aes_cbc_essiv128_mk_ripemd160_final (__global u32 *in, } } -void luks_decrypt_sector_aes_cbc_essiv256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -487,7 +487,7 @@ void luks_decrypt_sector_aes_cbc_essiv256 (__global u32 *in, u32 *out, const u32 } } -void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -524,7 +524,7 @@ void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1 (__global u32 *in, u32 *mk, co } } -void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -584,7 +584,7 @@ void luks_decrypt_sector_aes_cbc_essiv256_mk_sha1_final (__global u32 *in, u32 * } } -void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -621,7 +621,7 @@ void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -681,7 +681,7 @@ void luks_decrypt_sector_aes_cbc_essiv256_mk_sha256_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -718,7 +718,7 @@ void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -778,7 +778,7 @@ void luks_decrypt_sector_aes_cbc_essiv256_mk_sha512_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -815,7 +815,7 @@ void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160 (__global u32 *in, u32 *m } } -void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -877,7 +877,7 @@ void luks_decrypt_sector_aes_cbc_essiv256_mk_ripemd160_final (__global u32 *in, // cbc-plain -void luks_decrypt_sector_aes_cbc_plain128 (__global u32 *in, u32 *out, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain128 (__global u32 *in, u32 *out, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -907,7 +907,7 @@ void luks_decrypt_sector_aes_cbc_plain128 (__global u32 *in, u32 *out, const u32 } } -void luks_decrypt_sector_aes_cbc_plain128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -940,7 +940,7 @@ void luks_decrypt_sector_aes_cbc_plain128_mk_sha1 (__global u32 *in, u32 *mk, co } } -void luks_decrypt_sector_aes_cbc_plain128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -996,7 +996,7 @@ void luks_decrypt_sector_aes_cbc_plain128_mk_sha1_final (__global u32 *in, u32 * } } -void luks_decrypt_sector_aes_cbc_plain128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1029,7 +1029,7 @@ void luks_decrypt_sector_aes_cbc_plain128_mk_sha256 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_cbc_plain128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1085,7 +1085,7 @@ void luks_decrypt_sector_aes_cbc_plain128_mk_sha256_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_cbc_plain128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1118,7 +1118,7 @@ void luks_decrypt_sector_aes_cbc_plain128_mk_sha512 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_cbc_plain128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1174,7 +1174,7 @@ void luks_decrypt_sector_aes_cbc_plain128_mk_sha512_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1207,7 +1207,7 @@ void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160 (__global u32 *in, u32 *m } } -void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1263,7 +1263,7 @@ void luks_decrypt_sector_aes_cbc_plain128_mk_ripemd160_final (__global u32 *in, } } -void luks_decrypt_sector_aes_cbc_plain256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1293,7 +1293,7 @@ void luks_decrypt_sector_aes_cbc_plain256 (__global u32 *in, u32 *out, const u32 } } -void luks_decrypt_sector_aes_cbc_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1326,7 +1326,7 @@ void luks_decrypt_sector_aes_cbc_plain256_mk_sha1 (__global u32 *in, u32 *mk, co } } -void luks_decrypt_sector_aes_cbc_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1382,7 +1382,7 @@ void luks_decrypt_sector_aes_cbc_plain256_mk_sha1_final (__global u32 *in, u32 * } } -void luks_decrypt_sector_aes_cbc_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1415,7 +1415,7 @@ void luks_decrypt_sector_aes_cbc_plain256_mk_sha256 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_cbc_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1471,7 +1471,7 @@ void luks_decrypt_sector_aes_cbc_plain256_mk_sha256_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_cbc_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1504,7 +1504,7 @@ void luks_decrypt_sector_aes_cbc_plain256_mk_sha512 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_cbc_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1560,7 +1560,7 @@ void luks_decrypt_sector_aes_cbc_plain256_mk_sha512_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1593,7 +1593,7 @@ void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160 (__global u32 *in, u32 *m } } -void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1651,7 +1651,7 @@ void luks_decrypt_sector_aes_cbc_plain256_mk_ripemd160_final (__global u32 *in, // xts-plain -void aes128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { out[0] = in[0]; out[1] = in[1]; @@ -1673,7 +1673,7 @@ void aes128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TY xts_mul2 (T, T); } -void aes256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { out[0] = in[0]; out[1] = in[1]; @@ -1695,7 +1695,7 @@ void aes256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T, SHM_TY xts_mul2 (T, T); } -void luks_decrypt_sector_aes_xts_plain256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1729,7 +1729,7 @@ void luks_decrypt_sector_aes_xts_plain256 (__global u32 *in, u32 *out, const u32 } } -void luks_decrypt_sector_aes_xts_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1766,7 +1766,7 @@ void luks_decrypt_sector_aes_xts_plain256_mk_sha1 (__global u32 *in, u32 *mk, co } } -void luks_decrypt_sector_aes_xts_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1826,7 +1826,7 @@ void luks_decrypt_sector_aes_xts_plain256_mk_sha1_final (__global u32 *in, u32 * } } -void luks_decrypt_sector_aes_xts_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1863,7 +1863,7 @@ void luks_decrypt_sector_aes_xts_plain256_mk_sha256 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_xts_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1923,7 +1923,7 @@ void luks_decrypt_sector_aes_xts_plain256_mk_sha256_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_xts_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1960,7 +1960,7 @@ void luks_decrypt_sector_aes_xts_plain256_mk_sha512 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_xts_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2020,7 +2020,7 @@ void luks_decrypt_sector_aes_xts_plain256_mk_sha512_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2057,7 +2057,7 @@ void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160 (__global u32 *in, u32 *m } } -void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2117,7 +2117,7 @@ void luks_decrypt_sector_aes_xts_plain256_mk_ripemd160_final (__global u32 *in, } } -void luks_decrypt_sector_aes_xts_plain512 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain512 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2151,7 +2151,7 @@ void luks_decrypt_sector_aes_xts_plain512 (__global u32 *in, u32 *out, const u32 } } -void luks_decrypt_sector_aes_xts_plain512_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain512_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2188,7 +2188,7 @@ void luks_decrypt_sector_aes_xts_plain512_mk_sha1 (__global u32 *in, u32 *mk, co } } -void luks_decrypt_sector_aes_xts_plain512_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain512_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2248,7 +2248,7 @@ void luks_decrypt_sector_aes_xts_plain512_mk_sha1_final (__global u32 *in, u32 * } } -void luks_decrypt_sector_aes_xts_plain512_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain512_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2285,7 +2285,7 @@ void luks_decrypt_sector_aes_xts_plain512_mk_sha256 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_xts_plain512_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain512_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2345,7 +2345,7 @@ void luks_decrypt_sector_aes_xts_plain512_mk_sha256_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_xts_plain512_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain512_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2382,7 +2382,7 @@ void luks_decrypt_sector_aes_xts_plain512_mk_sha512 (__global u32 *in, u32 *mk, } } -void luks_decrypt_sector_aes_xts_plain512_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain512_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2442,7 +2442,7 @@ void luks_decrypt_sector_aes_xts_plain512_mk_sha512_final (__global u32 *in, u32 } } -void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2479,7 +2479,7 @@ void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160 (__global u32 *in, u32 *m } } -void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, const u32 sector, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2541,7 +2541,7 @@ void luks_decrypt_sector_aes_xts_plain512_mk_ripemd160_final (__global u32 *in, // luks helper -void luks_af_sha1_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_af_sha1_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -2932,7 +2932,7 @@ void luks_af_sha1_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_tm } } -void luks_af_sha256_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_af_sha256_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3291,7 +3291,7 @@ void luks_af_sha256_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_ } } -void luks_af_sha512_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_af_sha512_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3669,7 +3669,7 @@ void luks_af_sha512_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_ } } -void luks_af_ripemd160_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void luks_af_ripemd160_then_aes_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; diff --git a/OpenCL/inc_luks_af.cl b/OpenCL/inc_luks_af.cl index 47059bca1..ead5e288e 100644 --- a/OpenCL/inc_luks_af.cl +++ b/OpenCL/inc_luks_af.cl @@ -45,7 +45,7 @@ __constant u64a AF_k_sha512[80] = SHA512C4c, SHA512C4d, SHA512C4e, SHA512C4f, }; -void AF_sha1_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[5]) +static void AF_sha1_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[5]) { u32 A = digest[0]; u32 B = digest[1]; @@ -173,7 +173,7 @@ void AF_sha1_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], con digest[4] += E; } -void AF_sha256_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[8]) +static void AF_sha256_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[8]) { u32 a = digest[0]; u32 b = digest[1]; @@ -261,7 +261,7 @@ void AF_sha256_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], c digest[7] += h; } -void AF_sha512_transform_S (const u64 w0[4], const u64 w1[4], const u64 w2[4], const u64 w3[4], u64 digest[8]) +static void AF_sha512_transform_S (const u64 w0[4], const u64 w1[4], const u64 w2[4], const u64 w3[4], u64 digest[8]) { u64 a = digest[0]; u64 b = digest[1]; @@ -349,7 +349,7 @@ void AF_sha512_transform_S (const u64 w0[4], const u64 w1[4], const u64 w2[4], c digest[7] += h; } -void AF_ripemd160_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[5]) +static void AF_ripemd160_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[5]) { u32 w0_t = w0[0]; u32 w1_t = w0[1]; @@ -565,7 +565,7 @@ void AF_ripemd160_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4] // diffuse functions -void AF_sha1_diffuse16 (u32 *out) +static void AF_sha1_diffuse16 (u32 *out) { u32 w0[4]; u32 w1[4]; @@ -607,7 +607,7 @@ void AF_sha1_diffuse16 (u32 *out) out[3] = swap32_S (digest[3]); } -void AF_sha1_diffuse32 (u32 *out) +static void AF_sha1_diffuse32 (u32 *out) { u32 w0[4]; u32 w1[4]; @@ -681,7 +681,7 @@ void AF_sha1_diffuse32 (u32 *out) out[7] = swap32_S (digest[2]); } -void AF_sha1_diffuse64 (u32 *out) +static void AF_sha1_diffuse64 (u32 *out) { u32 w0[4]; u32 w1[4]; @@ -819,7 +819,7 @@ void AF_sha1_diffuse64 (u32 *out) out[15] = swap32_S (digest[0]); } -void AF_sha256_diffuse16 (u32 *out) +static void AF_sha256_diffuse16 (u32 *out) { u32 w0[4]; u32 w1[4]; @@ -864,7 +864,7 @@ void AF_sha256_diffuse16 (u32 *out) out[3] = swap32_S (digest[3]); } -void AF_sha256_diffuse32 (u32 *out) +static void AF_sha256_diffuse32 (u32 *out) { u32 w0[4]; u32 w1[4]; @@ -913,7 +913,7 @@ void AF_sha256_diffuse32 (u32 *out) out[7] = swap32_S (digest[7]); } -void AF_sha256_diffuse64 (u32 *out) +static void AF_sha256_diffuse64 (u32 *out) { u32 w0[4]; u32 w1[4]; @@ -1001,7 +1001,7 @@ void AF_sha256_diffuse64 (u32 *out) out[15] = swap32_S (digest[7]); } -void AF_sha512_diffuse16 (u32 *out) +static void AF_sha512_diffuse16 (u32 *out) { u64 w0[4]; u64 w1[4]; @@ -1046,7 +1046,7 @@ void AF_sha512_diffuse16 (u32 *out) out[3] = swap32_S (l32_from_64_S (digest[1])); } -void AF_sha512_diffuse32 (u32 *out) +static void AF_sha512_diffuse32 (u32 *out) { u64 w0[4]; u64 w1[4]; @@ -1095,7 +1095,7 @@ void AF_sha512_diffuse32 (u32 *out) out[7] = swap32_S (l32_from_64_S (digest[3])); } -void AF_sha512_diffuse64 (u32 *out) +static void AF_sha512_diffuse64 (u32 *out) { u64 w0[4]; u64 w1[4]; @@ -1152,7 +1152,7 @@ void AF_sha512_diffuse64 (u32 *out) out[15] = swap32_S (l32_from_64_S (digest[7])); } -void AF_ripemd160_diffuse16 (u32 *out) +static void AF_ripemd160_diffuse16 (u32 *out) { u32 w0[4]; u32 w1[4]; @@ -1194,7 +1194,7 @@ void AF_ripemd160_diffuse16 (u32 *out) out[3] = digest[3]; } -void AF_ripemd160_diffuse32 (u32 *out) +static void AF_ripemd160_diffuse32 (u32 *out) { u32 w0[4]; u32 w1[4]; @@ -1268,7 +1268,7 @@ void AF_ripemd160_diffuse32 (u32 *out) out[7] = digest[2]; } -void AF_ripemd160_diffuse64 (u32 *out) +static void AF_ripemd160_diffuse64 (u32 *out) { u32 w0[4]; u32 w1[4]; diff --git a/OpenCL/inc_luks_essiv.cl b/OpenCL/inc_luks_essiv.cl index 5011ffed4..ad8f3ffd3 100644 --- a/OpenCL/inc_luks_essiv.cl +++ b/OpenCL/inc_luks_essiv.cl @@ -19,7 +19,7 @@ __constant u32a ESSIV_k_sha256[64] = }; // basically a normal sha256_transform() but with a different name to avoid collisions with function nameing -void ESSIV_sha256_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[8]) +static void ESSIV_sha256_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4], const u32 w3[4], u32 digest[8]) { u32 a = digest[0]; u32 b = digest[1]; @@ -107,7 +107,7 @@ void ESSIV_sha256_transform_S (const u32 w0[4], const u32 w1[4], const u32 w2[4] digest[7] += h; } -void ESSIV_sha256_init128 (u32 *key, u32 *essivhash) +static void ESSIV_sha256_init128 (u32 *key, u32 *essivhash) { essivhash[0] = SHA256M_A; essivhash[1] = SHA256M_B; @@ -152,7 +152,7 @@ void ESSIV_sha256_init128 (u32 *key, u32 *essivhash) essivhash[7] = swap32_S (essivhash[7]); } -void ESSIV_sha256_init256 (u32 *key, u32 *essivhash) +static void ESSIV_sha256_init256 (u32 *key, u32 *essivhash) { essivhash[0] = SHA256M_A; essivhash[1] = SHA256M_B; diff --git a/OpenCL/inc_luks_serpent.cl b/OpenCL/inc_luks_serpent.cl index 8e99b5cff..00068776b 100644 --- a/OpenCL/inc_luks_serpent.cl +++ b/OpenCL/inc_luks_serpent.cl @@ -1,7 +1,7 @@ // cbc-essiv -void serpent128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv) +static void serpent128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv) { serpent128_decrypt (ks1, in, out); @@ -16,7 +16,7 @@ void serpent128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv essiv[3] = in[3]; } -void serpent256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv) +static void serpent256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv) { serpent256_decrypt (ks1, in, out); @@ -31,7 +31,7 @@ void serpent256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv essiv[3] = in[3]; } -void luks_decrypt_sector_serpent_cbc_essiv128 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv128 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -65,7 +65,7 @@ void luks_decrypt_sector_serpent_cbc_essiv128 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -102,7 +102,7 @@ void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -162,7 +162,7 @@ void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -199,7 +199,7 @@ void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -259,7 +259,7 @@ void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -296,7 +296,7 @@ void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -356,7 +356,7 @@ void luks_decrypt_sector_serpent_cbc_essiv128_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -393,7 +393,7 @@ void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -453,7 +453,7 @@ void luks_decrypt_sector_serpent_cbc_essiv128_mk_ripemd160_final (__global u32 * } } -void luks_decrypt_sector_serpent_cbc_essiv256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -487,7 +487,7 @@ void luks_decrypt_sector_serpent_cbc_essiv256 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -524,7 +524,7 @@ void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -584,7 +584,7 @@ void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -621,7 +621,7 @@ void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -681,7 +681,7 @@ void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -718,7 +718,7 @@ void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -778,7 +778,7 @@ void luks_decrypt_sector_serpent_cbc_essiv256_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -815,7 +815,7 @@ void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -877,7 +877,7 @@ void luks_decrypt_sector_serpent_cbc_essiv256_mk_ripemd160_final (__global u32 * // cbc-plain -void luks_decrypt_sector_serpent_cbc_plain128 (__global u32 *in, u32 *out, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain128 (__global u32 *in, u32 *out, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -907,7 +907,7 @@ void luks_decrypt_sector_serpent_cbc_plain128 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -940,7 +940,7 @@ void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -996,7 +996,7 @@ void luks_decrypt_sector_serpent_cbc_plain128_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1029,7 +1029,7 @@ void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1085,7 +1085,7 @@ void luks_decrypt_sector_serpent_cbc_plain128_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1118,7 +1118,7 @@ void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1174,7 +1174,7 @@ void luks_decrypt_sector_serpent_cbc_plain128_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1207,7 +1207,7 @@ void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1263,7 +1263,7 @@ void luks_decrypt_sector_serpent_cbc_plain128_mk_ripemd160_final (__global u32 * } } -void luks_decrypt_sector_serpent_cbc_plain256 (__global u32 *in, u32 *out, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain256 (__global u32 *in, u32 *out, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1293,7 +1293,7 @@ void luks_decrypt_sector_serpent_cbc_plain256 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1326,7 +1326,7 @@ void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1382,7 +1382,7 @@ void luks_decrypt_sector_serpent_cbc_plain256_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1415,7 +1415,7 @@ void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1471,7 +1471,7 @@ void luks_decrypt_sector_serpent_cbc_plain256_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1504,7 +1504,7 @@ void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1560,7 +1560,7 @@ void luks_decrypt_sector_serpent_cbc_plain256_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1593,7 +1593,7 @@ void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) +static void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1651,7 +1651,7 @@ void luks_decrypt_sector_serpent_cbc_plain256_mk_ripemd160_final (__global u32 * // xts-plain -void serpent128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T) +static void serpent128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T) { out[0] = in[0]; out[1] = in[1]; @@ -1673,7 +1673,7 @@ void serpent128_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T) xts_mul2 (T, T); } -void serpent256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T) +static void serpent256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T) { out[0] = in[0]; out[1] = in[1]; @@ -1695,7 +1695,7 @@ void serpent256_decrypt_xts (const u32 *ks1, const u32 *in, u32 *out, u32 *T) xts_mul2 (T, T); } -void luks_decrypt_sector_serpent_xts_plain256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain256 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1729,7 +1729,7 @@ void luks_decrypt_sector_serpent_xts_plain256 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_serpent_xts_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1766,7 +1766,7 @@ void luks_decrypt_sector_serpent_xts_plain256_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_serpent_xts_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1826,7 +1826,7 @@ void luks_decrypt_sector_serpent_xts_plain256_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_serpent_xts_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1863,7 +1863,7 @@ void luks_decrypt_sector_serpent_xts_plain256_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_xts_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1923,7 +1923,7 @@ void luks_decrypt_sector_serpent_xts_plain256_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_xts_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1960,7 +1960,7 @@ void luks_decrypt_sector_serpent_xts_plain256_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_xts_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2020,7 +2020,7 @@ void luks_decrypt_sector_serpent_xts_plain256_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2057,7 +2057,7 @@ void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2117,7 +2117,7 @@ void luks_decrypt_sector_serpent_xts_plain256_mk_ripemd160_final (__global u32 * } } -void luks_decrypt_sector_serpent_xts_plain512 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain512 (__global u32 *in, u32 *out, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2151,7 +2151,7 @@ void luks_decrypt_sector_serpent_xts_plain512 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_serpent_xts_plain512_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain512_mk_sha1 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2188,7 +2188,7 @@ void luks_decrypt_sector_serpent_xts_plain512_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_serpent_xts_plain512_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain512_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2248,7 +2248,7 @@ void luks_decrypt_sector_serpent_xts_plain512_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_serpent_xts_plain512_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain512_mk_sha256 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2285,7 +2285,7 @@ void luks_decrypt_sector_serpent_xts_plain512_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_xts_plain512_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain512_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2345,7 +2345,7 @@ void luks_decrypt_sector_serpent_xts_plain512_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_xts_plain512_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain512_mk_sha512 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2382,7 +2382,7 @@ void luks_decrypt_sector_serpent_xts_plain512_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_serpent_xts_plain512_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain512_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2442,7 +2442,7 @@ void luks_decrypt_sector_serpent_xts_plain512_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2479,7 +2479,7 @@ void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) +static void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *ks1, const u32 *ks2, volatile const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2541,7 +2541,7 @@ void luks_decrypt_sector_serpent_xts_plain512_mk_ripemd160_final (__global u32 * // luks helper -void luks_af_sha1_then_serpent_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) +static void luks_af_sha1_then_serpent_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -2900,7 +2900,7 @@ void luks_af_sha1_then_serpent_decrypt (__global luks_t *luks_bufs, __global luk } } -void luks_af_sha256_then_serpent_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) +static void luks_af_sha256_then_serpent_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3259,7 +3259,7 @@ void luks_af_sha256_then_serpent_decrypt (__global luks_t *luks_bufs, __global l } } -void luks_af_sha512_then_serpent_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) +static void luks_af_sha512_then_serpent_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3637,7 +3637,7 @@ void luks_af_sha512_then_serpent_decrypt (__global luks_t *luks_bufs, __global l } } -void luks_af_ripemd160_then_serpent_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) +static void luks_af_ripemd160_then_serpent_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; diff --git a/OpenCL/inc_luks_twofish.cl b/OpenCL/inc_luks_twofish.cl index 134385bf2..38800a872 100644 --- a/OpenCL/inc_luks_twofish.cl +++ b/OpenCL/inc_luks_twofish.cl @@ -1,7 +1,7 @@ // cbc-essiv -void twofish128_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *essiv) +static void twofish128_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *essiv) { twofish128_decrypt (sk1, lk1, in, out); @@ -16,7 +16,7 @@ void twofish128_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 essiv[3] = in[3]; } -void twofish256_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *essiv) +static void twofish256_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *essiv) { twofish256_decrypt (sk1, lk1, in, out); @@ -31,7 +31,7 @@ void twofish256_decrypt_cbc (const u32 *sk1, const u32 *lk1, const u32 *in, u32 essiv[3] = in[3]; } -void luks_decrypt_sector_twofish_cbc_essiv128 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv128 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -65,7 +65,7 @@ void luks_decrypt_sector_twofish_cbc_essiv128 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -102,7 +102,7 @@ void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -162,7 +162,7 @@ void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -199,7 +199,7 @@ void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -259,7 +259,7 @@ void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -296,7 +296,7 @@ void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -356,7 +356,7 @@ void luks_decrypt_sector_twofish_cbc_essiv128_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -393,7 +393,7 @@ void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -453,7 +453,7 @@ void luks_decrypt_sector_twofish_cbc_essiv128_mk_ripemd160_final (__global u32 * } } -void luks_decrypt_sector_twofish_cbc_essiv256 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv256 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -487,7 +487,7 @@ void luks_decrypt_sector_twofish_cbc_essiv256 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -524,7 +524,7 @@ void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -584,7 +584,7 @@ void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -621,7 +621,7 @@ void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -681,7 +681,7 @@ void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -718,7 +718,7 @@ void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -778,7 +778,7 @@ void luks_decrypt_sector_twofish_cbc_essiv256_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -815,7 +815,7 @@ void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -877,7 +877,7 @@ void luks_decrypt_sector_twofish_cbc_essiv256_mk_ripemd160_final (__global u32 * // cbc-plain -void luks_decrypt_sector_twofish_cbc_plain128 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain128 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -907,7 +907,7 @@ void luks_decrypt_sector_twofish_cbc_plain128 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -940,7 +940,7 @@ void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -996,7 +996,7 @@ void luks_decrypt_sector_twofish_cbc_plain128_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1029,7 +1029,7 @@ void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1085,7 +1085,7 @@ void luks_decrypt_sector_twofish_cbc_plain128_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1118,7 +1118,7 @@ void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1174,7 +1174,7 @@ void luks_decrypt_sector_twofish_cbc_plain128_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1207,7 +1207,7 @@ void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1263,7 +1263,7 @@ void luks_decrypt_sector_twofish_cbc_plain128_mk_ripemd160_final (__global u32 * } } -void luks_decrypt_sector_twofish_cbc_plain256 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain256 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1293,7 +1293,7 @@ void luks_decrypt_sector_twofish_cbc_plain256 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1326,7 +1326,7 @@ void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1382,7 +1382,7 @@ void luks_decrypt_sector_twofish_cbc_plain256_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1415,7 +1415,7 @@ void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1471,7 +1471,7 @@ void luks_decrypt_sector_twofish_cbc_plain256_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1504,7 +1504,7 @@ void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1560,7 +1560,7 @@ void luks_decrypt_sector_twofish_cbc_plain256_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1593,7 +1593,7 @@ void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) +static void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1651,7 +1651,7 @@ void luks_decrypt_sector_twofish_cbc_plain256_mk_ripemd160_final (__global u32 * // xts-plain -void twofish128_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *T) +static void twofish128_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *T) { out[0] = in[0]; out[1] = in[1]; @@ -1673,7 +1673,7 @@ void twofish128_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 xts_mul2 (T, T); } -void twofish256_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *T) +static void twofish256_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 *out, u32 *T) { out[0] = in[0]; out[1] = in[1]; @@ -1695,7 +1695,7 @@ void twofish256_decrypt_xts (const u32 *sk1, const u32 *lk1, const u32 *in, u32 xts_mul2 (T, T); } -void luks_decrypt_sector_twofish_xts_plain256 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain256 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1729,7 +1729,7 @@ void luks_decrypt_sector_twofish_xts_plain256 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_twofish_xts_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain256_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1766,7 +1766,7 @@ void luks_decrypt_sector_twofish_xts_plain256_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_twofish_xts_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain256_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1826,7 +1826,7 @@ void luks_decrypt_sector_twofish_xts_plain256_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_twofish_xts_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain256_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1863,7 +1863,7 @@ void luks_decrypt_sector_twofish_xts_plain256_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_xts_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain256_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1923,7 +1923,7 @@ void luks_decrypt_sector_twofish_xts_plain256_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_xts_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain256_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -1960,7 +1960,7 @@ void luks_decrypt_sector_twofish_xts_plain256_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_xts_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain256_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2020,7 +2020,7 @@ void luks_decrypt_sector_twofish_xts_plain256_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2057,7 +2057,7 @@ void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2117,7 +2117,7 @@ void luks_decrypt_sector_twofish_xts_plain256_mk_ripemd160_final (__global u32 * } } -void luks_decrypt_sector_twofish_xts_plain512 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain512 (__global u32 *in, u32 *out, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2151,7 +2151,7 @@ void luks_decrypt_sector_twofish_xts_plain512 (__global u32 *in, u32 *out, const } } -void luks_decrypt_sector_twofish_xts_plain512_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain512_mk_sha1 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2188,7 +2188,7 @@ void luks_decrypt_sector_twofish_xts_plain512_mk_sha1 (__global u32 *in, u32 *mk } } -void luks_decrypt_sector_twofish_xts_plain512_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain512_mk_sha1_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2248,7 +2248,7 @@ void luks_decrypt_sector_twofish_xts_plain512_mk_sha1_final (__global u32 *in, u } } -void luks_decrypt_sector_twofish_xts_plain512_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain512_mk_sha256 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2285,7 +2285,7 @@ void luks_decrypt_sector_twofish_xts_plain512_mk_sha256 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_xts_plain512_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain512_mk_sha256_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2345,7 +2345,7 @@ void luks_decrypt_sector_twofish_xts_plain512_mk_sha256_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_xts_plain512_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain512_mk_sha512 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2382,7 +2382,7 @@ void luks_decrypt_sector_twofish_xts_plain512_mk_sha512 (__global u32 *in, u32 * } } -void luks_decrypt_sector_twofish_xts_plain512_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain512_mk_sha512_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2442,7 +2442,7 @@ void luks_decrypt_sector_twofish_xts_plain512_mk_sha512_final (__global u32 *in, } } -void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160 (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2479,7 +2479,7 @@ void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160 (__global u32 *in, u3 } } -void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) +static void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160_final (__global u32 *in, u32 *mk, const u32 *sk1, const u32 *lk1, const u32 *sk2, const u32 *lk2, const u32 sector) { u32 S[4] = { sector, 0, 0, 0 }; @@ -2541,7 +2541,7 @@ void luks_decrypt_sector_twofish_xts_plain512_mk_ripemd160_final (__global u32 * // luks helper -void luks_af_sha1_then_twofish_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) +static void luks_af_sha1_then_twofish_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -2900,7 +2900,7 @@ void luks_af_sha1_then_twofish_decrypt (__global luks_t *luks_bufs, __global luk } } -void luks_af_sha256_then_twofish_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) +static void luks_af_sha256_then_twofish_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3259,7 +3259,7 @@ void luks_af_sha256_then_twofish_decrypt (__global luks_t *luks_bufs, __global l } } -void luks_af_sha512_then_twofish_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) +static void luks_af_sha512_then_twofish_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; @@ -3637,7 +3637,7 @@ void luks_af_sha512_then_twofish_decrypt (__global luks_t *luks_bufs, __global l } } -void luks_af_ripemd160_then_twofish_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) +static void luks_af_ripemd160_then_twofish_decrypt (__global luks_t *luks_bufs, __global luks_tmp_t *tmps, u32 *pt_buf) { const u32 key_size = luks_bufs->key_size; const u32 cipher_mode = luks_bufs->cipher_mode; diff --git a/OpenCL/inc_luks_xts.cl b/OpenCL/inc_luks_xts.cl index 1af200181..643b402e4 100644 --- a/OpenCL/inc_luks_xts.cl +++ b/OpenCL/inc_luks_xts.cl @@ -1,4 +1,4 @@ -void xts_mul2 (u32 *in, u32 *out) +static void xts_mul2 (u32 *in, u32 *out) { const u32 c = in[3] >> 31; diff --git a/OpenCL/inc_rp.cl b/OpenCL/inc_rp.cl index 8e0a69d56..6087f042a 100644 --- a/OpenCL/inc_rp.cl +++ b/OpenCL/inc_rp.cl @@ -738,7 +738,7 @@ static int apply_rule (const u32 name, MAYBE_UNUSED const u8 p0, MAYBE_UNUSED co return out_len; } -int apply_rules (__global const u32 *cmds, u32 *buf, const int in_len) +static int apply_rules (__global const u32 *cmds, u32 *buf, const int in_len) { int out_len = in_len; diff --git a/OpenCL/inc_rp_optimized.cl b/OpenCL/inc_rp_optimized.cl index 74ca84cc2..38158c534 100644 --- a/OpenCL/inc_rp_optimized.cl +++ b/OpenCL/inc_rp_optimized.cl @@ -3,7 +3,7 @@ * License.....: MIT */ -u32 generate_cmask (const u32 value) +static u32 generate_cmask (const u32 value) { const u32 rmask = ((value & 0x40404040u) >> 1u) & ~((value & 0x80808080u) >> 2u); @@ -14,7 +14,7 @@ u32 generate_cmask (const u32 value) return rmask & ~hmask & lmask; } -void truncate_right (u32 buf0[4], u32 buf1[4], const u32 offset) +static void truncate_right (u32 buf0[4], u32 buf1[4], const u32 offset) { const u32 tmp = (1u << ((offset & 3u) * 8u)) - 1u; @@ -67,7 +67,7 @@ void truncate_right (u32 buf0[4], u32 buf1[4], const u32 offset) } } -void truncate_left (u32 buf0[4], u32 buf1[4], const u32 offset) +static void truncate_left (u32 buf0[4], u32 buf1[4], const u32 offset) { const u32 tmp = ~((1u << ((offset & 3u) * 8u)) - 1u); @@ -120,7 +120,7 @@ void truncate_left (u32 buf0[4], u32 buf1[4], const u32 offset) } } -void lshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4]) +static void lshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4]) { out0[0] = amd_bytealign_S (in0[1], in0[0], 1); out0[1] = amd_bytealign_S (in0[2], in0[1], 1); @@ -132,7 +132,7 @@ void lshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4]) out1[3] = amd_bytealign_S ( 0, in1[3], 1); } -void rshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4]) +static void rshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4]) { out1[3] = amd_bytealign_S (in1[3], in1[2], 3); out1[2] = amd_bytealign_S (in1[2], in1[1], 3); @@ -144,7 +144,7 @@ void rshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4]) out0[0] = amd_bytealign_S (in0[0], 0, 3); } -void lshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4], const u32 num) +static void lshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4], const u32 num) { switch (num) { @@ -439,7 +439,7 @@ void lshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4 } } -void rshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4], const u32 num) +static void rshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4], const u32 num) { switch (num) { @@ -734,7 +734,7 @@ void rshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 out1[4 } } -void append_block1 (const u32 offset, u32 buf0[4], u32 buf1[4], const u32 src_r0) +static void append_block1 (const u32 offset, u32 buf0[4], u32 buf1[4], const u32 src_r0) { // this version works with 1 byte append only @@ -754,7 +754,7 @@ void append_block1 (const u32 offset, u32 buf0[4], u32 buf1[4], const u32 src_r0 buf1[3] |= (offset >= 28) ? tmp : 0; } -void append_block8 (const u32 offset, u32 buf0[4], u32 buf1[4], const u32 src_l0[4], const u32 src_l1[4], const u32 src_r0[4], const u32 src_r1[4]) +static void append_block8 (const u32 offset, u32 buf0[4], u32 buf1[4], const u32 src_l0[4], const u32 src_l1[4], const u32 src_r0[4], const u32 src_r1[4]) { const int offset_mod_4 = offset & 3; @@ -996,7 +996,7 @@ void append_block8 (const u32 offset, u32 buf0[4], u32 buf1[4], const u32 src_l0 buf1[3] = src_l1[3] | s7; } -void reverse_block (u32 in0[4], u32 in1[4], u32 out0[4], u32 out1[4], const u32 len) +static void reverse_block (u32 in0[4], u32 in1[4], u32 out0[4], u32 out1[4], const u32 len) { rshift_block_N (in0, in1, out0, out1, 32 - len); @@ -1022,7 +1022,7 @@ void reverse_block (u32 in0[4], u32 in1[4], u32 out0[4], u32 out1[4], const u32 out1[3] = swap32_S (tib41[3]); } -u32 rule_op_mangle_lrest (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_lrest (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { buf0[0] |= (generate_cmask (buf0[0])); buf0[1] |= (generate_cmask (buf0[1])); @@ -1036,7 +1036,7 @@ u32 rule_op_mangle_lrest (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], return in_len; } -u32 rule_op_mangle_urest (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_urest (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { buf0[0] &= ~(generate_cmask (buf0[0])); buf0[1] &= ~(generate_cmask (buf0[1])); @@ -1050,7 +1050,7 @@ u32 rule_op_mangle_urest (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], return in_len; } -u32 rule_op_mangle_lrest_ufirst (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_lrest_ufirst (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { rule_op_mangle_lrest (p0, p1, buf0, buf1, in_len); @@ -1059,7 +1059,7 @@ u32 rule_op_mangle_lrest_ufirst (const u32 p0, const u32 p1, u32 buf0[4], u32 bu return in_len; } -u32 rule_op_mangle_urest_lfirst (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_urest_lfirst (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { rule_op_mangle_urest (p0, p1, buf0, buf1, in_len); @@ -1068,7 +1068,7 @@ u32 rule_op_mangle_urest_lfirst (const u32 p0, const u32 p1, u32 buf0[4], u32 bu return in_len; } -u32 rule_op_mangle_trest (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_trest (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { buf0[0] ^= (generate_cmask (buf0[0])); buf0[1] ^= (generate_cmask (buf0[1])); @@ -1082,7 +1082,7 @@ u32 rule_op_mangle_trest (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], return in_len; } -u32 rule_op_mangle_toggle_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_toggle_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -1103,14 +1103,14 @@ u32 rule_op_mangle_toggle_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[ return in_len; } -u32 rule_op_mangle_reverse (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_reverse (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { reverse_block (buf0, buf1, buf0, buf1, in_len); return in_len; } -u32 rule_op_mangle_dupeword (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_dupeword (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if ((in_len + in_len) >= 32) return (in_len); @@ -1123,7 +1123,7 @@ u32 rule_op_mangle_dupeword (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4 return out_len; } -u32 rule_op_mangle_dupeword_times (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_dupeword_times (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (((in_len * p0) + in_len) >= 32) return (in_len); @@ -1151,7 +1151,7 @@ u32 rule_op_mangle_dupeword_times (const u32 p0, const u32 p1, u32 buf0[4], u32 return out_len; } -u32 rule_op_mangle_reflect (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_reflect (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if ((in_len + in_len) >= 32) return (in_len); @@ -1169,7 +1169,7 @@ u32 rule_op_mangle_reflect (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4] return out_len; } -u32 rule_op_mangle_append (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_append (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if ((in_len + 1) >= 32) return (in_len); @@ -1182,7 +1182,7 @@ u32 rule_op_mangle_append (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], return out_len; } -u32 rule_op_mangle_prepend (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_prepend (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if ((in_len + 1) >= 32) return (in_len); @@ -1197,7 +1197,7 @@ u32 rule_op_mangle_prepend (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4] return out_len; } -u32 rule_op_mangle_rotate_left (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_rotate_left (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (in_len == 0) return (in_len); @@ -1221,7 +1221,7 @@ u32 rule_op_mangle_rotate_left (const u32 p0, const u32 p1, u32 buf0[4], u32 buf return in_len; } -u32 rule_op_mangle_rotate_right (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_rotate_right (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (in_len == 0) return (in_len); @@ -1251,7 +1251,7 @@ u32 rule_op_mangle_rotate_right (const u32 p0, const u32 p1, u32 buf0[4], u32 bu return in_len; } -u32 rule_op_mangle_delete_first (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_delete_first (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (in_len == 0) return (in_len); @@ -1262,7 +1262,7 @@ u32 rule_op_mangle_delete_first (const u32 p0, const u32 p1, u32 buf0[4], u32 bu return in_len1; } -u32 rule_op_mangle_delete_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_delete_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (in_len == 0) return (in_len); @@ -1282,7 +1282,7 @@ u32 rule_op_mangle_delete_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf return in_len1; } -u32 rule_op_mangle_delete_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_delete_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -1357,7 +1357,7 @@ u32 rule_op_mangle_delete_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[ return out_len; } -u32 rule_op_mangle_extract (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_extract (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -1372,7 +1372,7 @@ u32 rule_op_mangle_extract (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4] return out_len; } -u32 rule_op_mangle_omit (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_omit (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -1458,7 +1458,7 @@ u32 rule_op_mangle_omit (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], c return out_len; } -u32 rule_op_mangle_insert (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_insert (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 > in_len) return (in_len); @@ -1530,7 +1530,7 @@ u32 rule_op_mangle_insert (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], return out_len; } -u32 rule_op_mangle_overstrike (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_overstrike (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -1553,7 +1553,7 @@ u32 rule_op_mangle_overstrike (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1 return in_len; } -u32 rule_op_mangle_truncate_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_truncate_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -1562,7 +1562,7 @@ u32 rule_op_mangle_truncate_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf return p0; } -u32 rule_op_mangle_replace (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_replace (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { const uchar4 tmp0 = (uchar4) (p0); const uchar4 tmp1 = (uchar4) (p1); @@ -1581,7 +1581,7 @@ u32 rule_op_mangle_replace (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4] return in_len; } -u32 rule_op_mangle_purgechar (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_purgechar (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { u32 out_len = 0; @@ -1622,13 +1622,13 @@ u32 rule_op_mangle_purgechar (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[ return out_len; } -u32 rule_op_mangle_togglecase_rec (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_togglecase_rec (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { // TODO return in_len; } -u32 rule_op_mangle_dupechar_first (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_dupechar_first (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if ( in_len == 0) return (in_len); if ((in_len + p0) >= 32) return (in_len); @@ -1815,7 +1815,7 @@ u32 rule_op_mangle_dupechar_first (const u32 p0, const u32 p1, u32 buf0[4], u32 return out_len; } -u32 rule_op_mangle_dupechar_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_dupechar_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if ( in_len == 0) return (in_len); if ((in_len + p0) >= 32) return (in_len); @@ -1849,7 +1849,7 @@ u32 rule_op_mangle_dupechar_last (const u32 p0, const u32 p1, u32 buf0[4], u32 b return out_len; } -u32 rule_op_mangle_dupechar_all (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_dupechar_all (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if ( in_len == 0) return (in_len); if ((in_len + in_len) >= 32) return (in_len); @@ -1882,7 +1882,7 @@ u32 rule_op_mangle_dupechar_all (const u32 p0, const u32 p1, u32 buf0[4], u32 bu return out_len; } -u32 rule_op_mangle_switch_first (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_switch_first (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (in_len < 2) return (in_len); @@ -1891,7 +1891,7 @@ u32 rule_op_mangle_switch_first (const u32 p0, const u32 p1, u32 buf0[4], u32 bu return in_len; } -u32 rule_op_mangle_switch_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_switch_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (in_len < 2) return (in_len); @@ -1976,7 +1976,7 @@ u32 rule_op_mangle_switch_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf return in_len; } -u32 rule_op_mangle_switch_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_switch_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); if (p1 >= in_len) return (in_len); @@ -2223,7 +2223,7 @@ u32 rule_op_mangle_switch_at (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[ return in_len; } -u32 rule_op_mangle_chr_shiftl (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_chr_shiftl (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -2245,7 +2245,7 @@ u32 rule_op_mangle_chr_shiftl (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1 return in_len; } -u32 rule_op_mangle_chr_shiftr (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_chr_shiftr (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -2267,7 +2267,7 @@ u32 rule_op_mangle_chr_shiftr (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1 return in_len; } -u32 rule_op_mangle_chr_incr (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_chr_incr (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -2291,7 +2291,7 @@ u32 rule_op_mangle_chr_incr (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4 return in_len; } -u32 rule_op_mangle_chr_decr (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_chr_decr (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 >= in_len) return (in_len); @@ -2315,7 +2315,7 @@ u32 rule_op_mangle_chr_decr (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4 return in_len; } -u32 rule_op_mangle_replace_np1 (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_replace_np1 (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if ((p0 + 1) >= in_len) return (in_len); @@ -2342,7 +2342,7 @@ u32 rule_op_mangle_replace_np1 (const u32 p0, const u32 p1, u32 buf0[4], u32 buf return in_len; } -u32 rule_op_mangle_replace_nm1 (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_replace_nm1 (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 == 0) return (in_len); @@ -2371,7 +2371,7 @@ u32 rule_op_mangle_replace_nm1 (const u32 p0, const u32 p1, u32 buf0[4], u32 buf return in_len; } -u32 rule_op_mangle_dupeblock_first (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_dupeblock_first (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 > in_len) return (in_len); @@ -2409,7 +2409,7 @@ u32 rule_op_mangle_dupeblock_first (const u32 p0, const u32 p1, u32 buf0[4], u32 return out_len; } -u32 rule_op_mangle_dupeblock_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_dupeblock_last (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { if (p0 > in_len) return (in_len); @@ -2438,7 +2438,7 @@ u32 rule_op_mangle_dupeblock_last (const u32 p0, const u32 p1, u32 buf0[4], u32 return out_len; } -u32 rule_op_mangle_title_sep (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 rule_op_mangle_title_sep (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { buf0[0] |= (generate_cmask (buf0[0])); buf0[1] |= (generate_cmask (buf0[1])); @@ -2481,7 +2481,7 @@ u32 rule_op_mangle_title_sep (const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[ return in_len; } -u32 apply_rule (const u32 name, const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) +static u32 apply_rule (const u32 name, const u32 p0, const u32 p1, u32 buf0[4], u32 buf1[4], const u32 in_len) { u32 out_len = in_len; @@ -2533,7 +2533,7 @@ u32 apply_rule (const u32 name, const u32 p0, const u32 p1, u32 buf0[4], u32 buf return out_len; } -u32 apply_rules (__global const u32 *cmds, u32 buf0[4], u32 buf1[4], const u32 len) +static u32 apply_rules (__global const u32 *cmds, u32 buf0[4], u32 buf1[4], const u32 len) { u32 out_len = len; @@ -2551,7 +2551,7 @@ u32 apply_rules (__global const u32 *cmds, u32 buf0[4], u32 buf1[4], const u32 l return out_len; } -u32x apply_rules_vect (const u32 pw_buf0[4], const u32 pw_buf1[4], const u32 pw_len, __global const kernel_rule_t *rules_buf, const u32 il_pos, u32x buf0[4], u32x buf1[4]) +static u32x apply_rules_vect (const u32 pw_buf0[4], const u32 pw_buf1[4], const u32 pw_len, __global const kernel_rule_t *rules_buf, const u32 il_pos, u32x buf0[4], u32x buf1[4]) { #if VECT_SIZE == 1 diff --git a/OpenCL/inc_simd.cl b/OpenCL/inc_simd.cl index ac9f0410f..25eca0fbc 100644 --- a/OpenCL/inc_simd.cl +++ b/OpenCL/inc_simd.cl @@ -1054,7 +1054,7 @@ // attack-mode 0 -u32x ix_create_bft (__global const bf_t *bfs_buf, const u32 il_pos) +static u32x ix_create_bft (__global const bf_t *bfs_buf, const u32 il_pos) { #if VECT_SIZE == 1 const u32x ix = (u32x) (bfs_buf[il_pos + 0].i); @@ -1073,7 +1073,7 @@ u32x ix_create_bft (__global const bf_t *bfs_buf, const u32 il_pos) // attack-mode 1 -u32x pwlenx_create_combt (__global const pw_t *combs_buf, const u32 il_pos) +static u32x pwlenx_create_combt (__global const pw_t *combs_buf, const u32 il_pos) { #if VECT_SIZE == 1 const u32x pw_lenx = (u32x) (combs_buf[il_pos + 0].pw_len); @@ -1090,7 +1090,7 @@ u32x pwlenx_create_combt (__global const pw_t *combs_buf, const u32 il_pos) return pw_lenx; } -u32x ix_create_combt (__global const pw_t *combs_buf, const u32 il_pos, const int idx) +static u32x ix_create_combt (__global const pw_t *combs_buf, const u32 il_pos, const int idx) { #if VECT_SIZE == 1 const u32x ix = (u32x) (combs_buf[il_pos + 0].i[idx]); diff --git a/OpenCL/inc_truecrypt_crc32.cl b/OpenCL/inc_truecrypt_crc32.cl index f6b5a5eaa..cc50e0098 100644 --- a/OpenCL/inc_truecrypt_crc32.cl +++ b/OpenCL/inc_truecrypt_crc32.cl @@ -66,7 +66,7 @@ __constant u32a crc32tab[0x100] = 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -u32 round_crc32 (u32 a, const u32 v) +static u32 round_crc32 (u32 a, const u32 v) { const u32 k = (a ^ v) & 0xff; @@ -79,7 +79,7 @@ u32 round_crc32 (u32 a, const u32 v) return a; } -u32 round_crc32_4 (const u32 w, const u32 iv) +static u32 round_crc32_4 (const u32 w, const u32 iv) { u32 a = iv; diff --git a/OpenCL/inc_truecrypt_xts.cl b/OpenCL/inc_truecrypt_xts.cl index 6bf6684d2..db2b34107 100644 --- a/OpenCL/inc_truecrypt_xts.cl +++ b/OpenCL/inc_truecrypt_xts.cl @@ -1,4 +1,4 @@ -void xts_mul2 (u32 *in, u32 *out) +static void xts_mul2 (u32 *in, u32 *out) { const u32 c = in[3] >> 31; @@ -10,7 +10,7 @@ void xts_mul2 (u32 *in, u32 *out) out[0] ^= c * 0x87; } -void aes256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { out[0] = in[0]; out[1] = in[1]; @@ -34,7 +34,7 @@ void aes256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in out[3] ^= T[3]; } -void aes256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static void aes256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { out[0] = in[0]; out[1] = in[1]; @@ -56,7 +56,7 @@ void aes256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks, SHM_TYPE out[3] ^= T[3]; } -void serpent256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks) +static void serpent256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *ks) { out[0] = in[0]; out[1] = in[1]; @@ -80,7 +80,7 @@ void serpent256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 out[3] ^= T[3]; } -void serpent256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks) +static void serpent256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks) { out[0] = in[0]; out[1] = in[1]; @@ -102,7 +102,7 @@ void serpent256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *ks) out[3] ^= T[3]; } -void twofish256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *sk, u32 *lk) +static void twofish256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 *in, u32 *out, u32 *S, u32 *T, u32 *sk, u32 *lk) { out[0] = in[0]; out[1] = in[1]; @@ -126,7 +126,7 @@ void twofish256_decrypt_xts_first (const u32 *ukey1, const u32 *ukey2, const u32 out[3] ^= T[3]; } -void twofish256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *sk, u32 *lk) +static void twofish256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *sk, u32 *lk) { out[0] = in[0]; out[1] = in[1]; @@ -150,7 +150,7 @@ void twofish256_decrypt_xts_next (const u32 *in, u32 *out, u32 *T, u32 *sk, u32 // 512 bit -int verify_header_aes (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static int verify_header_aes (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_aes[60]; @@ -206,7 +206,7 @@ int verify_header_aes (__global const tc_t *esalt_bufs, const u32 *ukey1, const return 1; } -int verify_header_serpent (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2) +static int verify_header_serpent (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2) { u32 ks_serpent[140]; @@ -262,7 +262,7 @@ int verify_header_serpent (__global const tc_t *esalt_bufs, const u32 *ukey1, co return 1; } -int verify_header_twofish (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2) +static int verify_header_twofish (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2) { u32 sk_twofish[4]; u32 lk_twofish[40]; @@ -321,7 +321,7 @@ int verify_header_twofish (__global const tc_t *esalt_bufs, const u32 *ukey1, co // 1024 bit -int verify_header_aes_twofish (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static int verify_header_aes_twofish (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_aes[60]; @@ -384,7 +384,7 @@ int verify_header_aes_twofish (__global const tc_t *esalt_bufs, const u32 *ukey1 return 1; } -int verify_header_serpent_aes (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static int verify_header_serpent_aes (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_serpent[140]; u32 ks_aes[60]; @@ -445,7 +445,7 @@ int verify_header_serpent_aes (__global const tc_t *esalt_bufs, const u32 *ukey1 return 1; } -int verify_header_twofish_serpent (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4) +static int verify_header_twofish_serpent (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4) { u32 sk_twofish[4]; u32 lk_twofish[40]; @@ -510,7 +510,7 @@ int verify_header_twofish_serpent (__global const tc_t *esalt_bufs, const u32 *u // 1536 bit -int verify_header_aes_twofish_serpent (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static int verify_header_aes_twofish_serpent (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_aes[60]; @@ -579,7 +579,7 @@ int verify_header_aes_twofish_serpent (__global const tc_t *esalt_bufs, const u3 return 1; } -int verify_header_serpent_twofish_aes (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +static int verify_header_serpent_twofish_aes (__global const tc_t *esalt_bufs, const u32 *ukey1, const u32 *ukey2, const u32 *ukey3, const u32 *ukey4, const u32 *ukey5, const u32 *ukey6, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 ks_serpent[140]; diff --git a/OpenCL/inc_types.cl b/OpenCL/inc_types.cl index 67c989b6a..cfc05ddca 100644 --- a/OpenCL/inc_types.cl +++ b/OpenCL/inc_types.cl @@ -33,14 +33,14 @@ typedef VTYPE(uint, VECT_SIZE) u32x; typedef VTYPE(ulong, VECT_SIZE) u64x; #endif -u32 l32_from_64_S (u64 a) +static u32 l32_from_64_S (u64 a) { const u32 r = (u32) (a); return r; } -u32 h32_from_64_S (u64 a) +static u32 h32_from_64_S (u64 a) { a >>= 32; @@ -49,12 +49,12 @@ u32 h32_from_64_S (u64 a) return r; } -u64 hl32_to_64_S (const u32 a, const u32 b) +static u64 hl32_to_64_S (const u32 a, const u32 b) { return as_ulong ((uint2) (b, a)); } -u32x l32_from_64 (u64x a) +static u32x l32_from_64 (u64x a) { u32x r; @@ -93,7 +93,7 @@ u32x l32_from_64 (u64x a) return r; } -u32x h32_from_64 (u64x a) +static u32x h32_from_64 (u64x a) { a >>= 32; @@ -134,7 +134,7 @@ u32x h32_from_64 (u64x a) return r; } -u64x hl32_to_64 (const u32x a, const u32x b) +static u64x hl32_to_64 (const u32x a, const u32x b) { u64x r; @@ -174,12 +174,12 @@ u64x hl32_to_64 (const u32x a, const u32x b) } #ifdef IS_AMD -u32 swap32_S (const u32 v) +static u32 swap32_S (const u32 v) { return bitselect (rotate (v, 24u), rotate (v, 8u), 0x00ff00ffu); } -u64 swap64_S (const u64 v) +static u64 swap64_S (const u64 v) { return bitselect (bitselect (rotate (v, 24ul), rotate (v, 8ul), 0x000000ff000000fful), @@ -188,17 +188,17 @@ u64 swap64_S (const u64 v) 0xffff0000ffff0000ul); } -u32 rotr32_S (const u32 a, const u32 n) +static u32 rotr32_S (const u32 a, const u32 n) { return rotate (a, (32 - n)); } -u32 rotl32_S (const u32 a, const u32 n) +static u32 rotl32_S (const u32 a, const u32 n) { return rotate (a, n); } -u64 rotr64_S (const u64 a, const u32 n) +static u64 rotr64_S (const u64 a, const u32 n) { const u32 a0 = h32_from_64_S (a); const u32 a1 = l32_from_64_S (a); @@ -211,17 +211,17 @@ u64 rotr64_S (const u64 a, const u32 n) return r; } -u64 rotl64_S (const u64 a, const u32 n) +static u64 rotl64_S (const u64 a, const u32 n) { return rotr64_S (a, 64 - n); } -u32x swap32 (const u32x v) +static u32x swap32 (const u32x v) { return bitselect (rotate (v, 24u), rotate (v, 8u), 0x00ff00ffu); } -u64x swap64 (const u64x v) +static u64x swap64 (const u64x v) { return bitselect (bitselect (rotate (v, 24ul), rotate (v, 8ul), 0x000000ff000000fful), @@ -230,17 +230,17 @@ u64x swap64 (const u64x v) 0xffff0000ffff0000ul); } -u32x rotr32 (const u32x a, const u32 n) +static u32x rotr32 (const u32x a, const u32 n) { return rotate (a, (32 - n)); } -u32x rotl32 (const u32x a, const u32 n) +static u32x rotl32 (const u32x a, const u32 n) { return rotate (a, n); } -u64x rotr64 (const u64x a, const u32 n) +static u64x rotr64 (const u64x a, const u32 n) { const u32x a0 = h32_from_64 (a); const u32x a1 = l32_from_64 (a); @@ -253,59 +253,59 @@ u64x rotr64 (const u64x a, const u32 n) return r; } -u64x rotl64 (const u64x a, const u32 n) +static u64x rotl64 (const u64x a, const u32 n) { return rotr64 (a, 64 - n); } -u32x __bfe (const u32x a, const u32x b, const u32x c) +static u32x __bfe (const u32x a, const u32x b, const u32x c) { return amd_bfe (a, b, c); } -u32 __bfe_S (const u32 a, const u32 b, const u32 c) +static u32 __bfe_S (const u32 a, const u32 b, const u32 c) { return amd_bfe (a, b, c); } -u32 amd_bytealign_S (const u32 a, const u32 b, const u32 c) +static u32 amd_bytealign_S (const u32 a, const u32 b, const u32 c) { return amd_bytealign (a, b, c); } #endif #ifdef IS_NV -u32 swap32_S (const u32 v) +static u32 swap32_S (const u32 v) { return (as_uint (as_uchar4 (v).s3210)); } -u64 swap64_S (const u64 v) +static u64 swap64_S (const u64 v) { return (as_ulong (as_uchar8 (v).s76543210)); } -u32 rotr32_S (const u32 a, const u32 n) +static u32 rotr32_S (const u32 a, const u32 n) { return rotate (a, (32 - n)); } -u32 rotl32_S (const u32 a, const u32 n) +static u32 rotl32_S (const u32 a, const u32 n) { return rotate (a, n); } -u64 rotr64_S (const u64 a, const u32 n) +static u64 rotr64_S (const u64 a, const u32 n) { return rotate (a, (u64) (64 - n)); } -u64 rotl64_S (const u64 a, const u32 n) +static u64 rotl64_S (const u64 a, const u32 n) { return rotate (a, (u64) n); } -u32x swap32 (const u32x v) +static u32x swap32 (const u32x v) { return ((v >> 24) & 0x000000ff) | ((v >> 8) & 0x0000ff00) @@ -313,7 +313,7 @@ u32x swap32 (const u32x v) | ((v << 24) & 0xff000000); } -u64x swap64 (const u64x v) +static u64x swap64 (const u64x v) { return ((v >> 56) & 0x00000000000000ff) | ((v >> 40) & 0x000000000000ff00) @@ -325,27 +325,27 @@ u64x swap64 (const u64x v) | ((v << 56) & 0xff00000000000000); } -u32x rotr32 (const u32x a, const u32 n) +static u32x rotr32 (const u32x a, const u32 n) { return rotate (a, (32 - n)); } -u32x rotl32 (const u32x a, const u32 n) +static u32x rotl32 (const u32x a, const u32 n) { return rotate (a, n); } -u64x rotr64 (const u64x a, const u32 n) +static u64x rotr64 (const u64x a, const u32 n) { return rotate (a, (u64x) (64 - n)); } -u64x rotl64 (const u64x a, const u32 n) +static u64x rotl64 (const u64x a, const u32 n) { return rotate (a, (u64x) n); } -u32x __byte_perm (const u32x a, const u32x b, const u32x c) +static u32x __byte_perm (const u32x a, const u32x b, const u32x c) { u32x r; @@ -384,7 +384,7 @@ u32x __byte_perm (const u32x a, const u32x b, const u32x c) return r; } -u32 __byte_perm_S (const u32 a, const u32 b, const u32 c) +static u32 __byte_perm_S (const u32 a, const u32 b, const u32 c) { u32 r; @@ -393,7 +393,7 @@ u32 __byte_perm_S (const u32 a, const u32 b, const u32 c) return r; } -u32x __bfe (const u32x a, const u32x b, const u32x c) +static u32x __bfe (const u32x a, const u32x b, const u32x c) { u32x r; @@ -432,7 +432,7 @@ u32x __bfe (const u32x a, const u32x b, const u32x c) return r; } -u32 __bfe_S (const u32 a, const u32 b, const u32 c) +static u32 __bfe_S (const u32 a, const u32 b, const u32 c) { u32 r; @@ -441,7 +441,7 @@ u32 __bfe_S (const u32 a, const u32 b, const u32 c) return r; } -u32x amd_bytealign (const u32x a, const u32x b, const u32x c) +static u32x amd_bytealign (const u32x a, const u32x b, const u32x c) { u32x r; @@ -488,7 +488,7 @@ u32x amd_bytealign (const u32x a, const u32x b, const u32x c) return r; } -u32 amd_bytealign_S (const u32 a, const u32 b, const u32 c) +static u32 amd_bytealign_S (const u32 a, const u32 b, const u32 c) { u32 r; @@ -507,37 +507,37 @@ u32 amd_bytealign_S (const u32 a, const u32 b, const u32 c) #endif #ifdef IS_GENERIC -u32 swap32_S (const u32 v) +static u32 swap32_S (const u32 v) { return (as_uint (as_uchar4 (v).s3210)); } -u64 swap64_S (const u64 v) +static u64 swap64_S (const u64 v) { return (as_ulong (as_uchar8 (v).s76543210)); } -u32 rotr32_S (const u32 a, const u32 n) +static u32 rotr32_S (const u32 a, const u32 n) { return rotate (a, (32 - n)); } -u32 rotl32_S (const u32 a, const u32 n) +static u32 rotl32_S (const u32 a, const u32 n) { return rotate (a, n); } -u64 rotr64_S (const u64 a, const u32 n) +static u64 rotr64_S (const u64 a, const u32 n) { return rotate (a, (u64) (64 - n)); } -u64 rotl64_S (const u64 a, const u32 n) +static u64 rotl64_S (const u64 a, const u32 n) { return rotate (a, (u64) n); } -u32x swap32 (const u32x v) +static u32x swap32 (const u32x v) { return ((v >> 24) & 0x000000ff) | ((v >> 8) & 0x0000ff00) @@ -545,7 +545,7 @@ u32x swap32 (const u32x v) | ((v << 24) & 0xff000000); } -u64x swap64 (const u64x v) +static u64x swap64 (const u64x v) { return ((v >> 56) & 0x00000000000000ff) | ((v >> 40) & 0x000000000000ff00) @@ -557,27 +557,27 @@ u64x swap64 (const u64x v) | ((v << 56) & 0xff00000000000000); } -u32x rotr32 (const u32x a, const u32 n) +static u32x rotr32 (const u32x a, const u32 n) { return rotate (a, (32 - n)); } -u32x rotl32 (const u32x a, const u32 n) +static u32x rotl32 (const u32x a, const u32 n) { return rotate (a, n); } -u64x rotr64 (const u64x a, const u32 n) +static u64x rotr64 (const u64x a, const u32 n) { return rotate (a, (u64x) (64 - n)); } -u64x rotl64 (const u64x a, const u32 n) +static u64x rotl64 (const u64x a, const u32 n) { return rotate (a, (u64x) n); } -u32x __bfe (const u32x a, const u32x b, const u32x c) +static u32x __bfe (const u32x a, const u32x b, const u32x c) { #define BIT(x) ((u32x) (1u) << (x)) #define BIT_MASK(x) (BIT (x) - 1) @@ -590,7 +590,7 @@ u32x __bfe (const u32x a, const u32x b, const u32x c) #undef BFE } -u32 __bfe_S (const u32 a, const u32 b, const u32 c) +static u32 __bfe_S (const u32 a, const u32 b, const u32 c) { #define BIT(x) (1u << (x)) #define BIT_MASK(x) (BIT (x) - 1) @@ -603,7 +603,7 @@ u32 __bfe_S (const u32 a, const u32 b, const u32 c) #undef BFE } -u32x amd_bytealign (const u32x a, const u32x b, const u32 c) +static u32x amd_bytealign (const u32x a, const u32x b, const u32 c) { #if VECT_SIZE == 1 const u64x tmp = ((((u64x) (a)) << 32) | ((u64x) (b))) >> ((c & 3) * 8); @@ -636,7 +636,7 @@ u32x amd_bytealign (const u32x a, const u32x b, const u32 c) #endif } -u32 amd_bytealign_S (const u32 a, const u32 b, const u32 c) +static u32 amd_bytealign_S (const u32 a, const u32 b, const u32 c) { const u64 tmp = ((((u64) a) << 32) | ((u64) b)) >> ((c & 3) * 8);