Re-keying Mechanisms for Symmetric Keys
CryptoPro18, Suschevsky val Moscow127018Russian Federation+7 (495) 995-48-20svs@cryptopro.ru
General
CFRGre-keying, key, key lifetime, encryption mode
If encryption is performed under a single key, there is a certain maximum threshold
amount of data that can be safely encrypted. This amount is called key lifetime.
This specification contains a description of a variety of methods to increase the lifetime of symmetric keys.
It provides external and internal re-keying mechanisms based on hash functions and on block ciphers
that can be used with such modes of operations as CTR, GCM, CCM, CBC, CFB, OFB and OMAC.
If encryption is performed under a single key, there is a certain maximum threshold
amount of data that can be safely encrypted. This amount is called key lifetime and
can be calculated from the following considerations:
Methods based on the combinatorial properties of used encryption mode
is an example of attack that is based on such methods.
These methods do not depend on the used block cipher permutation E_{K}.
Common encryption modes restrictions resulting from such methods are of order 2^{n/2}.
Methods based on side-channel analysis issues
In most cases these methods do not depend on the used encryption modes and weakly depend on the used
block cipher features. Restrictions resulting from these methods are usually the strongest ones.
Methods based on the properties of the used block cipher permutation E_{K}
The most common methods of this type are linear and differential cryptanalysis .
In most cases these methods do not depend on the used encryption modes.
In case of secure block ciphers, restrictions resulting from such methods
are roughly the same as the natural limitation 2^n and so can be excluded
from consideration as they become trivial.
Therefore, as soon as the total size of a plaintext processed with a single key
reaches the key lifetime limitation, that key must be replaced. A specific
value of the key lifetime is determined in accordance with safety margin for protocol security and methods outlined above.
Suppose L is a key lifetime limitation in some protocol P. For simplicity, assume that all messages
have the same length m. Hence the number of messages q that can be processed with a single key K
should be such that m*q <= L. This can be depicted graphically as a rectangle with sides m and q which is enclosed by area L (see Figure 1).
Thus, with increasing one of the parameters m or q, the second parameter should be reduced in proportion to the first.
In practice, such amount of data that corresponds to limitation L may not be enough.
The most simple and obvious way in this situation is a regular renegotiation of a session key.
However, this reduces the total performance since it usually entails
termination of application data transmission, additional service messages,
the use of random number generator and many other additional calculations,
including resource-intensive asymmetric cryptography.
This specification presents two approaches that extend the key lifetime for a single symmetric key while avoiding renegotiation:
external and internal re-keying. External re-keying is performed by a protocol, and it is independent of block cipher, key size, and mode.
External re-keying can use parallel or serial construction.
In the first case subkeys K^1, K^2,... are generated directly from the key K independently of each other,
while in the second case every next subkey depends on the state that is updated after each new subkey generation.
Internal re-keying is built into the mode, and it depends heavily on the properties of the block cipher and key size.
The re-keying approaches extend the key lifetime for a single agreed key by providing the possibility
to strictly limit the key leakage (to meet side channel limitations)
and by improving combinatorial properties of a used block cipher encryption mode.
As for practical issues, re-keying can be particularly useful in such fields as protocols functioning in hostile environments
(additional side channel resistance against DPA or EMI style attacks)
or lightweight cryptography (usage of ciphers with small block size leads to very strong combinatorial limitations).
Moreover, many mechanisms that use external and internal re-keying provide particular types of PFS security.
Also re-keying can provide additional security against possible future attacks on the used ciphers
(by limiting the number of plaintext-ciphertext pairs collected by an adversary),
however, it must not be used as a method to prolong life of ciphers that are already known to be vulnerable.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
"RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in
.
This document uses the following terms and definitions for the sets and operations
on the elements of these sets:
exclusive-or of two binary vectors of the same length.
the set of all strings of a finite length
(hereinafter referred to as strings), including the empty
string;
the set of all binary strings of length s, where s is a non-negative
integer; substrings and string components are
enumerated from right to left starting from one;
the bit length of the bit string X;
concatenation of strings A and B both belonging to V*, i.e.,
a string in V_{|A|+|B|}, where the left substring in
V_|A| is equal to A, and the right substring in V_|B| is
equal to B;
ring of residues modulo 2^n;
the transformation that maps a string a = (a_s, ... , a_1), a in V_s,
into the integer Int_s(a) = 2^{s-1}*a_s + ... + 2*a_2 + a_1;
the transformation inverse to the mapping Int_s;
the transformation that maps the string a = (a_s, ... , a_1) in V_s,
into the string MSB_i(a) = (a_s, ... , a_{s-i+1}) in V_i;
the transformation that maps the string a = (a_s, ... , a_1) in V_s,
into the string LSB_i(a) = (a_i, ... , a_1) in V_i;
the transformation that maps the string a = (a_s, ... , a_1) in V_s,
into the string Inc_c(a) = MSB_{|a|-c}(a) | Vec_c(Int_c(LSB_c(a)) + 1(mod 2^c)) in V_s;
denotes the string in V_s that consists of s 'a' bits;
the block cipher permutation under the key K in V_k;
the least integer that is not less than x;
the key K size (in bits), k is multiple of 8;
the block size of the block cipher (in bits), n is multiple of 8;
the total number of data blocks in the plaintext (b = ceil(m/n));
the section size (the number of bits in a data section);
the number of data sections in the plaintext;
the transformation that maps a string a = (a_s, ... , a_1)
into the value phi_i(a) = a_i for all i in {1, ... , s}.
A plaintext message P and a ciphertext C are divided into b = ceil(|P|/n) blocks
denoted as P = P_1 | P_2 | ... | P_b and C = C_1 | C_2 | ... | C_b,
where P_i and C_i are in V_n, for i = 1, 2, ... , b-1, and P_b, C_b are in V_r, where r <= n if not otherwise stated.
External re-keying provides an approach, decording to which a key is transformed after encrypting a limited number of messages.
A specific external re-keying method is chosen at the protocol level regardless of a used block cipher or encryption mode.
External re-keying approach is recommended for usage in protocols that process quite small messages or
in protocols that have a way to break a large message into manageable parts.
As a result of external re-keying, the number of messages that can be processed with a single symmetric key is substantially increased without loss in message length.
The use of external re-keying has the following advantages:
the lifetime of a negotiated key drastically increases by increasing the number of messages processed with one key;
it almost does not affect performance in case when a number of messages processed with one key is sufficiently large;
provides forward and backward security of session keys for all messages.
However, the use of external re-keying has the following disadvantages:
in case of restrictive key lifetime limitations the message sizes can become
inconvenient due to impossibility of processing sufficiently large messages, so it could
be necessary to perform additional fragmentation at the protocol level;
it is not transparent: procedures (like IVs generation) must be handled separately.
Internal re-keying provides an approach according to which a key is transformed during each separate message processing.
Such approaches are integrated into the base modes of operations so every internal re-keying mechanism is defined for a particular mode and block cipher
(e.g. depending of block and key sizes). Internal re-keying approach is recommended to be used in protocols that process large messages.
As a result of internal re-keying, the size of each single message can be substantially increased without loss in number of messages that can be processed with a single symmetric key.
The use of internal re-keying has the following advantages:
the lifetime of a negotiated key drastically increases by increasing the size of messages processed with one key;
minimal impact on performance;
internal re-keying mechanisms without master key does not affect short messages transformation at all;
transparent (works like any encryption mode): does not require changes of IV’s and restarting MACing.
However, the use of internal re-keying has the following disadvantages:
a specific method must not be chosen independently of a mode of operation;
internal re-keying mechanisms with master key provide backward security of session keys only for one separate message;
internal re-keying mechanisms without master key do not provide backward security of session keys.
Any block cipher modes of operations with internal re-keying can be jointly used with any external
re-keying mechanisms. Such joint usage increases both the number of messages processed with one key
and their maximum possible size.
The use of the same cryptographic primitives both for data processing and re-keying transformation
decreases the code size but can lead to some possible vulnerabilities because
the adversary always has access to the data processing interface.
This vulnerability can be eliminated by using different primitives for
data processing and re-keying, however, in this case the security of the whole scheme cannot be reduced
to standard notions like PRF or PRP so security estimations become more difficult and unclear.
This section presents an approach to increase the key lifetime by using
a transformation of a previously negotiated key after processing a limited number of integral messages.
It provides an external parallel and serial re-keying mechanisms (see ).
These mechanisms use an initial (negotiated) key as a master key, which is never used
directly for the data processing but is used for key generation.
Such mechanisms operate outside of the base modes of operations and do not change them at all, therefore
they are called "external re-keying" mechanisms in this document.
External re-keying mechanisms are recommended for usage in protocols
that process quite small messages since the maximum gain in increasing the key lifetime is achieved by increasing the number of messages.
External re-keying increases the key lifetime through the following approach.
Suppose there is a protocol P with some mode of operation (base encryption or authentication mode).
Let L1 be a key lifetime limitation induced by side-channel analysis methods (side-channel limitation),
let L2 be a key lifetime limitation induced by methods based on the combinatorial properties
of used mode of operation (combinatorial limitation)
and let q1, q2 be the total numbers of messages of length m, that can be safely processed with a single key K according to these limitations.
Let L = min(L1, L2), q = min (q1, q2), q*m <= L. As L1 limitation is usually much stronger then L2 limitation (L1 < L2), the final key lifetime restriction
is equal to the most restrictive limitation L1. Thus, as displayed in Figure 2, without re-keying only q1 (q1*m <= L1) messages can be safely processed.
Suppose that the safety margin for the protocol P is fixed and the external re-keying approach is applied.
As the key is transformed with an external re-keying mechanism, the leakage of a previous key does not have any impact on the following one, so the side channel limitation L1 goes off.
Thus, the resulting key lifetime limitation of the negotiated key K can be calculated
on the basis of a new combinatorial limitation L2'.
It is proven (see ) that the security of the mode of operation that uses external re-keying leads to an increase when compared to base mode
without re-keying (thus, L2 < L2'). Hence, as displayed in Figure 3, the resulting key lifetime limitation in case of using external re-keying can be increased up to L2'.
Note: the key transformation process is depicted in a simplified form.
A specific approach (parallel and serial) is described below.
Consider an example. Let the message size in protocol P be
equal to 1 KB. Suppose L1 = 128 MB and L2 = 1 TB.
Thus, if an external re-keying mechanism is not used, the key K must be
renegotiated after processing 128 MB / 1 KB = 131072 messages.
If an external re-keying mechanism is used,
the key lifetime limitation L1 goes off. Hence the resulting key lifetime limitation in case of using external re-keying can be set to 1 TB (and even more).
Thus if an external re-keying mechanism is used, then 1 TB / 1 KB = 2^30 messages can be processed before the master key K is renegotiated.
This is 8192 times greater than the number of messages that can be processed, when external re-keying mechanism is not used.
Suppose L is an amount of data that can be safely processed with one key (without re-keying).
For i in {1, 2, ..., t} the key K^i (see Figure 1 and Figure 2) should be transformed after processing q_i integral messages,
where q_i can be calculated in accordance with one of the following two approaches:
Explicit approach:
|M^{i,1}| + ... + |M^{i,q_i}| <= L, |M^{i,1}| + ... + |M^{i,q_i + 1}| > L.
This approach allows to use the key K^i in almost optimal way
but it cannot be applied in case when messages may be lost or reordered (e.g. DTLS packets).
Implicit approach:
q_i = L / m_max, i = 1, ... , t.
The amount of data processed with one key K^i is calculated under the assumption that every message has the maximum length m_max.
Hence this amount can be considerably less than the key lifetime limitation L. On the other hand this approach
can be applied in case when messages may be lost or reordered (e.g. DTLS packets).
The main idea behind external re-keying with parallel construction is presented in Figure 4:
The key K^i, i = 1, ... , t-1, is updated after processing a certain amount of data (see ).
ExtParallelC re-keying mechanism is based on key derivation function on a block cipher and is used to generate t keys for t sections as follows:
K^1 | K^2 | ... | K^t = ExtParallelC(K, t*k) = MSB_{t*k}(E_{K}(0) | E_{K}(1) | ... | E_{K}(R-1)),
where R = ceil(t*k/n).
ExtParallelH re-keying mechanism is based on HMAC key derivation function HKDF-Expand, described
in , and is used to generate t keys for t sections as follows:
K^1 | K^2 | ... | K^t = ExtParallelH(K, t*k) = HKDF-Expand(K, label, t*k),
where label is a string (can be a zero-length string) that is defined by a specific protocol.
The main idea behind external re-keying with serial construction is presented in Figure 5:
The key K^i, i = 1, ... , t-1, is updated after processing a certain amount of data (see ).
The key K^i is calculated using ExtSerialC transformation as follows:
K^i = ExtSerialC(K, i) = MSB_k(E_{K*_i}(0) | E_{K*_i}(1) | ... | E_{K*_i}(J-1)),
where J = ceil(k/n), i = 1, ... , t, K*_i is calculated as follows:
K*_1 = K,
K*_{j+1} = MSB_k(E_{K*_j}(J) | E_{K*_j}(J+1) | ... | E_{K*_j}(2J-1)),
where j = 1, ... , t-1.
The key K^i is calculated using ExtSerialH transformation as follows:
K^i = ExtSerialH(K, i) = HKDF-Expand(K*_i, label1, k),
where i = 1, ... , t, HKDF-Expand is an HMAC-based key derivation function, described in , K*_i is calculated as follows:
K*_1 = K,
K*_{j+1} = HKDF-Expand(K*_j, label2, k), where j = 1, ... , t-1,
where label1 and label2 are different strings (can be a zero-length strings) that are defined by a specific protocol (see, for example, TLS 1.3 updating traffic keys algorithm ).
This section presents an approach to increase the key lifetime by using
a transformation of a previously negotiated key during each separate message processing.
It provides internal re-keying mechanisms called ACPKM (Advanced cryptographic prolongation of key material) and ACPKM-Master
that do not use and use a master key respectively.
Such mechanisms are integrated into the base modes of operations
and actually form new modes of operation, therefore
they are called "internal re-keying" mechanisms in this document.
Internal re-keying mechanism is recommended to be used in protocols
that process large single messages (e.g. CMS messages) since the
maximum gain in increasing the key lifetime is achieved by increasing the length of a message,
while it almost does not affect performance for increasing the number of messages.
Internal re-keying increases the key lifetime through the following approach.
Suppose there is a protocol P with some base mode of operation.
Let L1 and L2 be a side channel and combinatorial limitations respectively and
for some fixed amount of messages q let m1, m2 be the length of each separate message,
that can be safely processed with a single key K according to these limitations.
Thus, by analogy with the without re-keying the final key lifetime restriction, as displayed in Figure 6,
is equal to L1 and only q messages of the length m1 can be safely processed.
Suppose that the safety margin for the protocol P is fixed and internal re-keying approach is applied to the base mode of operation.
Suppose further that for every message the key is transformed after processing N bits of data, where N is a parameter.
If q*N does not exceed L1 then the side channel limitation L1 goes off and the resulting key lifetime limitation of the negotiated key K can be calculated
on the basis of a new combinatorial limitation L2'. The security of the mode of operation that uses external re-keying must lead to an increase when compared to base mode of operation
without re-keying (thus, L2 < L2'). Hence, as displayed in Figure 7, the resulting key lifetime limitation in case of using external re-keying can be increased up to L2'.
Note: the key transformation process is depicted in a simplified form.
A specific approach (ACPKM and ACPKM-Master re-keying mechanisms) is described below.
Since the performance of encryption can slightly decrease for rather
small values of N, the parameter N should be selected for a
particular protocol as maximum possible to provide necessary key
lifetime for the adversary models that are considered.
Consider an example. Suppose L1 = 128 MB and L2 = 10 TB.
Let the message size in the protocol be large/unlimited (may exhaust the whole key lifetime L2').
The most restrictive resulting key lifetime limitation is equal to 128 MB.
Thus, there is a need to put a limit on the maximum message size m_max. For example, if m_max = 32 MB, it may happen
that the renegotiation of key K would be required after processing only four messages.
If an internal re-keying mechanism with section size N = 1 MB (see Figure 3 and Figure 4) is used, more then L1 / N = 128 MB / 1 MB = 128
messages can be processed before the renegotiation of key K (instead of 4 messages in case when an internal re-keying mechanism is not used).
Note that only one section of each message is processed with one key K^i, and, consequently, the key lifetime limitation L1 goes off.
Hence the resulting key lifetime limitation in case of using external re-keying can be set to at least 10 TB (in the case when the single large message is processed using the key K).
Suppose L is an amount of data that can be safely processed with one key (without re-keying),
N is a section size (fixed parameter).
Suppose M^{i}_1 is the first section of message M^{i}, i = 1, ... , q (see Figure 3 and Figure 4),
then the parameter q can be calculated in accordance with one of the following two approaches:
Explicit approach:
|M^{1}_1| + ... + |M^{q}_1| <= L, |M^{1}_1| + ... + |M^{q+1}_1| > L
This approach allows to use the key K^i in an almost optimal way
but it cannot be applied in case when messages may be lost or reordered (e.g. DTLS packets).
Implicit approach:
q = L / N.
The amount of data processed with one key K^i is calculated under the assumption that the length of every message is equal or more then section size N
and so it can be considerably less than the key lifetime limitation L. On the other hand this approach
can be applied in case when messages may be lost or reordered (e.g. DTLS packets).
This section describes the block cipher modes that use the ACPKM
re-keying mechanism, which
does not use master key: an initial key is used directly for the encryption of the data.
This section defines periodical key transformation with no master key which is
called ACPKM re-keying mechanism. This mechanism can be applied to one of the
basic encryption modes (CTR and GCM block cipher modes)
for getting an extension of this encryption mode that uses periodical key
transformation with no master key. This extension can be considered as a new encryption mode.
An additional parameter that defines the functioning of base encryption modes
with the ACPKM re-keying mechanism is the section size N.
The value of N is measured in bits and is fixed within a specific protocol based on the requirements of the system
capacity and key lifetime (some recommendations on choice of N will be provided in ).
The section size N MUST be divisible by the block size n.
The main idea behind internal re-keying with no master key is presented in Figure 8:
During the processing of the input message M with the length m in some encryption mode that
uses ACPKM key transformation of the key K the message is divided into l = ceil(m/N) sections
(denoted as M = M_1 | M_2 | ... | M_l, where M_i is in V_N for i = 1, 2, ... , l-1 and M_l is in V_r, r <= N).
The first section of each message is processed with the initial key K^1 = K. To process the (i+1)-th section of each message the K^{i+1} key value
is calculated using ACPKM transformation as follows:
K^{i+1} = ACPKM(K^i) = MSB_k(E_{K^i}(D_1) | ... | E_{K^i}(D_J)),
where J = ceil(k/n), parameter c is fixed by a specific encryption mode which uses ACPKM key transformation
and D_1, D_2, ... , D_J are in V_n and are calculated as follows:
D_1 | D_2 | ... | D_J = MSB_{J*n}(D),
where D is the following constant in V_{1024}:
N o t e : The constant D is such that D_1, ... , D_J are pairwise different for any allowed n, k values.
N o t e : The constant D is such that phi_c(D_t) = 1 for any allowed n, k, c and t in {1, ... , J}.
This condition is important, as it allows to prevent collisions of blocks of transformed key and block cipher permutation inputs.
This section defines a CTR-ACPKM encryption mode that uses internal ACPKM re-keying
mechanism for the periodical key transformation.
The CTR-ACPKM mode can be considered as the extended by the ACPKM re-keying mechanism basic encryption mode CTR (see ).
The CTR-ACPKM encryption mode can be used with the following parameters:
64 <= n <= 512; 128 <= k <= 512;
the number of bits c in a specific part of the block to be incremented
is such that 16 <= c <= 3/4 n, c is multiple of 8.
The CTR-ACPKM mode encryption and decryption procedures are defined as follows:
The initial counter nonce ICN value for each message that is encrypted under the given key must be
chosen in a unique manner.
The message size MUST NOT exceed n * 2^{c-1} bits.
This section defines GCM-ACPKM authenticated encryption mode that uses internal ACPKM re-keying mechanism for the periodical key transformation.
The GCM-ACPKM mode can be considered as the basic authenticated encryption mode GCM (see ) extended by the ACPKM re-keying mechanism.
The GCM-ACPKM authenticated encryption mode can be used with the following parameters:
n in {128, 256}; 128 <= k <= 512;
the number of bits c in a specific part of the block to be incremented
is such that 32 <= c <= 3/4 n, c is multiple of 8.;
authentication tag length t.
The GCM-ACPKM mode encryption and decryption procedures are defined as follows:
The * operation on (pairs of) the 2^n possible blocks corresponds to the multiplication operation
for the binary Galois (finite) field of 2^n elements defined by the polynomial f as follows (by analogy with ):
f = a^128 + a^7 + a^2 + a^1 + 1.
f = a^256 + a^10 + a^5 + a^2 + 1.
The initial vector IV value for each message that is encrypted under the given key must be
chosen in a unique manner.
The plaintext size MUST NOT exceed n*(2^{c-1} - 2) bits.
The key for computing values E_{K}(ICB_0) and H is not updated and is
equal to the initial key K.
This section defines a CCM-ACPKM authenticated encryption block cipher mode that uses internal ACPKM re-keying
mechanism for the periodical key transformation.
The CCM-ACPKM mode can be considered as the extended by the ACPKM re-keying mechanism basic authenticated
encryption mode CCM (see ).
Since defines CCM authenticated encryption mode only for 128-bit block size,
the CCM-ACPKM authenticated encryption mode can be used only with the parameter n = 128.
However, the CCM-ACPKM design principles can easily be applied to other block sizes,
but these modes will require their own specifications.
The CCM-ACPKM authenticated encryption mode differs from CCM mode in keys that are used for
encryption during CBC-MAC calculation (see Section 2.2 of )
and key stream blocks generation (see Section 2.3 of ).
The CCM mode uses the same initial key K block cipher encryption operations,
while the CCM-ACPKM mode uses the keys K^1, K^2, ..., which are generated from the key K as follows:
K^1 = K,
K^{i+1} = ACPKM( K^i ).
The keys K^1, K^2, ..., which are used as follows.
CBC-MAC calculation: under a separate message processing during the first N/n block cipher encryption operations the key K^1 is used,
the key K^2 is used for the next N/n block cipher encryption operations and so on. For example, if N = 2n, then CBC-MAC calculation for
a sequence of t blocks B_0, B_1, ..., B_t is as follows:
X_1 = E( K^1, B_0 ),
X_2 = E( K^1, X_1 XOR B_1 ),
X_3 = E( K^2, X_2 XOR B_2 ),
X_4 = E( K^2, X_3 XOR B_3 ),
X_5 = E( K^3, X_4 XOR B_4 ),
...
T = first-M-bytes( X_t+1 )
The key stream blocks generation: under a separate message processing during the first N/n block cipher encryption operations the key K^1 is used,
the key K^2 is used for the next N/n block cipher encryption operations and so on. For example, if N = 2n, then the key stream blocks are generated as follows:
S_0 = E( K^1, A_0 ),
S_1 = E( K^1, A_1 ),
S_2 = E( K^2, A_2 ),
S_3 = E( K^2, A_3 ),
S_4 = E( K^3, A_4 ),
...
This section describes the block cipher modes that uses the ACPKM-Master
re-keying mechanism, which
use the initial key K as a master key K, so K is never used directly for the data processing but is
used for key derivation.
This section defines periodical key transformation with master key K which is
called ACPKM-Master re-keying mechanism. This mechanism can be applied to one of the basic modes of operation (CTR, GCM, CBC, CFB, OFB, OMAC modes)
for getting an extension of this modes of operations that uses periodical key transformation with master key. This extension can be considered as a new mode of operation .
Additional parameters that defines the functioning of basic modes of operation
with the ACPKM-Master re-keying mechanism are the section size N and change frequency T* of the key K.
The values of N and T* are measured in bits and are fixed within a specific protocol based on the requirements of the system
capacity and key lifetime (some recommendations on choosing N and T* will be provided in ).
The section size N MUST be divisible by the block size n. The key frequency T* MUST be divisible by n.
The main idea behind internal re-keying with master key is presented in Figure 9:
During the processing of the input message M with the length m in some mode of operation that
uses ACPKM-Master key transformation with the master key K and key frequency T*
the message M is divided into l = ceil(m/N) sections (denoted as M = M_1 | M_2 | ... | M_l, where M_i is in V_N
for i in {1, 2, ... , l-1} and M_l is in V_r, r <= N). The j-th section of each message is processed
with the key material K[j], j in {1, ... ,l}, |K[j]| = d, that has been calculated with the ACPKM-Master algorithm as follows:
K[1] | ... | K[l] = ACPKM-Master(T*, K, d*l) = CTR-ACPKM-Encrypt (T*, K, 1^{n/2}, 0^{d*l}).
This section defines a CTR-ACPKM-Master encryption mode that uses internal ACPKM-Master re-keying
mechanism for the periodical key transformation.
The CTR-ACPKM-Master encryption mode can be considered as the extended by the ACPKM-Master re-keying mechanism basic encryption mode CTR (see ).
The CTR-ACPKM-Master encryption mode can be used with the following parameters:
64 <= n <= 512; 128 <= k <= 512;
the number of bits c in a specific part of the block to be incremented
is such that 32 <= c <= 3/4 n, c is multiple of 8.
The key material K[j] that is used for one section processing is equal to K^j, |K^j| = k bits.
The CTR-ACPKM-Master mode encryption and decryption procedures are defined as follows:
The initial counter nonce ICN value for each message that is encrypted under the given key must be
chosen in a unique manner. The counter (CTR_{i+1}) value does not change during key transformation.
The message size MUST NOT exceed (2^{n/2-1}*n*N / k) bits.
This section defines a GCM-ACPKM-Master authenticated encryption mode that uses internal ACPKM-Master re-keying
mechanism for the periodical key transformation.
The GCM-ACPKM-Master authenticated encryption mode can be considered as the extended by the ACPKM-Master re-keying mechanism basic authenticated encryption mode GCM (see ).
The GCM-ACPKM-Master authenticated encryption mode can be used with the following parameters:
n in {128, 256}; 128 <= k <= 512;
the number of bits c in a specific part of the block to be incremented
is such that 32 <= c <= 3/4 n, c is multiple of 8;
authentication tag length t.
The key material K[j] that is used for one section processing is equal to K^j, |K^j| = k bits, that is calculated as follows:
K^1 | ... | K^j | ... | K^l = ACPKM-Master(T*, K, k*l).
The GCM-ACPKM-Master mode encryption and decryption procedures are defined as follows:
The * operation on (pairs of) the 2^n possible blocks corresponds to the multiplication operation
for the binary Galois (finite) field of 2^n elements defined by the polynomial f as follows (by analogy with ):
f = a^128 + a^7 + a^2 + a^1 + 1.
f = a^256 + a^10 + a^5 + a^2 + 1.
The initial vector IV value for each message that is encrypted under the given key must be
chosen in a unique manner.
The plaintext size MUST NOT exceed (2^{n/2-1}*n*N / k) bits.
This section defines a CCM-ACPKM-Master authenticated encryption mode of operations
that uses internal ACPKM-Master re-keying mechanism for the periodical key transformation.
The CCM-ACPKM-Master authenticated encryption mode is differed from CCM-ACPKM mode in the way the keys
K^1, K^2, ... are generated. For CCM-ACPKM-Master mode the keys are generated as follows:
K^i = K[i], where |K^i|=k and K[1]|K[2]|...|K[l] = ACPKM-Master( T*, K, k*l ).
This section defines a CBC-ACPKM-Master encryption mode that uses internal ACPKM-Master re-keying
mechanism for the periodical key transformation.
The CBC-ACPKM-Master encryption mode can be considered as the extended by the ACPKM-Master re-keying mechanism basic encryption mode CBC (see ).
The CBC-ACPKM-Master encryption mode can be used with the following parameters:
64 <= n <= 512; 128 <= k <= 512.
In the specification of the CBC-ACPKM-Master mode the plaintext and ciphertext must be a sequence of one or more complete data blocks.
If the data string to be encrypted does not initially satisfy this property, then it MUST be padded to form complete data blocks.
The padding methods are outside the scope of this document. An example of a padding method can be found in Appendix A of .
The key material K[j] that is used for one section processing is equal to K^j, |K^j| = k bits.
We will denote by D_{K} the decryption function which is a permutation inverse to the E_{K}.
The CBC-ACPKM-Master mode encryption and decryption procedures are defined as follows:
The initialization vector IV for each message that is encrypted under the given key need not to be
secret, but must be unpredictable.
The message size MUST NOT exceed (2^{n/2-1}*n*N / k) bits.
This section defines a CFB-ACPKM-Master encryption mode that uses internal ACPKM-Master re-keying
mechanism for the periodical key transformation.
The CFB-ACPKM-Master encryption mode can be considered as the extended by the ACPKM-Master re-keying mechanism basic encryption mode CFB (see ).
The CFB-ACPKM-Master encryption mode can be used with the following parameters:
64 <= n <= 512; 128 <= k <= 512.
The key material K[j] that is used for one section processing is equal to K^j, |K^j| = k bits.
The CFB-ACPKM-Master mode encryption and decryption procedures are defined as follows:
The initialization vector IV for each message that is encrypted under the given key need not to be
secret, but must be unpredictable.
The message size MUST NOT exceed 2^{n/2-1}*n*N/k bits.
This section defines an OFB-ACPKM-Master encryption mode that uses internal ACPKM-Master re-keying
mechanism for the periodical key transformation.
The OFB-ACPKM-Master encryption mode can be considered as the extended by the ACPKM-Master re-keying mechanism basic encryption mode OFB (see ).
The OFB-ACPKM-Master encryption mode can be used with the following parameters:
64 <= n <= 512; 128 <= k <= 512.
The key material K[j] used for one section processing is equal to K^j, |K^j| = k bits.
The OFB-ACPKM-Master mode encryption and decryption procedures are defined as follows:
The initialization vector IV for each message that is encrypted under the given key need not be
unpredictable, but it must be a nonce that is unique to each execution of the encryption operation.
The message size MUST NOT exceed 2^{n/2-1}*n*N / k bits.
This section defines an OMAC-ACPKM-Master message authentication code calculation mode that uses internal ACPKM-Master re-keying
mechanism for the periodical key transformation.
The OMAC-ACPKM-Master mode can be considered as the extended by the ACPKM-Master re-keying mechanism basic message authentication code calculation mode OMAC, which is also known as CMAC (see ).
The OMAC-ACPKM-Master message authentication code calculation mode can be used with the following parameters:
n in {64, 128, 256}; 128 <= k <= 512.
The key material K[j] that is used for one section processing is equal to K^j | K^j_1, where |K^j| = k and |K^j_1| = n.
The following is a specification of the subkey generation process of OMAC:
Where R_n takes the following values:
n = 64: R_{64} = 0^{59} | 11011; n = 128: R_{128} = 0^{120} | 10000111; n = 256: R_{256} = 0^{145} | 10000100101.
The OMAC-ACPKM-Master message authentication code calculation mode is defined as follows:
The message size MUST NOT exceed 2^{n/2}*n^2*N / (k + n) bits.
Any mechanism described in can be used with any mechanism described in .
Re-keying should be used to increase "a priori" security properties of ciphers in hostile environments (e.g. with side-channel adversaries).
If some non-negligible attacks are known for a cipher, it must not be used. So re-keying cannot be used as a patch for vulnerable ciphers.
Base cipher properties must be well analyzed, because security of re-keying mechanisms is based on security of a block cipher as a pseudorandom function.
Re-keying is not intended to solve any post-quantum security issues for symmetric crypto
since the reduction of security caused by Grover's algorithm is not connected with a size
of plaintext transformed by a cipher - only a negligible (sufficient for key uniqueness)
material is needed and the aim of re-keying is to limit a size of plaintext transformed on one key.
Re-keying can provide backward security only if the previous traffic keys are securely deleted by all parties that have the keys.
The Transport Layer Security (TLS) Protocol Version 1.3
The Galois/Counter Mode of Operation (GCM)
McGrew, D. and J. Viega
Recommendation for Block Cipher Modes of Operation: Methods and Techniques
Dworkin, M.
Increasing the Lifetime of a Key: A Comparative Analysis of the Security of Re-keying Techniques
Michel Abdalla and Mihir Bellare
On the Practical (In-)Security of 64-bit Block Ciphers. Collision Attacks on HTTP over TLS and OpenVPN
Karthikeyan Bhargavan, Gaëtan Leurent
A Tutorial on Linear and Differential Cryptanalysis
Howard M. Heys
Russ Housley
Vigil Security, LLC
housley@vigilsec.com
Mihir Bellare
University of California
mihir@eng.ucsd.edu
Evgeny Alekseev
CryptoPro
alekseev@cryptopro.ru
Ekaterina Smyshlyaeva
CryptoPro
ess@cryptopro.ru
Daniel Fox Franke
Akamai Technologies
dfoxfranke@gmail.com
Lilia Ahmetzyanova
CryptoPro
lah@cryptopro.ru
Ruth Ng
University of California, San Diego
ring@eng.ucsd.edu
Shay Gueron
University of Haifa, Israel
Intel Corporation, Israel Development Center, Israel
shay.gueron@gmail.com
We thank Scott Fluhrer, Dorothy Cooley, Yoav Nir, Jim Schaad and Paul Hoffman
for their useful comments.