Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Encryption using perl core functions only

by Anonymous Monk
on Nov 25, 2007 at 22:39 UTC ( [id://652879]=note: print w/replies, xml ) Need Help??


in reply to Re: Encryption using perl core functions only
in thread Encryption using perl core functions only

>> On top of that, crypt isn't implemented in perl :)

> You must be talking about the Unix utility and not the C
> library since crypt is a built-in perl function.

Not exactly, the embedded platform used a microperl installation, and the perl crypt function is not implemented in that version.

I am trying to obscure the data from a bad guy during transit - that is, I forgo security if they have access to either computer. If I rot the data, my fear is that someone can identify that algorithm easily. I am also looking at the option of using an embedded libopenssl package, and calling out to that through backticks.
  • Comment on Re^2: Encryption using perl core functions only

Replies are listed 'Best First'.
Re^3: Encryption using perl core functions only
by Limbic~Region (Chancellor) on Nov 25, 2007 at 22:48 UTC
    Anonymous Monk/redhotpenguin,
    The perl crypt function wouldn't help you even if it were available since it is a 1-way hashing library and not an encryption/decryption utility.

    If you are only interested in protecting the data in transit, using an existing library like SSL is the lowest cost solution assuming it is available.

    I am not sure you understood what I was saying about using the algorithm as your shared secret. You could pick any data hiding you want that is more sophisticated than rot-13. If you don't provide people access to the algorithm than getting the secret isn't going to be very easy. If you don't believe me, I will design an algorithm and post a secret message to see how long it takes you to decipher it.

    Cheers - L~R

      I do understand what you mean by the algorithm as the shared secret, I am just a bit wary of inventing my own here as with my luck someone will see it and say "oh that's a rot15 modified cubic", etc. Partially paranoid yes, but probably better than not taking any time to think about the implications of what I'm doing.
        redhotpenguin,
        Ok, I give up. Why don't you just copy/paste one of the pure perl crypto modules on CPAN. You mentioned the Unix crypt utility so why not borrow the source of Crypt::UnixCrypt?

        I am not sure what else to tell you. Either you need to choose an encryption routine that is well known but is strong against attacks or you need to choose an encryption routine that is unknown. If you go the latter route coming up with one yourself may seem hard but I assure you it just takes some time thinking.

        Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://652879]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found