-
v2.5.0 Stable
released this
2025-10-17 20:42:46 +00:00 | 33 commits to main since this releaseRexCrypt v2.5.0
Highlights
- Salt specification (
-s <salt>): Pass a deterministic salt/setting to get a resulting hash. The same salt/setting, key, and algorithm will generate the same resulting hash. - Verify mode (
-V <hash>): Pass the stored hash as the "setting" tocrypt(3)and compare. Prints human-readable status and provides exit codes for scripting/TAP tests. - List algorithms (
-L): Probe support on the current system (viacrypt_gensalt()), and where available,crypt_checksalt()) and prints a short status table. Perfect for "what does this box support?" demos. - TAP v14 tests expanded: Test runner asserts exit codes, treats
rexcryptas a black box, and prints TAP to stdout with diagnostics on stderr. Added cases around verify OK/FAIL and error paths; regex comparator prints helpful compile errors. - Usage/README/TESTING updated: Built-in help and docs provide information on feature options, and docs provide additional detail where needed.
Changes & Refactors
- Complete refactor of the core:
rexcrypt.chas been rewritten to move much of the functionality into separate functions, adding new functions for support, and providing appropriate documentation in all cases. select_alg()no longer allocates: now returns aconst char *"setting" prefix; callers stop freeing it. Simpler, safer, and easier to explain.- Unsigned count semantics: Internal counters (e.g.
resalt,cpu_tim, andalg) useunsigned long; parsing moved tostrtoul()(parse_ulong()helper). The resalt loop was adjusted to avoid the classic "--u >= 0" unsigned underflow trap; comments call this out as a teachable gotcha. - Additional polish: Safer
copymem()demo, consistent help/usage text, and alignment/comment cleanups. - Multi-line support for regex comparator:
cmp_regex.cnow supports multi-line matches, allowing for greater test case flexibility & robustness.
CLI (recap)
rexcrypt [-c <cpu_tim>] [-r <resalt>] [-a <alg>] [-k <key>|-] [-s <salt>] [-V <hash>] [-L]-k -reads from stdin (newline trimmed; echo not disabled).- Passphrase input is capped by
CRYPT_MAX_PASSPHRASE_SIZE(commonly 512 bytes).
Build / Test
make # builds ./bin/rexcrypt make test # runs TAP v14 testsNotes
- RexCrypt remains an educational tool, not a production password subsystem.
- Algorithm availability and the semantics of
-cdepend on your system's libxcrypt build.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- Salt specification (