You don't need a keys.txt at all if you decrypt the game before loading it into Citra.

: Use a specific GodMode9 script to dump all necessary keys into a single aes_keys.txt file on your SD card.

in:

Instead of fixing keys, download .3DS or .CIA files (already unpacked). Citra runs these without any keys.txt . Check ROM sites for "decrypted" tags.