QRcodes are encrypted using the APT:Wrap function. It's using the 0x31 keyslot. (Check
this and
this)
Since the Wii U is able to read QR codes for the 3DS but does not have a key scrambler, that means the key you are looking for is somewhere in the Wii U firmware.
Once you get that key, it's as simple as an AES-CCM to encrypt/decrypt QR.
Now you have 2 options:
You want that key: I think the way to go should start by reading/following
this (Thanks
@NWPlayer123 ) but since I got a job, I dropped this ambitious project of learning PPC.
Btw, if you also extract the 0x31 keyY from the 3DS you can compute the 0x31 keyX which is stored in bootrom (
here).
You don't want that key so bad after all: You can always fallback on using your 3DS as a black box, what Decrypt9 and other tools are doing (until we get the bootrom? But that's offtopic). You can check
this code, that's specifically made for Mii crypto.
Note: I tried stuff but I probably missed something since doing this fails:
"3DS makes QR" -> "Read QR to bin" -> "Decrypt bin to Mii (using 3DS)" -> "Edit Mii" -> "Encrypt Mii to bin (Using 3DS)" -> "Make QR from bin" -> "Read QR with 3DS"
So I (at least) said something wrong|did not found something|forgot something.
Wish you luck!