RFC 9558
Use of GOST 2012 Signature Algorithms in DNSKEY and RRSIG Resource Records for DNSSEC
Use of GOST 2012 Signature Algorithms in DNSKEY and RRSIG Resource Records for DNSSEC π
okay bestie, let's get into RFC 9558 π It's an Independent Submission, so it came in through the independent stream instead of an IETF working group. The category is Informational, which means it's published for information and isn't a standard π¦ The ISSN is 2070-1721 and it's dated April 2024 πΈ
The authors are B. Makarenko, from The Technical center of Internet, LLC, and V. Dolmatov, Ed., from JSC "NPK Kryptonite". That Ed. means V. Dolmatov is the editor β¨ The header doesn't list anything it obsoletes or updates, so there's no lore to chase there π
Abstract π
so the abstract is basically this: the doc explains how to make 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). periodt π
Status of This Memo π
this doc is not an Internet Standards Track specification π it's published for informational purposes only πΈ
It's a contribution to the RFC Series, independent of any other RFC stream. The RFC Editor chose to publish it at their discretion and makes no statement about its value for implementation or deployment β¨ Documents approved for publication by the RFC Editor aren't candidates for any level of Internet Standard. See Section 2 of RFC 7841 for that π
Info about the current status, any errata, and how to give feedback can be found at https://www.rfc-editor.org/info/rfc9558 π¦
Copyright Notice Β©οΈ
Copyright (c) 2024 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. Please read those carefully, because they describe your rights and restrictions with respect to this doc π«Ά
Table of Contents ποΈ
1. Introduction
1.1. Terminology
2. DNSKEY Resource Records
2.1. Using a Public Key with Existing Cryptographic Libraries
2.2. GOST DNSKEY RR Example
3. RRSIG Resource Records
3.1. RRSIG RR Example
4. DS Resource Records
4.1. DS RR Example
5. Operational Considerations
5.1. Key Sizes
5.2. Signature Sizes
5.3. Digest Sizes
6. Implementation Considerations
7. IANA Considerations
8. Security Considerations
9. References
9.1. Normative References
9.2. Informative References
Acknowledgments
Authors' Addresses
1. Introduction πΈ
okay so the Domain Name System (DNS) is the global, hierarchically distributed database for Internet Naming. DNS has been extended to use cryptographic keys and digital signatures to verify 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 doc extends that list with the signature and hash algorithms GOST R 34.10-2012 ([RFC7091]) and GOST R 34.11-2012 ([RFC6986]). It also specifies how to store DNSKEY data and how to produce RRSIG resource records with these algorithms β¨
GOST R 34.10-2012 and GOST R 34.11-2012 are Russian national standards. Their cryptographic properties haven't been independently verified π
Familiarity with DNSSEC and with GOST signature and hash algorithms is assumed in this doc.
Caution: This specification is not a standard and does not have IETF community consensus. It makes use of a cryptographic algorithm that is a national standard for Russia. Neither the IETF nor the IRTF has analyzed that algorithm for suitability for any given application, and it may contain either intended or unintended weaknesses. π
1.1. Terminology π§
okay so the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this doc get read as described in BCP 14 [RFC2119] [RFC8174]. That only happens when they show up in all capitals, just like here π
2. DNSKEY Resource Records π
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 23.
According to RFC 7091 [RFC7091], a GOST R 34.10-2012 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 allow two variants of the length of the output hash and the signature, and many variants of parameters of the digital signature, this doc uses the 256-bit variant of the digital signature algorithm. That lines up with the 256-bit variant of the digest algorithm. The parameters for the digital signature algorithm are id-tc26-gost-3410-2012-256-paramSetA, as specified in RFC 7836 [RFC7836]. This doc refers to it as "parameter set A" π
2.1. Using a Public Key with Existing Cryptographic Libraries π
At the time of this writing, existing GOST-aware cryptographic libraries can read GOST R 34.10-2012 public keys through a generic X.509 API, as long as the key is encoded according to RFC 9215 [RFC9215], Section 4. π«§
To make this encoding from the wire format of a GOST R 34.10-2012 public key with the parameters used in this doc, prepend the 64 octets of key data with the following 30-byte sequence:
0x30 0x5c 0x30 0x17 0x06 0x08 0x2a 0x85
0x03 0x07 0x01 0x01 0x01 0x01 0x30 0x0b
0x06 0x09 0x2a 0x85 0x03 0x07 0x01 0x02
0x01 0x01 0x01 0x03 0x41 0x00
These bytes give the following ASN.1 structure, which cryptographic toolkits can parse:
0 92: SEQUENCE {
2 23: SEQUENCE {
4 8: OBJECT IDENTIFIER '1 2 643 7 1 1 1 1'
14 11: SEQUENCE {
16 9: OBJECT IDENTIFIER '1 2 643 7 1 2 1 1 1'
: }
: }
27 65: BIT STRING
The OIDs in the structure above represent a GOST R 34.10-2012 public key with a 256-bit private key length and parameter set A. The structure itself represents the SubjectPublicKeyInfo field of an X.509 certificate, as defined in RFC 5280 [RFC5280], Section 4.1.
2.2. GOST DNSKEY RR Example π
Given a private key with the following value:
Private-key-format: v1.2
Algorithm: 23 (ECC-GOST12)
Gost12Asn1: MD4CAQAwFwYIKoUDBwEBAQEwCwYJKoUDBwECAQEBBCD/Mw9o6R5lQHJ13
jz0W+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}
The private key here is presented in the PrivateKeyInfo ASN.1 structure, as described in RFC 5958 [RFC5958], Section 2. π
The public key can be calculated from the private key using the algorithm described in RFC 7091 [RFC7091].
3. RRSIG Resource Records π
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 come before the signature data are specified in RFC 4034 [RFC4034].
hash = GOSTR3411-2012(data)
Here, "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 GOST R 34.10-2012, and its wire format is compatible with RFC 7091 [RFC7091] π
3.1. RRSIG RR Example π§
Consider a given RRset with one MX RR to be signed with the private key described in Section 2.2 of this doc:
example. 600 IN MX 10 mail.example.
Set the inception date to 2022-10-06 12:32:30 UTC and the expiration date to 2022-11-03 12:32:30 UTC, and 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 GOST R 34.10-2012 signature algorithm uses a random (pseudorandom) integer k, as described in Section 6.1 of RFC 7091 [RFC7091]. The following value for k was used to produce the signature example:
k = 8BBD0CE7CAF3FC1C2503DF30D13ED5DB75EEC44060FA22FB7E29628407C1E34
This value for k MUST NOT be used when computing GOST R 34.10-2012 signatures. It's only provided so the above signature example can be reproduced. The actual signature value will differ between signature calculations π«
4. DS Resource Records π
The GOST R 34.11-2012 digest algorithm is denoted in DS RRs by the digest type 5. The wire format of a digest value is compatible with RFC 6986 [RFC6986] π
4.1. DS RR Example π
For the 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
)
(keep reading, Section 5 is up next π¦)
8. Security Considerations π
okay bestie, this part is serious but also lowkey iconic π . It is recommended to use a dual KSK algorithm signed zone until GOST-aware DNSSEC software becomes more widespread, unless GOST-only cryptography is to be used. Otherwise, GOST-signed zones may be considered unsigned by the DNSSEC software currently in use π. So if your software doesn't speak GOST yet, your zone could look unsigned to it, and that's a whole mess π.
Like all algorithms, it's possible that a significant flaw could be discovered with GOST R 34.11-2012 π¨. If that happens, deployments should roll over to another algorithm. For the timing of those changes, check out RFC 7583 [RFC7583] π°οΈβ¨.
9. References π
9.1. Normative References
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, https://www.rfc-editor.org/info/rfc2119.
- [RFC3110] Eastlake 3rd, D., "RSA/SHA-1 SIGs and RSA KEYs in the Domain Name System (DNS)", RFC 3110, DOI 10.17487/RFC3110, May 2001, https://www.rfc-editor.org/info/rfc3110.
- [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "DNS Security Introduction and Requirements", RFC 4033, DOI 10.17487/RFC4033, March 2005, https://www.rfc-editor.org/info/rfc4033.
- [RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "Resource Records for the DNS Security Extensions", RFC 4034, DOI 10.17487/RFC4034, March 2005, https://www.rfc-editor.org/info/rfc4034.
- [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "Protocol Modifications for the DNS Security Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, https://www.rfc-editor.org/info/rfc4035.
- [RFC6840] Weiler, S., Ed. and D. Blacka, Ed., "Clarifications and Implementation Notes for DNS Security (DNSSEC)", RFC 6840, DOI 10.17487/RFC6840, February 2013, https://www.rfc-editor.org/info/rfc6840.
- [RFC6986] Dolmatov, V., Ed. and A. Degtyarev, "GOST R 34.11-2012: Hash Function", RFC 6986, DOI 10.17487/RFC6986, August 2013, https://www.rfc-editor.org/info/rfc6986.
- [RFC7091] Dolmatov, V., Ed. and A. Degtyarev, "GOST R 34.10-2012: Digital Signature Algorithm", RFC 7091, DOI 10.17487/RFC7091, December 2013, https://www.rfc-editor.org/info/rfc7091.
- [RFC7583] Morris, S., Ihren, J., Dickinson, J., and W. Mekking, "DNSSEC Key Rollover Timing Considerations", RFC 7583, DOI 10.17487/RFC7583, October 2015, https://www.rfc-editor.org/info/rfc7583.
- [RFC7836] Smyshlyaev, S., Ed., Alekseev, E., Oshkin, I., Popov, V., Leontiev, S., Podobaev, V., and D. Belyavsky, "Guidelines on the Cryptographic Algorithms to Accompany the Usage of Standards GOST R 34.10-2012 and GOST R 34.11-2012", RFC 7836, DOI 10.17487/RFC7836, March 2016, https://www.rfc-editor.org/info/rfc7836.
- [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, https://www.rfc-editor.org/info/rfc8174.
9.2. Informative References
- [RFC4509] Hardaker, W., "Use of SHA-256 in DNSSEC Delegation Signer (DS) Resource Records (RRs)", RFC 4509, DOI 10.17487/RFC4509, May 2006, https://www.rfc-editor.org/info/rfc4509.
- [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, https://www.rfc-editor.org/info/rfc5280.
- [RFC5933] Dolmatov, V., Ed., Chuprina, A., and I. Ustinov, "Use of GOST Signature Algorithms in DNSKEY and RRSIG Resource Records for DNSSEC", RFC 5933, DOI 10.17487/RFC5933, July 2010, https://www.rfc-editor.org/info/rfc5933.
- [RFC5958] Turner, S., "Asymmetric Key Packages", RFC 5958, DOI 10.17487/RFC5958, August 2010, https://www.rfc-editor.org/info/rfc5958.
- [RFC9215] Baryshkov, D., Ed., Nikolaev, V., and A. Chelpanov, "Using GOST R 34.10-2012 and GOST R 34.11-2012 Algorithms with the Internet X.509 Public Key Infrastructure", RFC 9215, DOI 10.17487/RFC9215, March 2022, https://www.rfc-editor.org/info/rfc9215.
Acknowledgments π«Ά
this doc is a minor extension to RFC 4034 [RFC4034] πΈ. We also tried to follow RFC 3110 [RFC3110], RFC 4509 [RFC4509], and RFC 5933 [RFC5933] so everything stays consistent β¨. The authors of and contributors to those documents get all the love for their hard work π.
The following people gave extra feedback, text, and super valuable help: Alexander Venedyukhin, Michael StJohns, Valery Smyslov, Tim Wicinski, and StΓ©phane Bortzmeyer ππ.
Authors' Addresses π¦
Boris Makarenko The Technical center of Internet, LLC 8 marta St., 1, Bldg. 12 Moscow 127083 Russian Federation Email: bmakarenko@tcinet.ru
Vasily Dolmatov (editor) JSC "NPK Kryptonite" Spartakovskaya Sq., 14, Bldg. 2 Moscow 105082 Russian Federation Email: vdolmatov@gmail.com
π¦ where this page comes from
- ietf: rfc9558 2024-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms