Suggested changes for pull request

Fixed: Moved descriptions to appropriate location in readme file
Fixed: Changed name of alternate base64 tables to ab64
Fixed: Changed hash category to HASH_CATEGORY_GENERIC_KDF
pull/2008/head
vlo 5 years ago
parent 556db9a9e9
commit 84b8a1b1eb

@ -110,6 +110,9 @@ NVIDIA GPUs require "NVIDIA Driver" (418.56 or later)
- PBKDF2-HMAC-SHA1
- PBKDF2-HMAC-SHA256
- PBKDF2-HMAC-SHA512
- Python passlib pbkdf2-sha1
- Python passlib pbkdf2-sha256
- Python passlib pbkdf2-sha512
- Skype
- WPA-EAPOL-PBKDF2
- WPA-EAPOL-PMK
@ -270,9 +273,6 @@ NVIDIA GPUs require "NVIDIA Driver" (418.56 or later)
- Ethereum Pre-Sale Wallet, PBKDF2-HMAC-SHA256
- Ansible Vault
- Plaintext
- Python passlib pbkdf2-sha1
- Python passlib pbkdf2-sha256
- Python passlib pbkdf2-sha512
##
## Attack-Modes

@ -35,22 +35,22 @@ void u8_to_hex (const u8 v, u8 hex[2]);
void u32_to_hex (const u32 v, u8 hex[8]);
void u64_to_hex (const u64 v, u8 hex[16]);
u8 int_to_base32 (const u8 c);
u8 base32_to_int (const u8 c);
u8 int_to_base64 (const u8 c);
u8 base64_to_int (const u8 c);
u8 int_to_alternate_base64 (const u8 c);
u8 alternate_base64_to_int (const u8 c);
u8 int_to_base64url (const u8 c);
u8 base64url_to_int (const u8 c);
u8 int_to_itoa32 (const u8 c);
u8 itoa32_to_int (const u8 c);
u8 int_to_itoa64 (const u8 c);
u8 itoa64_to_int (const u8 c);
u8 int_to_bf64 (const u8 c);
u8 bf64_to_int (const u8 c);
u8 int_to_lotus64 (const u8 c);
u8 lotus64_to_int (const u8 c);
u8 int_to_base32 (const u8 c);
u8 base32_to_int (const u8 c);
u8 int_to_base64 (const u8 c);
u8 base64_to_int (const u8 c);
u8 int_to_ab64 (const u8 c);
u8 ab64_to_int (const u8 c);
u8 int_to_base64url (const u8 c);
u8 base64url_to_int (const u8 c);
u8 int_to_itoa32 (const u8 c);
u8 itoa32_to_int (const u8 c);
u8 int_to_itoa64 (const u8 c);
u8 itoa64_to_int (const u8 c);
u8 int_to_bf64 (const u8 c);
u8 bf64_to_int (const u8 c);
u8 int_to_lotus64 (const u8 c);
u8 lotus64_to_int (const u8 c);
size_t base32_decode (u8 (*f) (const u8), const u8 *in_buf, const size_t in_len, u8 *out_buf);
size_t base32_encode (u8 (*f) (const u8), const u8 *in_buf, const size_t in_len, u8 *out_buf);

@ -556,7 +556,7 @@ u8 base64_to_int (const u8 c)
}
// alternate base64 using ./ instead of +/, used in python passlib hashes
u8 int_to_alternate_base64 (const u8 c)
u8 int_to_ab64 (const u8 c)
{
const u8 tbl[0x40] =
{
@ -569,7 +569,7 @@ u8 int_to_alternate_base64 (const u8 c)
return tbl[c];
}
u8 alternate_base64_to_int (const u8 c)
u8 ab64_to_int (const u8 c)
{
const u8 tbl[0x100] =
{

@ -16,7 +16,7 @@ static const u32 DGST_POS1 = 1;
static const u32 DGST_POS2 = 2;
static const u32 DGST_POS3 = 3;
static const u32 DGST_SIZE = DGST_SIZE_8_16;
static const u32 HASH_CATEGORY = HASH_CATEGORY_FORUM_SOFTWARE;
static const u32 HASH_CATEGORY = HASH_CATEGORY_GENERIC_KDF;
static const char *HASH_NAME = "Python passlib pbkdf2-sha512";
static const u64 KERN_TYPE = 7100;
static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE
@ -153,7 +153,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
u8 tmp_buf[256] = { 0 };
const size_t salt_len_decoded = base64_decode (alternate_base64_to_int, (const u8 *) salt_pos, salt_len, tmp_buf);
const size_t salt_len_decoded = base64_decode (ab64_to_int, (const u8 *) salt_pos, salt_len, tmp_buf);
u8 *salt_buf_ptr = (u8 *) pbkdf2_sha512->salt_buf;
memcpy (salt_buf_ptr, tmp_buf, salt_len_decoded);
@ -166,7 +166,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
const u8 *hash_pos = token.buf[4];
const int hash_len = token.len[4];
base64_decode (alternate_base64_to_int, (const u8 *) hash_pos, hash_len, tmp_buf);
base64_decode (ab64_to_int, (const u8 *) hash_pos, hash_len, tmp_buf);
memcpy (digest, tmp_buf, HASH_LEN_RAW);
digest[0] = byte_swap_64 (digest[0]);
@ -203,8 +203,8 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
char salt_enc[257] = { 0 };
char hash_enc[128] = { 0 };
const size_t salt_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) pbkdf2_sha512->salt_buf, salt->salt_len, (u8 *) salt_enc);
const size_t hash_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) tmp, HASH_LEN_RAW, (u8 *) hash_enc);
const size_t salt_len_enc = base64_encode (int_to_ab64, (const u8 *) pbkdf2_sha512->salt_buf, salt->salt_len, (u8 *) salt_enc);
const size_t hash_len_enc = base64_encode (int_to_ab64, (const u8 *) tmp, HASH_LEN_RAW, (u8 *) hash_enc);
// remove padding =
for (size_t i = 0; i < salt_len_enc; i++)

@ -16,7 +16,7 @@ static const u32 DGST_POS1 = 1;
static const u32 DGST_POS2 = 2;
static const u32 DGST_POS3 = 3;
static const u32 DGST_SIZE = DGST_SIZE_4_32;
static const u32 HASH_CATEGORY = HASH_CATEGORY_FORUM_SOFTWARE;
static const u32 HASH_CATEGORY = HASH_CATEGORY_GENERIC_KDF;
static const char *HASH_NAME = "Python passlib pbkdf2-sha256";
static const u64 KERN_TYPE = 10900;
static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE
@ -152,7 +152,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
u8 tmp_buf[256] = { 0 };
const size_t salt_len_decoded = base64_decode (alternate_base64_to_int, (const u8 *) salt_pos, salt_len, tmp_buf);
const size_t salt_len_decoded = base64_decode (ab64_to_int, (const u8 *) salt_pos, salt_len, tmp_buf);
u8 *salt_buf_ptr = (u8 *) pbkdf2_sha256->salt_buf;
memcpy (salt_buf_ptr, tmp_buf, salt_len_decoded);
@ -165,7 +165,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
const u8 *hash_pos = token.buf[4];
const int hash_len = token.len[4];
base64_decode (alternate_base64_to_int, (const u8 *) hash_pos, hash_len, tmp_buf);
base64_decode (ab64_to_int, (const u8 *) hash_pos, hash_len, tmp_buf);
memcpy (digest, tmp_buf, HASH_LEN_RAW);
digest[0] = byte_swap_32 (digest[0]);
@ -202,8 +202,8 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
char salt_enc[257] = { 0 };
char hash_enc[128] = { 0 };
const size_t salt_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) pbkdf2_sha256->salt_buf, salt->salt_len, (u8 *) salt_enc);
const size_t hash_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) tmp, HASH_LEN_RAW, (u8 *) hash_enc);
const size_t salt_len_enc = base64_encode (int_to_ab64, (const u8 *) pbkdf2_sha256->salt_buf, salt->salt_len, (u8 *) salt_enc);
const size_t hash_len_enc = base64_encode (int_to_ab64, (const u8 *) tmp, HASH_LEN_RAW, (u8 *) hash_enc);
// remove padding =
for (size_t i = 0; i < salt_len_enc; i++)

@ -16,7 +16,7 @@ static const u32 DGST_POS1 = 1;
static const u32 DGST_POS2 = 2;
static const u32 DGST_POS3 = 3;
static const u32 DGST_SIZE = DGST_SIZE_4_32;
static const u32 HASH_CATEGORY = HASH_CATEGORY_FORUM_SOFTWARE;
static const u32 HASH_CATEGORY = HASH_CATEGORY_GENERIC_KDF;
static const char *HASH_NAME = "Python passlib pbkdf2-sha1";
static const u64 KERN_TYPE = 12000;
static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE
@ -152,7 +152,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
u8 tmp_buf[256] = { 0 };
const size_t salt_len_decoded = base64_decode (alternate_base64_to_int, (const u8 *) salt_pos, salt_len, tmp_buf);
const size_t salt_len_decoded = base64_decode (ab64_to_int, (const u8 *) salt_pos, salt_len, tmp_buf);
u8 *salt_buf_ptr = (u8 *) pbkdf2_sha1->salt_buf;
memcpy (salt_buf_ptr, tmp_buf, salt_len_decoded);
@ -164,7 +164,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
const u8 *hash_pos = token.buf[4];
const int hash_len = token.len[4];
base64_decode (alternate_base64_to_int, (const u8 *) hash_pos, hash_len, tmp_buf);
base64_decode (ab64_to_int, (const u8 *) hash_pos, hash_len, tmp_buf);
memcpy (digest, tmp_buf, HASH_LEN_RAW);
digest[0] = byte_swap_32 (digest[0]);
@ -195,8 +195,8 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
char salt_enc[257] = { 0 };
char hash_enc[128] = { 0 };
const size_t salt_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) pbkdf2_sha1->salt_buf, salt->salt_len, (u8 *) salt_enc);
const size_t hash_len_enc = base64_encode (int_to_alternate_base64, (const u8 *) tmp, HASH_LEN_RAW, (u8 *) hash_enc);
const size_t salt_len_enc = base64_encode (int_to_ab64, (const u8 *) pbkdf2_sha1->salt_buf, salt->salt_len, (u8 *) salt_enc);
const size_t hash_len_enc = base64_encode (int_to_ab64, (const u8 *) tmp, HASH_LEN_RAW, (u8 *) hash_enc);
// substitute + with . and remove padding =
for (size_t i = 0; i < salt_len_enc; i++)

Loading…
Cancel
Save