You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moving some of the interface
from the local CMC to the CMC Interface.
Using the CMC requires a consistent interface.
Currently the Caching CMM has an interface
that relies on the Local CMC.
This means that if a CMC was created according
to the specification it would not function correctly.
Copy file name to clipboardExpand all lines: framework/cryptographic-materials-cache.md
+45-11Lines changed: 45 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@
9
9
10
10
### Changelog
11
11
12
+
- 0.4.0
13
+
- Updating the interface. Moving elements from the Local CMC to the interface.
12
14
- 0.3.0
13
15
-[Return Nothing from Put Cache Entry in Cryptographic Materials Cache](../changes/2020-07-20_put-cache-entry-returns-nothing/change.md)
14
16
- 0.2.0
@@ -42,19 +44,25 @@ in this document are to be interpreted as described in [RFC 2119](https://tools.
42
44
43
45
### Cache Identifier
44
46
45
-
The cache identifier used to uniquely identify a single cache entry in the cryptographic materials cache.
47
+
The cache identifier used to uniquely identify a single cache entry
48
+
in the cryptographic materials cache.
46
49
47
50
### Cache Entry
48
51
49
-
A cache entry represents an entry in the cryptographic materials cache.
50
-
A cache entry contains the cryptographic materials, [encryption](structures.md#encryption-materials) or [decryption](structures.md#decryption-materials)
51
-
materials to be cached along with other metadata.
52
-
Some implementations of the CMC have the following metadata:
52
+
A cache entry represents an entry in the cryptographic materials cache
53
+
and MUST have the following information.
53
54
55
+
-[Materials](#materials)
54
56
-[Creation Time](#creation-time)
55
57
-[Expiry Time](#expiry-time)
56
58
-[Usage Metadata](#usage-metadata)
57
59
60
+
#### Materials
61
+
62
+
The cryptographic materials,
63
+
[encryption](structures.md#encryption-materials) or [decryption](structuresmd#decryption-materials)
64
+
materials to be cached along with other metadata.
65
+
58
66
#### Creation Time
59
67
60
68
Timestamp when the cache entry was created.
@@ -70,13 +78,32 @@ The usage metadata is of the following two types:
70
78
-[Messages Usage](#message-usage)
71
79
-[Bytes Usage](#bytes-usage)
72
80
81
+
Updating usage metadata SHOULD be atomic.
82
+
73
83
##### Message Usage
74
84
75
-
The number of messages encrypted by the [encryption](structures.md#encryption-materials) materials cached in this cache entry.
85
+
The number of messages encrypted
86
+
by the [encryption materials](structures.md#encryption-materials)
87
+
cached in this cache entry.
76
88
77
89
##### Bytes Usage
78
90
79
-
The number of bytes encrypted by the [encryption](structures.md#encryption-materials) materials cached in this cache entry.
91
+
The number of bytes encrypted by the [encryption materials](structures.md#encryption-materials)
92
+
cached in this cache entry.
93
+
94
+
### Time-to-live (TTL)
95
+
96
+
Each cache entry has a time-to-live (TTL)
97
+
that represents a point in time at which the cache entry
98
+
MUST be considered invalid.
99
+
This is generale the [expiry time](#expiry-time).
100
+
After a cache entry's TTL has elapsed,
101
+
we say that the entry is _TTL-expired_,
102
+
and a CMC MUST NOT return the entry to any caller.
103
+
104
+
However the [creation time](#creation-time) is also include
105
+
in case a stricter view of TTL is enforced by a caller.
106
+
This can be done by deleting the entry.
80
107
81
108
## Supported CMCs
82
109
@@ -86,19 +113,26 @@ It provides non-blocking, locking, [cache entries](#cache-entry) per [cache iden
86
113
87
114
## Behaviors
88
115
89
-
The Cryptographic Materials Cache provides behaviours for putting cache entries, getting cache entries and deleting cache entries.
116
+
The Cryptographic Materials Cache
117
+
provides behaviors for putting cache entries,
118
+
getting cache entries and deleting cache entries.
90
119
91
120
### Put Cache Entry
92
121
93
122
Attempts to put a cache entry for the specified cache ID.
94
-
If a cache entry for the given cache ID does not exists in the cache, the CMC creates a new cache entry.
123
+
If a cache entry for the given cache ID does not exists in the cache,
124
+
the CMC creates a new cache entry.
95
125
This operation MUST NOT return the inserted cache entry.
126
+
The cache entry MUST include all [usage metadata](#usage-metadata)
127
+
since this information can not be updated after the put operation.
96
128
97
129
### Get Cache Entry
98
130
99
131
Attempts to get a cache entry for the specified cache ID.
100
-
The CMC MUST validate that the cache entry is valid prior to returning the cache entry.
101
-
A successful call to Get Entry returns the [cache entry](#cache-entry) and an unsuccessful call returns a cache miss.
132
+
The CMC MUST validate that the cache entry
133
+
has not exceeded it's stored [TTL](#time-to-live-ttl).
134
+
A successful call to Get Entry returns the [cache entry](#cache-entry)
0 commit comments