nx_md5.nx
buildroot/runtime/nx_md5.nx
about
nx_md5.nx -- MD5 message digest (RFC 1321).
MD5 is cryptographically broken (collisions) but still used for:
- Legacy file checksums (md5sum verification)
- Apache .htdigest auth files (which we may need to interop)
- ETag generation (when collision resistance isn't needed)
- Cache keys for systems that hardcode 16-byte digests
DO NOT use MD5 for passwords, signatures, or anything where an
attacker controls the input. Use SHA-256 (already in tree) +
HMAC.
Algorithm: 64-round MD-construction with 4-word state, processing
64-byte blocks. Returns 16-byte digest.
dependencies 1 imports · 1 importers
imports: syscalls.nx
imported by: nx_tls13_chrome_hello_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 25 | func nx_md5_rotl(x: i64, k: i64) -> i64 |
| 33 | func nx_md5_F(x: i64, y: i64, z: i64) -> i64 { return ((x & y) | ((~x) & z)) & 0xFFFFFFFF } called by 1: nx_md5_FF |
| 34 | func nx_md5_G(x: i64, y: i64, z: i64) -> i64 { return ((x & z) | (y & (~z))) & 0xFFFFFFFF } called by 1: nx_md5_GG |
| 35 | func nx_md5_H(x: i64, y: i64, z: i64) -> i64 { return (x ^ y ^ z) & 0xFFFFFFFF } called by 1: nx_md5_HH |
| 36 | func nx_md5_I(x: i64, y: i64, z: i64) -> i64 { return (y ^ (x | (~z))) & 0xFFFFFFFF } called by 1: nx_md5_II |
| 39 | func nx_md5_FF(a: i64, b: i64, c: i64, d: i64, m: i64, s: i64, t: i64) -> i64 |
| 43 | func nx_md5_GG(a: i64, b: i64, c: i64, d: i64, m: i64, s: i64, t: i64) -> i64 |
| 47 | func nx_md5_HH(a: i64, b: i64, c: i64, d: i64, m: i64, s: i64, t: i64) -> i64 |
| 51 | func nx_md5_II(a: i64, b: i64, c: i64, d: i64, m: i64, s: i64, t: i64) -> i64 |
| 57 | func nx_md5_load_u32(p: *u8) -> i64 called by 1: nx_md5_block |
| 65 | func nx_md5_block(state: *i64, blk: *u8) -> i64 |
| 161 | func nx_md5(data: *u8, n: i64, digest: *u8) -> i64 |
| 227 | func main() -> i64 calls 1: nx_md5 |