crypto-secretbox

 

NAME

crypto-secretbox - encrypt and authenticate a stream of data using symmetric (secret-key) cryptography  

SYNOPSIS

crypto-secretbox secretkeyfile  

DESCRIPTION

Reads a stream of data from standard input, and encrypts it using secret-key authenticated cryptography from NaCl (the Networking and Cryptography library). The encrypted data is output in a format specifically for crypto-secretbox-open(1).

The secretkeyfile argument should point to a file with the secret key.  

OUTPUT FORMAT

Reads input in chunks, and outputs the following for each chunk:


    1) A nonce for the chunk, encoded as a netstring


    2) An encrypted chunk, encoded as a netstring  

EXIT CODE

Normally, crypto-secretbox exits with 0.

If invalid arguments are given, crypto-secretbox exits with 100.

If an error occurs, crypto-secretbox exits with 111.  

CRYPTOGRAPHY

This program is a simply a wrapper around the crypto_secretbox function provided by NaCl, the Networking and Cryptography library by Daniel J. Bernstein and Tanja Lange. See the official website http://nacl.cr.yp.to/ for details.  

AUTHOR

Jay Sullivan <jay@identity.pub>  

SEE ALSO

crypto-secretbox-key(1) crypto-secretbox-open(1)