Laravel uses the \phpseclib\Crypt\RSA library to generate the keys. In the end, it doesn't really matter how you generate the keys, as long as they are stored in the correct directory. Laravel only checks on the directory itself. If you have a matching private and public key you should be good to go ;)