diff options
Diffstat (limited to 'pipermail/pycrypto/2011q4/000504.html')
-rw-r--r-- | pipermail/pycrypto/2011q4/000504.html | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/pipermail/pycrypto/2011q4/000504.html b/pipermail/pycrypto/2011q4/000504.html new file mode 100644 index 0000000..4e979ae --- /dev/null +++ b/pipermail/pycrypto/2011q4/000504.html @@ -0,0 +1,99 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [pycrypto] Public Key encryption of files + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20Public%20Key%20encryption%20of%20files&In-Reply-To=CAEncD4e91oCifceev3ZxbSpoYT3P3V6zrzcMgf11ht69TBcmgQ%40mail.gmail.com"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="000503.html"> + <LINK REL="Next" HREF="000505.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[pycrypto] Public Key encryption of files</H1> + <B>John Matthew</B> + <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20Public%20Key%20encryption%20of%20files&In-Reply-To=CAEncD4e91oCifceev3ZxbSpoYT3P3V6zrzcMgf11ht69TBcmgQ%40mail.gmail.com" + TITLE="[pycrypto] Public Key encryption of files">john at compunique.com + </A><BR> + <I>Thu Nov 10 12:32:01 CST 2011</I> + <P><UL> + <LI>Previous message: <A HREF="000503.html">[pycrypto] Public Key encryption of files +</A></li> + <LI>Next message: <A HREF="000505.html">[pycrypto] Public Key encryption of files +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#504">[ date ]</a> + <a href="thread.html#504">[ thread ]</a> + <a href="subject.html#504">[ subject ]</a> + <a href="author.html#504">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>All good stuff, thanks Dave + +On Thu, Nov 10, 2011 at 10:26 AM, Dave Pawson <<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">dave.pawson at gmail.com</A>> wrote: + +><i> On 10 November 2011 18:18, Dean Macinskas <<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">dmacinskas at geobridge.net</A>> +</I>><i> wrote: +</I>><i> > All blocks need to be 16 bytes. So for example, if the file is 2,000,005 +</I>><i> > bytes, you'd encrypt 125,000 16-byte blocks; you then have 5 bytes left +</I>><i> > over, to which you'd add 11 padding bytes, which can be any binary value +</I>><i> and +</I>><i> > then encrypt that last block. +</I>><i> +</I>><i> +</I>><i> def _lazysecret(secret, blocksize=32, padding='}'): +</I>><i> """pads secret if not legal AES block size (16, 24, 32)""" +</I>><i> if not len(secret) in (16, 24, 32): +</I>><i> return secret + (blocksize - len(secret)) * padding +</I>><i> return secret +</I>><i> +</I>><i> Python makes it quite easy. +</I>><i> The reason I started to use it! +</I>><i> Thanks to +</I>><i> src <A HREF="http://www.turnkeylinux.org/blog/python-symmetric-encryption">http://www.turnkeylinux.org/blog/python-symmetric-encryption</A> +</I>><i> +</I>><i> great piece of software. +</I>><i> +</I>><i> regards +</I>><i> +</I>><i> +</I>><i> +</I>><i> -- +</I>><i> Dave Pawson +</I>><i> XSLT XSL-FO FAQ. +</I>><i> Docbook FAQ. +</I>><i> <A HREF="http://www.dpawson.co.uk">http://www.dpawson.co.uk</A> +</I>><i> _______________________________________________ +</I>><i> pycrypto mailing list +</I>><i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A> +</I>><i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A> +</I>><i> +</I>-------------- next part -------------- +An HTML attachment was scrubbed... +URL: <A HREF="http://lists.dlitz.net/pipermail/pycrypto/attachments/20111110/56d31537/attachment.htm">http://lists.dlitz.net/pipermail/pycrypto/attachments/20111110/56d31537/attachment.htm</A> +</PRE> + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000503.html">[pycrypto] Public Key encryption of files +</A></li> + <LI>Next message: <A HREF="000505.html">[pycrypto] Public Key encryption of files +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#504">[ date ]</a> + <a href="thread.html#504">[ thread ]</a> + <a href="subject.html#504">[ subject ]</a> + <a href="author.html#504">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">More information about the pycrypto +mailing list</a><br> +</body></html> |