ntru-cli
v1.0.14
Published
CLI for NTRU in TypeScript, with commands to generate keys and to encrypt/decrypt files and strings.
Downloads
3
Readme
ntru-cli
CLI for NTRU in TypeScript, with commands to generate keys and to encrypt/decrypt files and strings.
Installation
npm i -g ntru-cli
Screenshots
Usage
ntru help
Commands
ntru generate
Generate a new NTRU public/private key pair and log it to the console.
ntru generate <path>
Generate a new NTRU public/private key pair and save it to the specified path.
Example
ntru generate keypair1
Result: Public/private key pair generated and saved to keypair1.public.key
and keypair1.private.key
.
ntru encrypt <public key path> <file or text>
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.
Examples
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
ntru decrypt <private key path> <file or text>
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.
Examples
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
ntru help <command>
Displays help for a command.
License
MIT