Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93069

Re: Pure Python Data Mangling or Encrypting

References <mmcagn$aa5$1@ger.gmane.org>
From Devin Jeanpierre <jeanpierreda@gmail.com>
Date 2015-06-24 00:44 -0700
Subject Re: Pure Python Data Mangling or Encrypting
Newsgroups comp.lang.python
Message-ID <mailman.11.1435131890.3674.python-list@python.org> (permalink)

Show all headers | View raw


How about a random substitution cipher? This will be ultra-weak, but
fast (using bytes.translate/bytes.maketrans) and seems to be the kind
of thing you're asking for.

-- Devin

On Tue, Jun 23, 2015 at 12:02 PM, Randall Smith <randall@tnr.cc> wrote:
> Chunks of data (about 2MB) are to be stored on machines using a peer-to-peer
> protocol.  The recipient of these chunks can't assume that the payload is
> benign.  While the data senders are supposed to encrypt data, that's not
> guaranteed, and I'd like to protect the recipient against exposure to
> nefarious data by mangling or encrypting the data before it is written to
> disk.
>
> My original idea was for the recipient to encrypt using AES.  But I want to
> keep this software pure Python "batteries included" and not require
> installation of other platform-dependent software.  Pure Python AES and even
> DES are just way too slow.  I don't know that I really need encryption here,
> but some type of fast mangling algorithm where a bad actor sending a payload
> can't guess the output ahead of time.
>
> Any ideas are appreciated.  Thanks.
>
> -Randall
>
> --
> https://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Pure Python Data Mangling or Encrypting Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-06-24 00:44 -0700

csiph-web