It depends on your security requirements really.

If you want some hardcore security i'd consider something like a public key system, or something like a revolving token (ala secure_id from RSA).

If you want to protect your data from a casual browser, then a simple ROT13 scheme may be ok, but given the availability of cypher modules on CPAN and how easy they are to use, you've got a choice of a very wide range of very good cyphers. There is no point implementing a deliberately insecure "cypher" ala ROT13 IMO when all these others are available.

So, back to the original question, how to manage your keys. Well I guess it depends on the level of complexity you wish to maintain.

Key management in the most secure sense is difficult to get right, and some may say, it just cant be done. the difficulty comes with key distro, how can you ensure the key has not been intercepted? you cant, (unless you use the "in the research phase" quantum method (ie, the very act of viewing the key changes the stream making the indication the key has been previously viewed)).

So, in a this case, you're data may not be that important, and so you may very well choose to use the same key for all crypts. Not very secure as once the key is compromised, then all your data is vulnerable.

Take it a step up and use a public key system, and keep the private key "somewhere safe" public key systems are typically harder to brut force than a symetric key system (such as DES, 3DES, blowfish, twofish etc etc).

One key for all? or different keys? if you choose a one key method, how are you going to manage the keys? a file? something offline? your biological memory? how automated does the solution need to be? It sounds to me like the solution may need full automation, and given the nature of the data (email addresses) it could be easier to use a single key.

If you keep your keys in a secure location (ie appropriate permissions on a file, it probably doesnt really matter if you use may keys or a single key, if you're automating it, its not going to be too much extra effort to manage multiple keys.

We havent even touched on other aspects of security, such as circumventing the cypher entirely by sniffing the network traffic, rubber hose cryptanalysis (probably not so appropriate in this situation), and other attack methods...

So, bottom line, as always, is it depends. It doesnt make life easier, but you should know your rquirements completely depend on your individual sutation.


In reply to Re: Safe symmetric encryption - Crypt::CBC + Crypt::Blowfish? by Ryszard
in thread Safe symmetric encryption - Crypt::CBC + Crypt::Blowfish? by diotalevi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":