New blog post: Recovering public keys from signatures. It turns out public keys, are, in fact, public.
https://keymaterial.net/2024/06/15/reconstructing-public-keys-from-signatures/
New blog post: Recovering public keys from signatures. It turns out public keys, are, in fact, public.
https://keymaterial.net/2024/06/15/reconstructing-public-keys-from-signatures/
@tryst I can't see a way of doing it for RSA, but for UOV it is very easy to find a second key under which a specific signature verifies, you can find an alternate one that verifies up to (u+o)(u+o+1)/2 - 1 message/signature pairs using the same method I used to find the actual public key, given that it's polynomial interpolation you would get an underspecified linear system and have extra solutions.
The funny thing about that fake public key is that it would be a public key without a private key necessarily even existing.
@sophieschmieg yeah, thinking about the RSA method you laid out some more, if you attempt it with two messages signed with different keys you’re extremely likely to get a much smaller result with like a… ~55% chance of 1.
i guess this also suggests that you can, with enough factoring, probably recovery the RSA public key from one signature, as you’re unlikely to have more than two prime factors of s^e-m in the right range. and of them are very likely much smaller…
together, i think that implies that you can probably trust the RSA public key you recover from two message-signature pairs is the right one. (and so do the signed payloads checking thing you mentioned).