Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.057 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'subject:Python': 0.05; 'preferably': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'server,': 0.15; '>great': 0.16; 'encryption': 0.16; 'example).': 0.16; 'locally,': 0.16; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'stuff.': 0.16; "wouldn't": 0.16; 'url:home': 0.18; 'machine': 0.21; 'pass': 0.22; 'defined': 0.23; '2015': 0.23; 'installation': 0.23; 'sat,': 0.23; 'file.': 0.24; 'header:X-Complaints-To:1': 0.26; 'data,': 0.27; "i'm": 0.29; 'key,': 0.29; 'posts': 0.31; 'supposed': 0.31; 'option': 0.31; 'run': 0.32; 'anyone': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'late': 0.34; 'running': 0.34; 'file': 0.34; 'server': 0.34; 'could': 0.35; 'to:addr:python- list': 0.35; 'along': 0.35; 'clear': 0.35; 'files,': 0.35; 'protocol': 0.35; 'replace': 0.35; 'saved': 0.35; 'too': 0.36; 'except': 0.36; 'client': 0.37; 'subject:: ': 0.37; 'charset:us- ascii': 0.37; 'received:org': 0.38; 'say': 0.38; 'someone': 0.38; 'files': 0.38; 'application': 0.39; 'to:addr:python.org': 0.39; 'seem': 0.39; 'data': 0.40; 'sure': 0.40; 'where': 0.40; 'some': 0.40; 'yes': 0.60; 'your': 0.60; 'even': 0.61; 'side': 0.62; 'hear': 0.62; 'information': 0.62; 'suitable': 0.63; 'it!': 0.64; 'between': 0.65; 'subject:Data': 0.66; 'guaranteed': 0.67; 'programs,': 0.72; 'protect': 0.74; 'account.': 0.82; '+1000,': 0.84; 'blob': 0.84; 'insecure': 0.84; 'dennis': 0.91; 'received:108': 0.93; 'senders': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Pure Python Data Mangling or Encrypting Date: Sat, 27 Jun 2015 10:39:13 -0400 Organization: IISS Elusive Unicorn References: <558c1a7e$0$1668$c3e8da3$5496439d@news.astraweb.com> <558d86b0$0$1659$c3e8da3$5496439d@news.astraweb.com> <558e1ac6$0$1675$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-223-55.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 51 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1435415960 news.xs4all.nl 2876 [2001:888:2000:d::a6]:48726 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 5749 X-Received-Body-CRC: 160182134 Xref: csiph.com comp.lang.python:93248 On Sat, 27 Jun 2015 13:38:46 +1000, Steven D'Aprano declaimed the following: > >Sometimes you say the user is supposed to encrypt the data themselves: > > While the data senders are supposed to encrypt data, that's not > guaranteed > > >Now you say that the application encrypts the data, except that the user can >turn that option off. > > >Great to hear it! Just make sure your application always encrypts the >uploaded files, and you protect both the sender of the files and the >receiver. > Just an aside: I'm still not clear on just where this application resides! Some posts make it seem like it is all on the storage server, with nothing running on the sender (a web page file submittal page, for example). If the "application" consists of both client side and server side programs, with some defined protocol (proprietary to minimize the odds of someone spoofing as a client) between them, then yes -- just do the AES encryption in the client before sending... The server never needs to know the key [the client installation will need a key, preferably generated locally, and saved so the file can be decrypted later]. If the files will be retrievable by others than the originator, a public key system (PGP/GPG) might need to replace the AES encryption. For the web-page submittal scheme -- as far as I'm concerned it is too late to bother encrypting the received file. The only excuse would be that the server machine itself is insecure and anyone could log-in and peruse the file system looking at stuff. For this I wouldn't even consider using the file system to store these snippets... Use a database and store them as BLOB data, along with suitable information for keying on the content (submitter ID, submitter filename), make sure the database storage and the DBMS run as some limited privilege process, and have all access SQL pass through a limited user account. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/