Encrypt and Decrypt for text ...

Discussion in 'Perl Misc' started by stratus, Feb 10, 2004.

  1. stratus

    stratus Guest

    Is there any share tools in Unix,or even in PERL for encrypting the
    ascii text to binary or anything else and decrypting it to ascii text.
    Thanks a lot !!!

    Or can tell me how to do it !!
    stratus, Feb 10, 2004
    #1
    1. Advertising

  2. stratus

    Matt Garrish Guest

    "stratus" <> wrote in message
    news:c099ku$166k$...
    > Is there any share tools in Unix,or even in PERL for encrypting the
    > ascii text to binary or anything else and decrypting it to ascii text.
    > Thanks a lot !!!
    >


    We don't deal in shareware here (and it's "are there" not "is there", and
    Perl, not PERL). That you would even ask if such tools exists probably means
    this is going to fall on deaf ears, but there are many modules on cpan that
    deal with encrypting and decrypting all kinds of data.

    Matt
    Matt Garrish, Feb 10, 2004
    #2
    1. Advertising

  3. On Tue, 10 Feb 2004 00:46:22 +0000, stratus wrote:

    > Is there any share tools in Unix,or even in PERL for encrypting the
    > ascii text to binary or anything else and decrypting it to ascii text.
    > Thanks a lot !!!
    >
    > Or can tell me how to do it !!


    Converting (*not* encrypting) ASCII text to a binary format is *not* going
    to hide your code (I'm thinking this was the point of your post, right?).

    perldoc -q 'hide'

    --
    Jim

    Copyright notice: all code written by the author in this post is
    released under the GPL. http://www.gnu.org/licenses/gpl.txt
    for more information.

    a fortune quote ...
    Make it myself? But I'm a physical organic chemist!
    James Willmore, Feb 10, 2004
    #3
  4. stratus wrote:

    > Is there any share tools in Unix,or even in PERL for encrypting the
    > ascii text to binary or anything else and decrypting it to ascii text.
    > Thanks a lot !!!
    >
    > Or can tell me how to do it !!


    Assuming you are not trying to do anything naughty, search for "symmetric
    encryption".
    http://www.webopedia.com/TERM/S/symmetric_encryption.html

    The best known algorithm is DES
    http://www.itl.nist.gov/fipspubs/fip46-2.htm


    I have a quick-and-dirty Perl script that will encrypt a string of length s
    into a longer string of length 2s, and a decryption routine that will take
    the longer string and convert back to the original plaintext string.
    You should be able to whip up something similar - just like baking a cake
    but you invent your own recipe!

    gtoomey
    Gregory Toomey, Feb 10, 2004
    #4
  5. In article <Xns948BE9C5BE28Fnothing@209.98.50.131>,
    Klaas <> wrote:
    :Surely you jest? DES can be broken in a matter of hours.

    Yes, it can be broken in a matter of hours -- if you devote several
    thousand computers to the task. I would tend to doubt anyone would
    bother for whatever the original poster intended to use the
    encryption for.

    Encryption doesn't have to be perfect: it just has to be good
    enough to not be worth the bother of breaking.
    --
    I was very young in those days, but I was also rather dim.
    -- Christopher Priest
    Walter Roberson, Feb 11, 2004
    #5
  6. stratus

    Matt Garrish Guest

    "Klaas" <> wrote in message
    news:Xns948BE9C5BE28Fnothing@209.98.50.131...
    > After careful consideration, Gregory Toomey muttered:
    >
    > > The best known algorithm is DES
    > > http://www.itl.nist.gov/fipspubs/fip46-2.htm

    >
    > Surely you jest? DES can be broken in a matter of hours. AES is the
    > current standard.
    >


    In all fairness, I think he meant best known in the sense of widely known,
    not best available.

    Matt
    Matt Garrish, Feb 11, 2004
    #6
  7. stratus

    Ben Morrow Guest

    Klaas <> wrote:
    > I agree. I was essentially objecting to the poster's characterizing DES
    > as the best known algorithm (I should have realized he meant best-known).


    Yay! Punctuation Pedants of the World Unite!

    Ben

    --
    And if you wanna make sense / Whatcha looking at me for? (Fiona Apple)
    * *
    Ben Morrow, Feb 12, 2004
    #7
  8. stratus

    Matt Garrish Guest

    "Ben Morrow" <> wrote in message
    news:c0em79$ish$...
    >
    > Klaas <> wrote:
    > > I agree. I was essentially objecting to the poster's characterizing DES
    > > as the best known algorithm (I should have realized he meant

    best-known).
    >
    > Yay! Punctuation Pedants of the World Unite!
    >


    Our long-awaited call to arms! Quick, everyone to the Tower of Babel! : )

    Matt
    Matt Garrish, Feb 12, 2004
    #8
  9. -cnrc.gc.ca (Walter Roberson) wrote:

    > Encryption doesn't have to be perfect: it just has to be good
    > enough to not be worth the bother of breaking.


    ($encrypted = $plaintext) =~ tr/A-Za-z/N-ZA-Mn-za-m/;

    is often good enough... :)

    In meetings, I often use runes from The Hobbit to make notes such as "This
    person is just pushing their pet project" or "This is boring".
    David K. Wall, Feb 12, 2004
    #9
  10. David K. Wall <> wrote:
    > -cnrc.gc.ca (Walter Roberson) wrote:
    >
    >> Encryption doesn't have to be perfect: it just has to be good
    >> enough to not be worth the bother of breaking.

    >
    > ($encrypted = $plaintext) =~ tr/A-Za-z/N-ZA-Mn-za-m/;
    >
    > is often good enough... :)



    And if the data is really really secret, encode it as above twice!


    :)


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Feb 12, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWlrZQ==?=
    Replies:
    0
    Views:
    955
    =?Utf-8?B?TWlrZQ==?=
    Aug 31, 2005
  2. Randall Parker
    Replies:
    0
    Views:
    1,635
    Randall Parker
    Dec 4, 2005
  3. Replies:
    2
    Views:
    14,546
    =?iso-8859-1?B?QmVub+50?=
    Jun 23, 2005
  4. sweety
    Replies:
    9
    Views:
    1,019
    Richard Heathfield
    Feb 7, 2006
  5. Replies:
    1
    Views:
    431
    Daniel Martin
    Jun 16, 2007
Loading...

Share This Page