diff options
author | Mauro <you@example.com> | 2021-06-30 07:57:22 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2021-07-06 16:16:04 +0000 |
commit | 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch) | |
tree | 7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /lib/includes/hicn/protocol/ah.h | |
parent | 147ba39bed26887f5eba84757e2463ab8e370a9a (diff) |
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org>
Co-authored-by: Michele Papalini <micpapal@cisco.com>
Co-authored-by: Olivier Roques <oroques+fdio@cisco.com>
Co-authored-by: Giulio Grassi <gigrassi@cisco.com>
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'lib/includes/hicn/protocol/ah.h')
-rw-r--r-- | lib/includes/hicn/protocol/ah.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/includes/hicn/protocol/ah.h b/lib/includes/hicn/protocol/ah.h index a59a5051a..575da80d7 100644 --- a/lib/includes/hicn/protocol/ah.h +++ b/lib/includes/hicn/protocol/ah.h @@ -35,16 +35,19 @@ typedef struct { - u8 nh; // (to match with reserved in IPSEC AH) - u8 payloadlen; // Len of signature/HMAC in 4-bytes words + u8 nh; // (to match with reserved in IPSEC AH) + u8 payloadlen; // Len of signature/HMAC in 4-bytes words (maximum size) union { u16 reserved; struct { - u8 validationAlgorithm; // As defined in parc_SignerAlgorithm.h - u8 unused; // Unused (to match with reserved in IPSEC AH) + u8 validationAlgorithm; // As defined in parc_SignerAlgorithm.h + u8 signatureGap; // used to match IPSEC specification and to + // have the real size of the signature(without + // padding). It is the result of Maximum + // signature size - real size }; }; union @@ -60,12 +63,12 @@ typedef struct u32 timestamp_as_u32[2]; }; // ICV would follow - u8 keyId[32]; // Hash of the pub key + u8 keyId[32]; // Hash of pub key /* 44 B + validationPayload */ - u8 validationPayload[0]; // Holds the signature + u8 validationPayload[0]; // Holds the signature } _ah_header_t; -#define AH_HDRLEN sizeof(_ah_header_t) +#define AH_HDRLEN sizeof (_ah_header_t) static_assert (EXPECTED_AH_HDRLEN == AH_HDRLEN, "Size of AH Struct does not match its expected size."); |