pyMLS is a Python implementation of the Message Layer Security (MLS) protocol, designed for secure and efficient group messaging. This project aims to adhere to the RFC 9420 standard.
- HandshakeMessages: Add, Update, Remove, Commit message handling with RFC-compliant structures.
- KeyPackage: Construction, signing, serialization, and validation.
- KeySchedule: Epoch secret derivation with support for PSK injection.
- MessageFraming: Encoding/decoding for Public and Private messages with AES-GCM encryption.
- Proposals: AddProposal, UpdateProposal, RemoveProposal with validation.
- RatchetTree: Efficient group state management through tree-based cryptography.
- SecretTree: Secure key and nonce derivation for handshake and application messages.
- TranscriptHashManager: Ensures transcript consistency across group state transitions.
- WelcomeMessage: Secure group creation and member onboarding.
- Add detailed validation for fields (e.g., HPKE key checks, signature expiration).
- Incorporate support for pre-shared keys (PSKs) for external initialization.
- Complete integration with the
SecretTreefor encryption key derivation. - Validate derived secrets against expected outputs for compliance with RFC Section 9.1.
- Add robust nonce management to prevent AES-GCM nonce reuse.
- Implement padding mechanisms to obscure message length (Section 15.1).
- Validate proposal inputs (e.g., KeyPackages in AddProposal) against group capabilities.
- Implement proposal list validation checks (RFC Section 12.2).
- Add functions for validating parent and tree hash calculations (Sections 7.8 and 7.9).
- Implement synchronization mechanisms for distributed tree views (Section 7.5).
- Enforce deletion schedules for leaf nodes (Section 9.2).
- Enhance support for epoch transitions and synchronization.
- Add base hash integrity checks for stronger validation.
- Add support for group context extensions (Section 11.1).
- Improve validation for encrypted fields (e.g., nonce and ciphertext checks) to ensure consistency.
Contributions are welcome! Please create an issue or submit a pull request.