Skip to content

Commit 0677ade

Browse files
committed
eesp.org AAD changes.
this commit is still a work in progress. It need polishing. How to show what would be covered in AAD, also with Crypt Offset. Also further clarifaction on all crypto suites that use integerity protection would be covered in this update. This would also need a change to IANA IKEv2 registry add the column EESP there. Then do we need to upate EACH RFCs?
1 parent f30989e commit 0677ade

File tree

1 file changed

+111
-7
lines changed

1 file changed

+111
-7
lines changed

eesp.org

Lines changed: 111 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -526,10 +526,112 @@ padding, this too MUST be specified in that RFC.
526526
** Integrity Check Value (ICV)
527527

528528
The Integrity Check Value is a variable-length field computed over
529-
the EESP header, and Payload. The length of the field is
530-
specified by the algorithm selected and associated with the
531-
SA. The algorithm specification MUST specify the length of
532-
the ICV and the comparison rules and processing steps for validation.
529+
the Encrypted Payload and Additional Authenticated Data, as defined
530+
in [ADD Construction]. The length of the field is specified by the
531+
algorithm selected and associated with the SA. The algorithm
532+
specification MUST specify the length of the ICV and the comparison
533+
rules and processing steps for validation.
534+
535+
536+
** AAD Construction
537+
Additional Authenticated Data (AAD) includes the Base
538+
Header, any Optional Headers and Peer Header.
539+
540+
#+caption: EESP AAD
541+
#+name: eesp-aad
542+
#+begin_src
543+
0 1 2 3
544+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
545+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
546+
| | |
547+
~ Base Header ~ |
548+
| | |
549+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Int
550+
| | egr
551+
~ Peer Header (variable) ~ ity
552+
| | |
553+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Pro
554+
| | tec
555+
~ Encrypted Payload Data (variable) ~ ted
556+
| | |
557+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
558+
~ Integrity Check Value-ICV (variable) ~
559+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
560+
#+end_src
561+
562+
Additionally, if a Crypt Offset is used, the AAD includes the
563+
associated data exposed due to the offset. Payload Data covered
564+
by the Crypt Offset is transmitted in the clear, but is still
565+
included in the AAD.
566+
567+
#+caption: EESP Tunnel Mode AAD with Crypt Offset
568+
#+name: eesp-aad-crypt-offset
569+
#+begin_src
570+
0 1 2 3
571+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
572+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
573+
| | |
574+
| Base Header ~ |
575+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++|
576+
| Crypt Offset Optional Header | |
577+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++| Int
578+
| | egr
579+
~ Peer Header (variable) ~ ity
580+
| | |
581+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++| Pro
582+
| Plaintext Payload Data (variable) | tec
583+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++| ted
584+
| | |
585+
~ Encrypted Payload Data (variable) ~ |
586+
| | |
587+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+++--+
588+
~ Integrity Check Value-ICV (variable) ~
589+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++
590+
#+end_src
591+
592+
As an example consider a Tunnel mode SA, with replay protection
593+
enabled and 8 bytes explicit IV carrying an IPv4 UDP packet with
594+
crypto offset 8 (8x4 = 32 bytes). [eesp-aad-crypt-offset-example]
595+
596+
#+begin_src
597+
#+caption: EESP Tunnel Mode AAD with Crypt Offset example
598+
#+name: eesp-aad-crypt-offset-example
599+
0 1 2 3
600+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
601+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
602+
|1|Version|Flags| Opt Len (4) | Session ID | |
603+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
604+
| SPI | |
605+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
606+
| Crypt Offset(2) |Opt Len (4)|POffset (7)|CryptOff(8)| F | R | |
607+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Int
608+
| Sequence number 63-32 | egr
609+
| Sequence number 31-0 | ity
610+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
611+
| IV 63-32 | Pro
612+
| IV 31-0 | tec
613+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ted
614+
| Payload Info Header (Next header 4) Plain text) | |
615+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
616+
| IP + UDP Headers 28 bytes Plain text | |
617+
+---------------------------------------------------------------+ |
618+
| Remaining Encrypted Payload Data | |
619+
~ ~ |
620+
| | |
621+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+
622+
| |
623+
~ Integrity Check Value-ICV (variable) ~
624+
| |
625+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
626+
#+end_src
627+
628+
The AAD specifications apply to all EESP cipher suites used with
629+
EESP. This document updates [[RFC4106]] to define EESP-specific
630+
handling of Additional Authenticated Data (AAD) when using
631+
AES-GCM. For AES-GMAC [[RFC4543]], the AAD includes all headers,
632+
i.e. the entire EESP payload except the Integrity Check Value (ICV).
633+
This document also updates AAD processing for the
634+
ENCR_CHACHA20_POLY1305 cipher suite, as specified in [[RFC7634]].
533635

534636
** Full and Optimized Packet Formats
535637

@@ -936,7 +1038,8 @@ intermediate devices.
9361038

9371039
*** EESP Crypt Offset Option
9381040
This option is typically used for within one Datacenter use case
939-
such as [[PSP]].
1041+
such as [[PSP]]. When enabled full packet format, with Payload Info
1042+
Header MUST be used; for the intermediate router to have Next Header.
9401043

9411044
NOTE: This is for the use in Datacenters ONLY. It might be moved to
9421045
a separate document that defines the 'EESP use for Datacenters'.
@@ -1178,7 +1281,7 @@ packets.
11781281
** Algorithms
11791282

11801283
# :NOTE: Not all AEAD algorithms provide both services, e.g.
1181-
# ENCR_NULL_AUTH_AES_GMAC (RFC 4543) does not provide confidentiality
1284+
# ENCR_NULL_AUTH_AES_GMAC [[RFC4543]] does not provide confidentiality
11821285

11831286
EESP version 0 specifies combined mode algorithms only. Separate
11841287
confidentiality and integrity algorithms MUST NOT be used with
@@ -1835,7 +1938,6 @@ TBD
18351938
** RFC2119
18361939
** RFC4301
18371940
** RFC4303
1838-
** RFC4305
18391941
** RFC4494
18401942
** RFC7296
18411943
** RFC8200
@@ -1851,6 +1953,8 @@ TBD
18511953
** RFC3948
18521954
** RFC4106
18531955
** RFC8750
1956+
** RFC4543
1957+
** RFC7634
18541958
** PSP
18551959
:PROPERTIES:
18561960
:REF_TARGET: https://github.com/google/psp/blob/main/doc/PSP_Arch_Spec.pdf

0 commit comments

Comments
 (0)