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


Groups > comp.lang.python > #93069

Re: Pure Python Data Mangling or Encrypting

Return-Path <jeanpierreda@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; '(using': 0.07; 'chunks': 0.09; 'slow.': 0.09; 'substitution': 0.09; 'cc:addr:python-list': 0.10; 'stored': 0.10; 'python': 0.11; 'assume': 0.11; 'algorithm': 0.13; 'output': 0.15; '(about': 0.16; '23,': 0.16; 'disk.': 0.16; 'encryption': 0.16; 'included"': 0.16; 'nefarious': 0.16; 'peer-to-peer': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'software.': 0.22; 'thanks.': 0.22; '2015': 0.23; 'installation': 0.23; 'seems': 0.24; 'header:In-Reply-To:1': 0.24; 'skip:b 30': 0.24; 'written': 0.24; 'idea': 0.26; 'appreciated.': 0.27; 'data,': 0.27; 'message- id:@mail.gmail.com': 0.28; 'protocol.': 0.29; 'guess': 0.29; 'random': 0.29; 'url:mailman': 0.31; "i'd": 0.31; 'supposed': 0.31; "can't": 0.32; 'url:python': 0.33; 'received:google.com': 0.34; 'url:listinfo': 0.35; 'ahead': 0.35; 'machines': 0.35; 'really': 0.35; 'asking': 0.35; 'but': 0.36; 'too': 0.36; 'url:org': 0.36; 'subject:: ': 0.37; 'tue,': 0.38; 'pm,': 0.39; 'data': 0.40; 'where': 0.40; 'some': 0.40; 'even': 0.61; 'subject:Data': 0.66; 'protect': 0.74; 'smith': 0.76; 'payload': 0.84; 'senders': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=LKSjtnEzJE3uitEd2KyLC+plVxKY+2PPUK/n84VLuJI=; b=AR7U4C0amdwXKt61g18IbZuR7/0dB/RfQR2AkAfOOoziZXPfu3v8hv4lEl7jz9Wkje xMG0V43fDqP+VoQdPPakg/BXIkayL3juyluw+mq43F04Kfpi990sWnpqs1e4UNf2hhLN XThLbfwQ9S/h6XVILePix6WMxm+4+aAY224i4WNIR8wQjnar1NQckJwkImETrJn6FwFn gpNZuKtk1pBtmE+KSAAynhyf2BSWkPiU0Xb2TVjMn+xzsT+f5O/6+uVBaTVr2Nvz+b8U 4sWG3g0CEkDnzzw+eorn/2PMD/D41vAtpavgtMiRSZOWF69q+dUn3WFJrcsNrSYNwYQR /IqA==
X-Received by 10.180.211.77 with SMTP id na13mr2279558wic.76.1435131882022; Wed, 24 Jun 2015 00:44:42 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <mmcagn$aa5$1@ger.gmane.org>
References <mmcagn$aa5$1@ger.gmane.org>
From Devin Jeanpierre <jeanpierreda@gmail.com>
Date Wed, 24 Jun 2015 00:44:02 -0700
Subject Re: Pure Python Data Mangling or Encrypting
To Randall Smith <randall@tnr.cc>
Cc "comp.lang.python" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11.1435131890.3674.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1435131890 news.xs4all.nl 2877 [2001:888:2000:d::a6]:37810
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 4629
X-Received-Body-CRC 2146418121
Path csiph.com!usenet.pasdenom.info!news.stben.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Xref csiph.com comp.lang.python:93069

Show key headers only | 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