CLI for NTRU in TypeScript, with commands to generate keys and to encrypt/decrypt files and strings.
npm i -g ntru-cli
ntru help
Generate a new NTRU public/private key pair and log it to the console.
Generate a new NTRU public/private key pair and save it to the specified path.
ntru generate keypair1
Result: Public/private key pair generated and saved to keypair1.public.key
and keypair1.private.key
.
Encrypts a file or string with a public key. We first check for a file, and if we can't find one, we use it as a string.
ntru encrypt public.key file.txt
Result: file.txt.encrypted file created
ntru encrypt public.key "Hello, world!"
Result: Base64-encoded encrypted string is printed to the console
Decrypts a file or string with a private key. We first check for a file, and if we can't find one, we use it as a string.
ntru decrypt private.key file.txt.encrypted
Result: file.txt.decrypted file created
ntru decrypt private.key <base64-encoded encrypted string>
Result: Decrypted string is printed to the console
Displays help for a command.
MIT