Skip to content

Instantly share code, notes, and snippets.

@berney
berney / cook_rsa_key.go
Created July 1, 2016 23:25 — forked from AGWA/cook_rsa_key.go
Demonstrates that an RSA signature does not uniquely identify a public key.
/*
* Demonstrates that an RSA signature does not uniquely identify a public key.
* Given a signature, s, and a message m, it's possible to construct a new RSA key
* pair such that s is a valid signature for m under the new key pair.
*
* Requires Go version >= 1.5. Go <= 1.4 doesn't work due to a bug in the bignum
* package: https://github.com/golang/go/issues/9826
*
* Written in 2015 by Andrew Ayer <[email protected]>
*