The legally recommended method is to dump these keys from your own Nintendo 3DS hardware.

Allowing the emulator to install and play encrypted .cia files. How to Obtain aes_keys.txt

A Nintendo 3DS or 2DS console with custom firmware (CFW) and GodMode9 installed. Using GodMode9: