How nkujyw/distributed-password-hash-mhf-system works
FuzzyPCFG_SM_Argon2i combines a PCFG-based password-strength model, a FastAPI service for scoring and account operations, and a modified Argon2i password-hashing implementation. The documented path is training data through model training and CDF preparation, then service requests for scoring or registration/login; maintenance can update model components, and a separate tool creates differentially private model files. Several service-to-executable and service-to-hasher details are documented only at a high level, so those links are marked unverified rather than asserting specific call mechanics.
Main entry points: score_server.py API service · fuzzypcfg.cpp PCFG engine · ref.c Block mixing · models_original Original models
Components 22
Web service
- API service
score_server.py - User database
PCFG modeling
- PCFG engine
fuzzypcfg.cpp - Trie structures
Trie.h - Training corpus
files/train_dic.txt - Base dictionary
files/base_dic.txt - Original models
models_original - CDF preparation
build_cdf.py - Incremental updates
batch_update.py - Collected patterns
Model privacy
- DP noise tool
add_noise.py - Private models
models_dp
Password hashing
- Argon2 API
SM_Argon2/include/argon2.h - Hash entry points
SM_Argon2/src/argon2.c - Memory-hard core
SM_Argon2/src/core.c - Hash encoding
SM_Argon2/src/encoding.c - Block mixing
SM_Argon2/src/ref.c - SM3 hashing
SM_Argon2/src/sm3/sm3.c - BLAKE2 primitives
SM_Argon2/src/blake2/blake2.h - SM4 mixing
SM_Argon2/src/sm4/sm4-round.h - ZUC routines
SM_Argon2/src/zuc/ZUC.c
Other components
- API client
Connections 23
- API client → API service: requests
README.md - API service → User database: stores account data
README.md - API service → PCFG engine: requests scoring
- API service → Hash entry points: hashes credentials
- Training corpus → PCFG engine: trains from
README.md - Base dictionary → PCFG engine: parses with
README.md - PCFG engine → Trie structures: uses
fuzzypcfg.cpp - PCFG engine → Original models: writes or scores
README.md - Original models → CDF preparation: normalizes scoring
README.md - API service → Collected patterns: records patterns
README.md - Collected patterns → Incremental updates: consumes log
README.md - Incremental updates → Original models: updates components
README.md - Incremental updates → CDF preparation: uses preparation
batch_update.py - Original models → DP noise tool: adds noise to
README.md - DP noise tool → Private models: writes private models
README.md - Argon2 API → Hash entry points: exposes
SM_Argon2/src/argon2.c - Hash entry points → Memory-hard core: calls core
SM_Argon2/src/argon2.c - Hash entry points → Hash encoding: uses encoding
SM_Argon2/src/argon2.c - Memory-hard core → SM3 hashing: initializes blocks with
SM_Argon2/src/core.c - Memory-hard core → Block mixing: fills memory via
SM_Argon2/src/core.c - Block mixing → BLAKE2 primitives: uses primitives
SM_Argon2/src/ref.c - Block mixing → SM4 mixing: uses mixing
SM_Argon2/src/ref.c - Block mixing → ZUC routines: uses routines
SM_Argon2/src/ref.c