Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ add mode: SSHA -m 111
add mode: sha1crypt -m 15100
add mode: sm3crypt -m 35100
add mode: cmiyc (KoreLogic CMIYC 2026 contest algo)
add modes: Streebog/GOST 2012 -m 11700, 11750, 11760, 11800, 11850, 11860
```
### v1.3.1; 2026-04-13
```
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ To use hashgen, type your mode, wordlist input & hash output files with a simple
| 6050 | (hashcat compatible HMAC-RIPEMD160 key = $pass) |
| 6060 | (hashcat compatible HMAC-RIPEMD160 key = $salt) |
| | |
| **`Streebog / GOST R 34.11-2012`** | |
| streebog-256 | 11700 |
| 11750 | (HMAC-Streebog-256 key = $pass) |
| 11760 | (HMAC-Streebog-256 key = $salt) |
| streebog-512 | 11800 |
| 11850 | (HMAC-Streebog-512 key = $pass) |
| 11860 | (HMAC-Streebog-512 key = $salt) |
| | |
| **`Crypt / KDF`** | |
| argon2id | 34000 |
| bcrypt | 3200 |
Expand Down
63 changes: 63 additions & 0 deletions hashgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ v1.3.2; 2026-08-18
add mode: sha1crypt -m 15100
add mode: sm3crypt -m 35100
add mode: cmiyc (KoreLogic CMIYC 2026 contest algo)
add modes: Streebog/GOST 2012 -m 11700, 11750, 11760, 11800, 11850, 11860
*/

func versionFunc() {
Expand Down Expand Up @@ -180,6 +181,12 @@ func helpFunc() {
"1760\t\t(hashcat compatible HMAC-SHA512 key = $salt)\n" +
"6050\t\t(hashcat compatible HMAC-RIPEMD160 key = $pass)\n" +
"6060\t\t(hashcat compatible HMAC-RIPEMD160 key = $salt)\n" +
"streebog-256\t11700\n" +
"11750\t\t(hashcat compatible HMAC-Streebog-256 key = $pass)\n" +
"11760\t\t(hashcat compatible HMAC-Streebog-256 key = $salt)\n" +
"streebog-512\t11800\n" +
"11850\t\t(hashcat compatible HMAC-Streebog-512 key = $pass)\n" +
"11860\t\t(hashcat compatible HMAC-Streebog-512 key = $salt)\n" +
"10900\t\t(hashcat compatible PBKDF2-HMAC-SHA256)\n" +
"11900\t\t(hashcat compatible PBKDF2-HMAC-MD5)\n" +
"12000\t\t(hashcat compatible PBKDF2-HMAC-SHA1)\n" +
Expand Down Expand Up @@ -302,6 +309,13 @@ func hexMACLineDigest(digest []byte, salt []byte) string {
return string(out)
}

// reverse digest byte order for hashcat big-endian Streebog modes
func reverseBytes(b []byte) {
for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
b[i], b[j] = b[j], b[i]
}
}

// hashcat blake2s_hmac for mode 33300
func blake2sHMACHashcat(key, msg []byte) []byte {
const block = 64
Expand Down Expand Up @@ -1917,6 +1931,17 @@ func hashBytesDispatch(hashFunc string, data []byte, cost int) (string, bool) {
h.Write(data)
return hex.EncodeToString(h.Sum(nil)), true

// Streebog / GOST R 34.11-2012, big-endian
case "streebog-256", "streebog256", "11700":
sum := streebog.Sum256(data)
reverseBytes(sum[:])
return hex.EncodeToString(sum[:]), true

case "streebog-512", "streebog512", "11800":
sum := streebog.Sum512(data)
reverseBytes(sum[:])
return hex.EncodeToString(sum[:]), true

// HMAC (hashcat: hex_digest : salt)

case "50", "hmac-md5-pass", "60", "hmac-md5-salt":
Expand Down Expand Up @@ -2009,6 +2034,44 @@ func hashBytesDispatch(hashFunc string, data []byte, cost int) (string, bool) {
}
return hexMACLineDigest(m, salt), true

case "11750", "hmac-streebog256-pass", "11760", "hmac-streebog256-salt":
var saltBuf [16]byte
if !fillSaltHex8(saltBuf[:]) {
return "", true
}
salt := saltBuf[:]
var m []byte
if hashFunc == "11750" || hashFunc == "hmac-streebog256-pass" {
h := hmac.New(streebog.New256, data)
h.Write(salt)
m = h.Sum(nil)
} else {
h := hmac.New(streebog.New256, salt)
h.Write(data)
m = h.Sum(nil)
}
reverseBytes(m)
return hexMACLineDigest(m, salt), true

case "11850", "hmac-streebog512-pass", "11860", "hmac-streebog512-salt":
var saltBuf [16]byte
if !fillSaltHex8(saltBuf[:]) {
return "", true
}
salt := saltBuf[:]
var m []byte
if hashFunc == "11850" || hashFunc == "hmac-streebog512-pass" {
h := hmac.New(streebog.New512, data)
h.Write(salt)
m = h.Sum(nil)
} else {
h := hmac.New(streebog.New512, salt)
h.Write(data)
m = h.Sum(nil)
}
reverseBytes(m)
return hexMACLineDigest(m, salt), true

// BLAKE2

// blake2b-256 (raw hex)
Expand Down
Loading