[SciPy-User] encryption of numpy array (wav file) ?

Robert Kern robert.kern@gmail....
Sun Jul 26 20:06:19 CDT 2009

On Sun, Jul 26, 2009 at 19:16, David
Baddeley<david_baddeley@yahoo.com.au> wrote:
> If you're only looking to protect the data from accidental listening you could always just bitwise xor it with a (random) key:
> encrypted = data ^ key
> decrypted = encrypted ^ key
> if you had a reasonable key (which you kept safe), and potentially cast your data to some type with loads of precision (eg int64 or float128) before doing the xor's it might not be too insecure either.

Upcasting the data will make lots of predictable zeros and thus
exposing much of your key.

If you have any concerns about privacy, it is much, much easier to use
real cryptography written by security professionals than to devise
some scheme yourself. This is even more important when you are
protecting someone else's confidential medical information. If it's
important enough to do at all, it's important enough to do it right.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the SciPy-User mailing list