RFC 5933

Use of GOST Signature Algorithms in DNSKEY and RRSIG Resource Records for DNSSEC

๐Ÿ“… published July 2010, from ietf

RFC 5933: Use of GOST Signature Algorithms in DNSKEY and RRSIG Resource Records for DNSSEC ๐ŸŽ€

Stream: Internet Engineering Task Force (IETF) ๐ŸŒธ Editors and authors: V. Dolmatov, Ed.; A. Chuprina; I. Ustinov, all from Cryptocom Ltd. ๐Ÿ’– Category: Standards Track ๐Ÿ‘‘ ISSN: 2070-1721 โœจ Date: July 2010 ๐Ÿฆ‹ Obsoletes / Updates: this header doesn't list either one ๐Ÿงš


Abstract โœจ

okay so this doc shows how to make digital signatures and hash functions with the GOST R 34.10-2001 and GOST R 34.11-94 algorithms ๐Ÿ”. They're used for DNSKEY, RRSIG, and DS resource records in the Domain Name System Security Extensions (DNSSEC) ๐Ÿ’….

Status of This Memo ๐ŸŒˆ

This is an Internet Standards Track document. ๐Ÿ‘‘

This doc is a product of the Internet Engineering Task Force (IETF) ๐Ÿ’œ. It represents the consensus of the IETF community, and it got public review and was approved for publication by the Internet Engineering Steering Group (IESG) โœจ. If you want more on Internet Standards, check Section 2 of RFC 5741 ๐Ÿงš.

For the current status of this document, any errata, and how to give feedback on it, go to http://www.rfc-editor.org/info/rfc5933 ๐Ÿ”—.

Copyright (c) 2010 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 (http://trustee.ietf.org/license-info) as they were in effect on the date of publication. Please read these carefully, bestie, because they spell out your rights and restrictions for this document ๐Ÿ“œ. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License ๐Ÿซถ.

Table of Contents ๐Ÿ“

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . 3
2.  DNSKEY Resource Records . . . . . . . . . . . . . . . . . . . . 3
  2.1.  Using a Public Key with Existing Cryptographic
        Libraries . . . . . . . . . . . . . . . . . . . . . . . . . 3
  2.2.  GOST DNSKEY RR Example  . . . . . . . . . . . . . . . . . . 4
3.  RRSIG Resource Records  . . . . . . . . . . . . . . . . . . . . 4
  3.1.  RRSIG RR Example  . . . . . . . . . . . . . . . . . . . . . 5
4.  DS Resource Records . . . . . . . . . . . . . . . . . . . . . . 5
  4.1.  DS RR Example . . . . . . . . . . . . . . . . . . . . . . . 5
5.  Deployment Considerations . . . . . . . . . . . . . . . . . . . 6
  5.1.  Key Sizes . . . . . . . . . . . . . . . . . . . . . . . . . 6
  5.2.  Signature Sizes . . . . . . . . . . . . . . . . . . . . . . 6
  5.3.  Digest Sizes  . . . . . . . . . . . . . . . . . . . . . . . 6
6.  Implementation Considerations . . . . . . . . . . . . . . . . . 6
  6.1.  Support for GOST Signatures . . . . . . . . . . . . . . . . 6
  6.2.  Support for NSEC3 Denial of Existence . . . . . . . . . . . 6
7.  Security Considerations . . . . . . . . . . . . . . . . . . . . 6
8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7
9.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 7
10. References  . . . . . . . . . . . . . . . . . . . . . . . . . . 7
  10.1. Normative References  . . . . . . . . . . . . . . . . . . . 7
  10.2. Informative References  . . . . . . . . . . . . . . . . . . 8

1. Introduction โœจ

okay so the Domain Name System (DNS) is the global hierarchical distributed database for Internet Naming ๐ŸŒ. DNS got extended to use cryptographic keys and digital signatures so you can verify that its data is authentic and has integrity ๐Ÿ”. RFC 4033 [RFC4033], RFC 4034 [RFC4034], and RFC 4035 [RFC4035] describe these DNS Security Extensions, which are called DNSSEC ๐Ÿ’….

RFC 4034 explains how to store DNSKEY and RRSIG resource records, and it gives a list of cryptographic algorithms to use ๐Ÿ“‹. This document adds to that list with the signature and hash algorithms GOST R 34.10-2001 ([GOST3410], [RFC5832]) and GOST R 34.11-94 ([GOST3411], [RFC5831]). It also explains how to store DNSKEY data and how to make RRSIG resource records with these algorithms ๐Ÿฆ‹.

This doc assumes you already know your DNSSEC and your GOST signature and hash algorithms ๐Ÿง .

The term "GOST" isn't officially defined, but people usually use it for the family of Russian cryptographic algorithms: GOST R 34.10-2001 [RFC5832], GOST R 34.11-94 [RFC5831], and GOST 28147-89 [RFC5830]. Since GOST 28147-89 isn't used in DNSSEC, "GOST" will only mean GOST R 34.10-2001 and GOST R 34.11-94 in this document ๐Ÿ’œ.

1.1. Terminology

Here's the key word rule ๐Ÿ“–. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] ๐ŸŽ€.

2. DNSKEY Resource Records ๐Ÿ”‘

The format of the DNSKEY RR is in RFC 4034 [RFC4034], so go read that first ๐ŸŒธ.

GOST R 34.10-2001 public keys are stored with the algorithm number 12 ๐Ÿ”ข.

The wire format of the public key is compatible with RFC 4491 [RFC4491]:

According to [GOST3410] and [RFC5832], 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 ๐Ÿซถ.

The corresponding public key parameters are the ones identified by id-GostR3410-2001-CryptoPro-A-ParamSet (1.2.643.2.2.35.1) [RFC4357]. The digest parameters are the ones identified by id-GostR3411-94-CryptoProParamSet (1.2.643.2.2.30.1) [RFC4357] โœจ.

2.1. Using a Public Key with Existing Cryptographic Libraries ๐Ÿงš

At the time of writing, existing GOST-aware cryptographic libraries can read GOST public keys through a generic X509 API, as long as the key is encoded according to RFC 4491 [RFC4491], Section 2.3.2 ๐Ÿ’–.

To make this encoding from the wire format of a GOST public key with the parameters used in this document, you prepend the 64 octets of key data with the following 37-byte sequence ๐Ÿช„:

0x30 0x63 0x30 0x1c 0x06 0x06 0x2a 0x85 0x03 0x02 0x02 0x13 0x30
0x12 0x06 0x07 0x2a 0x85 0x03 0x02 0x02 0x23 0x01 0x06 0x07 0x2a
0x85 0x03 0x02 0x02 0x1e 0x01 0x03 0x43 0x00 0x04 0x40

2.2. GOST DNSKEY RR Example ๐ŸŽ€

Okay, here's a private key example. The GostAsn1 value is split across two lines here just to make it easier to read. In the private key file, it has to be on one line ๐Ÿ“„:

Private-key-format: v1.2
Algorithm: 12 (ECC-GOST)
GostAsn1: MEUCAQAwHAYGKoUDAgITMBIGByqFAwICIwEGByqFAwICHgEEIgQg/9M
          iXtXKg9FDXDN/R9CmVhJDyuzRAIgh4tPwCu4NHIs=

And this DNSKEY RR stores a DNS zone key for example.net ๐ŸŒˆ:

example.net. 86400 IN DNSKEY 256 3 12 (
                             aRS/DcPWGQj2wVJydT8EcAVoC0kXn5pDVm2I
                             MvDDPXeD32dsSKcmq8KNVzigjL4OXZTV+t/6
                             w4X1gpNrZiC01g==
                             ) ; key id = 59732

3. RRSIG Resource Records ๐ŸŒŸ

The value of the signature field in the RRSIG RR follows RFC 4490 [RFC4490]. Here's how it's calculated. The values for the RDATA fields that come before the signature data are specified in RFC 4034 [RFC4034] ๐Ÿงฎ.

hash = GOSTR3411(data)

Here, "data" is the wire format data of the resource record set that gets signed, as specified in RFC 4034 [RFC4034] ๐Ÿ’œ.

The hash MUST be calculated with GOST R 34.11-94 parameters identified by id-GostR3411-94-CryptoProParamSet [RFC4357] ๐Ÿ”ฅ.

The signature is calculated from the hash according to the GOST R 34.10-2001 standard, and its wire format is compatible with RFC 4490 [RFC4490] ๐Ÿ’….

Here's the RFC 4490 quote, verbatim, because it's important ๐Ÿซถ:

"The signature algorithm GOST R 34.10-2001 generates a digital signature in the form of two 256-bit numbers, r and s. Its octet string representation consists of 64 octets, where the first 32 octets contain the big-endian representation of s and the second 32 octets contain the big-endian representation of r".

3.1. RRSIG RR Example ๐Ÿฆ‹

Using the private key from Section 2.2, sign the following RRSet, which has one A record ๐Ÿ“:

www.example.net. 3600 IN A 192.0.2.1

Set the inception date to 2000-01-01 00:00:00 UTC and the expiration date to 2030-01-01 00:00:00 UTC. Then the following signature RR is valid โœจ:

www.example.net. 3600 IN RRSIG A 12 3 3600 20300101000000 (
                               20000101000000 59732 example.net.
                               7vzzz6iLOmvtjs5FjVjSHT8XnRKFY15ki6Kp
                               kNPkUnS8iIns0Kv4APT+D9ibmHhGri6Sfbyy
                               zi67+wBbbW/jrA== )

Note: the ECC-GOST signature algorithm uses random data, so the actual computed signature value will be different between signature calculations ๐Ÿ™ˆ.

4. DS Resource Records ๐Ÿ’–

The GOST R 34.11-94 digest algorithm is denoted in DS RRs by the digest type 3 ๐Ÿ”ข. The wire format of a digest value is compatible with RFC 4490 [RFC4490]. That means the digest is in little-endian representation ๐ŸŒธ.

The digest MUST always be calculated with GOST R 34.11-94 parameters identified by id-GostR3411-94-CryptoProParamSet [RFC4357] ๐ŸŽ€.

4.1. DS RR Example ๐Ÿงš

For the Key Signing Key (KSK) ๐Ÿ”‘:

example.net. 86400   DNSKEY  257 3 12 (
                             LMgXRHzSbIJGn6i16K+sDjaDf/k1o9DbxScO
                             gEYqYS/rlh2Mf+BRAY3QHPbwoPh2fkDKBroF
                             SRGR7ZYcx+YIQw==
                             ) ; key id = 40692

The DS RR will be:

example.net. 3600 IN DS 40692 12 3 (
          22261A8B0E0D799183E35E24E2AD6BB58533CBA7E3B14D659E9CA09B
          2071398F )

5. Deployment Considerations ๐ŸŒˆ

5.1. Key Sizes ๐Ÿ”

According to RFC 4357 [RFC4357], the key size of GOST public keys MUST be 512 bits ๐Ÿ’….

5.2. Signature Sizes โœจ

According to the GOST R 34.10-2001 digital signature algorithm specification ([GOST3410], [RFC5832]), the size of a GOST signature is 512 bits ๐Ÿฆ‹.

5.3. Digest Sizes ๐Ÿ“

According to GOST R 34.11-94 ([GOST3411], [RFC5831]), the size of a GOST digest is 256 bits ๐Ÿ’œ.

6. Implementation Considerations ๐Ÿง 

6.1. Support for GOST Signatures ๐Ÿ‘‘

DNSSEC-aware implementations MAY be able to support RRSIG and DNSKEY resource records created with the GOST algorithms as defined in this document ๐ŸŒธ.

6.2. Support for NSEC3 Denial of Existence ๐Ÿซถ

Any DNSSEC-GOST implementation MUST support both NSEC [RFC4035] and NSEC3 [RFC5155] ๐Ÿ”ฅ.

7. Security Considerations ๐Ÿ’€

This part is serious, so listen up ๐Ÿ™ˆ. Right now, the cryptographic resistance of the GOST R 34.10-2001 digital signature algorithm is estimated at 2**128 operations of multiple elliptic curve point computations on a prime modulus of order 2**256 ๐Ÿ”.

Right now, the cryptographic resistance of the GOST R 34.11-94 hash algorithm is estimated at 2**128 operations of computations of a step hash function. There is a known method to reduce this estimate to 2**105 operations, but it demands padding the colliding message with 1024 random bit blocks, each of 256-bit length. So it cannot be used in any practical implementation ๐Ÿ’€โœจ.

8. IANA Considerations โœจ

okay so IANA gets a little update too ๐ŸŽ€ this doc updates the "DNS Security Algorithm Numbers" registry from [RFC4034] and adds a new entry for GOST ๐Ÿ’…

                                      Zone    Trans.
 Value  Algorithm         Mnemonic Signing Sec.  References   Status
  12    GOST R 34.10-2001 ECC-GOST     Y   *     RFC 5933    OPTIONAL

bestie the Digest Types assignment from [RFC4034], Section A.2 also gets bumped ๐Ÿฆ‹ the doc adds the value and status for GOST R 34.11-94:

   Value   Algorithm        Status
     3    GOST R 34.11-94  OPTIONAL

9. Acknowledgments ๐Ÿซถ

ngl this doc is a minor extension of RFC 4034 [RFC4034] ๐ŸŒธ we also tried to match RFC 3110 [RFC3110], RFC 4509 [RFC4509], and RFC 4357 [RFC4357] so everything stays consistent. Huge thank-yous to the authors and contributors of those docs for all their hard work ๐Ÿ’œ

Extra shoutout to Dmitry Burkov, Jaap Akkerhuis, Olafur Gundmundsson, Jelte Jansen, and Wouter Wijngaards for the feedback, text, and super helpful assistance โœจ๐Ÿ‘‘


10. References ๐Ÿ“š

10.1. Normative References

[GOST3410]  "Information technology.  Cryptographic data security.
            Signature and verification processes of [electronic]
            digital signature.", GOST R 34.10-2001, Gosudarstvennyi
            Standard of Russian Federation, Government Committee of
            Russia for Standards, 2001. (In Russian).

[GOST3411]  "Information technology.  Cryptographic data security.
            Hashing function.", GOST R 34.11-94, Gosudarstvennyi
            Standard of Russian Federation, Government Committee of
            Russia for Standards, 1994. (In Russian).

[RFC2119]   Bradner, S., "Key words for use in RFCs to Indicate
            Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC3110]   Eastlake 3rd, D., "RSA/SHA-1 SIGs and RSA KEYs in the
            Domain Name System (DNS)", RFC 3110, May 2001.

[RFC4033]   Arends, R., Austein, R., Larson, M., Massey, D., and S.
            Rose, "DNS Security Introduction and Requirements",
            RFC 4033, March 2005.

[RFC4034]   Arends, R., Austein, R., Larson, M., Massey, D., and S.
            Rose, "Resource Records for the DNS Security Extensions",
            RFC 4034, March 2005.

[RFC4035]   Arends, R., Austein, R., Larson, M., Massey, D., and S.
            Rose, "Protocol Modifications for the DNS Security
            Extensions", RFC 4035, March 2005.

[RFC4357]   Popov, V., Kurepkin, I., and S. Leontiev, "Additional
            Cryptographic Algorithms for Use with GOST 28147-89,
            GOST R 34.10-94, GOST R 34.10-2001, and GOST R 34.11-94
            Algorithms", RFC 4357, January 2006.

[RFC4490]   Leontiev, S., Ed. and G. Chudov, Ed., "Using the
            GOST 28147-89, GOST R 34.11-94, GOST R 34.10-94, and
            GOST R 34.10-2001 Algorithms with Cryptographic Message
            Syntax (CMS)", RFC 4490, May 2006.

[RFC4491]   Leontiev, S., Ed. and D. Shefanovski, Ed., "Using the
            GOST R 34.10-94, GOST R 34.10-2001, and GOST R 34.11-94
            Algorithms with the Internet X.509 Public Key
            Infrastructure Certificate and CRL Profile", RFC 4491,
            May 2006.

[RFC5155]   Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS
            Security (DNSSEC) Hashed Authenticated Denial of
            Existence", RFC 5155, March 2008.

10.2. Informative References

[RFC4509]   Hardaker, W., "Use of SHA-256 in DNSSEC Delegation Signer
            (DS) Resource Records (RRs)", RFC 4509, May 2006.

[RFC5830]   Dolmatov, V., Ed., "GOST 28147-89: Encryption,
            Decryption, and Message Authentication Code (MAC)
            Algorithms", RFC 5830, March 2010.

[RFC5831]   Dolmatov, V., Ed., "GOST R 34.11-94: Hash Function
            Algorithm", RFC 5831, March 2010.

[RFC5832]   Dolmatov, V., Ed., "GOST R 34.10-2001: Digital Signature
            Algorithm", RFC 5832, March 2010.

Authors' Addresses ๐Ÿ’Œ

Vasily Dolmatov (editor)
Cryptocom Ltd.
14/2, Kedrova St.
Moscow,   117218
Russian Federation

Phone: +7 499 124 6226
EMail: dol@cryptocom.ru


Artem Chuprina
Cryptocom Ltd.
14/2, Kedrova St.
Moscow,   117218
Russian Federation

Phone: +7 499 124 6226
EMail: ran@cryptocom.ru


Igor Ustinov
Cryptocom Ltd.
14/2, Kedrova St.
Moscow,   117218
Russian Federation

Phone: +7 499 124 6226
EMail: igus@cryptocom.ru
๐Ÿ“ฆ where this page comes from