4 ms·
He is misquoting myself and/or other people who've talked about the encryption before. Sony has their own format they call SELF (secure ELF?) which works as fol
by yifanlu 11y ago
He is misquoting myself and/or other people who've talked about the encryption before. Sony has their own format they call SELF (secure ELF?) which works as follows: each ELF segment (not section) has a key/iv generated for it and is encrypted with AES-CTR (previously same keys were used for different segments, making it vulnerable to attacks). The keys are placed into the header and encrypted with AES-CBC. The decryption key for this is the important one, which if we obtain, allows the decryption of any* SELF. (So an mis-implemented encryption has happened before and doesn't mean 'oh the military uses AES, so anything that uses AES is unbreakable')
There's also the signatures which prevent modifying the SELFs even if we got the decryption keys. The ECDSA random-fail was what happened to the PS3. This has nothing to do with the encryption though. (There was also no "constant 4" that was just a simplification in the slide deck of the presenters. It was meant as a joke.)
But I do understand all the gross simplification CTurt made because the audience for this article is people who watch the console hacking scene, and in the console hacking scene, almost nobody knows anything about crypto. I frequently have to answer why brute forcing 128-bit AES keys is not possible. Then, inevitably, the asker will declare why we don't just try to guess then. Once I was informed that computers will become faster, so, in the future, we can brute force keys "at the speed of light." I asked them how many meters per second we can crack keys now.
* Okay, technically not any. I haven't gone into NPDRM, which is an additional layer of encryption for purchased games. Different keys are also used for different components (for example, kernel vs. user libraries).
- tptacek 11y agoSo the whole ELF file is protected by a signature you don't have known flaws in? Because AES-CTR and/or AES-CBC (actually especially CBC) gives me the willies without some kind of MAC.
- yifanlu 11y agoYeah, it's unauthenticated encryption, but think about their threat model. It's not about protecting integrity (the code signing takes care of that), it's about protecting the code from prying eyes (aka DRM). And the tradeoff with speed is likely why they choose CTR. That has bitten them in the ass before with key reuse, but by PS4 they've had about 10 years of experience with the SELF format now. While I doubt the format is completely secure, it's likely easier to find a flaw in FreeBSD9 (which is why CTurt tried to say).
- tptacek 11y agoIt is usually hard to retain confidentiality if you don't also have integrity protection. My suggestion wasn't that people would be able to exploit the lack of a MAC to override settings or code in ELF files; it was that they could use that flaw to decrypt the code.
- jsingleton 11y agoIIRC the joke slide was https://www.xkcd.com/221 https://www.xkcd.com/221 Edit for the lazy: int getRandomNumber() { return 4; // chosen by fair dice roll. // guaranteed to be random. } Alt text: RFC 1149.5 specifies 4 as the standard IEEE-vetted random number.