abcrypt-encrypt(1)

NAME

abcrypt-encrypt - encrypt files

SYNOPSIS

abcrypt encrypt [OPTION]…​ [FILE]

DESCRIPTION

This command encrypts FILE. By default, the result will be write to standard output. If FILE is not specified, data will be read from standard input. If -o is specified, the result will be write to the specified file.

The passphrase used for encryption can be read from either /dev/tty, standard input, an environment variable, or a file.

abcrypt enc and abcrypt e are aliases for this command.

POSITIONAL ARGUMENTS

FILE

Input file. If FILE is not specified, data will be read from standard input.

OPTIONS

-o, --output FILE

Output the result to a file.

-m, --memory-cost BYTE

Set the memory size in bytes. BYTE can be suffixed with the symbol (B) and the byte prefix (such as Ki and M). If only a numeric value is specified for BYTE, it is the same as specifying the symbol without the byte prefix. Note that BYTE that is not multiples of 1 KiB is truncated toward zero to the nearest it. BYTE should be between 8 KiB and 4294967295 KiB (4 TiB). Default is 19456 KiB (19 MiB).

-t, --time-cost NUM

Set the number of iterations. NUM should be between 1 and 4294967295. Default is 2.

-p, --parallelism NUM

Set the degree of parallelism. NUM should be between 1 and 16777215. Default is 1.

--passphrase-from-tty

Read the passphrase from /dev/tty. This is the default behavior.

--passphrase-from-stdin

Read the passphrase from standard input. This option cannot be used if FILE is also standard input.

--passphrase-from-tty-once

Read the passphrase from /dev/tty only once.

--passphrase-from-env VAR

Read the passphrase from the environment variable. Note that storing a passphrase in an environment variable can be a security risk.

--passphrase-from-file FILE

Read the passphrase from the file. Note that storing a passphrase in a file can be a security risk.

-v, --verbose

Print the encryption parameters.

-h, --help

Print help message. The short flag (-h) will print a condensed help message while the long flag (--help) will print a detailed help message.

-V, --version

Print version number. The long flag (--version) will also print the copyright notice, the license notice and where to report bugs.

EXIT STATUS

0

Successful program execution.

1

An error occurred.

2

An error occurred while parsing command-line arguments.

65

The input data was incorrect in some way.

66

An input file (not a system file) did not exist or was not readable.

69

A service is unavailable.

70

An internal software error has been detected.

71

An operating system error has been detected.

73

A (user specified) output file cannot be created.

74

An error occurred while doing I/O on some file.

75

Temporary failure, indicating something that is not really an error.

76

The remote system returned something that was "not possible" during a protocol exchange.

77

You did not have sufficient permission to perform the operation.

EXAMPLES

Encrypt a file:

$ abcrypt encrypt data.txt > data.txt.abcrypt

Output the result to the specified file:

$ abcrypt encrypt -o data.txt.abcrypt data.txt

Encrypt a file with the specified parameters:

$ abcrypt encrypt -m 32KiB -t 3 -p 4 data.txt > data.txt.abcrypt

Read the passphrase from the file:

$ abcrypt encrypt --passphrase-from-file passphrase.txt data.txt > data.txt.abcrypt

Print the encryption parameters when encrypting:

$ abcrypt encrypt -v data.txt > data.txt.abcrypt

Copyright © 2022-2024 Shun Sakai

  1. This program is distributed under the terms of the GNU General Public License v3.0 or later.

  2. This manual page is distributed under the terms of the Creative Commons Attribution 4.0 International Public License.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

abcrypt(1), abcrypt-decrypt(1), abcrypt-help(1), abcrypt-information(1)