Core Crypto Context
The CoreCryptoContext holds the primary CoreCrypto APIs.
An instance of this struct is provided to the closure passed to CoreCryptoFfi::transaction.
Every mutable operation is done through this struct. Operations are buffered in memory and persisted to the keystore when the transaction completes.
Constructors
Functions
Adds members to the conversation using their key packages, sending the resulting commit via the transport.
Adds a Credential to this client.
Commits all pending proposals in the conversation, sending the resulting commit via the transport.
Returns the ciphersuite in use for the given conversation.
Get the credential ref for the given conversation.
Returns the current MLS epoch of the given conversation.
Returns true if a conversation with the given id exists in the local state.
Creates a new MLS group with the given conversation ID, using the specified credential.
Decrypts an MLS message received in the given conversation.
Disables history sharing for the given conversation.
Returns the end-to-end identity verification state of the given conversation.
Returns true if end-to-end identity is enabled for the given ciphersuite.
Returns true if the PKI environment has been set up.
Enables history sharing for the given conversation.
Encrypts a plaintext message for all members of the given conversation.
Derives and exports a secret of key_length bytes for the given conversation.
Get all credentials from this client which match the provided parameters.
Generate a KeyPackage from the referenced credential.
Returns the client ids of all members of the given conversation.
Get all credentials from this client.
Returns the E2EI identity claims for the specified devices in the given conversation.
Returns the serialized public key of the external sender for the given conversation.
Get a reference to each KeyPackage in the database.
Returns the E2EI identity claims for the specified users in the given conversation, grouped by user ID.
Joins an existing conversation by constructing an external commit from the given group info.
Initializes the MLS client with the given client ID and message transport.
Joins a conversation by processing an MLS Welcome message, returning the new conversation's ID.
Decrypts a Proteus ciphertext in the given session, returning the plaintext.
Decrypt a message whether or not the proteus session already exists, and saves the session.
Encrypts a plaintext message in the given Proteus session.
Returns the hex-encoded public key fingerprint of this device's Proteus identity.
Returns the hex-encoded local public key fingerprint for the Proteus session with the given ID.
Returns the hex-encoded remote public key fingerprint for the Proteus session with the given ID.
Initializes the Proteus client.
Returns the CBOR-serialized last resort prekey bundle, creating it if it does not yet exist.
Creates a new Proteus prekey with the given ID and returns its CBOR-serialized bundle.
Creates a new Proteus prekey with an automatically assigned ID and returns its CBOR-serialized bundle.
Reloads all Proteus sessions from the keystore into memory.
Deletes the Proteus session with the given ID from local storage.
Returns true if a Proteus session with the given ID exists in local storage.
Creates a new Proteus session from an incoming encrypted message, returning the decrypted message payload.
Creates a new Proteus session from the given prekey bundle bytes, stored under the given session ID.
Saves the Proteus session with the given ID to the keystore.
Generates len random bytes from the cryptographically secure RNG.
Removes the specified clients from the conversation, sending the resulting commit via the transport.
Removes a Credential from this client.
Remove a KeyPackage from the database.
Remove all KeyPackages associated with this credential ref.
Set the credential ref for the given conversation.
Updates this client's key material in the conversation by sending an update commit.
Destroys the local state of the given conversation; it can no longer be used locally after this call.