Hacking Atmosphere-NX - Custom Firmware in development by SciresM

SciresM

Developer
Developer
Joined
Mar 21, 2014
Messages
954
Trophies
2
Age
31
XP
7,793
Country
United States
@SciresM

/* Package2 size, version number is stored XORed in header CTR. */
/* Nintendo, what the fuck? */

I loled. I don't know what he's talking about, but it must have been the blunder for him to be that exasperated about it. Can we get a little context?

Ah, yeah. So, package2 header is basically [Signature] || [CTR] || [Encrypted Header]. When they decrypt the encrypted header, they decrypt everything after the signature in place, and then fix the CTR to be what it was pre-decryption.

Then, they derive some important values from the CTR (how big is the package2, what version is it).

AES-CTR's security relies on the CTR being a random number, and Nintendo's derivation results in a CTR that's certainly random...however, they sacrifice some of that randomness in order to derive values from it.
In particular, the CTR should be 128 random bits, but because of their derivations they only actually get 88 bits of randomness.

It's super WTF, because there's plenty of space where they could have stored that metadata elsewhere, without sacrificing any randomness...
 

theMille

Member
Newcomer
Joined
Apr 3, 2016
Messages
23
Trophies
0
Age
39
XP
312
Country
United States
Ah, yeah. So, package2 header is basically [Signature] || [CTR] || [Encrypted Header]. When they decrypt the encrypted header, they decrypt everything after the signature in place, and then fix the CTR to be what it was pre-decryption.

Then, they derive some important values from the CTR (how big is the package2, what version is it).

AES-CTR's security relies on the CTR being a random number, and Nintendo's derivation results in a CTR that's certainly random...however, they sacrifice some of that randomness in order to derive values from it.
In particular, the CTR should be 128 random bits, but because of their derivations they only actually get 88 bits of randomness.

It's super WTF, because there's plenty of space where they could have stored that metadata elsewhere, without sacrificing any randomness...


Sooooooooo by sacrificing said randomness, technically wouldn't it then be less secure, I mean it seems bad enough that they would use an off the shelf arm with plenty of documented security shortcomings, but then also take liberties such as this.
 

Tilde88

Well-Known Member
Member
Joined
Feb 16, 2015
Messages
288
Trophies
0
Age
34
XP
1,018
Country
United States
Sooooooooo by sacrificing said randomness, technically wouldn't it then be less secure, I mean it seems bad enough that they would use an off the shelf arm with plenty of documented security shortcomings, but then also take liberties such as this.
I mean, I could be wrong, but it's still 88 encrypted characters. That's still quite formidable....
Let's see...

Assuming it only uses lowercase letters, uppercase letters, digits, and the 33 normal special characters. That is a total of 95 different characters per slot. 88 slots. So 95 to the 88th power, that is how many possible combinations exist. Would still take thousands of years (if not more) for the best cluster of supercomputers to bruteforce this.

Oh, this also assumes you were able to figure out the "pattern" and get the other 40 characters.if not, then it is 95 the 128th power. :-p
 
Last edited by Tilde88,
  • Like
Reactions: reminon

Nezztor

Well-Known Member
Member
Joined
Nov 8, 2016
Messages
488
Trophies
0
XP
1,318
Country
Mexico
Ah, yeah. So, package2 header is basically [Signature] || [CTR] || [Encrypted Header]. When they decrypt the encrypted header, they decrypt everything after the signature in place, and then fix the CTR to be what it was pre-decryption.

Then, they derive some important values from the CTR (how big is the package2, what version is it).

AES-CTR's security relies on the CTR being a random number, and Nintendo's derivation results in a CTR that's certainly random...however, they sacrifice some of that randomness in order to derive values from it.
In particular, the CTR should be 128 random bits, but because of their derivations they only actually get 88 bits of randomness.

It's super WTF, because there's plenty of space where they could have stored that metadata elsewhere, without sacrificing any randomness...


*Nintendo hiring scires to make the next generation of console security*
 

SciresM

Developer
Developer
Joined
Mar 21, 2014
Messages
954
Trophies
2
Age
31
XP
7,793
Country
United States
Sooooooooo by sacrificing said randomness, technically wouldn't it then be less secure, I mean it seems bad enough that they would use an off the shelf arm with plenty of documented security shortcomings, but then also take liberties such as this.

88 bits is totally sufficient randomness for a CTR, it's more a "wtf are you doing with this garbage design" than anything. My complaint is about how it makes the format gross (I want Nintendo to have clean, well-thought-out formats) more than anything.
 
  • Like
Reactions: theMille and Lacius

ootnes2

Well-Known Member
Member
Joined
Oct 26, 2015
Messages
219
Trophies
0
Age
37
XP
779
Country
United States
88 bits is totally sufficient randomness for a CTR, it's more a "wtf are you doing with this garbage design" than anything. My complaint is about how it makes the format gross (I want Nintendo to have clean, well-thought-out formats) more than anything.

Surely you have been a professional programmer long enough to know how ugly the sausage is made, no matter which company is writing the code.
 

TheCyberQuake

Certified Geek
Member
Joined
Dec 2, 2014
Messages
5,012
Trophies
1
Age
26
Location
Las Vegas, Nevada
XP
4,386
Country
United States
I would make some kind of meme picture with radial blur for speed emphasis but I'm way to lazy right now
NVM I got bored and made it anyway
AiEVARX.png
 

TheCyberQuake

Certified Geek
Member
Joined
Dec 2, 2014
Messages
5,012
Trophies
1
Age
26
Location
Las Vegas, Nevada
XP
4,386
Country
United States
At this point I keep a tab open on my phone with the github to check commits. Most of it goes over my head but it's fun to watch it progress.

At this point I have wifi set to not automatically connect, and when it does connect it goes through fiddler proxy for update blocking
Only connect to wifi to download games while I can.

Hoping I can nab typoman before an update comes out.

Looking forward to seeing what the full release is. Maybe we'll get custom themes (or at least custom colors)
 

Nezztor

Well-Known Member
Member
Joined
Nov 8, 2016
Messages
488
Trophies
0
XP
1,318
Country
Mexico
At this point I keep a tab open on my phone with the github to check commits. Most of it goes over my head but it's fun to watch it progress.

At this point I have wifi set to not automatically connect, and when it does connect it goes through fiddler proxy for update blocking
Only connect to wifi to download games while I can.

Hoping I can nab typoman before an update comes out.

Looking forward to seeing what the full release is. Maybe we'll get custom themes (or at least custom colors)

Any plans on getting a 2 switch for homebrew? or just holding with zelda like the 1.0.0 users
 

TheCyberQuake

Certified Geek
Member
Joined
Dec 2, 2014
Messages
5,012
Trophies
1
Age
26
Location
Las Vegas, Nevada
XP
4,386
Country
United States
Any plans on getting a 2 switch for homebrew? or just holding with zelda like the 1.0.0 users
I have a 4.1.0 switch, so I can play any game right now and will have access to future physical copies for a bit after an update comes out. Blocking updates from there, and I have no plans to buy a second switch. My game library is large enough to hold out on 4.1.0, and I don't care about most games currently announced, and even then I can wait a bit for anything I do care about rather than buy a new switch.
 
  • Like
Reactions: Nezztor

SoslanVanWieren

Banned!
Banned
Joined
Feb 6, 2017
Messages
1,809
Trophies
0
XP
827
Country
Australia
I have a 4.1.0 switch, so I can play any game right now and will have access to future physical copies for a bit after an update comes out. Blocking updates from there, and I have no plans to buy a second switch. My game library is large enough to hold out on 4.1.0, and I don't care about most games currently announced, and even then I can wait a bit for anything I do care about rather than buy a new switch.
Would rather have full control over the console in months to come instead of years.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    DEMONGreninjaPG @ DEMONGreninjaPG: oooh pizzza can i get a all meat pizza with pineapple