<div dir="ltr">If I'm reading this thread right (I apologize, I've only skimmed) this is a duplicate signature key selection attack, similar to:<div><br></div><div><a href="https://www.agwa.name/blog/post/duplicate_signature_key_selection_attack_in_lets_encrypt">https://www.agwa.name/blog/post/duplicate_signature_key_selection_attack_in_lets_encrypt</a><br></div><div><br></div><div>The easiest way to mitigate it at a protocol level is to include the sender's public key in the contents of the digest to be signed, then make sure the public key you're using to verify matches the one in the message you're verifying.</div><div><br></div><div>All that said, the strength of a cryptographic system rests in the keys. If you're trying to verify a message with a potentially malicious public key, what does that say about the contents of the message at all? (Not a whole lot, IMO)</div><div class="gmail_extra"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Tony Arcieri<br></div>
</div></div>