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

20 lines (19 loc) 1.01 kB
import { Decoder } from "./codec/tlsDecoder.js"; import { Encoder } from "./codec/tlsEncoder.js"; import { CiphersuiteName } from "./crypto/ciphersuite.js"; import { Kdf } from "./crypto/kdf.js"; import { Extension } from "./extension.js"; import { ProtocolVersionName } from "./protocolVersion.js"; export interface GroupContext { version: ProtocolVersionName; cipherSuite: CiphersuiteName; groupId: Uint8Array; epoch: bigint; treeHash: Uint8Array; confirmedTranscriptHash: Uint8Array; extensions: Extension[]; } export declare const encodeGroupContext: Encoder<GroupContext>; export declare const decodeGroupContext: Decoder<GroupContext>; export declare function extractEpochSecret(context: GroupContext, joinerSecret: Uint8Array, kdf: Kdf, pskSecret?: Uint8Array): Promise<Uint8Array<ArrayBufferLike>>; export declare function extractJoinerSecret(context: GroupContext, previousInitSecret: Uint8Array, commitSecret: Uint8Array, kdf: Kdf): Promise<Uint8Array<ArrayBufferLike>>;