For the nsec[...] nak key generate | nak encode nsec For the npub[...] nak key public [paste nsec] | nak encode npub The nsec and npub can be converted back to hex with nak decode npub [key] nak decode nsec [key]