Skip to content

deriveEpochIdFromRootSecret

deriveEpochIdFromRootSecret(rootSecret): Promise<Uint8Array<ArrayBufferLike>>

Defined in: packages/core/src/derive-doc-key.ts:106

Derive a 32-byte epoch ID from a BeeKEM root secret.

The epoch ID identifies the resulting document key inside the keychain (it is the keychain’s first-class key identifier for messages encrypted under this epoch). Using a stable hash of the root secret keeps every peer’s epoch-ID computation in agreement without an explicit ID round-trip.

Uses a different HKDF info string than deriveDocumentKeyFromRootSecret so the epoch ID and the document key remain independent outputs even though both derive from the same root secret.

Uint8Array

Promise<Uint8Array<ArrayBufferLike>>