As
lhoward pointed out, the unix (it's not exclusive to Solaris,
AFAIK) crypt(1) command is more of a toy program than a serious
encryption mechanism. From its man page in Solaris:
crypt implements a one-rotor machine designed along the
lines of the German Enigma, but with a 256-element rotor.
Methods of attack on such machines are widely known, thus
crypt provides minimal security.
A publicly available program for helping in breaking ciphers
generated with crypt(1) is
Crypt
Breaker's Workbench (cbw.tar.gz).
Also, from Bruce Schneier's "Applied Cryptography":
[crypt's] algorithm is far simpler than the World War II German
Enigma and, for a skilled cryptanalyst, very easy to break.
I'm sure I could dig the algorithm out of somewhere if you are
really interested in writing a Perl implementation. But if
you are really interested in encrypting stuff, use some
other algorithm. If you only want to play with it for a while,
you could use
marcos' suggestion of invoking the program
from perl.
--ZZamboni
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.