Hacking Atmosphere-NX - Custom Firmware in development by SciresM

SciresM

Developer
Developer
Joined
Mar 21, 2014
Messages
973
Trophies
3
Age
33
XP
8,295
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
41
XP
332
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
295
Trophies
0
Age
36
XP
1,068
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,338
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
973
Trophies
3
Age
33
XP
8,295
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
220
Trophies
0
Age
39
XP
1,104
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
28
Location
Las Vegas, Nevada
XP
4,433
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
28
Location
Las Vegas, Nevada
XP
4,433
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,338
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
28
Location
Las Vegas, Nevada
XP
4,433
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
857
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.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
  • Xdqwerty
    what are you looking at?
  • BakerMan @ BakerMan:
    GOOD LORD WHAT IS HAPPENING IN THERE?!
    +1
  • BakerMan @ BakerMan:
    Aurora Borealis?
    +1
  • BakerMan @ BakerMan:
    I- AURORA BOREALIS? AT THIS TIME OF YEAR, AT THIS TIME OF DAY, IN THIS PART IF THE COUNTRY, LOCALIZED ENTIRELY WITHIN YOUR KITCHEN?
    +1
  • BakerMan @ BakerMan:
    jokes aside, anyone else who saw the northern lights tonight, what did you think, i thought they were beautiful for a while, before it went to a vague pink
    maybe later they'll pick up again
    +1
  • BigOnYa @ BigOnYa:
    I went out and tried to see, but I'm too south, and its too cloudy, bummer
    +1
  • BakerMan @ BakerMan:
    too far south? it goes down to alabama tonight
  • BakerMan @ BakerMan:
    sorry about the clouds btw, the sky is clear here rn
    +1
  • BigOnYa @ BigOnYa:
    Maybe just too cloudy for me then, Idk
  • BigOnYa @ BigOnYa:
    Its neat tho, I seen it years ago when I was visiting Canada.
    +1
  • BakerMan @ BakerMan:
    this is my first aurora tbh
    +1
  • BakerMan @ BakerMan:
    i mean, multiple have happened in my lifetime, but it's always been too cloudy
  • BakerMan @ BakerMan:
    IT'S LIKE THAT ALMOST EVERY FUCKING METEOR SHOWER TOO
  • BigOnYa @ BigOnYa:
    You need to setup a time lapse camera, be neat
  • BigOnYa @ BigOnYa:
    I actually use a pic of it on my pc desktop cause its cool looking
  • Xdqwerty @ Xdqwerty:
    Apparently the pro versión of pizza boy is back aswell
  • Xdqwerty @ Xdqwerty:
    Gonna download the update
  • Xdqwerty @ Xdqwerty:
    Only 2 antiviruses detected the APK as a virus on virustotal so it Must be safe
  • Xdqwerty @ Xdqwerty:
    Cuz false positive
  • Xdqwerty @ Xdqwerty:
    Wait
  • Xdqwerty @ Xdqwerty:
    Eh nvm
  • BakerMan @ BakerMan:
    sadly, the clouds are setting in now

    hey BigOnYa the clouds are coming from the south, maybe check again
  • Xdqwerty @ Xdqwerty:
    Good night it's 11 pm
  • BakerMan @ BakerMan:
    night
  • BigOnYa @ BigOnYa:
    @BakerMan Nuh I'm in for the night playing Fallout 4, ill look tomorrow night
    BigOnYa @ BigOnYa: @BakerMan Nuh I'm in for the night playing Fallout 4, ill look tomorrow night