Package-level declarations

Types

Link copied to clipboard
data class BufferedDecryptedMessage(var message: ByteArray?, var isActive: Boolean, var commitDelay: ULong?, var senderClientId: ClientId?, var identity: WireIdentity) : Disposable

A decrypted message that was buffered due to out-of-order delivery by the distribution service.

Link copied to clipboard
data class BuildMetadata(var timestamp: String, var cargoDebug: String, var cargoFeatures: String, var optLevel: String, var targetTriple: String, var gitBranch: String, var gitDescribe: String, var gitSha: String, var gitDirty: String)

Metadata describing the conditions of the build of this software.

Link copied to clipboard

MLS ciphersuites.

Link copied to clipboard

A unique identifier for an MLS client.

Link copied to clipboard

A unique identifier for an MLS client.

Link copied to clipboard
data class CommitBundle(var welcome: Welcome?, var commit: ByteArray, var groupInfo: GroupInfoBundle, var encryptedMessage: ByteArray?) : Disposable

Information returned when a commit is created.

Link copied to clipboard

A unique identifier for a single conversation.

Link copied to clipboard

A unique identifier for a single conversation.

Link copied to clipboard

A high-level wrapper around a CoreCrypto client as emitted by Uniffi.

Link copied to clipboard

A CoreCryptoCommand has an execute method which accepts a CoreCryptoContext and returns nothing.

Link copied to clipboard

A CoreCryptoCommand has an execute method which accepts a CoreCryptoContext and returns nothing.

Link copied to clipboard

The CoreCryptoContext holds the primary CoreCrypto APIs.

Link copied to clipboard

The CoreCryptoContext holds the primary CoreCrypto APIs.

Link copied to clipboard
sealed class CoreCryptoException

The primary error type returned across the CoreCrypto FFI boundary.

Link copied to clipboard

CoreCrypto wraps around MLS and Proteus implementations and provides a transactional interface for each.

Link copied to clipboard

CoreCrypto wraps around MLS and Proteus implementations and provides a transactional interface for each.

Link copied to clipboard

A callback interface for forwarding CoreCrypto log messages to the platform's logging system.

Link copied to clipboard

A callback interface for forwarding CoreCrypto log messages to the platform's logging system.

Link copied to clipboard

Defines the log level for CoreCrypto.

Link copied to clipboard

A cryptographic credential.

Link copied to clipboard

A cryptographic credential.

Link copied to clipboard

A compact reference to a credential that has been persisted in CoreCrypto.

Link copied to clipboard

A compact reference to a credential that has been persisted in CoreCrypto.

Link copied to clipboard

The type of credential used to authenticate an MLS client's identity.

Link copied to clipboard

The database acting as a core crypto keystore.

Link copied to clipboard

The database acting as a core crypto keystore.

Link copied to clipboard

The key used to encrypt the database.

Link copied to clipboard

The key used to encrypt the database.

Link copied to clipboard
data class DecryptedMessage(var message: ByteArray?, var isActive: Boolean, var commitDelay: ULong?, var senderClientId: ClientId?, var identity: WireIdentity, var bufferedMessages: List<BufferedDecryptedMessage>?) : Disposable

A decrypted message and various associated metadata.

Link copied to clipboard

The standalone status of a device credential in an MLS group at a given moment.

Link copied to clipboard
interface Disposable
Link copied to clipboard

The end-to-end identity verification state of a conversation.

Link copied to clipboard

An error returned by an EpochObserver callback implementation.

Link copied to clipboard
interface EpochObserver

An EpochObserver is notified whenever a conversation's epoch changes.

Link copied to clipboard

An EpochObserver is notified whenever a conversation's epoch changes.

Link copied to clipboard

The raw public key of an external sender.

Link copied to clipboard

The raw public key of an external sender.

Link copied to clipboard
typealias FfiConverterTypeMlsTransportData = FfiConverterByteArray
Link copied to clipboard

MLS Group Information

Link copied to clipboard
data class GroupInfoBundle(var encryptionType: MlsGroupInfoEncryptionType, var ratchetTreeType: MlsRatchetTreeType, var payload: GroupInfo) : Disposable

A GroupInfo with associated metadata.

Link copied to clipboard

MLS Group Information

Link copied to clipboard
interface HistoryObserver

A HistoryObserver is notified whenever a new history client is created.

Link copied to clipboard

A HistoryObserver is notified whenever a new history client is created.

Link copied to clipboard
data class HistorySecret(var clientId: ClientId, var data: ByteArray) : Disposable

A HistorySecret encodes sufficient client state that it can be used to instantiate an ephemeral client.

Link copied to clipboard
data class HttpHeader(var name: String, var value: String)

An HttpHeader used for PKI hooks.

Link copied to clipboard

HttpMethod used for PKI hooks.

Link copied to clipboard
data class HttpResponse(var status: UShort, var headers: List<HttpHeader>, var body: ByteArray)

An HttpResponse used for PKI hooks.

Link copied to clipboard
class InternalException(message: String)
Link copied to clipboard

A signed object describing a client's identity and capabilities.

Link copied to clipboard

A signed object describing a client's identity and capabilities.

Link copied to clipboard

A lightweight distinct reference to a KeyPackage, sufficient to uniquely identify it.

Link copied to clipboard

A lightweight distinct reference to a KeyPackage, sufficient to uniquely identify it.

Link copied to clipboard
sealed class LoggingException

An error returned by a CoreCryptoLogger callback implementation.

Link copied to clipboard
sealed class MlsException

Errors produced by the MLS layer.

Link copied to clipboard

How a GroupInfo is encrypted in a commit bundle.

Link copied to clipboard

How the ratchet tree is represented in a GroupInfo.

Link copied to clipboard
interface MlsTransport

Used by CoreCrypto to send commits or application messages to the delivery service.

Link copied to clipboard

Typealias from the type name used in the UDL file to the builtin type. This is needed because the UDL type name is used in function/method signatures. It's also what we have an external type that references a custom type.

Link copied to clipboard

Used by CoreCrypto to send commits or application messages to the delivery service.

Link copied to clipboard

The outcome of an MLS transport attempt, returned to CoreCrypto after delivery.

Link copied to clipboard

An error returned by a HistoryObserver callback implementation.

Link copied to clipboard

The PKI environment used for certificate management during X509 credential acquisition.

Link copied to clipboard

Callbacks for external calls made by CoreCrypto during X509 credential acquisition.

Link copied to clipboard

An error returned by a PkiEnvironmentHooks callback implementation.

Link copied to clipboard

Callbacks for external calls made by CoreCrypto during X509 credential acquisition.

Link copied to clipboard

The PKI environment used for certificate management during X509 credential acquisition.

Link copied to clipboard
data class ProteusAutoPrekeyBundle(var id: UShort, var pkb: ByteArray)

Encapsulates a prekey id and a CBOR-serialized prekey.

Link copied to clipboard
sealed class ProteusException

Errors produced by the Proteus layer.

Link copied to clipboard

A secret key derived from the group secret.

Link copied to clipboard

A secret key derived from the group secret.

Link copied to clipboard

Signature schemes supported by MLS, as defined in RFC 9420.

Link copied to clipboard
typealias Timestamp = Instant

Typealias from the type name used in the UDL file to the custom type. This is needed because the UDL type name is used in function/method signatures. It's also what we have an external type that references a custom type.

Link copied to clipboard

A TLS-serialized Welcome message.

Link copied to clipboard

A TLS-serialized Welcome message.

Link copied to clipboard
data class WireIdentity(var clientId: String, var status: DeviceStatus, var thumbprint: String, var credentialType: CredentialType, var x509Identity: X509Identity?)

The identity claims identifying a client.

Link copied to clipboard
data class X509Identity(var handle: String, var displayName: String, var domain: String, var certificate: String, var serialNumber: String, var notBefore: Timestamp, var notAfter: Timestamp)

Fields from a WireIdentity that are specific to X509 credentials.

Properties

Link copied to clipboard

The default ciphersuite: MLS_128_DHKEMX25519_AES128GCM_SHA256_ED25519

Link copied to clipboard

The default set of ciphersuites: [MLS_128_DHKEMX25519_AES128GCM_SHA256_ED25519]

Link copied to clipboard

Default credential type

Functions

Link copied to clipboard

Returns build metadata for CoreCrypto.

Link copied to clipboard

Get an instance of the default ciphersuite.

Link copied to clipboard

Construct a ciphersuite enum instance from its discriminant.

Link copied to clipboard

Instantiate a history client.

Link copied to clipboard

Construct a new CoreCryptoFfi instance.

Link copied to clipboard

Create a new PKI environment.

Link copied to clipboard
suspend fun exportDatabaseCopy(database: Database, destinationPath: String)

Export a fully vacuumed and optimized copy of the database to the specified path.

Link copied to clipboard

Create an in-memory database whose data will be lost when the instance is dropped.

Link copied to clipboard

Wrap a CoreCryptoFfi instance in a CoreCrypto instance. Should largely be invisible to end-users.

Link copied to clipboard
suspend fun migrateDatabaseKeyTypeToBytes(path: String, oldKey: String, newKey: DatabaseKey)

Updates the key of the CoreCrypto database.

Link copied to clipboard

Create a new PKI environment

Link copied to clipboard

Initialise an in-memory Database whose data will be lost when the instance is dropped

suspend fun Database.Companion.open(location: String, key: DatabaseKey): Database

Initialise or open a Database

Link copied to clipboard
suspend fun openDatabase(location: String, key: DatabaseKey): Database

Open or create a database.

Link copied to clipboard

Returns the hex-encoded fingerprint of the identity key contained in the given prekey bundle.

Link copied to clipboard

Returns the Proteus last resort prekey ID.

Link copied to clipboard

Initializes the logger.

Link copied to clipboard

Sets the maximum log level forwarded to the logger.

Link copied to clipboard

Construct an AVS secret

Link copied to clipboard
fun String.toClientId(): <Error class: unknown class>

Construct a client ID

Link copied to clipboard

Construct an external sender ID

Link copied to clipboard

Construct a GroupInfo from bytes

Link copied to clipboard

Construct a KeyPackage from bytes

Link copied to clipboard

Construct a Welcome

Link copied to clipboard

The version of core-crypto.