This project provides a management system for classified document workflows based on the KTY04 group signature scheme. It supports anonymous signing, signer tracing (open), claim generation, claim verification, and full audit trails.
- Project usage, installation, permissions, testing, and API map: README.md
- Group creation and key initialization (
grpkey,mgrkey,gml) - Member onboarding via JOIN protocol and member key distribution
- Classified document creation, signing, verification, and archiving
- Anonymous group signatures with optional signer opening by administrators
- Claim generation and claim verification flow
- Audit logging and dashboard statistics
| Capability | Admin | User |
|---|---|---|
| Create groups | Yes | No |
| Add members | Yes | No |
| Open/trace signatures | Yes | No |
| View audit logs | Yes | No |
| Manage system users | Yes | No |
| Sign documents (group signature) | Optional | Yes |
| Verify signatures | Yes | Yes |
| Generate claim | Yes | Yes |
| Verify claim | Yes | Yes |
Regular users only see signing-related features in the UI. Group administration, member management, audit pages, and system user management are hidden from non-admin users.
- Backend: Flask (Python)
- Frontend: HTML + JavaScript + Bootstrap 5
- Storage: SQLite + JSON files
- Group signature library: libgroupsig / pygroupsig
- Python 3.10 or newer
uvfor dependency and virtual environment management
uv syncRecommended:
bash start.shManual start:
uv run python backend/app.pyThen open http://localhost:5000 in your browser.
If pygroupsig import fails:
uv sync --reinstallIf runtime errors occur:
uv run python --version
uv pip list --python .venv/bin/python | grep -E "Flask|cffi|pygroupsig"kty04-secrecy-system/
|- backend/
| |- app.py
| |- api/
| |- utils/
|- data/
| |- groups/
| |- members/
| |- signatures/
|- frontend/
| |- index.html
| |- css/
| |- js/
|- pyproject.toml
| Capability | Admin | User |
|---|---|---|
| Create groups | Yes | No |
| Add members | Yes | No |
| Open/trace signatures | Yes | No |
| View audit logs | Yes | No |
| Manage system users | Yes | No |
| Sign documents (group signature) | Optional | Yes |
| Verify signatures | Yes | Yes |
| Generate claim | Yes | Yes |
| Verify claim | Yes | Yes |
X-User-IDX-Token
POST /api/groups: admin onlyPOST /api/members: admin onlyPOST /api/documents/<id>/signatures/<sig_id>/trace: admin onlyGET /api/audit/logs: admin onlyPOST /api/documents/<id>/sign: authenticated user and target-group membership required
Regular users should not access system management or audit capabilities.
- An admin creates a group and the system generates group key material.
- The admin adds members and completes JOIN protocol steps.
- A user signs a document anonymously with a group signature.
- A verifier checks signature validity without learning signer identity.
- If accountability is required, an admin opens the signature.
- A signer can generate a claim and a verifier can validate it.
The test suite is organized by purpose:
tests/
|- conftest.py
|- functional/
| |- test_auth_and_permissions.py
| |- test_document_flow.py
|- performance/
|- test_api_performance.py
Start the backend before running tests:
uv run python backend/app.pyRun functional tests:
uv run pytest tests/functionalRun performance tests (opt-in):
uv run pytest tests/performance --run-performanceIf the database is not empty and admin-only assertions are needed:
uv run pytest tests/functional --admin-username <admin> --admin-password <password>
uv run pytest tests/performance --run-performance --admin-username <admin> --admin-password <password>POST /api/auth/registerPOST /api/auth/loginGET /api/auth/users(admin)PUT /api/auth/users/<id>/role(admin)
GET /api/groupsPOST /api/groups(admin)GET /api/groups/<id>
GET /api/members(admin)POST /api/members(admin)GET /api/members/<id>(admin)
GET /api/documentsPOST /api/documents(admin)GET /api/documents/<id>POST /api/documents/<id>/signPOST /api/documents/<id>/verifyPOST /api/documents/<id>/signatures/<sig_id>/trace(admin)PUT /api/documents/<id>/status(admin)
GET /api/signaturesPOST /api/signaturesPOST /api/signatures/<id>/verifyPOST /api/signatures/<id>/claimPOST /api/signatures/<id>/claim/verifyPOST /api/signatures/<id>/open(admin)
GET /api/audit/logs(admin)GET /api/audit/stats
- Key material and runtime data are stored under
data/; handle them securely. - This project documentation focuses on management workflows; for low-level library internals, refer to the upstream libgroupsig repository.