[SciPy-User] encryption of numpy array (wav file) ?
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.
----- Original Message ----
From: Robert Kern <firstname.lastname@example.org>
To: SciPy Users List <email@example.com>
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<firstname.lastname@example.org> wrote:
> 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.
"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
More information about the SciPy-User