encrypt(1) on Solnix vs Linux and the BSDs
On Solnix, encrypt is the illumos /usr/bin/encrypt, which encrypts and decrypts whole files with a named cryptographic-framework algorithm (-a). OpenBSD's encrypt is a different program: it hashes a password string for use in scripts. Same name, different job. Linux and FreeBSD have no counterpart page in the bundle, and neither does NetBSD.
The manual pages
- Solnix: encrypt(1) from
pkgs.solnix.illumos-world-man· illumos.org - OpenBSD: encrypt(1) 8.0
What Solnix runs
A default Solnix system runs the illumos encrypt at /usr/bin/encrypt. decrypt is documented on the same page and uses the same options. No other variants are shipped.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| OpenBSD | purpose | Solnix encrypt encrypts or decrypts file or stdin data with a symmetric algorithm. OpenBSD encrypt prints the encrypted (hashed) form of a string, mostly for passwords in scripts. A script written for one does not work on the other. Source: Solnix encrypt(1) NAME, DESCRIPTION; OpenBSD encrypt(1) NAME, DESCRIPTION |
| OpenBSD | input | Solnix reads a file (-i) or stdin and writes to stdout or a file (-o). OpenBSD takes a string argument, or reads one string per line from stdin and encrypts each. It also has -p to prompt with echo off.Source: Solnix encrypt(1) -i, -o; OpenBSD encrypt(1) SYNOPSIS, -p |
| OpenBSD | decryption | Solnix ships decrypt, which reverses encrypt output. The OpenBSD page describes only one-way encryption of strings and documents no decrypt command. Source: Solnix encrypt(1) SYNOPSIS (/usr/bin/decrypt); OpenBSD encrypt(1) DESCRIPTION |
| OpenBSD | algorithm selection | Solnix requires -a algorithm (case-sensitive alias of a PKCS #11 mechanism, listed by -l). OpenBSD picks Blowfish with -b rounds, the cipher of a login class with -c class, or the default class in /etc/login.conf.Source: Solnix encrypt(1) -a, -l, Algorithms; OpenBSD encrypt(1) -b, -c, DESCRIPTION |
| OpenBSD | -b, -c, -p flags | Solnix has no -b, -c or -p. OpenBSD has no -a, -i, -k, -K, -l, -o, -T or -v. Short options do not carry over between the two.Source: Solnix encrypt(1) SYNOPSIS; OpenBSD encrypt(1) SYNOPSIS |
| OpenBSD | key material | Solnix takes a key from a key file (-k), a PKCS#11 token key (-K, with -T), or a passphrase prompt via getpassphrase(3C). The passphrase goes through PBKDF2 (PKCS #5) to make a 128-bit key for variable-length ciphers. OpenBSD has no key option.Source: Solnix encrypt(1) -k, -K, -T, Passphrase; OpenBSD encrypt(1) SYNOPSIS |
| OpenBSD | output format | Solnix output is a binary file: version (4 bytes), iterations (4 bytes), IV, 16-byte salt, then ciphertext. Without -o it goes to stdout and can garble a terminal. OpenBSD prints the encrypted string on standard output.Source: Solnix encrypt(1) DESCRIPTION, -o; OpenBSD encrypt(1) DESCRIPTION |
| OpenBSD | in-place operation | If Solnix input and output are the same file, encrypt writes a temporary file in the same filesystem and replaces the original. The OpenBSD page describes no file handling. Source: Solnix encrypt(1) DESCRIPTION; OpenBSD encrypt(1) DESCRIPTION |
| Linux, FreeBSD, NetBSD | no counterpart page | No Linux, FreeBSD or NetBSD page was supplied for encrypt, so the bundle supports no comparison with those systems. The manual does not say whether they ship a command of this name. Source: bundle header (counterpart: openbsd only) |
Standards
- POSIX: encrypt is not a POSIX.1-2024 utility.
- Solnix: Interface Stability: Committed.
Writing portable scripts
- Do not assume the name encrypt means the same thing across systems. On Solnix it is a file cipher using
-a; on OpenBSD it hashes a password string. Check which one is installed before calling it. - On Solnix, run encrypt
-lto see which algorithms and key sizes this system's cryptographic framework offers before choosing-a.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.