Module prelude

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.
AddProposalIn
Add Proposal.
ApplicationIdExtension
Application Identifiers
ApplicationMessage
Application message received through a ProcessedMessage.
BasicCredential
Basic Credential.
Capabilities
Capabilities of [LeafNode]s.
CapabilitiesBuilder
A helper for building Capabilities
Certificate
X.509 Certificate.
CommitBuilder
The CommitBuilder is used to easily and dynamically build commit messages. It operates in a series of stages:
CommitMessageBundle
Contains the messages that are produced by committing. The messages can be accessed individually using getters or through the IntoIterator interface.
Complete
This stage is after we validated the data, ready for staging and exporting the messages
ConfirmationTag
Confirmation tag field of PublicMessage. For type safety this is a wrapper around a Mac.
Credential
Credential.
CredentialWithKey
A wrapper around a credential with a corresponding public key.
CustomProposal
A custom proposal with semantics to be implemented by the application.
EncryptedGroupSecrets
EncryptedGroupSecrets
ErrorString
A wrapper struct for an error string. This can be used when no complex error variant is needed.
ExporterSecret
Extensions
A list of extensions with unique extension types.
ExternalCommitBuilder
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.
ExternalInitProposal
ExternalInit Proposal.
ExternalProposal
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
ExternalPubExtension
ExternalSender
ExternalSender
GroupContext
8.1 Group Context
GroupContextExtensionProposal
GroupContextExtensions Proposal.
GroupEpoch
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.
HpkeCiphertext
7.7. Update Paths
HpkeConfig
Convenience tuple struct for an HPKE configuration.
HpkeKeyPair
Helper holding a (private, public) key pair as byte vectors.
HpkePrivateKey
A simple type for HPKE private keys.
InitKey
Init key for HPKE.
Initial
This stage is for populating the builder.
InterimTranscriptHash
This is a wrapper type, because we can’t implement the storage traits on Vec<u8>.
JoinBuilder
Builder for joining a group.
JoinProposal
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.
KeyPackageBuilder
Builder that helps creating (and configuring) a KeyPackage.
KeyPackageBundle
A KeyPackageBundle contains a KeyPackage and the init and encryption private key.
KeyPackageIn
The key package struct.
LastResortExtension
LeafNode
This struct implements the MLS leaf node.
LeafNodeIndex
LeafNodeIndex references a leaf node in a tree.
LeafNodeParameters
Parameters for a leaf node that can be chosen by the application.
LibraryError
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.
LoadedPsks
This stage is after the PSKs were loaded, ready for validation
Member
A member in the group is identified by this Member struct.
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 MlsGroup represents 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.
MlsGroupBuilder
Builder struct for an MlsGroup.
MlsGroupCreateConfig
Specifies configuration for the creation of an MlsGroup. Refer to the User Manual for more information about the different configuration values.
MlsGroupCreateConfigBuilder
Builder for an MlsGroupCreateConfig.
MlsGroupJoinConfig
The MlsGroupJoinConfig contains 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, use MlsGroupCreateConfig.
MlsGroupJoinConfigBuilder
Builder struct for an MlsGroupJoinConfig.
MlsMessageIn
Before use with the MlsGroup API, the message has to be unpacked via extract to yield its MlsMessageBodyIn.
MlsMessageOut
An MlsMessageOut is typically returned from an MlsGroup function and meant to be serialized and sent to the DS.
NewSignerBundle
Bundle consisting of a [Signer] and a CredentialWithKey to be used to update the signature key in an [MlsGroup]. The public key and credential in credential_with_key MUST match the signature key exposed by signer.
OpenMlsSignaturePublicKey
A public signature key.
ParentNode
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.
PreSharedKeyProposal
PreSharedKey Proposal.
PrivateMessage
PrivateMessage is the framing struct for an encrypted PublicMessage. This message format is meant to be sent to and received from the Delivery Service.
PrivateMessageIn
PrivateMessage is the framing struct for an encrypted PublicMessage. This message format is meant to be sent to and received from the Delivery Service.
ProcessedMessage
A message that has passed all syntax and semantics checks.
ProcessedWelcome
A Welcome message that has been processed but not staged yet.
ProposalQueue
Proposal queue that helps filtering and sorting Proposals received during one epoch. The Proposals are stored in a HashMap which maps Proposal references to Proposals, such that, given a reference, a proposal can be accessed efficiently. To enable iteration over the queue in order, the ProposalQueue also contains a vector of ProposalRefs.
ProposalStore
A ProposalStore can store the standalone proposals that are received from the DS in between two commit messages.
PublicGroup
This struct holds all public values of an MLS group.
PublicMessage
PublicMessage is a framing structure for MLS messages. It can contain Proposals, Commits and application messages.
PublicMessageIn
PublicMessageIn is a framing structure for MLS messages. It can contain Proposals, Commits and application messages.
QueuedAddProposal
A queued Add proposal
QueuedProposal
Alternative representation of a Proposal, where the sender is extracted from the encapsulating PublicMessage and the ProposalRef is attached.
QueuedPskProposal
A queued PresharedKey proposal
QueuedRemoveProposal
A queued Remove proposal
QueuedUpdateProposal
A queued Update proposal
RatchetTreeExtension
Ratchet Tree Extension.
RatchetTreeIn
A ratchet tree made of unverified nodes. This is used for deserialization and verification.
ReInitProposal
ReInit Proposal.
RemoveProposal
Remove Proposal.
RequiredCapabilitiesExtension
Required Capabilities Extension.
SecretTlsVecU8
SecretTlsVecU16
SecretTlsVecU24
SecretTlsVecU32
SecretVLBytes
A wrapper struct around VLBytes that implements [ZeroizeOnDrop]. It behaves just like VLBytes, except that it doesn’t allow conversion into a Vec<u8>.
SenderExtensionIndex
Identifies an external sender in the ExternalSendersExtension.
SenderRatchetConfiguration
Stores the configuration parameters for DecryptionRatchets.
SignContent
Labeled signature content.
Signature
Signature.
SignaturePublicKey
A public signature key.
StagedCommit
Contains the changes from a commit to the group state.
StagedWelcome
A StagedWelcome can be inspected and then turned into a MlsGroup. This allows checking who authored the Welcome message.
TlsByteSliceU8
TlsByteSliceU16
TlsByteSliceU24
TlsByteSliceU32
TlsByteVecU8
TlsByteVecU16
TlsByteVecU24
TlsByteVecU32
TlsSliceU8
TlsSliceU16
TlsSliceU24
TlsSliceU32
TlsVecU8
TlsVecU16
TlsVecU24
TlsVecU32
U24
A 3 byte wide unsigned integer type as defined in RFC 5246.
UnknownExtension
A unknown/unparsed extension represented by raw bytes.
UpdateProposal
Update Proposal.
UpdateProposalIn
Update Proposal.
VLByteSlice
VLBytes
Variable-length encoded byte vectors. Use this struct if bytes are encoded. This is faster than the generic version.
VerifiableCiphersuite
A currently unknown ciphersuite.
Welcome
Welcome message
WelcomeCommitMessages
The result of a commit with an add proposal. This includes
WireFormatPolicy
Defines what wire format is desired for outgoing handshake messages. Note that application messages must always be encrypted.

Enums§

AddMembersError
Add members error
AeadType
AEAD types
ApplyUpdatePathError
Apply update path error
BasicCredentialError
An error that occurs in methods of a super::Credential.
CapabilitiesExtensionError
Capabilities extension error
Ciphersuite
MLS ciphersuites.
CommitBuilderStageError
Stage commit error
CommitToPendingProposalsError
Commit to pending proposals error
ContentType
CreateAddProposalError
Create add proposal error
CreateCommitError
Create commit error
CreateGroupContextExtProposalError
Create group context ext proposal error
CreateMessageError
Create message error
CreationFromExternalError
Public group creation from external error.
CredentialError
An error that occurs in methods of a super::Credential.
CredentialType
CredentialType.
CryptoError
Crypto errors.
EmptyInputError
EmptyInput error
Error
Errors that are thrown by this crate.
ExportGroupInfoError
Errors that can happen when exporting a group info object.
ExportSecretError
Export secret error
Extension
Extension
ExtensionError
Extension error
ExtensionType
MLS Extension Types
ExternalCommitBuilderError
Error type for the ExternalCommitBuilder.
ExternalCommitBuilderFinalizeError
Stage commit error
ExternalCommitError
External Commit error
ExternalCommitValidationError
External Commit validaton error
GroupContextExtensionsProposalValidationError
Error validation a GroupContextExtensions proposal.
GroupSecretsError
Error related to group secrets.
HashType
Hash types
HpkeAeadType
AEAD Types for HPKE.
HpkeKdfType
KDF Types for HPKE
HpkeKemType
KEM Types for HPKE
IncomingWireFormatPolicy
Defines what wire format is acceptable for incoming handshake messages. Note that application messages must always be encrypted.
InvalidExtensionError
Invalid extension error
KeyPackageExtensionSupportError
KeyPackage extension support error
KeyPackageIdError
KeyPackage Id error
KeyPackageNewError
KeyPackage new error
KeyPackageVerifyError
KeyPackage verify error
LeafNodeLifetimePolicy
Verify or skip the validation of leaf node lifetimes in the ratchet tree when joining a group.
LeaveGroupError
Leave group error
MergeCommitError
Error merging a commit.
MergePendingCommitError
Error merging pending commit
MlsGroupState
MlsGroupState determines the state of an MlsGroup. The different states and their transitions are as follows:
MlsGroupStateError
Group state error
MlsMessageBodyIn
MLSMessage (Body)
MlsMessageBodyOut
MLSMessage (Body)
NewGroupError
New group error
Node
Container enum for leaf and parent nodes.
OutgoingWireFormatPolicy
Defines what wire format should be used for outgoing handshake messages. Note that application messages must always be encrypted.
ParentHashError
Parent hash error
PendingCommitState
Pending Commit state. Differentiates between Commits issued by group members and External Commits.
ProcessMessageError
Process message error
ProcessedMessageContent
Content of a processed message.
Proposal
Proposal.
ProposalError
Proposal error
ProposalIn
Proposal.
ProposalOrRefType
11.2 Commit
ProposalType
MLS Proposal Types
ProposalValidationError
Proposal validation error
ProposeAddMemberError
Propose add members error
ProposePskError
Propose PSK error
ProposeRemoveMemberError
Propose remove members error
ProposeSelfUpdateError
Propose self update error
ProtocolMessage
Enum containing a message for use with process_message and an MlsGroup. Both PublicMessage and PrivateMessage implement Into<ProtocolMessage>.
ProtocolVersion
Protocol Version
PublicGroupBuildError
Public group builder error.
PublicProcessMessageError
Process message error
PublicTreeError
Public tree error
RatchetTreeError
Ratchet tree error
RemoveMembersError
Remove members error
RemoveOperation
Helper enum that 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.
RemoveProposalError
Remove proposal error
SelfUpdateError
Self update error
Sender
All possible sender types according to the MLS protocol spec.
SignatureError
Signature generation and verification errors. The only information relayed with this error is whether the signature verification or generation failed.
SignatureScheme
SignatureScheme according to IANA TLS parameters
StageCommitError
Stage Commit error
SwapMembersError
Add members error
UpdateGroupMembershipError
Update group membership error
ValidationError
Validation error
VersionError
Version Error
WelcomeError
Welcome error
WireFormat
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§

DeserializeBytes
The DeserializeBytes trait defines functions to deserialize a byte slice to a struct or enum. In contrast to Deserialize, this trait operates directly on byte slices and can return any remaining bytes.
OpenMlsCrypto
OpenMlsProvider
The OpenMLS Crypto Provider Trait
OpenMlsRand
SerializeBytes
The SerializeBytes trait provides a function to serialize a struct or enum.
Signable
The Signable trait is implemented by all struct that are being signed. The implementation has to provide the unsigned_payload function.
SignedStruct
This trait must be implemented by all structs that contain a self-signature.
Size
The Size trait 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 verify method is provided. The unsigned_payload and signature functions have to be implemented for each struct, returning the serialized payload and the signature respectively.
VerifiedStruct
This marker trait must be implemented by all structs that contain a verified self-signature.

Type Aliases§

ExternalSendersExtension
ExternalSender (extension data)
HpkePublicKey
A simple type for HPKE public keys using VLBytes for (de)serializing.
KemOutput
KeyPackageRef
A reference to a key package. This value uniquely identifies a key package.

Derive Macros§

TlsDeserialize
TlsDeserializeBytes
TlsSerialize
TlsSerializeBytes
TlsSize