Module prelude
Expand description
Single place, re-exporting the most used public functions. Prelude for OpenMLS. Include this to get access to all the public functions of OpenMLS.
Modules§
- tls_
codec - RustCrypto: TLS Codec
Structs§
- AddProposal
- Add Proposal.
- AddProposal
In - Add Proposal.
- Application
IdExtension - Application Identifiers
- Application
Message - Application message received through a ProcessedMessage.
- Basic
Credential - Basic Credential.
- Capabilities
- Capabilities of [
LeafNode]s. - Capabilities
Builder - A helper for building
Capabilities - Certificate
- X.509 Certificate.
- Commit
Builder - The
CommitBuilderis used to easily and dynamically build commit messages. It operates in a series of stages: - Commit
Message Bundle - Contains the messages that are produced by committing. The messages can be accessed individually
using getters or through the
IntoIteratorinterface. - Complete
- This stage is after we validated the data, ready for staging and exporting the messages
- Confirmation
Tag - Confirmation tag field of PublicMessage. For type safety this is a wrapper
around a
Mac. - Credential
- Credential.
- Credential
With Key - A wrapper around a credential with a corresponding public key.
- Custom
Proposal - A custom proposal with semantics to be implemented by the application.
- Encrypted
Group Secrets - EncryptedGroupSecrets
- Error
String - A wrapper struct for an error string. This can be used when no complex error variant is needed.
- Exporter
Secret - Extensions
- A list of extensions with unique extension types.
- External
Commit Builder - This is the builder for external commits. It allows you to build an external commit that can be used to join a group externally. Parameters such as optional SelfRemove proposals from other members, the ratchet tree, and the group join configuration can be set in the first builder stage.
- External
Init Proposal - ExternalInit Proposal.
- External
Proposal - External Proposal where sender is External. A party outside the group can request to add or remove a member to the group. This proposal should then be committed by a group member. The sender must be pre configured within the group through the crate::extensions::ExternalSendersExtension
- External
PubExtension - External
Sender - ExternalSender
- Group
Context - 8.1 Group Context
- Group
Context Extension Proposal - GroupContextExtensions Proposal.
- Group
Epoch - Group epoch. Internally this is stored as a
u64. The group epoch is incremented with every valid Commit that is merged into the group state. - GroupId
- A group ID. The group ID is chosen by the creator of the group and should be globally unique.
- Hpke
Ciphertext - 7.7. Update Paths
- Hpke
Config - Convenience tuple struct for an HPKE configuration.
- Hpke
KeyPair - Helper holding a (private, public) key pair as byte vectors.
- Hpke
Private Key - A simple type for HPKE private keys.
- InitKey
- Init key for HPKE.
- Initial
- This stage is for populating the builder.
- Interim
Transcript Hash - This is a wrapper type, because we can’t implement the storage traits on
Vec<u8>. - Join
Builder - Builder for joining a group.
- Join
Proposal - External Add Proposal where sender is NewMemberProposal. A client outside the group can request joining the group. This proposal should then be committed by a group member. Note that this is unconstrained i.e. it works for any MLS group. This is not the case for the same external proposal with a Preconfigured sender
- KeyPackage
- The key package struct.
- KeyPackage
Builder - Builder that helps creating (and configuring) a
KeyPackage. - KeyPackage
Bundle - A
KeyPackageBundlecontains aKeyPackageand the init and encryption private key. - KeyPackage
In - The key package struct.
- Last
Resort Extension - Leaf
Node - This struct implements the MLS leaf node.
- Leaf
Node Index - LeafNodeIndex references a leaf node in a tree.
- Leaf
Node Parameters - Parameters for a leaf node that can be chosen by the application.
- Library
Error - Generic error type that indicates unrecoverable errors in the library.
- Lifetime
- The lifetime represents the times between which clients will consider a KeyPackage valid. This time is represented as an absolute time, measured in seconds since the Unix epoch (1970-01-01T00:00:00Z). A client MUST NOT use the data in a KeyPackage for any processing before the not_before date, or after the not_after date.
- Loaded
Psks - This stage is after the PSKs were loaded, ready for validation
- Member
- A member in the group is identified by this
Memberstruct. - Metadata
- Metadata is an extension that keeps arbitrary application-specific metadata, in the form of a byte sequence. The application is responsible for specifying a format and parsing the contents.
- MlsGroup
- A
MlsGrouprepresents an MLS group with a high-level API. The API exposes high level functions to manage a group by adding/removing members, get the current member list, etc. - MlsGroup
Builder - Builder struct for an
MlsGroup. - MlsGroup
Create Config - Specifies configuration for the creation of an
MlsGroup. Refer to the User Manual for more information about the different configuration values. - MlsGroup
Create Config Builder - Builder for an
MlsGroupCreateConfig. - MlsGroup
Join Config - The
MlsGroupJoinConfigcontains all configuration parameters that are relevant to group operation at runtime. It is used to configure the group’s behaviour when joining an existing group. To configure a newly created group, useMlsGroupCreateConfig. - MlsGroup
Join Config Builder - Builder struct for an
MlsGroupJoinConfig. - MlsMessage
In - Before use with the
MlsGroupAPI, the message has to be unpacked viaextractto yield itsMlsMessageBodyIn. - MlsMessage
Out - An
MlsMessageOutis typically returned from anMlsGroupfunction and meant to be serialized and sent to the DS. - NewSigner
Bundle - Bundle consisting of a [
Signer] and aCredentialWithKeyto be used to update the signature key in an [MlsGroup]. The public key and credential incredential_with_keyMUST match the signature key exposed bysigner. - Open
MlsSignature Public Key - A public signature key.
- Parent
Node - This struct implements the MLS parent node. It contains its public key, parent hash and unmerged leaves. Additionally, it may contain the private key corresponding to the public key.
- PreShared
KeyProposal - PreSharedKey Proposal.
- Private
Message PrivateMessageis the framing struct for an encryptedPublicMessage. This message format is meant to be sent to and received from the Delivery Service.- Private
Message In PrivateMessageis the framing struct for an encryptedPublicMessage. This message format is meant to be sent to and received from the Delivery Service.- Processed
Message - A message that has passed all syntax and semantics checks.
- Processed
Welcome - A
Welcomemessage that has been processed but not staged yet. - Proposal
Queue - Proposal queue that helps filtering and sorting Proposals received during
one epoch. The Proposals are stored in a
HashMapwhich maps Proposal references to Proposals, such that, given a reference, a proposal can be accessed efficiently. To enable iteration over the queue in order, theProposalQueuealso contains a vector ofProposalRefs. - Proposal
Store - A ProposalStore can store the standalone proposals that are received from the DS in between two commit messages.
- Public
Group - This struct holds all public values of an MLS group.
- Public
Message PublicMessageis a framing structure for MLS messages. It can contain Proposals, Commits and application messages.- Public
Message In PublicMessageInis a framing structure for MLS messages. It can contain Proposals, Commits and application messages.- Queued
AddProposal - A queued Add proposal
- Queued
Proposal - Alternative representation of a Proposal, where the sender is extracted from the encapsulating PublicMessage and the ProposalRef is attached.
- Queued
PskProposal - A queued PresharedKey proposal
- Queued
Remove Proposal - A queued Remove proposal
- Queued
Update Proposal - A queued Update proposal
- Ratchet
Tree Extension - Ratchet Tree Extension.
- Ratchet
Tree In - A ratchet tree made of unverified nodes. This is used for deserialization and verification.
- ReInit
Proposal - ReInit Proposal.
- Remove
Proposal - Remove Proposal.
- Required
Capabilities Extension - Required Capabilities Extension.
- Secret
TlsVec U8 - Secret
TlsVec U16 - Secret
TlsVec U24 - Secret
TlsVec U32 - SecretVL
Bytes - A wrapper struct around
VLBytesthat implements [ZeroizeOnDrop]. It behaves just likeVLBytes, except that it doesn’t allow conversion into aVec<u8>. - Sender
Extension Index - Identifies an external sender in the
ExternalSendersExtension. - Sender
Ratchet Configuration - Stores the configuration parameters for
DecryptionRatchets. - Sign
Content - Labeled signature content.
- Signature
- Signature.
- Signature
Public Key - A public signature key.
- Staged
Commit - Contains the changes from a commit to the group state.
- Staged
Welcome - A
StagedWelcomecan be inspected and then turned into aMlsGroup. This allows checking who authored the Welcome message. - TlsByte
Slice U8 - TlsByte
Slice U16 - TlsByte
Slice U24 - TlsByte
Slice U32 - TlsByte
VecU8 - TlsByte
VecU16 - TlsByte
VecU24 - TlsByte
VecU32 - TlsSlice
U8 - TlsSlice
U16 - TlsSlice
U24 - TlsSlice
U32 - TlsVec
U8 - TlsVec
U16 - TlsVec
U24 - TlsVec
U32 - U24
- A 3 byte wide unsigned integer type as defined in RFC 5246.
- Unknown
Extension - A unknown/unparsed extension represented by raw bytes.
- Update
Proposal - Update Proposal.
- Update
Proposal In - Update Proposal.
- VLByte
Slice - VLBytes
- Variable-length encoded byte vectors. Use this struct if bytes are encoded. This is faster than the generic version.
- Verifiable
Ciphersuite - A currently unknown ciphersuite.
- Welcome
- Welcome message
- Welcome
Commit Messages - The result of a commit with an add proposal. This includes
- Wire
Format Policy - Defines what wire format is desired for outgoing handshake messages. Note that application messages must always be encrypted.
Enums§
- AddMembers
Error - Add members error
- Aead
Type - AEAD types
- Apply
Update Path Error - Apply update path error
- Basic
Credential Error - An error that occurs in methods of a
super::Credential. - Capabilities
Extension Error - Capabilities extension error
- Ciphersuite
- MLS ciphersuites.
- Commit
Builder Stage Error - Stage commit error
- Commit
ToPending Proposals Error - Commit to pending proposals error
- Content
Type - Create
AddProposal Error - Create add proposal error
- Create
Commit Error - Create commit error
- Create
Group Context ExtProposal Error - Create group context ext proposal error
- Create
Message Error - Create message error
- Creation
From External Error - Public group creation from external error.
- Credential
Error - An error that occurs in methods of a
super::Credential. - Credential
Type - CredentialType.
- Crypto
Error - Crypto errors.
- Empty
Input Error - EmptyInput error
- Error
- Errors that are thrown by this crate.
- Export
Group Info Error - Errors that can happen when exporting a group info object.
- Export
Secret Error - Export secret error
- Extension
- Extension
- Extension
Error - Extension error
- Extension
Type - MLS Extension Types
- External
Commit Builder Error - Error type for the
ExternalCommitBuilder. - External
Commit Builder Finalize Error - Stage commit error
- External
Commit Error - External Commit error
- External
Commit Validation Error - External Commit validaton error
- Group
Context Extensions Proposal Validation Error - Error validation a GroupContextExtensions proposal.
- Group
Secrets Error - Error related to group secrets.
- Hash
Type - Hash types
- Hpke
Aead Type - AEAD Types for HPKE.
- Hpke
KdfType - KDF Types for HPKE
- Hpke
KemType - KEM Types for HPKE
- Incoming
Wire Format Policy - Defines what wire format is acceptable for incoming handshake messages. Note that application messages must always be encrypted.
- Invalid
Extension Error - Invalid extension error
- KeyPackage
Extension Support Error - KeyPackage extension support error
- KeyPackage
IdError - KeyPackage Id error
- KeyPackage
NewError - KeyPackage new error
- KeyPackage
Verify Error - KeyPackage verify error
- Leaf
Node Lifetime Policy - Verify or skip the validation of leaf node lifetimes in the ratchet tree when joining a group.
- Leave
Group Error - Leave group error
- Merge
Commit Error - Error merging a commit.
- Merge
Pending Commit Error - Error merging pending commit
- MlsGroup
State MlsGroupStatedetermines the state of anMlsGroup. The different states and their transitions are as follows:- MlsGroup
State Error - Group state error
- MlsMessage
Body In - MLSMessage (Body)
- MlsMessage
Body Out - MLSMessage (Body)
- NewGroup
Error - New group error
- Node
- Container enum for leaf and parent nodes.
- Outgoing
Wire Format Policy - Defines what wire format should be used for outgoing handshake messages. Note that application messages must always be encrypted.
- Parent
Hash Error - Parent hash error
- Pending
Commit State - Pending Commit state. Differentiates between Commits issued by group members and External Commits.
- Process
Message Error - Process message error
- Processed
Message Content - Content of a processed message.
- Proposal
- Proposal.
- Proposal
Error - Proposal error
- Proposal
In - Proposal.
- Proposal
OrRef Type - 11.2 Commit
- Proposal
Type - MLS Proposal Types
- Proposal
Validation Error - Proposal validation error
- Propose
AddMember Error - Propose add members error
- Propose
PskError - Propose PSK error
- Propose
Remove Member Error - Propose remove members error
- Propose
Self Update Error - Propose self update error
- Protocol
Message - Enum containing a message for use with
process_messageand anMlsGroup. BothPublicMessageandPrivateMessageimplementInto<ProtocolMessage>. - Protocol
Version - Protocol Version
- Public
Group Build Error - Public group builder error.
- Public
Process Message Error - Process message error
- Public
Tree Error - Public tree error
- Ratchet
Tree Error - Ratchet tree error
- Remove
Members Error - Remove members error
- Remove
Operation - Helper
enumthat classifies the kind of remove operation. This can be used to better interpret the semantic value of a remove proposal that is covered in a Commit message. - Remove
Proposal Error - Remove proposal error
- Self
Update Error - Self update error
- Sender
- All possible sender types according to the MLS protocol spec.
- Signature
Error - Signature generation and verification errors. The only information relayed with this error is whether the signature verification or generation failed.
- Signature
Scheme - SignatureScheme according to IANA TLS parameters
- Stage
Commit Error - Stage Commit error
- Swap
Members Error - Add members error
- Update
Group Membership Error - Update group membership error
- Validation
Error - Validation error
- Version
Error - Version Error
- Welcome
Error - Welcome error
- Wire
Format - Wire format of MLS messages.
Constants§
- MIXED_
CIPHERTEXT_ WIRE_ FORMAT_ POLICY - Incoming wire formats can be mixed while outgoing wire formats are always ciphertext.
- MIXED_
PLAINTEXT_ WIRE_ FORMAT_ POLICY - Incoming wire formats can be mixed while outgoing wire formats are always plaintext.
- PURE_
CIPHERTEXT_ WIRE_ FORMAT_ POLICY - Incoming and outgoing wire formats are always ciphertext.
- PURE_
PLAINTEXT_ WIRE_ FORMAT_ POLICY - Incoming and outgoing wire formats are always plaintext.
- WIRE_
FORMAT_ POLICIES - All valid wire format policy combinations.
Traits§
- Deserialize
Bytes - The
DeserializeBytestrait defines functions to deserialize a byte slice to a struct or enum. In contrast toDeserialize, this trait operates directly on byte slices and can return any remaining bytes. - Open
MlsCrypto - Open
MlsProvider - The OpenMLS Crypto Provider Trait
- Open
MlsRand - Serialize
Bytes - The
SerializeBytestrait provides a function to serialize a struct or enum. - Signable
- The
Signabletrait is implemented by all struct that are being signed. The implementation has to provide theunsigned_payloadfunction. - Signed
Struct - This trait must be implemented by all structs that contain a self-signature.
- Size
- The
Sizetrait needs to be implemented by any struct that should be efficiently serialized. This allows to collect the length of a serialized structure before allocating memory. - Verifiable
- The verifiable trait must be implemented by any struct that is signed with
a credential. The actual
verifymethod is provided. Theunsigned_payloadandsignaturefunctions have to be implemented for each struct, returning the serialized payload and the signature respectively. - Verified
Struct - This marker trait must be implemented by all structs that contain a verified self-signature.
Type Aliases§
- External
Senders Extension - ExternalSender (extension data)
- Hpke
Public Key - A simple type for HPKE public keys using
VLBytesfor (de)serializing. - KemOutput
- KeyPackage
Ref - A reference to a key package. This value uniquely identifies a key package.