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

David Baddeley david_baddeley@yahoo.com...
Sun Jul 26 19:16:26 CDT 2009


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.

David





----- Original Message ----
From: Robert Kern <robert.kern@gmail.com>
To: SciPy Users List <scipy-user@scipy.org>
Sent: Sunday, 26 July, 2009 9:17:17 AM
Subject: Re: [SciPy-User] encryption of numpy array (wav file) ?

On Sat, Jul 25, 2009 at 16:13, Stef Mientki<stef.mientki@gmail.com> wrote:
> hello,
>
> I need to encrypt a wav file (conversation between doctor and his patient).
> Now it's easy to convert a wav file ( or maybe even the sound stream
> itself) into a numpy array.
> Everything runs on a slow machine (netbook),
> so I hope numpy can encrypt on the flight.
> I don't need very secure encryption, just good enough to protect the
> patient information from accidental listening by others.
>
> Any idea of a relative simple (and fast) encryption method with numpy
> arrays ?

Not on numpy arrays, no. Just use the normal crypto tools on strings.
Preferably, use a complete tool like GPG (for files) or SSL (for
network connections) than just using a library like PyCrypto.

-- 
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
_______________________________________________
SciPy-User mailing list
SciPy-User@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user



      


More information about the SciPy-User mailing list