UNPKG

ts-mls

Version:

[![CI](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml/badge.svg)](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/ts-mls.svg)](https://badge.fury.io/js/ts-mls) [![Coverage Status](https://co

25 lines (24 loc) 1.22 kB
import { CiphersuiteImpl } from "./crypto/ciphersuite"; import { Kdf } from "./crypto/kdf"; import { GroupContext } from "./groupContext"; export type KeySchedule = { epochSecret: Uint8Array; senderDataSecret: Uint8Array; encryptionSecret: Uint8Array; exporterSecret: Uint8Array; externalSecret: Uint8Array; confirmationKey: Uint8Array; membershipKey: Uint8Array; resumptionPsk: Uint8Array; epochAuthenticator: Uint8Array; initSecret: Uint8Array; }; export type EpochSecrets = { keySchedule: KeySchedule; joinerSecret: Uint8Array; welcomeSecret: Uint8Array; }; export declare function mlsExporter(exporterSecret: Uint8Array, label: string, context: Uint8Array, length: number, cs: CiphersuiteImpl): Promise<Uint8Array<ArrayBufferLike>>; export declare function deriveKeySchedule(joinerSecret: Uint8Array, pskSecret: Uint8Array, groupContext: GroupContext, kdf: Kdf): Promise<KeySchedule>; export declare function initializeKeySchedule(epochSecret: Uint8Array, kdf: Kdf): Promise<KeySchedule>; export declare function initializeEpoch(initSecret: Uint8Array, commitSecret: Uint8Array, groupContext: GroupContext, pskSecret: Uint8Array, kdf: Kdf): Promise<EpochSecrets>;