Publish managed RSA DKIM keys in SPKI format #212

Closed
opened 2026-11-30 23:38:13 +01:00 by parkel · 0 comments
Owner

Coulobre exports the public part of managed RSA signing keys as raw PKCS#1 DER. Gmail has returned dkim=neutral (invalid public key) for a message signed with a matching 2048-bit RSA key even though SPF and DMARC passed. Re-encoding the same public key as SubjectPublicKeyInfo (SPKI) matches the format produced by the OpenSSL command in RFC 6376 Appendix C.1.

  • Generate the TXT record from SPKI for both new and existing managed RSA keys, for local and linked mail nodes.
  • Parse both formats when checking existing records and compare canonical key material rather than comparing encoded bytes or whole TXT strings.
  • Allow a managed zone to republish a legacy PKCS#1 record when the existing record and the signer contain the same key. Preserve unrelated records and treat a different key at the same selector as a conflict. Document how to republish existing domains and verify a new signed message after the DNS TTL.
  • Cover the same-key conversion, backwards-compatible checks, a mixed node version if applicable, and protection of an existing different key. Verify against an external receiver after publishing.

Reference: https://www.rfc-editor.org/rfc/rfc6376.html#appendix-C.1

Coulobre exports the public part of managed RSA signing keys as raw PKCS#1 DER. Gmail has returned `dkim=neutral (invalid public key)` for a message signed with a matching 2048-bit RSA key even though SPF and DMARC passed. Re-encoding the same public key as SubjectPublicKeyInfo (SPKI) matches the format produced by the OpenSSL command in RFC 6376 Appendix C.1. - Generate the TXT record from SPKI for both new and existing managed RSA keys, for local and linked mail nodes. - Parse both formats when checking existing records and compare canonical key material rather than comparing encoded bytes or whole TXT strings. - Allow a managed zone to republish a legacy PKCS#1 record when the existing record and the signer contain the same key. Preserve unrelated records and treat a different key at the same selector as a conflict. Document how to republish existing domains and verify a new signed message after the DNS TTL. - Cover the same-key conversion, backwards-compatible checks, a mixed node version if applicable, and protection of an existing different key. Verify against an external receiver after publishing. Reference: https://www.rfc-editor.org/rfc/rfc6376.html#appendix-C.1
parkel added the
kind
bug
area/mailarea/dns
labels 2026-11-30 23:38:13 +01:00
parkel added this to the v1.0.0 - First stable release milestone 2026-12-01 00:51:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hippogrief/coulobre#212