Table of Contents

Class WrappedDataKey

Namespace
Excalibur.Compliance
Assembly
Excalibur.Compliance.Abstractions.dll

A data encryption key that has been wrapped by an IKeyWrappingProvider, together with the information needed to unwrap it later.

public sealed record WrappedDataKey : IEquatable<WrappedDataKey>
Inheritance
WrappedDataKey
Implements
Inherited Members

Remarks

The wrapped key is safe to persist next to the ciphertext it protects: it is only usable by a caller that can reach the key service holding the wrapping key.

Properties

Algorithm

Gets the provider-side wrapping algorithm, when the provider names one.

public string? Algorithm { get; init; }

Property Value

string

A provider-specific algorithm identifier, or null when not applicable.

CiphertextBlob

Gets the opaque wrapped key bytes as returned by the key service.

public required byte[] CiphertextBlob { get; init; }

Property Value

byte[]

Remarks

The internal structure is the provider's own and MUST be treated as opaque by callers. Providers commonly embed the wrapping key identity in these bytes.

WrappingKeyId

Gets the provider-side identity of the exact key that performed the wrap, when the provider exposes one.

public string? WrappingKeyId { get; init; }

Property Value

string

A provider-specific key identifier — for example a versioned key URI — or null when the provider embeds the identity in CiphertextBlob instead.

Remarks

Recorded so that an unwrap resolves the same key version that performed the wrap, rather than whichever version is current at read time. A rotated key must still be able to read data it wrote.