ntru-cli

1.0.14 • Public • Published

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

ntru generate

more

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

Readme

Keywords

none

Package Sidebar

Install

npm i ntru-cli

Weekly Downloads

0

Version

1.0.14

License

MIT

Unpacked Size

27.3 kB

Total Files

18

Last publish

Collaborators

  • asour