Skip to main content

Crate ms_gkdi

Crate ms_gkdi 

Source
Expand description

MS-GKDI — Group Key Distribution.

Extracted from dpapi-ng so the tree walk, KDF, and ISDKey RPC caller can be reused without pulling in the DPAPI-NG CMS layer. The three public modules are:

  • gkdi — KEY_IDENTIFIER / GROUP_KEY_ENVELOPE parsers and the L0/L1/L2 walk.
  • kdf — SP800-108 counter-mode KDF and the "KDS service" label.
  • rpc — ISDKey::GetKey over sealed ncacn_ip_tcp (via the dcerpc crate).

UNVALIDATED CRYPTO — DO NOT PUBLISH. See README.md: this 0.1.0-dev tag is local only. The derivation has not been cross-checked against a live Server 2022 DC or against Microsoft’s reference dpapi-ng.py. Ship after the KAT harness lands.

Modules§

gkdi
MS-GKDI: the Group Key Distribution structures and the L0/L1/L2 key-tree walk.
kdf
SP800-108 counter-mode KDF — the one MS-GKDI uses to walk the key tree.
rpc
MS-GKDI GetKey RPC client — the transport piece the rest of the crate deliberately left to the caller. Ask a domain controller for the GroupKeyEnvelope covering a given (rootKeyId, L0, L1, L2) node; the crate’s derivation then walks downwards to the exact L2 key needed to open the LAPS/gMSA/dMSA blob.

Enums§

GkdiError
Errors surfaced by the parsers and the tree walk. Kept as a plain enum so callers can match on the specific failure without stringly inspecting a message.

Type Aliases§

Result