Thrill  0.1
tlx::digest_detail Namespace Reference

Functions

static uint64_t Ch (const uint64_t &x, const uint64_t &y, const uint64_t &z)
 
static uint32_t F (const uint32_t &x, const uint32_t &y, const uint32_t &z)
 
static uint32_t F0 (const uint32_t &x, const uint32_t &y, const uint32_t &z)
 
static uint32_t F1 (const uint32_t &x, const uint32_t &y, const uint32_t &z)
 
static uint32_t F2 (const uint32_t &x, const uint32_t &y, const uint32_t &z)
 
static uint32_t F3 (const uint32_t &x, const uint32_t &y, const uint32_t &z)
 
static void FF (uint32_t &a, uint32_t &b, uint32_t &c, uint32_t &d, uint32_t M, uint32_t s, uint32_t t)
 
static uint32_t G (const uint32_t &x, const uint32_t &y, const uint32_t &z)
 
static uint64_t Gamma0 (uint64_t x)
 
static uint64_t Gamma1 (uint64_t x)
 
static void GG (uint32_t &a, uint32_t &b, uint32_t &c, uint32_t &d, uint32_t M, uint32_t s, uint32_t t)
 
static uint32_t H (const uint32_t &x, const uint32_t &y, const uint32_t &z)
 
static void HH (uint32_t &a, uint32_t &b, uint32_t &c, uint32_t &d, uint32_t M, uint32_t s, uint32_t t)
 
static uint32_t I (const uint32_t &x, const uint32_t &y, const uint32_t &z)
 
static void II (uint32_t &a, uint32_t &b, uint32_t &c, uint32_t &d, uint32_t M, uint32_t s, uint32_t t)
 
static uint32_t load32h (const uint8_t *y)
 
static uint32_t load32l (const uint8_t *y)
 
static uint64_t load64 (const unsigned char *y)
 
static uint64_t Maj (const uint64_t &x, const uint64_t &y, const uint64_t &z)
 
static void md5_compress (uint32_t state[4], const uint8_t *buf)
 
static uint32_t min (uint32_t x, uint32_t y)
 
static uint32_t min (uint32_t x, uint32_t y)
 
static uint32_t min (uint32_t x, uint32_t y)
 
static uint64_t Sh (uint64_t x, uint64_t n)
 
static void sha1_compress (uint32_t state[4], const uint8_t *buf)
 
static void sha512_compress (uint64_t state[8], const uint8_t *buf)
 
static uint64_t Sigma0 (uint64_t x)
 
static uint64_t Sigma1 (uint64_t x)
 
static void store32h (uint32_t x, uint8_t *y)
 
static void store32l (uint32_t x, uint8_t *y)
 
static void store64 (uint64_t x, unsigned char *y)
 
static void store64h (uint64_t x, unsigned char *y)
 
static void store64l (uint64_t x, uint8_t *y)
 

Variables

static const uint64_t K [80]
 
static const uint32_t Korder [64]
 
static const uint8_t Rorder [64]
 
static const uint8_t Worder [64]
 

Function Documentation

◆ Ch()

static uint64_t tlx::digest_detail::Ch ( const uint64_t &  x,
const uint64_t &  y,
const uint64_t &  z 
)
inlinestatic

Definition at line 78 of file sha512.cpp.

Referenced by sha512_compress().

◆ F()

static uint32_t tlx::digest_detail::F ( const uint32_t &  x,
const uint32_t &  y,
const uint32_t &  z 
)
inlinestatic

Definition at line 54 of file md5.cpp.

Referenced by FF().

◆ F0()

static uint32_t tlx::digest_detail::F0 ( const uint32_t &  x,
const uint32_t &  y,
const uint32_t &  z 
)
inlinestatic

Definition at line 50 of file sha1.cpp.

Referenced by sha1_compress().

◆ F1()

static uint32_t tlx::digest_detail::F1 ( const uint32_t &  x,
const uint32_t &  y,
const uint32_t &  z 
)
inlinestatic

Definition at line 54 of file sha1.cpp.

Referenced by sha1_compress().

◆ F2()

static uint32_t tlx::digest_detail::F2 ( const uint32_t &  x,
const uint32_t &  y,
const uint32_t &  z 
)
inlinestatic

Definition at line 58 of file sha1.cpp.

Referenced by sha1_compress().

◆ F3()

static uint32_t tlx::digest_detail::F3 ( const uint32_t &  x,
const uint32_t &  y,
const uint32_t &  z 
)
inlinestatic

Definition at line 62 of file sha1.cpp.

Referenced by sha1_compress().

◆ FF()

static void tlx::digest_detail::FF ( uint32_t &  a,
uint32_t &  b,
uint32_t &  c,
uint32_t &  d,
uint32_t  M,
uint32_t  s,
uint32_t  t 
)
inlinestatic

Definition at line 70 of file md5.cpp.

References F(), and tlx::rol32().

Referenced by md5_compress().

◆ G()

static uint32_t tlx::digest_detail::G ( const uint32_t &  x,
const uint32_t &  y,
const uint32_t &  z 
)
inlinestatic

Definition at line 58 of file md5.cpp.

Referenced by GG().

◆ Gamma0()

static uint64_t tlx::digest_detail::Gamma0 ( uint64_t  x)
inlinestatic

Definition at line 94 of file sha512.cpp.

References tlx::ror64(), and Sh().

Referenced by sha512_compress().

◆ Gamma1()

static uint64_t tlx::digest_detail::Gamma1 ( uint64_t  x)
inlinestatic

Definition at line 97 of file sha512.cpp.

References tlx::ror64(), and Sh().

Referenced by sha512_compress().

◆ GG()

static void tlx::digest_detail::GG ( uint32_t &  a,
uint32_t &  b,
uint32_t &  c,
uint32_t &  d,
uint32_t  M,
uint32_t  s,
uint32_t  t 
)
inlinestatic

Definition at line 76 of file md5.cpp.

References G(), and tlx::rol32().

Referenced by md5_compress().

◆ H()

static uint32_t tlx::digest_detail::H ( const uint32_t &  x,
const uint32_t &  y,
const uint32_t &  z 
)
inlinestatic

Definition at line 62 of file md5.cpp.

Referenced by HH(), and HyperLogLogRegisters< p >::result().

◆ HH()

static void tlx::digest_detail::HH ( uint32_t &  a,
uint32_t &  b,
uint32_t &  c,
uint32_t &  d,
uint32_t  M,
uint32_t  s,
uint32_t  t 
)
inlinestatic

Definition at line 82 of file md5.cpp.

References H(), and tlx::rol32().

Referenced by md5_compress().

◆ I()

static uint32_t tlx::digest_detail::I ( const uint32_t &  x,
const uint32_t &  y,
const uint32_t &  z 
)
inlinestatic

Definition at line 66 of file md5.cpp.

Referenced by II().

◆ II()

static void tlx::digest_detail::II ( uint32_t &  a,
uint32_t &  b,
uint32_t &  c,
uint32_t &  d,
uint32_t  M,
uint32_t  s,
uint32_t  t 
)
inlinestatic

Definition at line 88 of file md5.cpp.

References I(), and tlx::rol32().

Referenced by md5_compress().

◆ load32h()

static uint32_t tlx::digest_detail::load32h ( const uint8_t *  y)
inlinestatic

Definition at line 40 of file sha1.cpp.

Referenced by sha1_compress().

◆ load32l()

static uint32_t tlx::digest_detail::load32l ( const uint8_t *  y)
inlinestatic

Definition at line 36 of file md5.cpp.

Referenced by md5_compress().

◆ load64()

static uint64_t tlx::digest_detail::load64 ( const unsigned char *  y)
inlinestatic

Definition at line 70 of file sha512.cpp.

Referenced by sha512_compress().

◆ Maj()

static uint64_t tlx::digest_detail::Maj ( const uint64_t &  x,
const uint64_t &  y,
const uint64_t &  z 
)
inlinestatic

Definition at line 82 of file sha512.cpp.

Referenced by sha512_compress().

◆ md5_compress()

static void tlx::digest_detail::md5_compress ( uint32_t  state[4],
const uint8_t *  buf 
)
static

Definition at line 124 of file md5.cpp.

References FF(), GG(), HH(), II(), and load32l().

Referenced by MD5::finalize(), and MD5::process().

◆ min() [1/3]

static uint32_t tlx::digest_detail::min ( uint32_t  x,
uint32_t  y 
)
inlinestatic

Definition at line 32 of file md5.cpp.

References gen_data::x.

Referenced by MD5::process(), SHA512::process(), and SHA1::process().

◆ min() [2/3]

static uint32_t tlx::digest_detail::min ( uint32_t  x,
uint32_t  y 
)
inlinestatic

Definition at line 32 of file sha1.cpp.

References gen_data::x.

◆ min() [3/3]

static uint32_t tlx::digest_detail::min ( uint32_t  x,
uint32_t  y 
)
inlinestatic

Definition at line 62 of file sha512.cpp.

References gen_data::x.

◆ Sh()

static uint64_t tlx::digest_detail::Sh ( uint64_t  x,
uint64_t  n 
)
inlinestatic

Definition at line 85 of file sha512.cpp.

Referenced by Gamma0(), and Gamma1().

◆ sha1_compress()

static void tlx::digest_detail::sha1_compress ( uint32_t  state[4],
const uint8_t *  buf 
)
static

Definition at line 66 of file sha1.cpp.

References F0(), F1(), F2(), F3(), load32h(), and tlx::rol32().

Referenced by SHA1::finalize(), and SHA1::process().

◆ sha512_compress()

static void tlx::digest_detail::sha512_compress ( uint64_t  state[8],
const uint8_t *  buf 
)
static

Definition at line 101 of file sha512.cpp.

References Ch(), Gamma0(), Gamma1(), load64(), Maj(), Sigma0(), and Sigma1().

Referenced by SHA512::finalize(), and SHA512::process().

◆ Sigma0()

static uint64_t tlx::digest_detail::Sigma0 ( uint64_t  x)
inlinestatic

Definition at line 88 of file sha512.cpp.

References tlx::ror64().

Referenced by sha512_compress().

◆ Sigma1()

static uint64_t tlx::digest_detail::Sigma1 ( uint64_t  x)
inlinestatic

Definition at line 91 of file sha512.cpp.

References tlx::ror64().

Referenced by sha512_compress().

◆ store32h()

static void tlx::digest_detail::store32h ( uint32_t  x,
uint8_t *  y 
)
inlinestatic

Definition at line 44 of file sha1.cpp.

Referenced by SHA1::finalize().

◆ store32l()

static void tlx::digest_detail::store32l ( uint32_t  x,
uint8_t *  y 
)
inlinestatic

Definition at line 43 of file md5.cpp.

Referenced by MD5::finalize().

◆ store64()

static void tlx::digest_detail::store64 ( uint64_t  x,
unsigned char *  y 
)
inlinestatic

Definition at line 66 of file sha512.cpp.

Referenced by SHA256::finalize(), and SHA512::finalize().

◆ store64h()

static void tlx::digest_detail::store64h ( uint64_t  x,
unsigned char *  y 
)
inlinestatic

Definition at line 36 of file sha1.cpp.

Referenced by SHA1::finalize().

◆ store64l()

static void tlx::digest_detail::store64l ( uint64_t  x,
uint8_t *  y 
)
inlinestatic

Definition at line 48 of file md5.cpp.

Referenced by MD5::finalize().

Variable Documentation

◆ K

const uint64_t K[80]
static
Initial value:
= {
0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL,
0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL,
0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL,
0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL,
0xc19bf174cf692694ULL, 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL,
0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, 0x2de92c6f592b0275ULL,
0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL,
0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL,
0xbf597fc7beef0ee4ULL, 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL,
0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, 0x27b70a8546d22ffcULL,
0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL,
0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL,
0x92722c851482353bULL, 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL,
0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, 0xd192e819d6ef5218ULL,
0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL,
0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL,
0x34b0bcb5e19b48a8ULL, 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL,
0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, 0x748f82ee5defb2fcULL,
0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL,
0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL,
0xc67178f2e372532bULL, 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL,
0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, 0x06f067aa72176fbaULL,
0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL,
0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL,
0x431d67c49c100d4cULL, 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL,
0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
}

Definition at line 32 of file sha512.cpp.

Referenced by examples::suffix_sorting::DC3(), examples::suffix_sorting::DC3Recursive(), examples::suffix_sorting::DC7(), examples::suffix_sorting::DC7Recursive(), thrill::common::radix_sort_CI(), and hypergeometric_distribution<>::rk_hypergeometric_hyp().

◆ Korder

const uint32_t Korder[64]
static
Initial value:
= {
0xd76aa478UL, 0xe8c7b756UL, 0x242070dbUL, 0xc1bdceeeUL, 0xf57c0fafUL,
0x4787c62aUL, 0xa8304613UL, 0xfd469501UL, 0x698098d8UL, 0x8b44f7afUL,
0xffff5bb1UL, 0x895cd7beUL, 0x6b901122UL, 0xfd987193UL, 0xa679438eUL,
0x49b40821UL, 0xf61e2562UL, 0xc040b340UL, 0x265e5a51UL, 0xe9b6c7aaUL,
0xd62f105dUL, 0x02441453UL, 0xd8a1e681UL, 0xe7d3fbc8UL, 0x21e1cde6UL,
0xc33707d6UL, 0xf4d50d87UL, 0x455a14edUL, 0xa9e3e905UL, 0xfcefa3f8UL,
0x676f02d9UL, 0x8d2a4c8aUL, 0xfffa3942UL, 0x8771f681UL, 0x6d9d6122UL,
0xfde5380cUL, 0xa4beea44UL, 0x4bdecfa9UL, 0xf6bb4b60UL, 0xbebfbc70UL,
0x289b7ec6UL, 0xeaa127faUL, 0xd4ef3085UL, 0x04881d05UL, 0xd9d4d039UL,
0xe6db99e5UL, 0x1fa27cf8UL, 0xc4ac5665UL, 0xf4292244UL, 0x432aff97UL,
0xab9423a7UL, 0xfc93a039UL, 0x655b59c3UL, 0x8f0ccc92UL, 0xffeff47dUL,
0x85845dd1UL, 0x6fa87e4fUL, 0xfe2ce6e0UL, 0xa3014314UL, 0x4e0811a1UL,
0xf7537e82UL, 0xbd3af235UL, 0x2ad7d2bbUL, 0xeb86d391UL
}

Definition at line 108 of file md5.cpp.

◆ Rorder

const uint8_t Rorder[64]
static
Initial value:
= {
7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20,
4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21
}

Definition at line 101 of file md5.cpp.

◆ Worder

const uint8_t Worder[64]
static
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12,
5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2,
0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9
}

Definition at line 94 of file md5.cpp.