Commit Graph

2 Commits

Author SHA1 Message Date
Markus Maiwald 5a79e02684
fix(test_pqxdh): implement real Ed25519 signature generation/validation
Replace stubbed signed_prekey_signature = [0] ** 64 with real Ed25519
cryptographic signatures. This fixes the security-critical signature
validation that was previously bypassed in tests.

Changes:
- Add signEd25519() helper for deterministic Ed25519 signing
- Add verifyEd25519() helper for signature verification
- Generate real identity keypair for Bob (Ed25519)
- Sign Bob's X25519 signed_prekey with his Ed25519 identity key
- Verify signature before using prekey in handshake
- Add dedicated test for Ed25519 signature roundtrip

Security: Prekey bundles now carry cryptographic proof of authenticity.
The signature binds the medium-term signed prekey to the long-term
identity key, preventing MITM attacks during key exchange.

Fixes P0 security audit issue: Stubbed Signature Validation
(closes issue at test_pqxdh.zig:113)
2026-02-09 00:56:02 +01:00
Markus Maiwald 07ccd484f1
refactor: restructure repository with tiered licensing
Major restructuring of libertaria-sdk -> libertaria-stack:

FOLDER REORGANIZATION:
- core/          - L0-L3 layers (Commonwealth LCL-1.0)
  - l0-transport/
  - l1-identity/
  - l2_session/
  - l2-federation/
  - l2-membrane/
- sdk/           - L4+ and bindings (Sovereign LSL-1.0)
  - janus-sdk/
  - l4-feed/
- apps/          - Examples (Unbound LUL-1.0)
  - examples/
- legal/         - All license texts

LICENSES ADDED:
- LICENSE_COMMONWEALTH.md (LCL-1.0) - Viral reciprocity for Core
- LICENSE_SOVEREIGN.md (LSL-1.0) - Business-friendly for SDK
- LICENSE_UNBOUND.md (LUL-1.0) - Maximum freedom for docs/apps

BUILD.ZIG UPDATED:
- All paths updated to new structure
- Examples imports fixed

README.md REWRITTEN:
- Documents new folder structure
- Explains tiered licensing strategy
- Clear SPDX identifiers per component

NO CLA REQUIRED - contributors keep copyright
2026-02-05 20:12:32 +01:00
Renamed from l1-identity/test_pqxdh.zig (Browse further)