1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-26 01:50:10 +00:00

Reorganized 'SHA-2' constants

This commit is contained in:
Gabriele Gristina 2016-12-17 19:50:28 +01:00
parent 496c749b2b
commit 37f562cabd
6 changed files with 110 additions and 192 deletions

View File

@ -155,7 +155,7 @@ typedef enum sha1_constants
} sha1_constants_t;
typedef enum sha2_constants
typedef enum sha2_32_constants
{
// SHA-224 Initial Hash Values
SHA224M_A=0xc1059ed8,
@ -177,7 +177,7 @@ typedef enum sha2_constants
SHA256M_G=0x1f83d9ab,
SHA256M_H=0x5be0cd19,
// Common Constants
// SHA-224/256 Constants
SHA256C00=0x428a2f98,
SHA256C01=0x71374491,
SHA256C02=0xb5c0fbcf,
@ -241,12 +241,13 @@ typedef enum sha2_constants
SHA256C3c=0x90befffa,
SHA256C3d=0xa4506ceb,
SHA256C3e=0xbef9a3f7,
SHA256C3f=0xc67178f2u
SHA256C3f=0xc67178f2
} sha2_constants_t;
} sha2_32_constants_t;
typedef enum sha384_constants
typedef enum sha2_64_constants
{
// SHA-384 Initial Hash Values
SHA384M_A=0xcbbb9d5dc1059ed8,
SHA384M_B=0x629a292a367cd507,
SHA384M_C=0x9159015a3070dd17,
@ -256,91 +257,7 @@ typedef enum sha384_constants
SHA384M_G=0xdb0c2e0d64f98fa7,
SHA384M_H=0x47b5481dbefa4fa4,
SHA384C00=0x428a2f98d728ae22,
SHA384C01=0x7137449123ef65cd,
SHA384C02=0xb5c0fbcfec4d3b2f,
SHA384C03=0xe9b5dba58189dbbc,
SHA384C04=0x3956c25bf348b538,
SHA384C05=0x59f111f1b605d019,
SHA384C06=0x923f82a4af194f9b,
SHA384C07=0xab1c5ed5da6d8118,
SHA384C08=0xd807aa98a3030242,
SHA384C09=0x12835b0145706fbe,
SHA384C0a=0x243185be4ee4b28c,
SHA384C0b=0x550c7dc3d5ffb4e2,
SHA384C0c=0x72be5d74f27b896f,
SHA384C0d=0x80deb1fe3b1696b1,
SHA384C0e=0x9bdc06a725c71235,
SHA384C0f=0xc19bf174cf692694,
SHA384C10=0xe49b69c19ef14ad2,
SHA384C11=0xefbe4786384f25e3,
SHA384C12=0x0fc19dc68b8cd5b5,
SHA384C13=0x240ca1cc77ac9c65,
SHA384C14=0x2de92c6f592b0275,
SHA384C15=0x4a7484aa6ea6e483,
SHA384C16=0x5cb0a9dcbd41fbd4,
SHA384C17=0x76f988da831153b5,
SHA384C18=0x983e5152ee66dfab,
SHA384C19=0xa831c66d2db43210,
SHA384C1a=0xb00327c898fb213f,
SHA384C1b=0xbf597fc7beef0ee4,
SHA384C1c=0xc6e00bf33da88fc2,
SHA384C1d=0xd5a79147930aa725,
SHA384C1e=0x06ca6351e003826f,
SHA384C1f=0x142929670a0e6e70,
SHA384C20=0x27b70a8546d22ffc,
SHA384C21=0x2e1b21385c26c926,
SHA384C22=0x4d2c6dfc5ac42aed,
SHA384C23=0x53380d139d95b3df,
SHA384C24=0x650a73548baf63de,
SHA384C25=0x766a0abb3c77b2a8,
SHA384C26=0x81c2c92e47edaee6,
SHA384C27=0x92722c851482353b,
SHA384C28=0xa2bfe8a14cf10364,
SHA384C29=0xa81a664bbc423001,
SHA384C2a=0xc24b8b70d0f89791,
SHA384C2b=0xc76c51a30654be30,
SHA384C2c=0xd192e819d6ef5218,
SHA384C2d=0xd69906245565a910,
SHA384C2e=0xf40e35855771202a,
SHA384C2f=0x106aa07032bbd1b8,
SHA384C30=0x19a4c116b8d2d0c8,
SHA384C31=0x1e376c085141ab53,
SHA384C32=0x2748774cdf8eeb99,
SHA384C33=0x34b0bcb5e19b48a8,
SHA384C34=0x391c0cb3c5c95a63,
SHA384C35=0x4ed8aa4ae3418acb,
SHA384C36=0x5b9cca4f7763e373,
SHA384C37=0x682e6ff3d6b2b8a3,
SHA384C38=0x748f82ee5defb2fc,
SHA384C39=0x78a5636f43172f60,
SHA384C3a=0x84c87814a1f0ab72,
SHA384C3b=0x8cc702081a6439ec,
SHA384C3c=0x90befffa23631e28,
SHA384C3d=0xa4506cebde82bde9,
SHA384C3e=0xbef9a3f7b2c67915,
SHA384C3f=0xc67178f2e372532b,
SHA384C40=0xca273eceea26619c,
SHA384C41=0xd186b8c721c0c207,
SHA384C42=0xeada7dd6cde0eb1e,
SHA384C43=0xf57d4f7fee6ed178,
SHA384C44=0x06f067aa72176fba,
SHA384C45=0x0a637dc5a2c898a6,
SHA384C46=0x113f9804bef90dae,
SHA384C47=0x1b710b35131c471b,
SHA384C48=0x28db77f523047d84,
SHA384C49=0x32caab7b40c72493,
SHA384C4a=0x3c9ebe0a15c9bebc,
SHA384C4b=0x431d67c49c100d4c,
SHA384C4c=0x4cc5d4becb3e42b6,
SHA384C4d=0x597f299cfc657e2a,
SHA384C4e=0x5fcb6fab3ad6faec,
SHA384C4f=0x6c44198c4a475817
} sha384_constants_t;
typedef enum sha512_constants
{
// SHA-512 Initial Hash Values
SHA512M_A=0x6a09e667f3bcc908,
SHA512M_B=0xbb67ae8584caa73b,
SHA512M_C=0x3c6ef372fe94f82b,
@ -350,6 +267,7 @@ typedef enum sha512_constants
SHA512M_G=0x1f83d9abfb41bd6b,
SHA512M_H=0x5be0cd19137e2179,
// SHA-384/512 Constants
SHA512C00=0x428a2f98d728ae22,
SHA512C01=0x7137449123ef65cd,
SHA512C02=0xb5c0fbcfec4d3b2f,
@ -431,7 +349,7 @@ typedef enum sha512_constants
SHA512C4e=0x5fcb6fab3ad6faec,
SHA512C4f=0x6c44198c4a475817
} sha512_constants_t;
} sha2_64_constants_t;
typedef enum ripemd160_constants
{

View File

@ -144,26 +144,26 @@ static void sha256_transform (const u32 *w0, const u32 *w1, const u32 *w2, const
__constant u64 k_sha384[80] =
{
SHA384C00, SHA384C01, SHA384C02, SHA384C03,
SHA384C04, SHA384C05, SHA384C06, SHA384C07,
SHA384C08, SHA384C09, SHA384C0a, SHA384C0b,
SHA384C0c, SHA384C0d, SHA384C0e, SHA384C0f,
SHA384C10, SHA384C11, SHA384C12, SHA384C13,
SHA384C14, SHA384C15, SHA384C16, SHA384C17,
SHA384C18, SHA384C19, SHA384C1a, SHA384C1b,
SHA384C1c, SHA384C1d, SHA384C1e, SHA384C1f,
SHA384C20, SHA384C21, SHA384C22, SHA384C23,
SHA384C24, SHA384C25, SHA384C26, SHA384C27,
SHA384C28, SHA384C29, SHA384C2a, SHA384C2b,
SHA384C2c, SHA384C2d, SHA384C2e, SHA384C2f,
SHA384C30, SHA384C31, SHA384C32, SHA384C33,
SHA384C34, SHA384C35, SHA384C36, SHA384C37,
SHA384C38, SHA384C39, SHA384C3a, SHA384C3b,
SHA384C3c, SHA384C3d, SHA384C3e, SHA384C3f,
SHA384C40, SHA384C41, SHA384C42, SHA384C43,
SHA384C44, SHA384C45, SHA384C46, SHA384C47,
SHA384C48, SHA384C49, SHA384C4a, SHA384C4b,
SHA384C4c, SHA384C4d, SHA384C4e, SHA384C4f,
SHA512C00, SHA512C01, SHA512C02, SHA512C03,
SHA512C04, SHA512C05, SHA512C06, SHA512C07,
SHA512C08, SHA512C09, SHA512C0a, SHA512C0b,
SHA512C0c, SHA512C0d, SHA512C0e, SHA512C0f,
SHA512C10, SHA512C11, SHA512C12, SHA512C13,
SHA512C14, SHA512C15, SHA512C16, SHA512C17,
SHA512C18, SHA512C19, SHA512C1a, SHA512C1b,
SHA512C1c, SHA512C1d, SHA512C1e, SHA512C1f,
SHA512C20, SHA512C21, SHA512C22, SHA512C23,
SHA512C24, SHA512C25, SHA512C26, SHA512C27,
SHA512C28, SHA512C29, SHA512C2a, SHA512C2b,
SHA512C2c, SHA512C2d, SHA512C2e, SHA512C2f,
SHA512C30, SHA512C31, SHA512C32, SHA512C33,
SHA512C34, SHA512C35, SHA512C36, SHA512C37,
SHA512C38, SHA512C39, SHA512C3a, SHA512C3b,
SHA512C3c, SHA512C3d, SHA512C3e, SHA512C3f,
SHA512C40, SHA512C41, SHA512C42, SHA512C43,
SHA512C44, SHA512C45, SHA512C46, SHA512C47,
SHA512C48, SHA512C49, SHA512C4a, SHA512C4b,
SHA512C4c, SHA512C4d, SHA512C4e, SHA512C4f,
};
static void sha384_transform (const u64 *w0, const u64 *w1, const u64 *w2, const u64 *w3, u64 *digest)
@ -256,26 +256,26 @@ static void sha384_transform (const u64 *w0, const u64 *w1, const u64 *w2, const
__constant u64 k_sha512[80] =
{
SHA384C00, SHA384C01, SHA384C02, SHA384C03,
SHA384C04, SHA384C05, SHA384C06, SHA384C07,
SHA384C08, SHA384C09, SHA384C0a, SHA384C0b,
SHA384C0c, SHA384C0d, SHA384C0e, SHA384C0f,
SHA384C10, SHA384C11, SHA384C12, SHA384C13,
SHA384C14, SHA384C15, SHA384C16, SHA384C17,
SHA384C18, SHA384C19, SHA384C1a, SHA384C1b,
SHA384C1c, SHA384C1d, SHA384C1e, SHA384C1f,
SHA384C20, SHA384C21, SHA384C22, SHA384C23,
SHA384C24, SHA384C25, SHA384C26, SHA384C27,
SHA384C28, SHA384C29, SHA384C2a, SHA384C2b,
SHA384C2c, SHA384C2d, SHA384C2e, SHA384C2f,
SHA384C30, SHA384C31, SHA384C32, SHA384C33,
SHA384C34, SHA384C35, SHA384C36, SHA384C37,
SHA384C38, SHA384C39, SHA384C3a, SHA384C3b,
SHA384C3c, SHA384C3d, SHA384C3e, SHA384C3f,
SHA384C40, SHA384C41, SHA384C42, SHA384C43,
SHA384C44, SHA384C45, SHA384C46, SHA384C47,
SHA384C48, SHA384C49, SHA384C4a, SHA384C4b,
SHA384C4c, SHA384C4d, SHA384C4e, SHA384C4f,
SHA512C00, SHA512C01, SHA512C02, SHA512C03,
SHA512C04, SHA512C05, SHA512C06, SHA512C07,
SHA512C08, SHA512C09, SHA512C0a, SHA512C0b,
SHA512C0c, SHA512C0d, SHA512C0e, SHA512C0f,
SHA512C10, SHA512C11, SHA512C12, SHA512C13,
SHA512C14, SHA512C15, SHA512C16, SHA512C17,
SHA512C18, SHA512C19, SHA512C1a, SHA512C1b,
SHA512C1c, SHA512C1d, SHA512C1e, SHA512C1f,
SHA512C20, SHA512C21, SHA512C22, SHA512C23,
SHA512C24, SHA512C25, SHA512C26, SHA512C27,
SHA512C28, SHA512C29, SHA512C2a, SHA512C2b,
SHA512C2c, SHA512C2d, SHA512C2e, SHA512C2f,
SHA512C30, SHA512C31, SHA512C32, SHA512C33,
SHA512C34, SHA512C35, SHA512C36, SHA512C37,
SHA512C38, SHA512C39, SHA512C3a, SHA512C3b,
SHA512C3c, SHA512C3d, SHA512C3e, SHA512C3f,
SHA512C40, SHA512C41, SHA512C42, SHA512C43,
SHA512C44, SHA512C45, SHA512C46, SHA512C47,
SHA512C48, SHA512C49, SHA512C4a, SHA512C4b,
SHA512C4c, SHA512C4d, SHA512C4e, SHA512C4f,
};
static void sha512_transform (const u64 *w0, const u64 *w1, const u64 *w2, const u64 *w3, u64 *digest)

View File

@ -18,26 +18,26 @@
__constant u64 k_sha384[80] =
{
SHA384C00, SHA384C01, SHA384C02, SHA384C03,
SHA384C04, SHA384C05, SHA384C06, SHA384C07,
SHA384C08, SHA384C09, SHA384C0a, SHA384C0b,
SHA384C0c, SHA384C0d, SHA384C0e, SHA384C0f,
SHA384C10, SHA384C11, SHA384C12, SHA384C13,
SHA384C14, SHA384C15, SHA384C16, SHA384C17,
SHA384C18, SHA384C19, SHA384C1a, SHA384C1b,
SHA384C1c, SHA384C1d, SHA384C1e, SHA384C1f,
SHA384C20, SHA384C21, SHA384C22, SHA384C23,
SHA384C24, SHA384C25, SHA384C26, SHA384C27,
SHA384C28, SHA384C29, SHA384C2a, SHA384C2b,
SHA384C2c, SHA384C2d, SHA384C2e, SHA384C2f,
SHA384C30, SHA384C31, SHA384C32, SHA384C33,
SHA384C34, SHA384C35, SHA384C36, SHA384C37,
SHA384C38, SHA384C39, SHA384C3a, SHA384C3b,
SHA384C3c, SHA384C3d, SHA384C3e, SHA384C3f,
SHA384C40, SHA384C41, SHA384C42, SHA384C43,
SHA384C44, SHA384C45, SHA384C46, SHA384C47,
SHA384C48, SHA384C49, SHA384C4a, SHA384C4b,
SHA384C4c, SHA384C4d, SHA384C4e, SHA384C4f,
SHA512C00, SHA512C01, SHA512C02, SHA512C03,
SHA512C04, SHA512C05, SHA512C06, SHA512C07,
SHA512C08, SHA512C09, SHA512C0a, SHA512C0b,
SHA512C0c, SHA512C0d, SHA512C0e, SHA512C0f,
SHA512C10, SHA512C11, SHA512C12, SHA512C13,
SHA512C14, SHA512C15, SHA512C16, SHA512C17,
SHA512C18, SHA512C19, SHA512C1a, SHA512C1b,
SHA512C1c, SHA512C1d, SHA512C1e, SHA512C1f,
SHA512C20, SHA512C21, SHA512C22, SHA512C23,
SHA512C24, SHA512C25, SHA512C26, SHA512C27,
SHA512C28, SHA512C29, SHA512C2a, SHA512C2b,
SHA512C2c, SHA512C2d, SHA512C2e, SHA512C2f,
SHA512C30, SHA512C31, SHA512C32, SHA512C33,
SHA512C34, SHA512C35, SHA512C36, SHA512C37,
SHA512C38, SHA512C39, SHA512C3a, SHA512C3b,
SHA512C3c, SHA512C3d, SHA512C3e, SHA512C3f,
SHA512C40, SHA512C41, SHA512C42, SHA512C43,
SHA512C44, SHA512C45, SHA512C46, SHA512C47,
SHA512C48, SHA512C49, SHA512C4a, SHA512C4b,
SHA512C4c, SHA512C4d, SHA512C4e, SHA512C4f,
};
static void sha384_transform (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u64x digest[8])

View File

@ -16,26 +16,26 @@
__constant u64 k_sha384[80] =
{
SHA384C00, SHA384C01, SHA384C02, SHA384C03,
SHA384C04, SHA384C05, SHA384C06, SHA384C07,
SHA384C08, SHA384C09, SHA384C0a, SHA384C0b,
SHA384C0c, SHA384C0d, SHA384C0e, SHA384C0f,
SHA384C10, SHA384C11, SHA384C12, SHA384C13,
SHA384C14, SHA384C15, SHA384C16, SHA384C17,
SHA384C18, SHA384C19, SHA384C1a, SHA384C1b,
SHA384C1c, SHA384C1d, SHA384C1e, SHA384C1f,
SHA384C20, SHA384C21, SHA384C22, SHA384C23,
SHA384C24, SHA384C25, SHA384C26, SHA384C27,
SHA384C28, SHA384C29, SHA384C2a, SHA384C2b,
SHA384C2c, SHA384C2d, SHA384C2e, SHA384C2f,
SHA384C30, SHA384C31, SHA384C32, SHA384C33,
SHA384C34, SHA384C35, SHA384C36, SHA384C37,
SHA384C38, SHA384C39, SHA384C3a, SHA384C3b,
SHA384C3c, SHA384C3d, SHA384C3e, SHA384C3f,
SHA384C40, SHA384C41, SHA384C42, SHA384C43,
SHA384C44, SHA384C45, SHA384C46, SHA384C47,
SHA384C48, SHA384C49, SHA384C4a, SHA384C4b,
SHA384C4c, SHA384C4d, SHA384C4e, SHA384C4f,
SHA512C00, SHA512C01, SHA512C02, SHA512C03,
SHA512C04, SHA512C05, SHA512C06, SHA512C07,
SHA512C08, SHA512C09, SHA512C0a, SHA512C0b,
SHA512C0c, SHA512C0d, SHA512C0e, SHA512C0f,
SHA512C10, SHA512C11, SHA512C12, SHA512C13,
SHA512C14, SHA512C15, SHA512C16, SHA512C17,
SHA512C18, SHA512C19, SHA512C1a, SHA512C1b,
SHA512C1c, SHA512C1d, SHA512C1e, SHA512C1f,
SHA512C20, SHA512C21, SHA512C22, SHA512C23,
SHA512C24, SHA512C25, SHA512C26, SHA512C27,
SHA512C28, SHA512C29, SHA512C2a, SHA512C2b,
SHA512C2c, SHA512C2d, SHA512C2e, SHA512C2f,
SHA512C30, SHA512C31, SHA512C32, SHA512C33,
SHA512C34, SHA512C35, SHA512C36, SHA512C37,
SHA512C38, SHA512C39, SHA512C3a, SHA512C3b,
SHA512C3c, SHA512C3d, SHA512C3e, SHA512C3f,
SHA512C40, SHA512C41, SHA512C42, SHA512C43,
SHA512C44, SHA512C45, SHA512C46, SHA512C47,
SHA512C48, SHA512C49, SHA512C4a, SHA512C4b,
SHA512C4c, SHA512C4d, SHA512C4e, SHA512C4f,
};
static void sha384_transform (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u64x digest[8])

View File

@ -16,26 +16,26 @@
__constant u64 k_sha384[80] =
{
SHA384C00, SHA384C01, SHA384C02, SHA384C03,
SHA384C04, SHA384C05, SHA384C06, SHA384C07,
SHA384C08, SHA384C09, SHA384C0a, SHA384C0b,
SHA384C0c, SHA384C0d, SHA384C0e, SHA384C0f,
SHA384C10, SHA384C11, SHA384C12, SHA384C13,
SHA384C14, SHA384C15, SHA384C16, SHA384C17,
SHA384C18, SHA384C19, SHA384C1a, SHA384C1b,
SHA384C1c, SHA384C1d, SHA384C1e, SHA384C1f,
SHA384C20, SHA384C21, SHA384C22, SHA384C23,
SHA384C24, SHA384C25, SHA384C26, SHA384C27,
SHA384C28, SHA384C29, SHA384C2a, SHA384C2b,
SHA384C2c, SHA384C2d, SHA384C2e, SHA384C2f,
SHA384C30, SHA384C31, SHA384C32, SHA384C33,
SHA384C34, SHA384C35, SHA384C36, SHA384C37,
SHA384C38, SHA384C39, SHA384C3a, SHA384C3b,
SHA384C3c, SHA384C3d, SHA384C3e, SHA384C3f,
SHA384C40, SHA384C41, SHA384C42, SHA384C43,
SHA384C44, SHA384C45, SHA384C46, SHA384C47,
SHA384C48, SHA384C49, SHA384C4a, SHA384C4b,
SHA384C4c, SHA384C4d, SHA384C4e, SHA384C4f,
SHA512C00, SHA512C01, SHA512C02, SHA512C03,
SHA512C04, SHA512C05, SHA512C06, SHA512C07,
SHA512C08, SHA512C09, SHA512C0a, SHA512C0b,
SHA512C0c, SHA512C0d, SHA512C0e, SHA512C0f,
SHA512C10, SHA512C11, SHA512C12, SHA512C13,
SHA512C14, SHA512C15, SHA512C16, SHA512C17,
SHA512C18, SHA512C19, SHA512C1a, SHA512C1b,
SHA512C1c, SHA512C1d, SHA512C1e, SHA512C1f,
SHA512C20, SHA512C21, SHA512C22, SHA512C23,
SHA512C24, SHA512C25, SHA512C26, SHA512C27,
SHA512C28, SHA512C29, SHA512C2a, SHA512C2b,
SHA512C2c, SHA512C2d, SHA512C2e, SHA512C2f,
SHA512C30, SHA512C31, SHA512C32, SHA512C33,
SHA512C34, SHA512C35, SHA512C36, SHA512C37,
SHA512C38, SHA512C39, SHA512C3a, SHA512C3b,
SHA512C3c, SHA512C3d, SHA512C3e, SHA512C3f,
SHA512C40, SHA512C41, SHA512C42, SHA512C43,
SHA512C44, SHA512C45, SHA512C46, SHA512C47,
SHA512C48, SHA512C49, SHA512C4a, SHA512C4b,
SHA512C4c, SHA512C4d, SHA512C4e, SHA512C4f,
};
static void sha384_transform (const u32x w0[4], const u32x w1[4], const u32x w2[4], const u32x w3[4], u64x digest[8])

View File

@ -117,8 +117,8 @@ static const char *USAGE_BIG[] =
" 5100 | Half MD5 | Raw Hash",
" 100 | SHA1 | Raw Hash",
" 1300 | SHA-224 | Raw Hash",
" 10800 | SHA-384 | Raw Hash",
" 1400 | SHA-256 | Raw Hash",
" 10800 | SHA-384 | Raw Hash",
" 1700 | SHA-512 | Raw Hash",
" 5000 | SHA-3(Keccak) | Raw Hash",
" 10100 | SipHash | Raw Hash",