-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIG(0) signature should include SIG's RDATA in hash #120
Comments
Thanks for the report. I use the presig in RRSIG creation for DNSSec. I've validated that in real world systems. The SIG0 calculation has always annoyed me, and I haven't had real world systems to validate it. Thank you for this report! Anyway, for various reasons, most of the code for SIG0 creation is in Message::sign(). That is where this should probably be fixed. The SIG0 rdata creation will need to be reordered to allow for this. |
Yes, I came up with:
... and then forwarding |
According to RFC2931, the hash for the signature should be calculated over
data = RDATA | request - SIG(0)
where "RDATA is the RDATA of the SIG(0) being calculated less the signature itself".
When signing DNS requests, AFAICT, trust_dns currently calculates the hash over
request - SIG(0)
, only.In
fn hash_rrset
, used to sign signatures over record sets, there is a call tosig::emit_pre_sig
to include the SIG(0) RDATA.But in
fn hash_messages
, such code is missing.The text was updated successfully, but these errors were encountered: