Repository navigation
Releases: ankit-chaubey/usr
Release list
v0.1.3
🚀 usr v0.1.3 — Complete Rewrite
This release is a full ground-up rewrite of usr, fixing all critical bugs and implementing every missing or placeholder feature from v0.1.0. The library is now cryptographically correct, spec-accurate, fully tested, and production-usable.
🔐 Cryptography
- Fixed SHA-256 two-block padding bug (previously broken for
len % 64 ≥ 56) - Fixed AES-256 decryption — replaced incorrect 3-line stub with full 14-round inverse cipher
- Added SHA-512 (streaming + one-shot APIs)
- Added HMAC-SHA256 and PBKDF2-HMAC-SHA256
- Added AES-256-CBC (PKCS#7) and AES-256-CTR modes
- Fixed CRC-32 double-XOR bug (now correctly produces
0xCBF43926) - Added cryptographically secure random bytes via
getrandom,/dev/urandom, andCryptGenRandom
📝 Text & Encoding
-
Added Base64 (standard + URL-safe), hex, URL, and HTML entity encode/decode
-
Rewrote UTF-8 / UTF-16 utilities: decode, encode, validate, codepoint count, offset conversion
- UTF-16 offsets follow Telegram spec (surrogate pairs count as 2 units)
-
Rewrote HTML parser:
- Added
<code>,<pre>,<tg-spoiler> - Fixed missing
>inhref, buffer overflow, and escaping issues
- Added
-
Rewrote entities_to_html:
- Previously a placeholder that appended tags
- Now inserts entities at correct UTF-16 positions using an event-sorted algorithm
-
Implemented usr_entities_to_markdown (previously declared but never implemented)
-
Completed Markdown V2 parser:
- Backslash escapes,
||spoiler||,__underline__,~strike~ - Triple-backtick code blocks, inline links
- Correct UTF-16 offset handling
- Backslash escapes,
-
Fixed entity normalization:
- Replaced overlap-dropping logic with an interval stack to allow proper nesting
🏗 Infrastructure
-
Rewrote CMakeLists.txt:
- Fixed broken
src/core/*.cglob - Added all test and benchmark targets
- Added proper install rules
- Fixed broken
-
Added 5 C test suites:
- Crypto (15 tests)
- Encoding (23 tests)
- UTF-8 (15 tests)
- Roundtrip (13 tests)
- Fuzz (5,000 iterations)
- ✅ All tests pass
-
Added benchmarks:
- SHA-256 ~220 MB/s
- AES-IGE ~40 MB/s
- Base64 ~1,800 MB/s
-
Added full_demo.c covering all major APIs
🐍 Python Bindings
-
Added missing _lib.py (package was previously non-functional without it)
-
Added _structs.py with
EntityTypeenum and sharedctypesdefinitions -
Fixed
__init__.pyshadow redefinition offrom_text/to_text -
Rewrote all Python modules:
crypto,encoding,entities,html,markdown,binary
-
All 15 Python integration tests pass
📦 Version
- 0.1.0 → 0.1.3
📝 What’s Changed
-
docs: clarify local build workflow and pre-release status
- by @ankit-chaubey in #1
👤 New Contributors
- @ankit-chaubey made their first contribution in #1
Full Changelog: v0.1.2...v0.1.3
v0.1.2b1
v0.1.1.post1 — Initial Public Pre-Release
This is the first public pre-release of usr.
What this release represents
- Initial snapshot of the project after internal experimentation
- Early exposure of the core architecture
- A foundation release for learning, exploration, and feedback
Scope
- C core with optional Python bindings
- Binary utilities, cryptographic primitives, and entity processing
- APIs are unstable and may change without notice
Status
- Pre-release / experimental
- Not intended for production use
- Published to establish a public baseline version
This release intentionally prioritizes transparency and correctness over completeness.