> For the complete documentation index, see [llms.txt](https://onyb.gitbook.io/roll-your-own-crypto/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://onyb.gitbook.io/roll-your-own-crypto/the-playstation-3-hack.md).

# Quiz: The Playstation 3 Hack

aka The Nonce Reuse Attack

![Very very secure.](https://93210801-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lw3TyXBjTYBK7fUhhiC%2F-LwAZpQ7jo5WmjWX7nPU%2F-LwA_1aSNqbqUQR2yo85%2Frandom_number.png?alt=media\&token=94063de1-2b31-44c6-8b6d-28e23ec9f9be)

Sony uses a private key, typically stored (in an HSM?) at the company's HQ, to mark their Playstation firmwares as valid and unmodified. The PS3 only needs a public key to verify that the signature came from Sony. Normally, this is considered safe; but Sony did a rookie mistake in the implementation of their signing algorithm - **they used the same random number to sign everything**.

### Quiz time

Recall how the (public parameter) $$r$$ in the signature is generated from a (secret) random number $$k$$, using the formula $$kG = R$$, $$r$$ being the x-coordinate of the point $$R$$.

Given two signatures that use the same $$k$$,  **prove how you can extract the private key** used for signing. Use the signature formula in the ECDSA section. You'll need pen and paper for this.&#x20;
