The most reliable "source" for understanding how these keys are derived is the 3DS Emulation Guide , which outlines the use of scripts to dump keys directly from a console. Homebrew Requirement : Your 3DS must have Custom Firmware (CFW) installed.
The safest and legal way is to extract (dump) the keys from your own physical 3DS console .
The keyword represents a common but solvable frustration. To summarize: