[GH-ISSUE #141] ECDSA support is broken #366

Closed
opened 2026-03-15 22:10:10 +03:00 by kerem · 1 comment
Owner

Originally created by @SAPikachu on GitHub (Jun 7, 2017).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/141

Test case:

#[test]
pub fn test_secure_query_ecdsa() {
    use udp::UdpClientConnection;
    use self::domain::Name;
    let client = SecureSyncClient::new(UdpClientConnection::new("8.8.8.8:53".parse().unwrap()).unwrap()).build();
    client.secure_query(&Name::parse("blog.cloudflare.com.", None).unwrap(), DNSClass::IN, RecordType::A).unwrap();

}

We have 3 issues in the code:

  1. Curve of ECDSAP256SHA256 should be X9_62_PRIME256V1 (aka secp256r1) instead of SECP256K1.
  2. Public key needs to be converted to OpenSSL format.
  3. Signature needs to be converted to ASN.1 DER encoding.

Will send a pull request a bit later.

Originally created by @SAPikachu on GitHub (Jun 7, 2017). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/141 Test case: ``` #[test] pub fn test_secure_query_ecdsa() { use udp::UdpClientConnection; use self::domain::Name; let client = SecureSyncClient::new(UdpClientConnection::new("8.8.8.8:53".parse().unwrap()).unwrap()).build(); client.secure_query(&Name::parse("blog.cloudflare.com.", None).unwrap(), DNSClass::IN, RecordType::A).unwrap(); } ``` We have 3 issues in the code: 1. Curve of `ECDSAP256SHA256` should be `X9_62_PRIME256V1` (aka `secp256r1`) instead of `SECP256K1`. 2. Public key needs to be converted to OpenSSL format. 3. Signature needs to be converted to ASN.1 DER encoding. Will send a pull request a bit later.
kerem 2026-03-15 22:10:10 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@bluejekyll commented on GitHub (Jun 7, 2017):

Awesome, thanks!

<!-- gh-comment-id:306704363 --> @bluejekyll commented on GitHub (Jun 7, 2017): Awesome, thanks!
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#366
No description provided.