A bundle of a KES key with a period, plus the matching op cert. The key itself is stored as a CRef, rather than directly, which allows us to pass keys around and forget them exactly when the last reference is dropped. The downside to this is that we need to be explicit about those references, which is what the CRef type achieves.
Modulekes-agent-crypto-1.2.0.0Haskell2010
Cardano.KESAgent.KES.Bundle
The Bundle and TaggedBundle types. These represent KES credential "bundles", consisting of the key itself, its current KES period, and an operational certificate ("OpCert"). "Tagged bundles" are tagged with a timestamp indicating their age, and may contain either a Bundle (which indicates a key update), or Nothing (which indicates a key deletion). We need to track key deletions as explicit data points in order to propagate them between KES agents.
Consider a scenario where 3 KES agents are connected as follows:
Now the following happens:
A key is installed into agent A.
The key propagates from agent A to agent B, and from there to agent C.
Agent B shuts down.
The key in agent A is deleted; agent A no longer holds a key.
Agent B restarts.
Agent B connects to agent C and receives the key.
Agent A receives the key from agent B, thus undoing the delete.
This is undesirable, hence we represent key deletions as TaggedBundles without keys. This way, an agent can hold and propagate a "key deletion" the same way it can propagate actual key bundles. Now the above scenario plays out as follows:
A key is installed into agent A.
The key propagates from agent A to agent B, and from there to agent C.
Agent B shuts down.
The key in agent A is deleted; agent A now holds a key deletion.
Agent B restarts.
Agent B connects to agent C and receives the key.
Agent B connects to agent A and receives the deletion. Since the deletion is newer than the key it got from agent C, it deletes the key and stores the deletion.
Agent B pushes the deletion to agent C. Since the deletion is newer than the key agent C holds, agent C deletes its key and stores the deletion.
- 3 types
- 2 values
- Packagekes-agent-crypto-1.2.0.0
- Exports5
- LanguageHaskell2010
- LicenceApache-2.0
- SourceBundle.hs
Integral POSIX timestamps with microsecond accuracy. These are used to tag key bundles and key bundle deletions for the purpose of resolving synchronization conflicts.
Constructors
Instances9Bounded, Enum, Eq, Integral, Num, Ord, …
Bounded TimestampDefined in kes-agent-crypto-1.2.0.0 · Cardano.KESAgent.KES.BundleEnum TimestampDefined in kes-agent-crypto-1.2.0.0 · Cardano.KESAgent.KES.BundleEq TimestampDefined in kes-agent-crypto-1.2.0.0 · Cardano.KESAgent.KES.BundleIntegral TimestampDefined in kes-agent-crypto-1.2.0.0 · Cardano.KESAgent.KES.BundleNum TimestampDefined in kes-agent-crypto-1.2.0.0 · Cardano.KESAgent.KES.BundleOrd TimestampDefined in kes-agent-crypto-1.2.0.0 · Cardano.KESAgent.KES.BundleReal TimestampDefined in kes-agent-crypto-1.2.0.0 · Cardano.KESAgent.KES.BundleShow TimestampDefined in kes-agent-crypto-1.2.0.0 · Cardano.KESAgent.KES.BundlePretty TimestampDefined in kes-agent-crypto-1.2.0.0 · Cardano.KESAgent.KES.Bundle
A key bundle, or key bundle deletion, tagged with a Timestamp.
Constructors
TaggedBundletaggedBundle :: Maybe (Bundle m c)Nothing means delete(d)
taggedBundleTimestamp :: Timestamp