Repository navigation
Give RSA/MD5 DNSKEYs from zone files their RFC key tag - #197
Merged
Merged
Conversation
RFC 4034 Appendix B.1 has an algorithm 1 key tag be the third- and second-to-last octets of the modulus. The wire decoder gives it so, but the zone reader computed its own checksum for every algorithm. It now takes the key tag from dns_dnskey:key_tag/1, as the wire decoder does, and the test that pins dnspython's key tags reads the same keys from zone text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC 4034 Appendix B.1, as erratum 193 corrects it, has the key tag of an algorithm 1 (RSA/MD5) key be the third- and second-to-last octets of its modulus, not the checksum the other algorithms take. The wire decoder gives that key tag, but the zone reader computed the checksum for every algorithm itself, so the same DNSKEY had another
keytagread from a zone file than decoded from the wire.The zone reader now takes the key tag from
dns_dnskey:key_tag/1, as the wire decoder does, for DNSKEY and CDNSKEY alike, and its own checksum is gone.Tests:
keytag_rsamd5, which pins the key tags dnspython 2.9.1 gives three RSA/MD5 keys against the wire decoder andadd_keytag_to_dnskey/1, reads the same keys from zone text too, as DNSKEY and CDNSKEY. With the old checksum it fails.