Internet-Draft | Use of GOST 2012 Signatures in DNSSEC | November 2022 |
Belyavskiy, et al. | Expires 3 June 2023 | [Page] |
This document describes how to produce digital signatures and hash functions using the GOST R 34.10-2012 and GOST R 34.11-2012 algorithms for DNSKEY, RRSIG, and DS resource records, for use in the Domain Name System Security Extensions (DNSSEC).¶
This document obsoletes RFC 5933 and updates RFC 8624.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 3 June 2023.¶
Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The Domain Name System (DNS) is the global hierarchical distributed database for Internet Naming. The DNS has been extended to use cryptographic keys and digital signatures for the verification of the authenticity and integrity of its data. RFC 4033 [RFC4033], RFC 4034 [RFC4034], and RFC 4035 [RFC4035] describe these DNS Security Extensions, called DNSSEC.¶
RFC 4034 describes how to store DNSKEY and RRSIG resource records, and specifies a list of cryptographic algorithms to use. This document extends that list with the signature and hash algorithms GOST R 34.10-2012 ([RFC7091]) and GOST R 34.11-2012 ([RFC6986]), and specifies how to store DNSKEY data and how to produce RRSIG resource records with these algorithms.¶
This document obsoletes RFC5933 [RFC5933]. This document also marks the DNS Security Algorithm GOST R 34.10-2001 as obsolete.¶
Algorithms GOST R 34.10-2012 and GOST R 34.11-2012 are national standards. Their cryptographic properties haven't been independently verified.¶
Familiarity with DNSSEC and with GOST signature and hash algorithms is assumed in this document.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The format of the DNSKEY RR can be found in RFC 4034 [RFC4034].¶
GOST R 34.10-2012 public keys are stored with the algorithm number TBA1.¶
According to RFC 7091 [RFC7091], a public key is a point on the elliptic curve Q = (x,y). The wire representation of a public key MUST contain 64 octets, where the first 32 octets contain the little-endian representation of x and the second 32 octets contain the little-endian representation of y.¶
As RFC 6986 and RFC 7091 allows 2 variants of length of the output hash and signature and many variants of parameters of the digital signature, for the purpose of this document we use 256-bit variant of the digital signature algorithm, corresponding 256-bit variant of the digest algorithm. We select the parameters for the digital signature algorithm to be id-tc26-gost-3410-2012-256-paramSetA in RFC 7836 [RFC7836].¶
At the time of this writing, existing GOST-aware cryptographic libraries are capable of reading GOST public keys via a generic X509 API if the key is encoded according to RFC 7091 [RFC7091], Section 2.3.2.¶
To make this encoding from the wire format of a GOST public key with the parameters used in this document, prepend the 64 octets of key data with the following 32-byte sequence:¶
These bytes provide the following ASN.1 structure suitable for parsing by cryptographic toolkits:¶
0 62: SEQUENCE { 2 1: INTEGER 0 5 23: SEQUENCE { 7 8: OBJECT IDENTIFIER '1 2 643 7 1 1 1 1' 17 11: SEQUENCE { 19 9: OBJECT IDENTIFIER '1 2 643 7 1 2 1 1 1' : } : } 30 32: OCTET STRING¶
The OIDs in the structure above represent GOsudarstvennyy STandart (GOST) R 34.10-2012 public keys with 256 bits private key length algorithm with Parameter set A for Keyed-Hash Message Authentication Code (HMAC) transformation based on the GOsudarstvennyy STandart (GOST) R 34.11-2012 hash function with 256-bit output according to RFC 7836 [RFC7836] and RFC 9125 [RFC9125].¶
Given a private key with the following value:¶
Private-key-format: v1.2 Algorithm: 23 (ECC-GOST12) Gost12Asn1: MD4CAQAwFwYIKoUDBwEBAQEwCwYJKoUDBwECAQEBBCD/Mw9o6R5lQHJ13jz0 W+C1tdsS4W7RJn04rk9MGJq3Hg==¶
The following DNSKEY RR stores a DNS zone key for example:¶
example. 600 IN DNSKEY 256 3 23 ( XGiiHlKUJd5fSeAK5O3L4tUNCPxs4pGqum6wKbqjdkqu IQ8nOXrilXZ9HcY8b2AETkWrtWHfwvJD4twPPJFQSA== ) ;{id = 47355 (zsk), size = 512b}¶
Public key can be calculated from the private key using algorithm described in RFC 7091 [RFC7091].¶
[RFC Editor note: Algorithm numbers 23 and 5 are used in this document as an example, since the actual numbers have not yet been assigned. If the assigned values will differ, the example keys and signatures will have to be recalculated before the official publication of the RFC.]¶
The value of the signature field in the RRSIG RR follows RFC 7091 [RFC7091] and is calculated as follows. The values for the RDATA fields that precede the signature data are specified in RFC 4034 [RFC4034].¶
hash = GOSTR3411-2012(data)¶
where "data" is the wire format data of the resource record set that is signed, as specified in RFC 4034 [RFC4034].¶
The signature is calculated from the hash according to the GOST R 34.10-2012 standard, and its wire format is compatible with RFC 7091 [RFC7091].¶
Consider a given RRset consisting of one MX RR to be signed with the private key described in Section 2.2 of this document:¶
example. 600 IN MX 10 mail.example.¶
Setting the inception date to 2022-10-06 12:32:30 UTC and the expiration date to 2022-11-03 12:32:30 UTC, the following signature RR will be valid:¶
example. 600 IN RRSIG MX 23 1 600 20221103123230 ( 20221006123230 47355 example. EuLO0Qpn6zT1pzj9T2H5AWjcgzfmjNiK/vj811bExa0V HMOVD9ma8rpf0B+D+V4Q0CWu1Ayzu+H/SyndnOWGxw== )¶
The ECC-GOST12 signature algorithm uses random (pseudorandom) integer k as described in Section 6.1 of RFC 7091 [RFC7091]. The following constant was used to replace k to provide a reproducible signature example.¶
k = 8BBD0CE7CAF3FC1C2503DF30D13ED5DB75EEC44060FA22FB7E29628407C1E34¶
This constant MUST NOT be used when computing ECC-GOST12 signatures. It is provided only so the above signature example can be reproduced. The actual computed signature value will differ between signature calculations.¶
The GOST R 34.11-2012 digest algorithm is denoted in DS RRs by the digest type TBA2. The wire format of a digest value is compatible with RFC 6986 [RFC6986].¶
For Key Signing Key (KSK):¶
example. IN DNSKEY 257 3 23 ( p8Req8DLJOfPymO5vExuK4gCcihF5N1YL7veCJ47av+w h/qs9yJpD064k02rYUHfWnr7IjvJlbn3Z0sTZe9GRQ== ) ;{id = 29468 (ksk), size = 512b}¶
The DS RR will be:¶
example. IN DS 29468 23 5 ( 6033725b0ccfc05d1e9d844d49c6cf89 0b13d5eac9439189947d5db6c8d1c1ec )¶
The key size of GOST public keys conforming to this specification MUST be 512 bits according to RFC 7091 [RFC7091].¶
The size of a GOST signature conforming to this specification MUST be 512 bits according to RFC 7091 [RFC7091].¶
The size of a GOST digest conforming to this specification MUST be 256 bits according to RFC 6986 [RFC6986].¶
The support of this cryptographic suite in DNSSEC-aware systems is OPTIONAL. According to RFC6840 [RFC6840], Section 5.2 systems that do not support these algorithms MUST ignore the RRSIG, DNSKEY and DS records created with them.¶
[(To be removed in RFC). To check the correctness of the implementation, authors recommend using OpenSSL 1.1.1 or 3.0.x series, a fork of ldns available at https://github.com/beldmit/ldns, and a reference implementation of GOST crypto algorithms available at https://github.com/gost-engine/engine.]¶
This document specifies the usage of the signature algorithm GOST R 34.10-2012 and hash algorithm GOST R 34.11-2012 instead of the signature algorithm GOST R 34.10-2001 and hash algorithm GOST R 34.11-94, specified in RFC 5933.¶
As GOST R 34.10-2001 and GOST R 34.11-94 are not used in production deployments, these deprecated algorithms MUST NOT be implemented or used for DNSSEC signing or DNSSEC validation.¶
This document updates RFC8624 [RFC8624]. The paragraph describing the state of GOST R 34.10-2012 algorithm in section 3.1 of RFC 8624 currently says:¶
ECC-GOST (GOST R 34.10-2001) has been superseded by GOST R 34.10-2012 in [RFC7091]. GOST R 34.10-2012 hasn't been standardized for use in DNSSEC.¶
That paragraph is now replaced with the following:¶
ECC-GOST (GOST R 34.10-2001) has been superseded by GOST R 34.10-2012 in [RFC7091]. GOST R 34.10-2012 has been standardized for use in DNSSEC in RFC TBC.¶
The paragraph describing the state of GOST R 34.11-2012 algorithm in section 3.3 of RFC 8624 currently says:¶
GOST R 34.11-94 has been superseded by GOST R 34.11-2012 in [RFC6986]. GOST R 34.11-2012 has not been standardized for use in DNSSEC.¶
That paragraph is now replaced with the following:¶
GOST R 34.11-94 has been superseded by GOST R 34.11-2012 in [RFC6986]. GOST R 34.10-2012 has been standardized for use in DNSSEC in RFC TBC.¶
It is recommended to use a dual KSK algorithm signed zone until GOST-aware DNSSEC software become more widespread, unless GOST-only cryptography is needed. Otherwise, GOST-signed zones may be considered unsigned by the DNSSEC software currently in use.¶
Currently, the cryptographic resistance of the GOST R 34.10-2012 digital signature algorithm is estimated as 2**128 operations of multiple elliptic curve point computations on prime modulus of order 2**256.¶
Currently, the cryptographic collision resistance of the GOST R 34.11-2012 hash algorithm is estimated as 2**128 operations of computations of a step hash function.¶
This document updates the IANA registry "DNS Security Algorithm Numbers". The following entries have been added to the registry:¶
Zone Trans. Value Algorithm Mnemonic Signing Sec. References TBA1 GOST R 34.10-2012 ECC-GOST12 Y * RFC TBA¶
The description field of entry for the algorithm "GOST R 34.10-2001", number 12 should be changed to "GOST R 34.10-2001 (deprecated, see TBA1)"¶
This document updates the RFC IANA registry "Delegation Signer (DS) Resource Record (RR) Type Digest Algorithms" by adding an entry for the GOST R 34.11-2012 algorithm:¶
Value Algorithm TBA2 GOST R 34.11-2012¶
The entry for Value 3, GOST R 34.11-94 should be updated to have its Status changed to '-'.¶
[RFC editor note: For the purpose of example computations, the following values were used: TBA1 = 23, TBA2 = 5. If the assigned values will differ, the example keys and signatures will have to be recalculated before the official publication of the RFC.]¶
This document is a minor extension to RFC 4034 [RFC4034]. Also, we tried to follow the documents RFC 3110 [RFC3110], RFC 4509 [RFC4509], and RFC 5933 [RFC5933] for consistency. The authors of and contributors to these documents are gratefully acknowledged for their hard work.¶
The following people provided additional feedback, text, and valuable assistance: Alexander Venedyukhin, Michael StJohns, Valery Smyslov, Tim Wicinski, Stephane Bortzmeyer.¶