Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Vincent Davis Newsgroups: comp.lang.python Subject: Re: Public key encryption example. Date: Wed, 18 Nov 2015 19:22:30 -0700 Lines: 28 Message-ID: References: <87vb8ylv5a.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de foKNkLicXH8vpQQQYYqFpgWXxdvc1qXfzQMnNWUA2aMw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'gpg': 0.09; 'to)': 0.09; 'received:209.85.218': 0.10; 'url:blog': 0.10; 'python': 0.10; 'wed,': 0.15; 'thu,': 0.15; 'comparable.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:key': 0.16; 'wrote:': 0.16; '>': 0.18; 'email addr:gmail.com>': 0.18; 'shell': 0.18; '2015': 0.20; 'to:name:python-list@python.org': 0.20; 'keys': 0.22; 'file.': 0.22; 'am,': 0.23; 'header:In-Reply- To:1': 0.24; 'paul': 0.24; "i've": 0.25; 'example': 0.26; 'chris': 0.26; 'updating': 0.27; 'message-id:@mail.gmail.com': 0.27; 'that.': 0.30; 'url:mailman': 0.30; 'url:python': 0.33; 'though.': 0.33; 'url:listinfo': 0.34; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'done': 0.35; 'library.': 0.35; 'nov': 0.35; 'something': 0.35; 'but': 0.36; 'url:org': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'doing': 0.38; 'received:209': 0.38; 'stuff': 0.38; 'files': 0.38; 'along': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'easy': 0.60; 'your': 0.60; 'saving': 0.70; 'chrisa': 0.84; 'subject:Public': 0.91; 'mistakes': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vincentdavis.net; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=NVkNjb8uEg+2tWeLjy2IDRagi3mGH+wYaGYvCB8ipxg=; b=BxlI1PZd1e+ROuzTbRouZM7BV5uJawE1Pxvf1m/d4X5v159ctDGlNs+rOi4+iNSAFx aiiVqP529yAgWNmscCqfME/asrY4LkJkWqKiG5MmrCCHc6WZFJCKmpUP6GShJh4kzRNc ASdrrA78A3xOEPDMvCE2GIdcsS+XLcoC7oQKk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=NVkNjb8uEg+2tWeLjy2IDRagi3mGH+wYaGYvCB8ipxg=; b=JeqgrMQqy9f99V8ZdOGWgBvM8BMfpwpUayGy2VCtGQSDbDF+iuh6Rsq7Y1fHZ/PPR9 DOAm3ZZs19D2tl4lhjN0KOAphYzPUYSXVyNK8CmCNM6AQsacay42mBX635A+vg58de7B yWWW9RS8fJpXEPNNh9rXbdqzwJIw+TVCPzoF06Vc2A/A9DMg+5Ns1vWfO6MHtfJjqwFK vkN1c15PipTxBMm+cg2PjsfGwqDyPnDxy1QsMv1KooabxcMYvs066/LEN2PP9Vm6DsMa IS/YjB73EQbkrCEgXPJ5qeaN1PL+O6uvkYP2gnpyIbYqz2EDYK9DZEWS2xS1vjp1IiiJ cX+A== X-Gm-Message-State: ALoCoQnoHOZS7sL78NsJXrl4BItMlX7fRh3lC7aiEkqX23MEnp27CDeH8mqI3tQhivdp7j21iFv6 X-Received: by 10.202.197.150 with SMTP id v144mr3297592oif.31.1447899769572; Wed, 18 Nov 2015 18:22:49 -0800 (PST) In-Reply-To: X-Content-Filtered-By: Mailman/MimeDel 2.1.20+ 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: , Xref: csiph.com comp.lang.python:99028 Found an example, needs a little updating but then it works (appears to) in python 3.5. http://coding4streetcred.com/blog/post/Asymmetric-Encryption-Revisited-(in-PyCrypto) Vincent Davis 720-301-3003 On Wed, Nov 18, 2015 at 5:04 PM, Chris Angelico wrote: > On Thu, Nov 19, 2015 at 10:56 AM, Paul Rubin > wrote: > > Vincent Davis writes: > >> I am looking for the "simplest" example of sending(encrypting) and > >> receiving(decrypting) using public key encryption. I am think of > something > >> along the lines of having all the keys in local files and saving and > >> reading the message from a local file. > > > > It's very easy to make mistakes doing stuff like that. Your simplest > > bet is to shell out to GPG or something comparable. > > It's not that hard to pull up a library. I've never done it in Python, > though. > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list >