draft-ietf-manet-packetbb-sec-05.txt   draft-ietf-manet-packetbb-sec-06.txt 
Mobile Ad hoc Networking (MANET) U. Herberg Mobile Ad hoc Networking (MANET) U. Herberg
Internet-Draft T. Clausen Internet-Draft Fujitsu Laboratories of America
Intended status: Standards Track LIX, Ecole Polytechnique Intended status: Standards Track T. Clausen
Expires: January 30, 2012 July 29, 2011 Expires: March 9, 2012 LIX, Ecole Polytechnique
September 6, 2011
MANET Cryptographical Signature TLV Definition MANET Cryptographical Signature TLV Definition
draft-ietf-manet-packetbb-sec-05 draft-ietf-manet-packetbb-sec-06
Abstract Abstract
This document describes general and flexible TLVs (type-length-value This document describes general and flexible TLVs (type-length-value
structure) for representing cryptographic signatures as well as structure) for representing cryptographic signatures as well as
timestamps, using the generalized MANET packet/message format timestamps, using the generalized MANET packet/message format
[RFC5444]. It defines two Packet TLVs, two Message TLVs, and two [RFC5444]. It defines two Packet TLVs, two Message TLVs, and two
Address Block TLVs, for affixing cryptographic signatures and Address Block TLVs, for affixing cryptographic signatures and
timestamps to a packet, message and address, respectively. timestamps to a packet, message and address, respectively.
skipping to change at page 1, line 35 skipping to change at page 1, line 36
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 30, 2012. This Internet-Draft will expire on March 9, 2012.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Applicability Statement . . . . . . . . . . . . . . . . . . . 3 3. Applicability Statement . . . . . . . . . . . . . . . . . . . 4
4. Security Architecture . . . . . . . . . . . . . . . . . . . . 4 4. Security Architecture . . . . . . . . . . . . . . . . . . . . 4
5. Protocol Overview and Functioning . . . . . . . . . . . . . . 5 5. Overview and Functioning . . . . . . . . . . . . . . . . . . . 5
6. Imported TLV Fields . . . . . . . . . . . . . . . . . . . . . 5 6. General Signature TLV Structure . . . . . . . . . . . . . . . 6
7. General Signature TLV Structure . . . . . . . . . . . . . . . 5 7. General Timestamp TLV Structure . . . . . . . . . . . . . . . 6
8. General Timestamp TLV Structure . . . . . . . . . . . . . . . 6 8. Packet TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 7
9. Packet TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 6 8.1. Packet SIGNATURE TLV . . . . . . . . . . . . . . . . . . . 7
9.1. Packet SIGNATURE TLV . . . . . . . . . . . . . . . . . . . 6 8.2. Packet TIMESTAMP TLV . . . . . . . . . . . . . . . . . . . 7
9.2. Packet TIMESTAMP TLV . . . . . . . . . . . . . . . . . . . 7 9. Message TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 8
10. Message TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 7 9.1. Message SIGNATURE TLV . . . . . . . . . . . . . . . . . . 8
10.1. Message SIGNATURE TLV . . . . . . . . . . . . . . . . . . 7 9.2. Message TIMESTAMP TLV . . . . . . . . . . . . . . . . . . 8
10.2. Message TIMESTAMP TLV . . . . . . . . . . . . . . . . . . 8 10. Address Block TLVs . . . . . . . . . . . . . . . . . . . . . . 8
11. Address Block TLVs . . . . . . . . . . . . . . . . . . . . . . 8 10.1. Address Block SIGNATURE TLV . . . . . . . . . . . . . . . 8
11.1. Address Block SIGNATURE TLV . . . . . . . . . . . . . . . 8 10.2. Address Block TIMESTAMP TLV . . . . . . . . . . . . . . . 9
11.2. Address Block TIMESTAMP TLV . . . . . . . . . . . . . . . 8 11. Signature: Basic . . . . . . . . . . . . . . . . . . . . . . . 9
12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 12. Signature: Cryptographic Function over a Hash Value . . . . . 9
12.1. TLV Registrations . . . . . . . . . . . . . . . . . . . . 8 12.1. General Signature TLV Structure . . . . . . . . . . . . . 9
12.1.1. Expert Review: Evaluation Guidelines . . . . . . . . 9 12.1.1. Rationale . . . . . . . . . . . . . . . . . . . . . . 10
12.1.2. Packet TLV Type Registrations . . . . . . . . . . . . 9 12.2. Considerations for Calculating the Signature . . . . . . . 11
12.1.3. Message TLV Type Registrations . . . . . . . . . . . 10 12.2.1. Packet SIGNATURE TLV . . . . . . . . . . . . . . . . 11
12.1.4. Address Block TLV Type Registrations . . . . . . . . 10 12.2.2. Message SIGNATURE TLV . . . . . . . . . . . . . . . . 11
12.2. New IANA Registries . . . . . . . . . . . . . . . . . . . 11 12.2.3. Address Block SIGNATURE TLV . . . . . . . . . . . . . 11
12.2.1. Expert Review: Evaluation Guidelines . . . . . . . . 11 12.3. Example of a Signed Message . . . . . . . . . . . . . . . 11
12.2.2. Hash Function . . . . . . . . . . . . . . . . . . . . 11 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
12.2.3. Cryptographic Algorithm . . . . . . . . . . . . . . . 12 13.1. Expert Review: Evaluation Guidelines . . . . . . . . . . . 13
13. Security Considerations . . . . . . . . . . . . . . . . . . . 12 13.2. Packet TLV Type Registrations . . . . . . . . . . . . . . 13
14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12 13.3. Message TLV Type Registrations . . . . . . . . . . . . . . 14
15. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13 13.4. Address Block TLV Type Registrations . . . . . . . . . . . 15
15.1. Normative References . . . . . . . . . . . . . . . . . . . 13 13.5. Hash Function . . . . . . . . . . . . . . . . . . . . . . 15
15.2. Informative References . . . . . . . . . . . . . . . . . . 13 13.6. Cryptographic Algorithm . . . . . . . . . . . . . . . . . 16
Appendix A. Signature Decomposition into Cryptographic 14. Security Considerations . . . . . . . . . . . . . . . . . . . 16
Function of a Hash Value . . . . . . . . . . . . . . 13 15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 16
A.1. General Signature TLV Structure . . . . . . . . . . . . . 13 16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 17
A.1.1. Rationale . . . . . . . . . . . . . . . . . . . . . . 14 16.1. Normative References . . . . . . . . . . . . . . . . . . . 17
A.2. Considerations for Calculating the Signature . . . . . . . 15 16.2. Informative References . . . . . . . . . . . . . . . . . . 17
A.2.1. Packet SIGNATURE TLV . . . . . . . . . . . . . . . . 15 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 17
A.2.2. Message SIGNATURE TLV . . . . . . . . . . . . . . . . 15
A.2.3. Address Block SIGNATURE TLV . . . . . . . . . . . . . 15
A.3. Example of a Signed Message . . . . . . . . . . . . . . . 15
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 16
1. Introduction 1. Introduction
This document specifies: This document specifies:
o two TLVs for carrying cryptographic signatures and timestamps in o two TLVs for carrying cryptographic signatures and timestamps in
packets, messages and address blocks as defined by [RFC5444], packets, messages, and address blocks as defined by [RFC5444],
o a generic framework for calculating cryptographic signatures, o a generic framework for calculating cryptographic signatures,
taking (for Message TLVs) into account the mutable message header accounting (for Message TLVs) for mutable message header fields
fields (<msg-hop-limit> and <msg-hop-count>) where these fields (<msg-hop-limit> and <msg-hop-count>), where these fields are
are present in messages, present in messages.
o a specific calculation of signatures in the Appendix A of this
document. The signature is decomposed into a cryptographic
function over the hash value of the content to be signed.
This document requests from IANA: This document requests from IANA:
o allocations for these Packet, Message, and Address Block TLVs from o allocations for these Packet, Message, and Address Block TLVs from
the 0-223 Packet TLV range, the 0-127 Message TLV range and the the 0-223 Packet TLV range, the 0-127 Message TLV range and the
0-127 Address Block TLV range from [RFC5444], 0-127 Address Block TLV range from [RFC5444],
o creation of two IANA registries for recording code points for hash o creation of two IANA registries for recording code points for hash
function and signature calculation, respectively. function and signature calculation, respectively.
Finally, this document defines, in Section 12:
o one common method for generating signatures as a cryptographic
function, calculated over the hash value of the content to be
signed.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
[RFC2119]. [RFC2119].
This document uses the terminology and notation defined in [RFC5444]. This document uses the terminology and notation defined in [RFC5444].
In particular, the following TLV fields from [RFC5444] are used in
this specification:
<msg-hop-limit> - hop limit of a message, as specified in Section
5.2 of [RFC5444].
<msg-hop-count> - hop count of a message, as specified in Section
5.2 of [RFC5444].
<length> - length of a TLV in octets, as specified in Section 5.4.1
of [RFC5444].
3. Applicability Statement 3. Applicability Statement
MANET routing protocols using the format defined in [RFC5444] are MANET routing protocols using the format defined in [RFC5444] are
accorded the ability to carry additional information in control accorded the ability to carry additional information in control
messages and packets, through inclusion of TLVs. Information so messages and packets, through inclusion of TLVs. Information so
included MAY be used by a routing protocol, or by an extension of a included MAY be used by a MANET routing protocol, or by an extension
routing protocol, according to its specification. of a MANET routing protocol, according to its specification.
This document specifies how to include a cryptographic signature for This document specifies how to include a cryptographic signature for
a packet, message or address by way of such TLVs. This document also a packet, a message, and addresses in address blocks within a
specifies how to treat "mutable" fields (<msg-hop-count> and <msg- message, by way of such TLVs. This document also specifies how to
hop-limit>), if present, in the message header when calculating treat "mutable" fields, specifically the <msg-hop-count> and <msg-
hop-limit> fields, if present in the message header when calculating
signatures, such that the resulting signature can be correctly signatures, such that the resulting signature can be correctly
verified by any recipient, and how to include this signature. verified by any recipient, and how to include this signature.
This document describes a generic framework of creating signatures in This document describes a generic framework for creating signatures,
the presence of mutable fields, and how to include these signatures and how to include these signatures in TLVs. In Section 12, an
in TLVs. In the Appendix A, one example of how to calculate a example method for calculating such signatures is given, using a
signature is specified, using a cryptographic function over the hash cryptographic function over the hash value of the content to be
value of the content to be signed. signed.
4. Security Architecture 4. Security Architecture
Basic MANET routing protocol specifications are often "oblivious to Basic MANET routing protocol specifications are often "oblivious to
security", however have a clause allowing a control message to be security", however have a clause allowing a control message to be
rejected as "badly formed" prior to it being processed or forwarded. rejected as "badly formed" prior to it being processed or forwarded.
Protocols such as [RFC6130] and [OLSRv2] recognize external reasons MANET routing protocols such as [RFC6130] and [OLSRv2] recognize
(such as failure to verify a signature) for rejecting a message as external reasons (such as failure to verify a signature) for
"badly formed", and therefore "invalid for processing". This rejecting a message as "badly formed", and therefore "invalid for
architecture is a result of the observation that with respect to processing". This architecture is a result of the observation that
security in MANETs, "one size rarely fits all" and that MANET routing with respect to security in MANETs, "one size rarely fits all" and
protocol deployment domains have varying security requirements that MANET routing protocol deployment domains have varying security
ranging from "unbreakable" to "virtually none". The virtue of this requirements ranging from "unbreakable" to "virtually none". The
approach is that MANET routing protocol specifications (and virtue of this approach is that MANET routing protocol specifications
implementations) can remain "generic", with extensions providing (and implementations) can remain "generic", with extensions providing
proper deployment-domain specific security mechanisms. proper deployment-domain specific security mechanisms.
The MANET routing protocol "security architecture", in which this The MANET routing protocol "security architecture", in which this
specification situates itself, can therefore be summarized as specification situates itself, can therefore be summarized as
follows: follows:
o Security-oblivious MANET routing protocol specifications, with a o Security-oblivious MANET routing protocol specifications, with a
clause allowing an extension to reject a message (prior to clause allowing an extension to reject a message (prior to
processing/forwarding) as "badly formed". processing/forwarding) as "badly formed".
o MANET routing protocol security extensions, rejecting messages as o MANET routing protocol security extensions, rejecting messages as
"badly formed", as appropriate for a given deployment-domain "badly formed", as appropriate for a given deployment-domain
specific security requirement. specific security requirement.
o Code-points and an exchange format for information, necessary for o Code-points and an exchange format for information, necessary for
specification of such MANET routing protocol security extensions. specification of such MANET routing protocol security extensions.
This document addresses the last of these issues, by specifying a This document addresses the last of these issues, by specifying a
common exchange format for cryptographic signatures, making common exchange format for cryptographic signatures, making
reservations from within the Packet TLV, Message TLV and Address reservations from within the Packet TLV, Message TLV, and Address
Block TLV registries of [RFC5444], to be used (and shared) among Block TLV registries of [RFC5444], to be used (and shared) among
MANET routing protocol security extensions. MANET routing protocol security extensions.
For the specific decomposition of a signature into a cryptographic For the specific decomposition of a signature into a cryptographic
function over a hash value, specified in Appendix A, this document function over a hash value, specified in Section 12, this document
establishes two IANA registries for code-points for hash functions establishes two IANA registries for code-points for hash functions
and cryptographic functions adhering to [RFC5444]. and cryptographic functions adhering to [RFC5444].
With respect to [RFC5444], this document: With respect to [RFC5444], this document:
o is intended to be used in the non-normative, but intended, mode of o is intended to be used in the non-normative, but intended, mode of
use of [RFC5444] as described in its Appendix B. use described in Appendix B of [RFC5444].
o is a specific example of the Security Considerations section of o is a specific example of the Security Considerations section of
[RFC5444] (the authentication part). [RFC5444] (the authentication part).
5. Protocol Overview and Functioning 5. Overview and Functioning
This document specifies a syntactical representation of security This document specifies a syntactical representation of security
related information for use with [RFC5444] addresses, messages and related information for use with [RFC5444] addresses, messages, and
packets, as well as establishes IANA registrations and registries. packets, as well as establishes IANA registrations and registries.
Moreover, this document provides guidelines how protocols using this Moreover, this document provides guidelines how MANET routing
specification should treat Signature and Timestamp TLVs, and mutable protocols and MANET routing protocol extensions, using this
fields in messages. This specification, however, does not represent specification, should treat Signature and Timestamp TLVs, and mutable
a stand-alone protocol; protocols using this specification have to fields in messages. This specification does not represent a stand-
provide instructions how to handle packets, messages and addresses alone protocol; MANET routing protocols and MANET routing protocol
with associated security information, as specified in this document. extensions, using this specification, MUST provide instructions as to
how to handle packets, messages and addresses with security
information, associated as specified in this document.
6. Imported TLV Fields This document requests assignment of TLV types from the registries
defined for Packet, Message and Address Block TLVs in [RFC5444].
In this specification, the following TLV fields from [RFC5444] are When a TLV type is assigned from one of these registries, a registry
used: for "Type Extensions" for that TLV type is created by IANA. This
document utilizes these "Type Extension" registries so created, in
order to specify internal structure (and accompanying processing) of
the <value> field of a TLV.
<msg-hop-limit> - hop limit of a message, as specified in Section For example, and as defined in this document, a SIGNATURE TLV with
5.2 of [RFC5444]. Type Extension = 0 specifies that the <value> field has no pre-
defined internal structure, but is simply a sequence of octets. A
SIGNATURE TLV with Type Extension = 1 specifies that the <value>
field has a pre-defined internal structure, and defines its
interpretation (specifically, the <value> field consists of a
cryptographic operation over a hash value, with fields indicating
which hash function and cryptographic operation has been used,
specified in Section 12).
<msg-hop-count> - hop count of a message, as specified in Section Other documents may request assignments for other Type Extensions,
5.2 of [RFC5444]. and must if so specify their internal structure (if any) and
interpretation.
<length> - length of a TLV in octets, as specified in Section 5.4.1 6. General Signature TLV Structure
of [RFC5444].
7. General Signature TLV Structure The value of the Signature TLV is:
The following data structure, which is the value of the Signature <value> := <signature-value>
TLV, allows a generic representation of a cryptographic signature.
This <signature> data structure is specified, using the regular
expression syntax of [RFC5444], as:
<signature> := <signature-value> where:
<signature-value> is an integer field, whose length is <length>, and <signature-value> is a field, of <length> octets, which contains the
which contains the signature. The value of this variable is to be information, to be interpreted by the signature verification
interpreted by the routing protocol as specified by the type process, as specified by the Type Extension.
extension of the Signature TLV, see Section 12.
This generic specification allows for adding a signature in a TLV, Note that this does not stipulate how to calculate the <signature-
using TLV type extension 0, and does not stipulate how to calculate value>, nor the internal structure hereof, if any; such MUST be
the signature-value. Appendix A specifies a concrete calculation of specified by way of the Type Extension for the SIGNATURE TLV type,
the signature-value, using a cryptographic function over a hash see Section 13. This document specifies two such type-extensions,
function of the content to be signed. Other methods of how to for signatures without pre-defined structures, and for signatures
calculate the signature-value may be specified in future documents. constructed by way of a cryptographic operation over a hash-value.
8. General Timestamp TLV Structure 7. General Timestamp TLV Structure
The following data structure, which is the value of the Timestamp The value of the Timestamp TLV is:
TLV, allows the representation of a timestamp. This <timestamp> data
structure is specified as:
<timestamp> := <time-value> <value> := <time-value>
where: where:
<time-value> is an unsigned integer field, whose length is <length>, <time-value> is an unsigned integer field, of length <length>, which
and which contains the timestamp. The value of this variable is contains the timestamp.
to be interpreted by the routing protocol as specified by the type
extension of the Timestamp TLV, see Section 12. Note that this does not stipulate how to calculate the <time-
value>, nor the internal structure hereof, if any; such MUST be
specified by way of the Type Extension for the TIMESTAMP TLV type,
see Section 13.
A timestamp is essentially "freshness information". As such, its A timestamp is essentially "freshness information". As such, its
setting and interpretation is to be determined by the routing setting and interpretation is to be determined by the MANET routing
protocol (or the extension to a routing protocol) that uses it, and protocol, or MANET routing protocol extension, that uses the
may e.g. correspond to a UNIX-timestamp, GPS timestamp or a simple timestamp, and may, e.g., correspond to a UNIX-timestamp, GPS
sequence number. timestamp or a simple sequence number.
9. Packet TLVs 8. Packet TLVs
Two Packet TLVs are defined, for including the cryptographic Two Packet TLVs are defined, for including the cryptographic
signature of a packet, and for including the timestamp indicating the signature of a packet, and for including the timestamp indicating the
time at which the cryptographic signature was calculated. time at which the cryptographic signature was calculated.
9.1. Packet SIGNATURE TLV 8.1. Packet SIGNATURE TLV
A Packet SIGNATURE TLV is an example of a Signature TLV as described A Packet SIGNATURE TLV is an example of a Signature TLV as described
in Section 7. in Section 6.
The following considerations apply: The following considerations apply:
o As packets defined in [RFC5444] are never forwarded by routers, it o As packets defined in [RFC5444] are never forwarded by routers, no
is unnecessary to consider mutable fields (e.g. <msg-hop-count> special considerations are required regarding mutable fields (e.g.
and <msg-hop-limit>), if present, when calculating the signature. <msg-hop-count> and <msg-hop-limit>), if present, when calculating
the signature.
o any Packet SIGNATURE TLVs already present in the Packet TLV block o Any Packet SIGNATURE TLVs already present in the Packet TLV block
MUST be removed before calculating the signature, and the Packet MUST be removed before calculating the signature, and the Packet
TLV block size MUST be recalculated accordingly. The TLVs can be TLV block size MUST be recalculated accordingly. The TLVs can be
restored after having calculated the signature value. restored after having calculated the signature value.
The rationale for removing any Packet SIGNATURE TLV already present The rationale for removing any Packet SIGNATURE TLV already present
prior to calculating the signature, is that several signatures may be prior to calculating the signature is that several signatures may be
added to the same packet, e.g., using different signature functions. added to the same packet, e.g., using different signature functions.
9.2. Packet TIMESTAMP TLV 8.2. Packet TIMESTAMP TLV
A Packet TIMESTAMP TLV is an example of a Timestamp TLV as described A Packet TIMESTAMP TLV is an example of a Timestamp TLV as described
in Section 8. If a packet contains a TIMESTAMP TLV and a SIGNATURE in Section 7. If a packet contains a TIMESTAMP TLV and a SIGNATURE
TLV, the TIMESTAMP TLV SHOULD be added to the packet before any TLV, the TIMESTAMP TLV SHOULD be added to the packet before any
SIGNATURE TLV, in order that it be included in the calculation of the SIGNATURE TLV, in order that it be included in the calculation of the
signature. signature.
10. Message TLVs 9. Message TLVs
Two Message TLVs are defined, for including the cryptographic Two Message TLVs are defined, for including the cryptographic
signature of a message, and for including the timestamp indicating signature of a message, and for including the timestamp indicating
the time at which the cryptographic signature was calculated. the time at which the cryptographic signature was calculated.
10.1. Message SIGNATURE TLV 9.1. Message SIGNATURE TLV
A Message SIGNATURE TLV is an example of a Signature TLV as described A Message SIGNATURE TLV is an example of a Signature TLV as described
in Section 7. When determining the <signature-value> for a message, in Section 6. When determining the <signature-value> for a message,
the following considerations must be applied: the following considerations must be applied:
o the fields <msg-hop-limit> and <msg-hop-count>, if present, MUST o The fields <msg-hop-limit> and <msg-hop-count>, if present, MUST
both be assumed to have the value 0 (zero) when calculating the both be assumed to have the value 0 (zero) when calculating the
signature. signature.
o any Message SIGNATURE TLVs already present in the Message TLV o Any Message SIGNATURE TLVs already present in the Message TLV
block MUST be removed before calculating the signature, and the block MUST be removed before calculating the signature, and the
message size as well as the Message TLV block size MUST be message size as well as the Message TLV block size MUST be
recalculated accordingly. The TLVs can be restored after having recalculated accordingly. Removed SIGNATURE TLVs SHOULD be
calculated the signature value. restored after having calculated the signature value.
The rationale for removing any Message SIGNATURE TLV already present The rationale for removing any Message SIGNATURE TLV already present
prior to calculating the signature, is that several signatures may be prior to calculating the signature is that several signatures may be
added to the same message, e.g., using different signature functions. added to the same message, e.g., using different signature functions.
10.2. Message TIMESTAMP TLV 9.2. Message TIMESTAMP TLV
A Message TIMESTAMP TLV is an example of a Timestamp TLV as described A Message TIMESTAMP TLV is an example of a Timestamp TLV as described
in Section 8. If a message contains a TIMESTAMP TLV and a SIGNATURE in Section 7. If a message contains a TIMESTAMP TLV and a SIGNATURE
TLV, the TIMESTAMP TLV SHOULD be added to the message before the TLV, the TIMESTAMP TLV SHOULD be added to the message before the
SIGNATURE TLV, in order that it be included in the calculation of the SIGNATURE TLV, in order that it be included in the calculation of the
signature. signature.
11. Address Block TLVs 10. Address Block TLVs
Two Address Block TLVs are defined, for associating a cryptographic Two Address Block TLVs are defined, for associating a cryptographic
signature to an address, and for including the timestamp indicating signature to an address, and for including the timestamp indicating
the time at which the cryptographic signature was calculated. the time at which the cryptographic signature was calculated.
11.1. Address Block SIGNATURE TLV 10.1. Address Block SIGNATURE TLV
An Address Block SIGNATURE TLV is an example of a Signature TLV as An Address Block SIGNATURE TLV is an example of a Signature TLV as
described in Section 7. The signature is calculated over the described in Section 6. The signature is calculated over the
address, concatenated with any other values, for example, any other address, concatenated with any other values, for example, any other
TLV value that is associated with that address. A routing protocol TLV value that is associated with that address. A MANET routing
or routing protocol extension using Address Block SIGNATURE TLVs MUST protocol or MANET routing protocol extension using Address Block
specify how to include any such concatenated attribute of the address SIGNATURE TLVs MUST specify how to include any such concatenated
in the verification process of the signature. attribute of the address in the verification process of the
signature.
11.2. Address Block TIMESTAMP TLV 10.2. Address Block TIMESTAMP TLV
An Address Block TIMESTAMP TLV is an example of a Timestamp TLV as An Address Block TIMESTAMP TLV is an example of a Timestamp TLV as
described in Section 8. If both a TIMESTAMP TLV and a SIGNATURE TLV described in Section 7. If both a TIMESTAMP TLV and a SIGNATURE TLV
are associated with an address, the timestamp value should be are associated with an address, the timestamp value should be
considered when calculating the value of the signature. considered when calculating the value of the signature.
12. IANA Considerations 11. Signature: Basic
This section specifies requests to IANA. The basic signature proposed, represented by way of a SIGNATURE TLV
with Type Extension = 0, is a simple bit-field containing the
cryptographic signature. This assumes that the mechanism stipulating
how signatures are calculated and verified is established outside of
this specification, e.g., by way of administrative configuration or
external out-of-band signaling. Thus, the <signature-value> for when
using Type Extension = 0 is:
12.1. TLV Registrations <signature-value> := <signature-data>
where:
<signature-data> is an unsigned integer field, of length <length>,
which contains the cryptographic signature.
12. Signature: Cryptographic Function over a Hash Value
One common way of calculating a signature is applying a cryptographic
function on a hash value of the content. This decomposition is
specified in the following, using a Type Extension = 1 in the
Signature TLVs.
12.1. General Signature TLV Structure
The following data structure allows representation of a cryptographic
signature, including specification of the appropriate hash function
and cryptographic function used for calculating the signature:
<signature-value> := <hash-function>
<cryptographic-function>
<key-index>
<signature-data>
where:
<hash-function> is an 8-bit unsigned integer field specifying the
hash function.
<cryptographic-function> is an 8-bit unsigned integer field
specifying the cryptographic function.
<key-index> is an 8-bit unsigned integer field specifying the key
index of the key which was used to sign the message, which allows
unique identification of different keys with the same originator.
It is the responsibility of each key originator to make sure that
actively used keys that it issues have distinct key indices and
that all key indices have a value not equal to 0x00. The value
0x00 is reserved for a pre-installed, shared key.
<signature-data> is an unsigned integer field, whose length is
<length> - 3, and which contains the cryptographic signature.
The version of this TLV, specified in this section, assumes that
calculating the signature can be decomposed into:
signature-value = cryptographic-function(hash-function(content))
The hash function and the cryptographic function correspond to the
entries in two IANA registries, set up by this specification in
Section 13.
12.1.1. Rationale
The rationale for separating the hash function and the cryptographic
function into two octets instead of having all combinations in a
single octet - possibly as TLV type extension - is twofold: First, if
further hash functions or cryptographic functions are added in the
future, the number space might not remain continuous. More
importantly, the number space of possible combinations would be
rapidly exhausted. As new or improved cryptographic mechanism are
continuously being developed and introduced, this format should be
able to accommodate such for the foreseeable future.
The rationale for not including a field that lists parameters of the
cryptographic signature in the TLV is, that before being able to
validate a cryptographic signature, routers have to exchange or
acquire keys (e.g. public keys). Any additional parameters can be
provided together with the keys in that bootstrap process. It is
therefore not necessary, and would even entail an extra overhead, to
transmit the parameters within every message. One implicitly
available parameter is the length of the signature, which is <length>
- 3, and which depends on the choice of the cryptographic function.
12.2. Considerations for Calculating the Signature
In the following, considerations are listed, which MUST be applied
when calculating the signature for Packet, Message and Address
SIGNATURE TLVs, respectively.
12.2.1. Packet SIGNATURE TLV
When determining the <signature-value> for a Packet, the signature is
calculated over the three fields <hash-function>, <cryptographic-
function> and <key-index> (in that order), concatenated with the
entire Packet, including the packet header, all Packet TLVs (other
than Packet SIGNATURE TLVs) and all included Messages and their
message headers, in accordance with Section 8.1.
12.2.2. Message SIGNATURE TLV
When determining the <signature-value> for a message, the signature
is calculated over the three fields <hash-function>, <cryptographic-
function>, and <key-index> (in that order), concatenated with the
entire message. The considerations in Section 9.1 MUST be applied.
12.2.3. Address Block SIGNATURE TLV
When determining the <signature-value> for an address, the signature
is calculated over the three fields <hash-function>, <cryptographic-
function>, and <key-index> (in that order), concatenated with the
address, concatenated with any other values, for example, any other
TLV value that is associated with that address. A MANET routing
protocol or MANET routing protocol extension using Address Block
SIGNATURE TLVs MUST specify how to include any such concatenated
attribute of the address in the verification process of the
signature. The considerations in Section 10.2 MUST be applied.
12.3. Example of a Signed Message
The sample message depicted in Figure 1 is derived from appendix D of
[RFC5444]. The message contains a SIGNATURE Message TLV, with the
value representing a 16 octet long signature of the whole message.
The type extension of the Message TLV is 1, for the specific
decomposition of a signature into a cryptographic function over a
hash value, as specified in Section 12.
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PV=0 | PF=8 | Packet Sequence Number | Message Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| MF=15 | MAL=3 | Message Length = 40 | Msg. Orig Addr|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message Originator Address (cont) | Hop Limit |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Hop Count | Message Sequence Number | Msg. TLV Block|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length = 30 | SIGNATURE | MTLVF = 144 | MTLVExt = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Value Len = 19 | Hash Func | Crypto Func | Key Index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Signature Value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Signature Value (cont) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Signature Value (cont) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Signature Value (cont) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: Example message with signature
13. IANA Considerations
This specification defines: This specification defines:
o two Packet TLV types which must be allocated from the 0-223 range o two Packet TLV types, which MUST be allocated from the 0-223 range
of the "Assigned Packet TLV Types" repository of [RFC5444] as of the "Assigned Packet TLV Types" repository of [RFC5444] as
specified in Table 1, specified in Table 1,
o two Message TLV types which must be allocated from the 0-127 range o two Message TLV types, which MUST be allocated from the 0-127
of the "Assigned Message TLV Types" repository of [RFC5444] as range of the "Assigned Message TLV Types" repository of [RFC5444]
specified in Table 2, as specified in Table 2,
o and two Address Block TLV types which must be allocated from the o two Address Block TLV types, which MUST be allocated from the
0-127 range of the "Assigned Address Block TLV Types" repository 0-127 range of the "Assigned Address Block TLV Types" repository
of [RFC5444] as specified in Table 3. of [RFC5444] as specified in Table 3.
This specification requests: This specification requests:
o set up of type extension registries for these TLV types with o creation of type extension registries for these TLV types with
initial values as in Table 1 to Table 3. initial values as in Table 1 to Table 3.
IANA is requested to assign the same numerical value to the Packet IANA is requested to assign the same numerical value to the Packet
TLV, Message TLV and Address Block TLV types with the same name. TLV, Message TLV and Address Block TLV types with the same name.
12.1.1. Expert Review: Evaluation Guidelines The following terms are used with the meanings defined in [BCP26]:
"Namespace", "Assigned Value", "Registration", "Unassigned",
"Reserved", "Hierarchical Allocation", and "Designated Expert".
The following policies are used with the meanings defined in [BCP26]:
"Private Use", "Expert Review", and "Standards Action".
13.1. Expert Review: Evaluation Guidelines
For the registries for TLV type extensions where an Expert Review is For the registries for TLV type extensions where an Expert Review is
required, the designated expert SHOULD take the same general required, the designated expert SHOULD take the same general
recommendations into consideration as are specified by [RFC5444]. recommendations into consideration as are specified by [RFC5444].
For the Timestamp TLV, the same type extensions for all Packet, For the Timestamp TLV, the same type extensions for all Packet,
Message and Address TLVs should be numbered identically. Message and Address TLVs SHOULD be numbered identically.
12.1.2. Packet TLV Type Registrations 13.2. Packet TLV Type Registrations
The Packet TLVs as specified in Table 1 must be allocated from the IANA is requested to make allocations from the "Packet TLV Types"
"Packet TLV Types" namespace of [RFC5444]. namespace of [RFC5444] for the Packet TLVs specified in Table 1.
+-----------+------+-----------+------------------------------------+ +-----------+------+-----------+------------------------------------+
| Name | Type | Type | Description | | Name | Type | Type | Description |
| | | Extension | | | | | Extension | |
+-----------+------+-----------+------------------------------------+ +-----------+------+-----------+------------------------------------+
| SIGNATURE | TBD1 | 0 | Signature of a packet | | SIGNATURE | TBD1 | 0 | Signature of a packet |
| | | 1 | Signature, decomposed into | | | | 1 | Signature, decomposed into |
| | | | cryptographic function over a hash | | | | | cryptographic function over a hash |
| | | | value, as specified in Appendix A | | | | | value, as specified in Section 12 |
| | | | in this document. | | | | | in this document. |
| | | 2-223 | Expert Review | | | | 2-223 | Expert Review |
| | | 224-255 | Experimental Use | | | | 224-255 | Experimental Use |
| TIMESTAMP | TBD2 | 0 | Unsigned timestamp of arbitrary | | TIMESTAMP | TBD2 | 0 | Unsigned timestamp of arbitrary |
| | | | length, given by the TLV length | | | | | length, given by the TLV length |
| | | | field. The MANET routing protocol | | | | | field. The MANET routing protocol |
| | | | has to define how to interpret | | | | | has to define how to interpret |
| | | | this timestamp | | | | | this timestamp |
| | | 1-223 | Expert Review | | | | 1-223 | Expert Review |
| | | 224-255 | Experimental Use | | | | 224-255 | Experimental Use |
+-----------+------+-----------+------------------------------------+ +-----------+------+-----------+------------------------------------+
Table 1: Packet TLV types Table 1: Packet TLV types
12.1.3. Message TLV Type Registrations 13.3. Message TLV Type Registrations
The Message TLVs as specified in Table 2 must be allocated from the IANA is requested to make allocations from the "Message TLV Types"
"Message TLV Types" namespace of [RFC5444]. namespace of [RFC5444] for the Message TLVs specified in Table 2.
+-----------+------+-----------+------------------------------------+ +-----------+------+-----------+------------------------------------+
| Name | Type | Type | Description | | Name | Type | Type | Description |
| | | Extension | | | | | Extension | |
+-----------+------+-----------+------------------------------------+ +-----------+------+-----------+------------------------------------+
| SIGNATURE | TBD3 | 0 | Signature of a message | | SIGNATURE | TBD3 | 0 | Signature of a message |
| | | 1 | Signature, decomposed into | | | | 1 | Signature, decomposed into |
| | | | cryptographic function over a hash | | | | | cryptographic function over a hash |
| | | | value, as specified in Appendix A | | | | | value, as specified in Section 12 |
| | | | in this document. | | | | | in this document. |
| | | 2-223 | Expert Review | | | | 2-223 | Expert Review |
| | | 224-255 | Experimental Use | | | | 224-255 | Experimental Use |
| TIMESTAMP | TBD4 | 0 | Unsigned timestamp of arbitrary | | TIMESTAMP | TBD4 | 0 | Unsigned timestamp of arbitrary |
| | | | length, given by the TLV length | | | | | length, given by the TLV length |
| | | | field. | | | | | field. |
| | | 1-223 | Expert Review | | | | 1-223 | Expert Review |
| | | 224-255 | Experimental Use | | | | 224-255 | Experimental Use |
+-----------+------+-----------+------------------------------------+ +-----------+------+-----------+------------------------------------+
Table 2: Message TLV types Table 2: Message TLV types
12.1.4. Address Block TLV Type Registrations 13.4. Address Block TLV Type Registrations
The Address Block TLVs as specified in Table 3 must be allocated from IANA is requested to make allocations from the "Address Block TLV
the "Address Block TLV Types" namespace of [RFC5444]. Types" namespace of [RFC5444] for the Packet TLVs specified in
Table 3.
+-----------+------+-----------+------------------------------------+ +-----------+------+-----------+------------------------------------+
| Name | Type | Type | Description | | Name | Type | Type | Description |
| | | Extension | | | | | Extension | |
+-----------+------+-----------+------------------------------------+ +-----------+------+-----------+------------------------------------+
| SIGNATURE | TBD5 | 0 | Signature of an object (e.g. an | | SIGNATURE | TBD5 | 0 | Signature of an object (e.g. an |
| | | | address) | | | | | address) |
| | | 1 | Signature, decomposed into | | | | 1 | Signature, decomposed into |
| | | | cryptographic function over a hash | | | | | cryptographic function over a hash |
| | | | value, as specified in Appendix A | | | | | value, as specified in Section 12 |
| | | | in this document. | | | | | in this document. |
| | | 2-223 | Expert Review | | | | 2-223 | Expert Review |
| | | 224-255 | Experimental Use | | | | 224-255 | Experimental Use |
| TIMESTAMP | TBD6 | 0 | Unsigned timestamp of arbitrary | | TIMESTAMP | TBD6 | 0 | Unsigned timestamp of arbitrary |
| | | | length, given by the TLV length | | | | | length, given by the TLV length |
| | | | field. | | | | | field. |
| | | 1-223 | Expert Review | | | | 1-223 | Expert Review |
| | | 224-255 | Experimental Use | | | | 224-255 | Experimental Use |
+-----------+------+-----------+------------------------------------+ +-----------+------+-----------+------------------------------------+
Table 3: Address Block TLV types Table 3: Address Block TLV types
12.2. New IANA Registries 13.5. Hash Function
This document introduces three namespaces that have been registered:
Packet TLV Types, Message TLV Types, and Address Block TLV Types.
This section specifies IANA registries for these namespaces and
provides guidance to the Internet Assigned Numbers Authority
regarding registrations in these namespaces.
The following terms are used with the meanings defined in [BCP26]:
"Namespace", "Assigned Value", "Registration", "Unassigned",
"Reserved", "Hierarchical Allocation", and "Designated Expert".
The following policies are used with the meanings defined in [BCP26]:
"Private Use", "Expert Review", and "Standards Action".
12.2.1. Expert Review: Evaluation Guidelines
For the registries for the following tables where an Expert Review is
required, the designated expert SHOULD take the same general
recommendations into consideration as are specified by [RFC5444].
12.2.2. Hash Function
IANA is requested to create a new registry for the hash functions IANA is requested to create a new registry for hash functions that
that can be used when creating a signature, as specified in the can be used when creating a signature, as specified in Section 12 of
Appendix A of this document. The initial assignments and allocation this document. The initial assignments and allocation policies are
policies are specified in Table 4. specified in Table 4.
+-------------+-----------+-----------------------------------------+ +-------------+-----------+-----------------------------------------+
| Hash | Algorithm | Description | | Hash | Algorithm | Description |
| function | | | | function | | |
| value | | | | value | | |
+-------------+-----------+-----------------------------------------+ +-------------+-----------+-----------------------------------------+
| 0 | none | The "identity function": the hash value | | 0 | none | The "identity function": the hash value |
| | | of an object is the object itself | | | | of an object is the object itself |
| 1-223 | | Expert Review | | 1-223 | | Expert Review |
| 224-255 | | Experimental Use | | 224-255 | | Experimental Use |
skipping to change at page 12, line 4 skipping to change at page 15, line 49
+-------------+-----------+-----------------------------------------+ +-------------+-----------+-----------------------------------------+
| Hash | Algorithm | Description | | Hash | Algorithm | Description |
| function | | | | function | | |
| value | | | | value | | |
+-------------+-----------+-----------------------------------------+ +-------------+-----------+-----------------------------------------+
| 0 | none | The "identity function": the hash value | | 0 | none | The "identity function": the hash value |
| | | of an object is the object itself | | | | of an object is the object itself |
| 1-223 | | Expert Review | | 1-223 | | Expert Review |
| 224-255 | | Experimental Use | | 224-255 | | Experimental Use |
+-------------+-----------+-----------------------------------------+ +-------------+-----------+-----------------------------------------+
Table 4: Hash-Function registry Table 4: Hash-Function registry
12.2.3. Cryptographic Algorithm 13.6. Cryptographic Algorithm
IANA is requested to create a new registry for the cryptographic IANA is requested to create a new registry for the cryptographic
function, as specified in the Appendix A of this document. Initial function, as specified in Section 12 of this document. Initial
assignments and allocation policies are specified in Table 5. assignments and allocation policies are specified in Table 5.
+----------------+-----------+--------------------------------------+ +----------------+-----------+--------------------------------------+
| Cryptographic | Algorithm | Description | | Cryptographic | Algorithm | Description |
| function value | | | | function value | | |
+----------------+-----------+--------------------------------------+ +----------------+-----------+--------------------------------------+
| 0 | none | The "identity function": the value | | 0 | none | The "identity function": the value |
| | | of an encrypted hash is the hash | | | | of an encrypted hash is the hash |
| | | itself | | | | itself |
| 1-223 | | Expert Review | | 1-223 | | Expert Review |
| 224-255 | | Experimental Use | | 224-255 | | Experimental Use |
+----------------+-----------+--------------------------------------+ +----------------+-----------+--------------------------------------+
Table 5: Cryptographic function registry Table 5: Cryptographic function registry
13. Security Considerations 14. Security Considerations
This document does not specify a protocol itself. However, it This document does not specify a protocol. It provides a syntactical
provides a syntactical component for cryptographic signatures of component for cryptographic signatures of messages and packets as
messages and packets as defined in [RFC5444]. It can be used to defined in [RFC5444]. It can be used to address security issues of a
address security issues of a protocol or extension that uses the MANET routing protocol or MANET routing protocol extension. As such,
component specified in this document. As such, it has the same it has the same security considerations as [RFC5444].
security considerations as [RFC5444].
In addition, a protocol that includes this component MUST specify the In addition, a MANET routing protocol or MANET routing protocol
usage as well as the security that is attained by the cryptographic extension that uses this specification MUST specify the usage as well
signatures of a message or a packet. as the security that is attained by the cryptographic signatures of a
message or a packet.
As an example, a routing protocol that uses this component to reject As an example, a MANET routing protocol that uses this component to
"badly formed" messages if a control message does not contain a valid reject "badly formed" messages if a control message does not contain
signature, should indicate the security assumption that if the a valid signature, SHOULD indicate the security assumption that if
signature is valid, the message is considered valid. It also should the signature is valid, the message is considered valid. It also
indicate the security issues that are counteracted by this measure SHOULD indicate the security issues that are counteracted by this
(e.g. link or identity spoofing) as well as the issues that are not measure (e.g. link or identity spoofing) as well as the issues that
counteracted (e.g. compromised keys). are not counteracted (e.g. compromised keys).
14. Acknowledgements 15. Acknowledgements
The authors would like to thank Bo Berry (Cisco), Alan Cullen (BAE), The authors would like to thank Bo Berry (Cisco), Alan Cullen (BAE),
Justin Dean (NRL), Christopher Dearlove (BAE), Paul Lambert Justin Dean (NRL), Christopher Dearlove (BAE), Paul Lambert
(Marvell), Jerome Milan (Ecole Polytechnique) and Henning Rogge (Marvell), Jerome Milan (Ecole Polytechnique) and Henning Rogge
(FGAN) for their constructive comments on the document. (FGAN) for their constructive comments on the document.
15. References 16. References
15.1. Normative References 16.1. Normative References
[BCP26] Narten, T. and H. Alvestrand, "Guidelines for Writing an [BCP26] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", RFC 5226, BCP 26, IANA Considerations Section in RFCs", RFC 5226, BCP 26,
May 2008. May 2008.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", RFC 2119, BCP 14, March 1997. Requirement Levels", RFC 2119, BCP 14, March 1997.
[RFC5444] Clausen, T., Dearlove, C., Dean, J., and C. Adjih, [RFC5444] Clausen, T., Dearlove, C., Dean, J., and C. Adjih,
"Generalized MANET Packet/Message Format", RFC 5444, "Generalized MANET Packet/Message Format", RFC 5444,
February 2009. February 2009.
15.2. Informative References 16.2. Informative References
[OLSRv2] Clausen, T., Dearlove, C., and P. Jacquet, "The Optimized [OLSRv2] Clausen, T., Dearlove, C., and P. Jacquet, "The Optimized
Link State Routing Protocol version 2", work in Link State Routing Protocol version 2", work in
progress draft-ietf-manet-olsrv2-12.txt, July 2011. progress draft-ietf-manet-olsrv2-12.txt, July 2011.
[RFC6130] Clausen, T., Dean, J., and C. Dearlove, "MANET [RFC6130] Clausen, T., Dean, J., and C. Dearlove, "MANET
Neighborhood Discovery Protocol (NHDP)", RFC 6130, Neighborhood Discovery Protocol (NHDP)", RFC 6130,
March 2011. March 2011.
Appendix A. Signature Decomposition into Cryptographic Function of a
Hash Value
This section specifies how to calculate the signature-value in a
Signature TLV, as described in Section 7. A common way of
calculating a signature is applying a cryptographic function on a
hash value of the content. This decomposition is specified in the
following, using a type extension of 1 in the Signature TLVs.
A.1. General Signature TLV Structure
The following data structure allows representation of a cryptographic
signature, including specification of the appropriate hash function
and cryptographic function used for calculating the signature:
<signature> := <hash-function>
<cryptographic-function>
<key-index>
<signature-value>
where:
<hash-function> is an 8-bit unsigned integer field specifying the
hash function.
<cryptographic-function> is an 8-bit unsigned integer field
specifying the cryptographic function.
<key-index> is an 8-bit unsigned integer field specifying the key
index of the key which was used to sign the message, which allows
unique identification of different keys with the same originator.
It is the responsibility of each key originator to make sure that
actively used keys that it issues have distinct key indices and
that all key indices have a value unequal to 0x00. Value 0x00 is
reserved for a pre-installed, shared key.
<signature-value> is an unsigned integer field, whose length is
<length> - 3, and which contains the cryptographic signature.
The version of this TLV, specified in this section, assumes that
calculating the signature can be decomposed into:
signature-value = cryptographic-function(hash-function(content))
The hash function and the cryptographic function correspond to the
entries in two IANA registries, set up by this specification in
Section 12.
A.1.1. Rationale
The rationale for separating the hash function and the cryptographic
function into two octets instead of having all combinations in a
single octet - possibly as TLV type extension - is twofold: First, if
further hash functions or cryptographic functions are added in the
future, the number space might not remain continuous. More
importantly, the number space of possible combinations would be
rapidly exhausted. As new or improved cryptographic mechanism are
continuously being developed and introduced, this format should be
able to accommodate such for the foreseeable future.
The rationale for not including a field that lists parameters of the
cryptographic signature in the TLV is, that before being able to
validate a cryptographic signature, routers have to exchange or
acquire keys (e.g. public keys). Any additional parameters can be
provided together with the keys in that bootstrap process. It is
therefore not necessary, and would even entail an extra overhead, to
transmit the parameters within every message. One inherently
included parameter is the length of the signature, which is <length>
- 3 and which depends on the choice of the cryptographic function.
A.2. Considerations for Calculating the Signature
In the following, considerations are listed, which have to be applied
when calculating the signature for Packet, Message and Address
SIGNATURE TLVs, respectively.
A.2.1. Packet SIGNATURE TLV
When determining the <signature-value> for a Packet, the signature is
calculated over the three fields <hash-function>, <cryptographic-
function> and <key-index> (in that order), concatenated with the
entire Packet, including the packet header, all Packet TLVs (other
than Packet SIGNATURE TLVs) and all included Messages and their
message headers.
A.2.2. Message SIGNATURE TLV
When determining the <signature-value> for a message, the signature
is calculated over the three fields <hash-function>, <cryptographic-
function>, and <key-index> (in that order), concatenated with the
entire message.
A.2.3. Address Block SIGNATURE TLV
When determining the <signature-value> for an address, the signature
is calculated over the three fields <hash-function>, <cryptographic-
function>, and <key-index> (in that order), concatenated with the
address, concatenated with any other values, for example, any other
TLV value that is associated with that address. A routing protocol
or routing protocol extension using Address Block SIGNATURE TLVs MUST
specify how to include any such concatenated attribute of the address
in the verification process of the signature.
A.3. Example of a Signed Message
The sample message depicted in Figure 1 is derived from the appendix
of [RFC5444]. A SIGNATURE Message TLV has been added, with the value
representing a 16 octet long signature of the whole message. The
type extension of the Message TLV is 1, for the specific
decomposition of a signature into a cryptographic function over a
hash value, as specified in Appendix A.
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PV=0 | PF=8 | Packet Sequence Number | Message Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| MF=15 | MAL=3 | Message Length = 40 | Msg. Orig Addr|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message Originator Address (cont) | Hop Limit |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Hop Count | Message Sequence Number | Msg. TLV Block|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length = 30 | SIGNATURE | MTLVF = 144 | MTLVExt = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Value Len = 19 | Hash Func | Crypto Func | Key Index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Signature Value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Signature Value (cont) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Signature Value (cont) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Signature Value (cont) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: Example message with signature
Authors' Addresses Authors' Addresses
Ulrich Herberg Ulrich Herberg
LIX, Ecole Polytechnique Fujitsu Laboratories of America
91128 Palaiseau Cedex, 1240 E. Arques Ave. M/S 345
France Sunnyvale, CA, 94085
USA
Email: ulrich@herberg.name Email: ulrich@herberg.name
URI: http://www.herberg.name/ URI: http://www.herberg.name/
Thomas Heide Clausen Thomas Heide Clausen
LIX, Ecole Polytechnique LIX, Ecole Polytechnique
91128 Palaiseau Cedex, 91128 Palaiseau Cedex,
France France
Phone: +33 6 6058 9349 Phone: +33 6 6058 9349
 End of changes. 90 change blocks. 
362 lines changed or deleted 386 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/