Reconstructing public keys from signatures