Compare commits

..

2 Commits

Author SHA1 Message Date
Lillian Skinner
5d55d306f1
Update build.yml
Some checks failed
Build TAD Delivery Tool / Build with Docker using devkitARM (push) Has been cancelled
Build TAD Delivery Tool / Devsign TDT and build a TAD (push) Has been cancelled
Build TAD Delivery Tool / Upload to release (push) Has been cancelled
2025-09-30 15:28:52 -04:00
Lillian Skinner
751c22214f
Update tad.c 2025-09-30 15:26:52 -04:00
2 changed files with 10 additions and 1 deletions

View File

@ -15,7 +15,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: devkitpro/devkitarm
container: devkitpro/devkitarm:20241104
name: Build with Docker using devkitARM
steps:
- name: Checkout repo

View File

@ -41,6 +41,10 @@ const unsigned char debuggerKey[] = {
0xA2, 0xFD, 0xDD, 0xF2 ,0xE4, 0x23, 0x57, 0x4A,
0xE7, 0xED, 0x86, 0x57, 0xB5, 0xAB, 0x19, 0xD3
};
const unsigned char customKey[] = {
0x00, 0x00, 0x00, 0x00 ,0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 ,0x00, 0x00, 0x00, 0x00
};
// Content IV be fine as a hardcoded string. Content IV is based off of the content index. (index # with zerobyte padding)
// All TADs I've seen only ever had a single content. It might be a good idea to add something down the line in case a
// weird TAD pops up, but until then this should do.
@ -252,6 +256,11 @@ char* openTad(char const* src) {
iprintf("Key fail!\n\nTrying debugger common key...\n");
keyFail = decryptTad(debuggerKey, title_key_iv, title_key_enc, content_iv, swap_endian_u32(srlTrueSize), srlTidLow, dataTitle, contentHash);
}
if (keyFail == TRUE) {
remove("sd:/_nds/TADDeliveryTool/tmp/temp.srl");
iprintf("Key fail!\n\nTrying custom key...\n");
keyFail = decryptTad(customKey, title_key_iv, title_key_enc, content_iv, swap_endian_u32(srlTrueSize), srlTidLow, dataTitle, contentHash);
}
if (keyFail == TRUE) {
remove("sd:/_nds/TADDeliveryTool/tmp/temp.srl");
iprintf("All keys failed!\n");