In
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
computing, crypt or enigma is a
utility program used for encryption. Due to the ease of breaking it, it is considered to be obsolete.
The program is usually used as a
filter, and it has traditionally been implemented using a "rotor machine"
algorithm
In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
based on the
Enigma machine
The Enigma machine is a cipher device developed and used in the early- to mid-20th century to protect commercial, diplomatic, and military communication. It was employed extensively by Nazi Germany during World War II, in all branches of the W ...
. It is considered to be
cryptographically far too weak to provide any security against
brute-force attack
In cryptography, a brute-force attack or exhaustive key search is a cryptanalytic attack that consists of an attacker submitting many possible keys or passwords with the hope of eventually guessing correctly. This strategy can theoretically be ...
s by modern, commodity
personal computer
A personal computer, commonly referred to as PC or computer, is a computer designed for individual use. It is typically used for tasks such as Word processor, word processing, web browser, internet browsing, email, multimedia playback, and PC ...
s.
Some versions of Unix shipped with an even weaker version of the ''crypt(1)'' command in order to comply with
contemporaneous laws and regulations that limited the exportation of cryptographic software. Some of these were simply implementations of the
Caesar cipher (effectively no more secure than
ROT13
ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the Latin alphabet.
ROT13 is a special case of the Caesar cipher which was developed in ancient Rome, used by Julius Caesar in the 1st centur ...
, which is implemented as a Caesar cipher with a well-known key).
History
Cryptographer
Robert Morris wrote a
M-209-based , which first appeared in
Version 3 Unix
Research Unix refers to the early versions of the Unix operating system for DEC PDP-7, PDP-11, VAX and Interdata 7/32 and 8/32 computers, developed in the Bell Labs Computing Sciences Research Center (CSRC). The term ''Research Unix'' first appe ...
, to encourage codebreaking experiments; Morris managed to break by hand.
Dennis Ritchie
Dennis MacAlistair Ritchie (September 9, 1941 – October 12, 2011) was an American computer scientist. He created the C programming language and the Unix operating system and B language with long-time colleague Ken Thompson. Ritchie and Thomp ...
automated decryption with a method by
James Reeds, and a new Enigma-based version appeared in
Version 7, which Reeds and
Peter J. Weinberger also broke.
''crypt(1)'' under Linux
Linux distribution
A Linux distribution, often abbreviated as distro, is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro—if distributed on its own—is oft ...
s generally do not include a Unix compatible version of the ''crypt'' command. This is largely due to a combination of three major factors:
# ''crypt'' is relatively obscure and rarely used for e-mail attachments nor as a file format
# ''crypt'' is considered to be cryptographically far too weak to withstand brute-force attacks by modern computing systems (Linux systems generally ship with
GNU Privacy Guard
GNU Privacy Guard (GnuPG or GPG) is a free-software replacement for Symantec's cryptographic software suite PGP. The software is compliant with the now obsoleted , the IETF standards-track specification of OpenPGP. Modern versions of PGP are ...
which is considered to be reasonably secure by modern standards)
# During the early years of Linux development and adoption there was some concern that even as weak as the algorithm used by ''crypt'' was, that it might still run afoul of
ITAR's export controls; so mainstream distribution developers in the
United States
The United States of America (USA), also known as the United States (U.S.) or America, is a country primarily located in North America. It is a federal republic of 50 U.S. state, states and a federal capital district, Washington, D.C. The 48 ...
generally excluded it, leaving their customers to fetch GnuPG or other strong cryptographic software from international sites, sometimes providing packages or scripts to automate that process.
The source code to several old versions of the ''crypt'' command is available in The Unix Heritage Society's Unix Archive. The recent crypt source code is available in the
OpenSolaris
OpenSolaris () is a discontinued open-source computer operating system for SPARC and x86 based systems, created by Sun Microsystems and based on Solaris. Its development began in the mid 2000s and ended in 2010.
OpenSolaris was developed as ...
project. A
public domain
The public domain (PD) consists of all the creative work to which no Exclusive exclusive intellectual property rights apply. Those rights may have expired, been forfeited, expressly Waiver, waived, or may be inapplicable. Because no one holds ...
version is available from the Crypt Breaker's Workbench.
Enhanced
symmetric encryption utilities are available for Linux (and should also be
portable
Portable may refer to:
General
* Portable building, a manufactured structure that is built off site and moved in upon completion of site and utility work
* Portable classroom, a temporary building installed on the grounds of a school to provide a ...
to any other
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
system) including
mcrypt and
ccrypt. While these provide support for much more sophisticated and modern algorithms, they can be used to encrypt and decrypt files which are compatible with the traditional ''crypt(1)'' command by providing the correct command line options.
Breaking crypt(1) encryption
Programs for breaking crypt(1) encryption are widely available. Bob Baldwin's
public domain
The public domain (PD) consists of all the creative work to which no Exclusive exclusive intellectual property rights apply. Those rights may have expired, been forfeited, expressly Waiver, waived, or may be inapplicable. Because no one holds ...
Crypt Breaker's Workbench, which was written in 1984-1985, is an interactive tool that provides successive plaintext guesses that must be corrected by the user. It also provides a working crypt(1) implementation used by modern BSD distributions.
Peter Selinger's unixcrypt-breaker uses a simple statistical model similar to a dictionary-attack that takes a set of plain texts as input and processes it to guess plausible plaintexts, and does not require user interaction.
[Peter Selinger]
unixcrypt-breaker
Retrieved July 27, 2008.
Relationship to password hash function
There is also a Unix
password hash function with the same name,
crypt
A crypt (from Greek κρύπτη (kryptē) ''wikt:crypta#Latin, crypta'' "Burial vault (tomb), vault") is a stone chamber beneath the floor of a church or other building. It typically contains coffins, Sarcophagus, sarcophagi, or Relic, religiou ...
. Though both are used for securing data in some sense, they are otherwise essentially unrelated. To distinguish between the two, writers often refer to the utility program as ''crypt(1)'', because it is documented in section 1 of the Unix
manual pages, and refer to the password hash function as ''crypt(3)'', because its documentation is in section 3 of the manual.
See also
* ''
crypt
A crypt (from Greek κρύπτη (kryptē) ''wikt:crypta#Latin, crypta'' "Burial vault (tomb), vault") is a stone chamber beneath the floor of a church or other building. It typically contains coffins, Sarcophagus, sarcophagi, or Relic, religiou ...
'' – an unrelated Unix C library function
*
Key derivation function
In cryptography, a key derivation function (KDF) is a cryptographic algorithm that derives one or more secret keys from a secret value such as a master key, a password, or a passphrase using a pseudorandom function (which typically uses a cr ...
References
{{Reflist
External links
Source code for crypt(1)from
OpenSolaris
OpenSolaris () is a discontinued open-source computer operating system for SPARC and x86 based systems, created by Sun Microsystems and based on Solaris. Its development began in the mid 2000s and ended in 2010.
OpenSolaris was developed as ...
(published after clearing up export regulations)
Source code for crypt(1)from
Version 7 Unix
Version 7 Unix, also called Seventh Edition Unix, Version 7 or just V7, was an important early release of the Unix operating system. V7, released in 1979, was the last Bell Laboratories release to see widespread distribution before the commerc ...
(trivialised one-rotor Enigma-style machine)
Source code for crypt(1)from
Version 6 Unix (implementation of
Boris Hagelin's
M-209 cryptographic machine)
Unix security-related software
Cryptographic software
Broken cryptography algorithms