Module tink_core::primitiveset
source · [−]Expand description
Provides a container for a set of cryptographic primitives.
It provides also additional properties for the primitives it holds. In particular, one of the primitives in the set can be distinguished as “the primary” one.
Structs
Entry
represents a single entry in the keyset. In addition to the actual
primitive, it holds the identifier and status of the primitive.
PrimitiveSet
is used for supporting key rotation: primitives in a set
correspond to keys in a keyset. Users will usually work with primitive
instances, which essentially wrap primitive sets. For example an instance of
an AEAD-primitive for a given keyset holds a set of AEAD-primitives
corresponding to the keys in the keyset, and uses the set members to do the
actual crypto operations: to encrypt data the primary AEAD-primitive from
the set is used, and upon decryption the ciphertext’s prefix determines the
id of the primitive from the set.
TypedEntry
represents a single entry in a keyset for primitives of a known type. In addition
to the actual primitive, it holds the identifier and status of the primitive.
TypedPrimitiveSet
is equivalent to PrimitiveSet
but holds primitives
of a specific known type P
.