gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Misc > Homebrew DSiWare

#173855 - ritz - Tue May 04, 2010 7:38 pm

For fun and curiosity only:

In theory, could Nintendo give out a special homebrewer's public key or whatever to encrypt/sign (using some tool released by Nintendo) a homebrew rom? The idea would be that homebrewers could build their app/game, use this key to sign/encrypt the final rom (.bin) which would allow it to run from the DSi just like DSiWare. It would essentially be equivalent to any DSiWare software (could manipulate it in data management, etc). I know it's probably too late now as the DSi wasn't designed for this special key/signature check, but let's just pretend it was. Would this not allow homebrew to run on the DSi without the worry of piracy? Even if pirates figured out how to circumvent the homebrewer's key somehow, it still wouldn't work because commercial roms are already signed/encrypted differently. Right?

I dunno, just some thoughts I had after stumbling upon the comment that John Carmack said about DS homebrew:

Quote:
IGN: Since this is your first Nintendo DS project, what was it like poking at the hardware?

Carmack: It was probably the most fun platform that I have personally worked on. The early consoles that I worked on (SNES, Genesis-32X, and Jaguar) had fun hardware and full documentation, but a lousy development tool chain. A lot of later consoles had much better development tools, but they started playing secretive with the exact hardware specs, at least around console introduction time.
While there are a few nooks on the DS that aren't documented, they weren't things I cared about, so to me it was almost perfect. It is a shame that homebrew development can't be officially sanctioned and supported, because it would be a wonderful platform for a modern generation of programmers to be able to get a real feel for low level design work, to be contrasted with the high level web and application work that so many entry level people start with.


Last edited by ritz on Tue May 04, 2010 7:42 pm; edited 1 time in total

#173856 - Dwedit - Tue May 04, 2010 7:41 pm

Then what if someone rips commercial software and signs it with the homebrew key? That's the supposed reason why people never give out homebrew keys.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#173857 - ritz - Tue May 04, 2010 7:49 pm

I don't mean rom dumps of DS or DSi carts. They simply shouldn't work with the homebrewer's key as the console would be designed not to allow that (Slot-1 roms). Or DSi-only roms (and future cart's roms) would be fully pre-Nintendo-encrypted and it wouldn't matter if the homebrewer's key was injected somehow... it's still a completely different scheme/signature.
But isn't the rom of a DSiWare app/game already fully encrypted/signed with Nintendo's current method? So even if you used the homebrewer's key somehow, the DSiWare rom is still safe as it's still encrypted with a different scheme/key.

P.S. As you can see, I know nothing about encryption, etc. by the way I just throw terms around trying to make my explanation work somehow :)

#173861 - Rajveer - Wed May 05, 2010 12:46 am

I guess that would only work if the system restricted some resources when presented with a homebrew key as opposed to a commercial one, kinda like Symbian and different developer certificates. If with a homebrew key you're given full access to all the hardware, then you could just write a loader, sign it with a leaked homebrew key/signer tool, and your loader would have access to the full system and could load a rom from a flashcart or whatever.

Also, I too know barely anything about encryption, so maybe I should just let the experts reply!

#174010 - Kayvon - Wed May 12, 2010 3:13 pm

I know a bit about encryption. But as Rajveer mentioned, there's no good way for the DS to differentiate between a homebrew ROM and a commercial ROM signed with homebrew code. (Not that it matters, since the commercial ROMs would already be signed with the commercial signature; using the homebrew signature wouldn't be helpful unless it was needed to allow the games to run off the SD slot.)

I think the real problem is that this signature isn't really buying you anything. If Nintendo wanted to give out a homebrew signature, then why would it bother requiring a signature at all? There's no point in cryptographically signing something if the signature's private key is publicly known.

#174012 - ritz - Wed May 12, 2010 5:14 pm

Kayvon wrote:
using the homebrew signature wouldn't be helpful unless it was needed to allow the games to run off the SD slot

I think this is what I was getting at. I was just wondering how Nintendo could allow legit homebrew on the DSi in a similar form as DSiWare. Currently, DSiWare is wrapped up with sig/encrypt stuff and the DSi firmware knows how to validate/unencrypt/run the DSiWare software. It'd be nice if we had something similar:

1. Build homebrew, with linker?/crt0? type stuff given to us by Nintendo
2. Use a tool given to us by Nintendo that does (required) sanity checking (lotcheck? I think I read something somewhere that lotcheck is a program that tests a commercial rom to get a Nintendo seal of approval before release). The success of this would be embedded in the rom or signature when signed (so that ds-bricker type software wouldn't make the cut).
3. Use a tool from Nintendo that would sign/encrypt the final rom so that it would actually run on the DSi via the firmware just like DSiWare works.

Anyway, thanks for the insight. I had fun pretending that the legit homebrew scene was a welcomed guest in Iwata's house :)

#174179 - tepples - Sat May 22, 2010 5:09 pm

Rajveer wrote:
I guess that would only work if the system restricted some resources when presented with a homebrew key as opposed to a commercial one, kinda like Symbian and different developer certificates.

The homebrew key is called WarioWare DIY.

Kayvon wrote:
If Nintendo wanted to give out a homebrew signature, then why would it bother requiring a signature at all?

Each system would have a different keypair. In order to distribute your app, you'd have to do it through the official channels. That's what Microsoft did for XNA and what Apple copied to make the iPhone developer program.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.