<div dir="auto"><div data-smartmail="gmail_signature" dir="auto"><br></div><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">Den 28 feb. 2017 22:32 skrev "Ron Garret" <<a href="mailto:ron@flownet.com" target="_blank">ron@flownet.com</a>>:<br type="attribution"><blockquote class="m_-2032471703860993159quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One of the things you have to decide when designing a signature protocol is exactly what is to be signed.  Simply signing a raw document is a bad idea because that leaves you vulnerable to chimera/Dali attacks (<a href="https://pdfs.semanticscholar.org/7a3a/8a1342d40e0585342fd36f938d01c82b75c7.pdf" rel="noreferrer" target="_blank">https://pdfs.semanticscholar.<wbr>org/7a3a/8a1342d40e0585342fd36<wbr>f938d01c82b75c7.pdf</a>).  At the very least you need to integrate the mime-type (or something equivalent) and maybe even the file name into the data being signed.<br>
<br>
My question is: would it help to also integrate the public key being used to produce the signature into the data being signed?  Are there any attacks that this would help prevent?  Has this construction been studied?  Can anyone point me to a paper?</blockquote></div></div><div dir="auto"><br></div><div dir="auto">Don't have the papers right now, but at least in some cases with RSA you can take an existing message and signature pair, and construct a matching keypair (different from the original signing key) for which it still validates. </div><div dir="auto"><br></div><div dir="auto">Attack scenario: Somebody thought a stand-alone signature was as good as a secure hash in every way. </div><div dir="auto"><br></div><div dir="auto">Based on this, the adversary takes a trusted message (previous validated, key data discarded...? CT logged signature...?), generates a matching keypair, and then lies about which signing keypair was used, allowing him to spoof that message signer by using another keypair which he also can use to sign other messages.  </div><div dir="auto"><br></div><div dir="auto">Definitely a very unlikely attack. Still possible, though. </div><div dir="auto"><br></div><div dir="auto">Note that instead of including the full public key you really just need to include some pointer / address / identifier for the key that allows you to look it up and confirm it. Anything unambiguous. </div><div dir="auto"><br></div><div dir="auto">Related previous comment of mine: </div><div dir="auto"><a href="https://www.ietf.org/mail-archive/web/cfrg/current/msg08958.html">https://www.ietf.org/mail-archive/web/cfrg/current/msg08958.html</a></div><div dir="auto"><br></div><div dir="auto"><br></div><div class="gmail_extra" dir="auto"></div><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote class="m_-2032471703860993159quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div>