Classes
The following classes are available globally.
-
CoreCrypto client which manages one cryptographic client for proteus and MLS.
See moreDeclaration
Swift
public final class CoreCrypto : CoreCryptoFfi, CoreCryptoProtocol, @unchecked Sendable -
The PKI environment used for certificate management during X509 credential acquisition.
See moreDeclaration
Swift
open class PkiEnvironment : PkiEnvironmentProtocol, @unchecked Sendable -
The database acting as a core crypto keystore.
See moreDeclaration
Swift
open class Database : DatabaseProtocol, @unchecked Sendable -
A unique identifier for an MLS client.
Each app instance a user is running, such as desktop or mobile, is a separate client with its own client id. A single user may therefore have multiple clients. More information: https://messaginglayersecurity.rocks/mls-architecture/draft-ietf-mls-architecture.html#name-group-members-and-clients
See moreDeclaration
Swift
open class ClientId : ClientIdProtocol, @unchecked Sendable -
A unique identifier for a single conversation.
The backend provides an opaque string identifying a new conversation. Construct an instance of this newtype to pass that identifier to Rust.
See moreDeclaration
Swift
open class ConversationId : ConversationIdProtocol, @unchecked Sendableextension ConversationId: CustomDebugStringConvertibleextension ConversationId: CustomStringConvertibleextension ConversationId: Equatableextension ConversationId: Hashable -
A
CoreCryptoCommandhas anexecutemethod which accepts aCoreCryptoContextand returns nothing.It is the argument to a
See moreCoreCrypto::transactioncall.Declaration
Swift
open class CoreCryptoCommandImpl : CoreCryptoCommand, @unchecked Sendable -
The
CoreCryptoContextholds the primaryCoreCryptoAPIs.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.
See moreDeclaration
Swift
open class CoreCryptoContext : CoreCryptoContextProtocol, @unchecked Sendable -
CoreCrypto wraps around MLS and Proteus implementations and provides a transactional interface for each.
See moreDeclaration
Swift
open class CoreCryptoFfi : CoreCryptoFfiProtocol, @unchecked Sendable -
A callback interface for forwarding CoreCrypto log messages to the platform’s logging system.
See moreDeclaration
Swift
open class CoreCryptoLoggerImpl : CoreCryptoLogger, @unchecked Sendable -
A cryptographic credential.
This is tied to a particular client via either its client id or certificate bundle, depending on its credential type, but is independent of any client instance or storage.
To attach a credential to a client instance and store it, call
See moreadd_credentialon aCoreCryptoContext.Declaration
Swift
open class Credential : CredentialProtocol, @unchecked Sendable -
A compact reference to a credential that has been persisted in CoreCrypto.
Credentials can be quite large; this type avoids passing them back and forth across the FFI boundary more than strictly required.
Created by calling
add_credentialon aCoreCryptoContext.This reference is not a literal in-memory reference. It is instead the key from which a credential can be retrieved, and is stable over time and across the FFI boundary.
See moreDeclaration
Swift
open class CredentialRef : CredentialRefProtocol, @unchecked Sendableextension CredentialRef: CustomDebugStringConvertible -
The key used to encrypt the database.
See moreDeclaration
Swift
open class DatabaseKey : DatabaseKeyProtocol, @unchecked Sendableextension DatabaseKey: Equatable -
An
See moreEpochObserveris notified whenever a conversation’s epoch changes.Declaration
Swift
open class EpochObserverImpl : EpochObserver, @unchecked Sendable -
The raw public key of an external sender.
This can be used to initialize a subconversation.
See moreDeclaration
Swift
open class ExternalSenderKey : ExternalSenderKeyProtocol, @unchecked Sendableextension ExternalSenderKey: CustomStringConvertibleextension ExternalSenderKey: Equatableextension ExternalSenderKey: Hashable -
MLS Group Information
This is used when joining by external commit. It can be found within the
See moreGroupInfoBundlewithin aCommitBundle.Declaration
Swift
open class GroupInfo : GroupInfoProtocol, @unchecked Sendableextension GroupInfo: CustomStringConvertibleextension GroupInfo: Equatableextension GroupInfo: Hashable -
A
See moreHistoryObserveris notified whenever a new history client is created.Declaration
Swift
open class HistoryObserverImpl : HistoryObserver, @unchecked Sendable -
A signed object describing a client’s identity and capabilities.
Includes a public key that can be used to encrypt to that client. Other clients can use a client’s KeyPackage to introduce that client to a new group.
See moreDeclaration
Swift
open class Keypackage : KeypackageProtocol, @unchecked Sendable -
A lightweight distinct reference to a
KeyPackage, sufficient to uniquely identify it.This contains some metadata to assist in sorting and filtering refs without needing to perform the relatively heavy operation of converting to a full keypackage.
See moreDeclaration
Swift
open class KeypackageRef : KeypackageRefProtocol, @unchecked Sendable -
Used by CoreCrypto to send commits or application messages to the delivery service.
This trait must be implemented before calling any functions that produce commits.
See moreDeclaration
Swift
open class MlsTransportImpl : MlsTransport, @unchecked Sendable -
Callbacks for external calls made by CoreCrypto during X509 credential acquisition.
When communicating with the Identity Provider (IDP) and Wire server, CoreCrypto delegates to the client app by calling the relevant methods.
Client App CoreCrypto Acme IDP | | | | | X509CredentialAcquisition().finalize() | | |————————–>| | | | | GET acme/root.pem | | | |————————> | | | | 200 OK | | | |<———————— | | | authenticate() | | | |<————————–| | | | | Authentication flow | | | —————————————————————————-> | |<—————————————————————————– | | return Success [PKiEnvironmentHooks.authenticate()] | | |<————————–| | | | | (excluded several calls for brevity) | | return Success(Credential) [X509CredentialAcquisition().finalize()] | |<————————–| | |
See moreDeclaration
Swift
open class PkiEnvironmentHooksImpl : PkiEnvironmentHooks, @unchecked Sendable -
Declaration
Swift
open class SecretKey : SecretKeyProtocol, @unchecked Sendableextension SecretKey: CustomStringConvertibleextension SecretKey: Equatableextension SecretKey: Hashable -
A TLS-serialized Welcome message.
This structure is defined in RFC 9420: https://www.rfc-editor.org/rfc/rfc9420.html#joining-via-welcome-message.
See moreDeclaration
Swift
open class Welcome : WelcomeProtocol, @unchecked Sendableextension Welcome: CustomStringConvertibleextension Welcome: Equatableextension Welcome: Hashable
Classes Reference