@@ -318,89 +318,53 @@ The requirements:
318
318
- Minimal memory requirements
319
319
- Keyderviation support multiple SAs, such as EESP, AH
320
320
321
- *** Iterative key derivation
322
- To iteratively derive keys create a large keymt. e.g. for the nth
321
+ *** Hierarchical key derivation
322
+ Hierarchical key derivation use Sub SA ID, which is carried in EESP
323
+ Seesion ID or in EESP Flow ID(TLV), as an input to the key dervivation.
323
324
324
- KEYMAT = prf+(SK_d, Ni | Nr)
325
- When there is no additional Key Exchange.
325
+ Two KDF are propsed below and eventually choose one of them.
326
326
327
- KEYMAT = prf+(SK_d, g^ir (new) | Ni | Nr)
328
- When there is additional Key Exchange Paload, a.k.a. PFS.
327
+ KEYMAT = prf+(SK_d, Ni | Nr | Sub SA ID)
329
328
330
- Where SK_d is derived from IKE negotiation, as specified in Section
331
- 2.14 of [[RFC7296]]
329
+ Where Ni and Nr are the nonces from the IKE_SA_INIT exchange if this
330
+ request is the first Child SA created or the fresh Ni and Nr from the
331
+ CREATE_CHILD_SA exchange if this is a subsequent creation.
332
+
333
+ For CREATE_CHILD_SA exchanges including an optional Key Exchange
334
+ , the keying material is defined as:
335
+
336
+ KEYMAT = prf+(SK_d, g^ir (new) | Ni | Nr | Sub SA ID)
332
337
333
- Where g^ir (new) is the shared secret from the ephemeral Key Exchange
338
+ where g^ir (new) is the shared secret from the ephemeral Key Exchange
334
339
of this CREATE_CHILD_SA exchange (represented as an
335
340
octet string in big endian order padded with zeros in the high-order
336
341
bits if necessary to make it the length of the modulus).
337
342
338
- For example for Sub SA ID n, use nth set of keys from the KEYMAT.
339
- The order is specified in Section 2.17 of [[RFC7296]] .
343
+ [Note an alternative design that would provide
344
+ uniform distribution when oring with Sub SA ID .
340
345
341
- With existing prf+ function the keymat length is rather limited.
342
- [[RFC7296]] limit the iteration to 256.
343
- However, with modern prf+, more specifically XOF, functions,
344
- such as KMAC specified in [[NIST800-185 ]], or HopMAC/TurboSHAKE
345
- specified [[I-D.irtf-cfrg-kangarootwelve]] the KEYMAT can be
346
- infinitely,(2^40 bytes), long.
347
-
348
- An XOF differs from a traditional PRF, hash, function in that it is
349
- designed to generate very long, and variable length output.
350
- Unlike the IKEv2 prf+ an XOF can generate longer outputs directly
351
- without iterative call.
352
-
353
- Typical length of of 256 bit encryption is 36 bytes,
354
- (32 + 4 salt for IV), in one direction. Using an AEAD for 64K Sub SAs
355
- maximum KEYMAT length would
356
- be:
357
-
358
- 4718592 bytes = 2^16 * 2 * 36 bytes. i.e. 4.5 Mega Bytes
359
-
360
- When using non AEAD algorithms KEMAT size would roughly double of the
361
- above, about 9 Mega Bytes.
362
-
363
- The memory requirment fot generate could be reduced by changing prf+
364
- function interface to return portion of the KEYMAT when using
365
- iterative feedback mode.
366
-
367
- *** Hierarchical key derivation
368
-
369
- Hierarchical key derivation use Sub SA ID, which is carried in EESP
370
- Seesion ID or in EESP Flow ID(TLV), as an input to the key dervivation.
371
-
372
- Two KDF are propsed below and eventually choose one of them.
373
-
374
- KEYMAT = prf+(SK_child, Sub SA ID)
375
-
376
- Where SK_child is the key derived for the Child SA as specified in
377
- [[RFC7296]] section 2.17
346
+ KEYMAT = prf+(prf(SK_d, Ni | Nr | Sub SA ID))
378
347
379
348
One advantage of Hierarchical KDF is KEYMAT for the Sub SAs can be
380
349
generated on the fly, for every packet, when available memory is
381
350
limited, for example [[PSP]]. This is usually the case when key
382
351
derivation is implemented in hardware. When implimenting in hardware
383
352
choose a hardware friendly prf+.
384
353
385
- An alternative key derivation :
386
-
387
- KEYMAT = prf+(SK_d, Ni | Nr | Flow ID)
388
-
389
- NOTE: does using using Ni|Nr|g^ir KDF input matters? Is there a
390
- perfernece? Any advise from the cryptographers?
391
-
392
354
** Rekey Key Derivation.
393
355
During the EESP SA rekey, new keys are derived using the new Ni
394
356
and Nr values. If a Key Exchange (KE) method was used in the rekying,
395
357
CREATE_CHILD_SA exchange, the new key MAY also include g^ir as part of
396
358
the derivation process.
397
359
398
- KEYMAT = prf+(SK_child, Sub SA ID)
360
+ KEYMAT = prf+(SK_d, Ni | Nr | Sub SA ID)
399
361
400
- or depending on which one of the above KDF is chossen.
362
+ or
401
363
402
364
KEYMAT = prf+(SK_d, g^ir (new) | Ni | Nr | Sub SA ID)
403
365
366
+ When there is an additionl Key Exchange in rekey.
367
+
404
368
Even though each Sub SA can be independently rekeyed, for
405
369
simplicity and security, all Sub SAs MUST be rekeyed together
406
370
when either a cryptographic limit or a time-based limit is
0 commit comments