scrypt(1) encrypt and decrypt files.

SYNOPSIS

Br q Cm enc | Cm dec [-M maxmem ] [-m maxmemfrac ] [-t maxtime ] infile [outfile ]
--version

DESCRIPTION

enc encrypts infile and writes the result to outfile if specified, or the standard output otherwise. The user will be prompted to enter a passphrase (twice) to be used to generate a derived encryption key.

dec decrypts infile and writes the result to outfile if specified, or the standard output otherwise. The user will be prompted to enter the passphrase used at encryption time to generate the derived encryption key.

OPTIONS

-M maxmem
Use at most maxmem bytes of RAM to compute the derived encryption key.
-m maxmemfrac
Use at most the fraction maxmemfrac of the available RAM to compute the derived encryption key.
-t maxtime
Use at most maxtime seconds of CPU time to compute the derived encryption key.
--version
Print version of scrypt, and exit.

In enc the memory and CPU time limits are enforced by picking appropriate parameters to the key derivation function. In dec the memory and CPU time limits are enforced by exiting with an error if decrypting the file would require too much memory or CPU time.

EXIT STATUS

The utility exits 0 on success, and >0 if an error occurs.

Note that if the input encrypted file is corrupted, dec may produce output prior to determining that the input was corrupt and exiting with a non-zero status; so users should direct the output to a safe location and check the exit status of before using the decrypted data.

HISTORY

The utility was written in May 2009 by Colin Percival as a demonstration of the key derivation function. The key derivation function was invented in March 2009 by Colin Percival in order to allow key files from the tarsnap backup system to be passphrase protected.