[PR #122] [MERGED] Fix SIG(0) calculation #1255

Closed
opened 2026-03-16 01:56:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/122
Author: @jannic
Created: 4/28/2017
Status: Merged
Merged: 5/2/2017
Merged by: @bluejekyll

Base: key_flagsHead: pr-fix-sig0


📝 Commits (4)

  • d0850be make signatory value 0 the default value
  • f1c05cf Don't double-hash message when signing
  • b77d0a9 Fix SIG(0) hash calculation
  • 4a22016 Avoid code duplication in Message::sign()

📊 Changes

5 files changed (+107 additions, -35 deletions)

View changed files

📝 client/src/op/message.rs (+17 -20)
📝 client/src/rr/dnssec/signer.rs (+55 -13)
📝 client/src/rr/rdata/key.rs (+11 -1)
📝 client/src/rr/rdata/sig.rs (+23 -0)
📝 server/src/authority/authority.rs (+1 -1)

📄 Description

This fixes https://github.com/bluejekyll/trust-dns/issues/120, and a bug where the message was hashed twice before signing it.

With these changes, bind9 accepts a SIG(0) signed update request sent with trust_dns.

As mentioned in github.com/jannic/trust-dns@f1c05cfcdb I only tested this with RSA signatures, not sure if ED25519 are missing the hashing step, now.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/122 **Author:** [@jannic](https://github.com/jannic) **Created:** 4/28/2017 **Status:** ✅ Merged **Merged:** 5/2/2017 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `key_flags` ← **Head:** `pr-fix-sig0` --- ### 📝 Commits (4) - [`d0850be`](https://github.com/hickory-dns/hickory-dns/commit/d0850becf4d3e24f06c3d79186f6e07901fec802) make signatory value 0 the default value - [`f1c05cf`](https://github.com/hickory-dns/hickory-dns/commit/f1c05cfcdb0506836adf68988be2af859288fc1f) Don't double-hash message when signing - [`b77d0a9`](https://github.com/hickory-dns/hickory-dns/commit/b77d0a9dd05e29eb9c3bed716a2c87a96384af8b) Fix SIG(0) hash calculation - [`4a22016`](https://github.com/hickory-dns/hickory-dns/commit/4a22016f3d6867d017d5f07c98843a3b70e4f0a0) Avoid code duplication in Message::sign() ### 📊 Changes **5 files changed** (+107 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `client/src/op/message.rs` (+17 -20) 📝 `client/src/rr/dnssec/signer.rs` (+55 -13) 📝 `client/src/rr/rdata/key.rs` (+11 -1) 📝 `client/src/rr/rdata/sig.rs` (+23 -0) 📝 `server/src/authority/authority.rs` (+1 -1) </details> ### 📄 Description This fixes https://github.com/bluejekyll/trust-dns/issues/120, and a bug where the message was hashed twice before signing it. With these changes, bind9 accepts a SIG(0) signed update request sent with trust_dns. As mentioned in https://github.com/jannic/trust-dns/commit/f1c05cfcdb0506836adf68988be2af859288fc1f I only tested this with RSA signatures, not sure if ED25519 are missing the hashing step, now. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 01:56:27 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1255
No description provided.