RFC 9563: SM2 Digital Signature Algorithm for DNSSEC
- C. Zhang,
- Y. Liu,
- F. Leng,
- Q. Zhao,
- Z. He
Abstract
This document specifies the use of the SM2 digital signature algorithm and SM3 hash algorithm for DNS Security (DNSSEC).¶
This document is an Independent Submission to the RFC series and does not have consensus of the IETF community.¶
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This is a contribution to the RFC Series, independently of any other RFC stream. The RFC Editor has chosen to publish this document at its discretion and makes no statement about its value for implementation or deployment. Documents approved for publication by the RFC Editor are not candidates for any level of Internet Standard; see Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
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://
1. Introduction
DNSSEC is broadly defined in [RFC4033], [RFC4034], and [RFC4035]. It uses cryptographic keys and digital signatures to provide authentication of DNS data. DNSSEC signature algorithms are registered in the DNSSEC algorithm numbers registry [IANA].¶
This document defines the DNSKEY and RRSIG resource records (RRs)
of new signing algorithms: SM2 uses elliptic curves over 256-bit
prime fields with SM3 hash algorithm. (A description of SM2 can be found in GM/T 0003.2-2012 [GMT-0003.2] or ISO
Many implementations may not support SM2 signatures and SM3 digests. Section 5.2 of [RFC6840] specifies handling of answers in such cases.¶
Caution: This specification is not a standard and does not have IETF community consensus. It makes use of cryptographic algorithms that are national standards for China, as well as ISO/IEC standards (ISO/IEC 14888:3-2018 [ISO
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.¶
2. SM3 DS Records
The implementation of SM3 in DNSSEC follows the implementation of SHA-256 as specified in [RFC4509] except that the underlying algorithm is SM3 with digest type code 6.¶
The generation of an SM3 hash value is described in Section 5 of [GMT-0004] and generates a 256-bit hash value.¶
3. SM2 Parameters
Verifying SM2 signatures requires agreement between the signer and
the verifier on the parameters used. The SM2 digital signature algorithm
has been added to [ISO
4. DNSKEY and RRSIG Resource Records for SM2
4.1. DNSKEY Resource Records
SM2 public keys consist of a single value, called "P". In DNSSEC keys, P is a string of 64 octets that represents the uncompressed form of a curve point, "x | y". (Conversion of a point to an octet string is described in Section 4.2.8 of [GMT-0003.1].)¶
4.2. RRSIG Resource Records
The SM2 signature is the combination of two non-negative integers, called "r" and "s". The two integers, each of which is formatted as a simple octet string, are combined into a single longer octet string for DNSSEC as the concatenation "r | s". (Conversion of the integers to bit strings is described in Section 4.2.1 of [GMT-0003.1].) Each integer MUST be encoded as 32 octets.¶
Process details are described in Section 6 of [GMT-0003.2].¶
The algorithm number associated with the DNSKEY and RRSIG resource records is 17, which is described in the IANA Considerations section.¶
Conformant implementations that create records to be put into the DNS MAY implement signing and verification for the SM2 digital signature algorithm. Conformant DNSSEC verifiers MAY implement verification for the above algorithm.¶
5. Support for NSEC3 Denial of Existence
This document does not define algorithm aliases mentioned in [RFC5155].¶
A DNSSEC validator that implements the signing algorithms defined in this document MUST be able to validate negative answers in the form of both NSEC and NSEC3 with hash algorithm SHA-1, as defined in [RFC5155]. An authoritative server that does not implement NSEC3 MAY still serve zones that use the signing algorithms defined in this document with NSEC denial of existence.¶
If using NSEC3, the iterations MUST be 0 and salt MUST be an empty string as recommended in Section 3.1 of [RFC9276].¶
6. Example
The following is an example of SM2 keys and signatures in DNS zone file format, including DNSKEY RR, NSEC3PARAM RR, NSEC3 RR with RRSIG RRs, and DS RR.¶
[Example_Program] is an example program based on dnspython and gmssl, which supplies key generating, zone signing, zone validating, and DS RR generating functions for convenience.¶
7. IANA Considerations
IANA has registered the following in the "Digest Algorithms" registry within the "DNSSEC Delegation Signer (DS) Resource Record (RR) Type Digest Algorithms" registry group.¶
IANA has registered the following in the "DNS Security Algorithm Numbers" registry within the "Domain Name System Security (DNSSEC) Algorithm Numbers" registry group.¶
* There has been no determination of standardization of the use of this algorithm with Transaction Security.¶
8. Security Considerations
The security strength of SM2 depends on the size of the key. A longer key provides stronger security strength. The security of ECC-based algorithms is influenced by the curve it uses, too.¶
Like any cryptographic algorithm, it may come to pass that a weakness is found in either SM2 or SM3. In this case, the proper remediation is crypto-agility. In the case of DNSSEC, the appropriate approach would be to regenerate appropriate DS, DNSKEY, RRSIG, and NSEC3 records. Care MUST be taken in this situation to permit appropriate rollovers, taking into account record caching. See [RFC7583] for details. A suitable replacement algorithm should be both widely implemented and not known to have weaknesses.¶
The security considerations listed in [RFC4509] apply here as well.¶
9. References
9.1. Normative References
- [GMT-0003.1]
-
Cryptography Standardization Technical Committee of China, "SM2 Public Key Cryptographic Algorithms Based on Elliptic Curves Part 1: General", [In Chinese], GM/T 0003.1-2012, . English translation available at: http://
www .gmbz .org .cn /upload /2024 -11 -18 /173189950168702 4253 .pdf - [GMT-0003.2]
-
Cryptography Standardization Technical Committee of China, "SM2 Public Key Cryptographic Algorithms Based on Elliptic Curves Part 2: Digital Signature Algorithm", [In Chinese], GM/T 0003.2-2012, . English translation available at: http://
www .gmbz .org .cn /upload /2024 -11 -18 /173189958335901 3934 .pdf - [GMT-0004]
-
Cryptography Standardization Technical Committee of China, "SM3 Cryptographic Hash Algorithm", [In Chinese], GM/T 0004-2012, . English translation available at: http://
www ..gmbz .org .cn /upload /2024 -11 -18 /173189942656501 2428 .pdf - [IANA]
-
IANA, "DNS Security Algorithm Numbers", <https://
www >..iana .org /assignments /dns -sec -alg -numbers - [ISO
-IEC10118 -3 _2018] - ISO/IEC, "IT Security techniques -- Hash-functions -- Part 3: Dedicated hash-functions", ISO/IEC 10118-3:2018, .
- [ISO
-IEC14888 -3 _2018] - ISO/IEC, "IT Security techniques -- Digital signatures with appendix -- Part 3: Discrete logarithm based mechanisms", ISO/IEC 14888-3:2018, .
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC4033]
-
Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "DNS Security Introduction and Requirements", RFC 4033, DOI 10
.17487 , , <https:///RFC4033 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 , , <https:///RFC4034 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 , , <https:///RFC4035 www >..rfc -editor .org /info /rfc4035 - [RFC4509]
-
Hardaker, W., "Use of SHA-256 in DNSSEC Delegation Signer (DS) Resource Records (RRs)", RFC 4509, DOI 10
.17487 , , <https:///RFC4509 www >..rfc -editor .org /info /rfc4509 - [RFC5155]
-
Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS Security (DNSSEC) Hashed Authenticated Denial of Existence", RFC 5155, DOI 10
.17487 , , <https:///RFC5155 www >..rfc -editor .org /info /rfc5155 - [RFC6840]
-
Weiler, S., Ed. and D. Blacka, Ed., "Clarifications and Implementation Notes for DNS Security (DNSSEC)", RFC 6840, DOI 10
.17487 , , <https:///RFC6840 www >..rfc -editor .org /info /rfc6840 - [RFC7583]
-
Morris, S., Ihren, J., Dickinson, J., and W. Mekking, "DNSSEC Key Rollover Timing Considerations", RFC 7583, DOI 10
.17487 , , <https:///RFC7583 www >..rfc -editor .org /info /rfc7583 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC9276]
-
Hardaker, W. and V. Dukhovni, "Guidance for NSEC3 Parameter Settings", BCP 236, RFC 9276, DOI 10
.17487 , , <https:///RFC9276 www >..rfc -editor .org /info /rfc9276
9.2. Informative References
- [Example
_Program] -
"sign and validate dnssec signature with sm2sm3 algorithm", commit 6f98c17 , , <https://
github >..com /scooct /dnssec _sm2sm3