diff options
Diffstat (limited to 'pipermail/pycrypto/attachments/20111110/7641abf0/attachment-0001.htm')
-rw-r--r-- | pipermail/pycrypto/attachments/20111110/7641abf0/attachment-0001.htm | 188 |
1 files changed, 188 insertions, 0 deletions
diff --git a/pipermail/pycrypto/attachments/20111110/7641abf0/attachment-0001.htm b/pipermail/pycrypto/attachments/20111110/7641abf0/attachment-0001.htm new file mode 100644 index 0000000..4097de1 --- /dev/null +++ b/pipermail/pycrypto/attachments/20111110/7641abf0/attachment-0001.htm @@ -0,0 +1,188 @@ +<tt> +<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><br> +<br> +<head><br> +<meta http-equiv=Content-Type content="text/html; charset=us-ascii"><br> +<meta name=Generator content="Microsoft Word 12 (filtered medium)"><br> +<style><br> +<!--<br> + /* Font Definitions */<br> + @font-face<br> +        {font-family:"Cambria Math";<br> +        panose-1:2 4 5 3 5 4 6 3 2 4;}<br> +@font-face<br> +        {font-family:Calibri;<br> +        panose-1:2 15 5 2 2 2 4 3 2 4;}<br> +@font-face<br> +        {font-family:Tahoma;<br> +        panose-1:2 11 6 4 3 5 4 4 2 4;}<br> + /* Style Definitions */<br> + p.MsoNormal, li.MsoNormal, div.MsoNormal<br> +        {margin:0in;<br> +        margin-bottom:.0001pt;<br> +        font-size:12.0pt;<br> +        font-family:"Times New Roman","serif";}<br> +a:link, span.MsoHyperlink<br> +        {mso-style-priority:99;<br> +        color:blue;<br> +        text-decoration:underline;}<br> +a:visited, span.MsoHyperlinkFollowed<br> +        {mso-style-priority:99;<br> +        color:purple;<br> +        text-decoration:underline;}<br> +span.EmailStyle17<br> +        {mso-style-type:personal-reply;<br> +        font-family:"Calibri","sans-serif";<br> +        color:#1F497D;}<br> +.MsoChpDefault<br> +        {mso-style-type:export-only;}<br> +@page Section1<br> +        {size:8.5in 11.0in;<br> +        margin:1.0in 1.0in 1.0in 1.0in;}<br> +div.Section1<br> +        {page:Section1;}<br> +--><br> +</style><br> +<!--[if gte mso 9]><xml><br> + <o:shapedefaults v:ext="edit" spidmax="1026" /><br> +</xml><![endif]--><!--[if gte mso 9]><xml><br> + <o:shapelayout v:ext="edit"><br> + <o:idmap v:ext="edit" data="1" /><br> + </o:shapelayout></xml><![endif]--><br> +</head><br> +<br> +<body lang=EN-US link=blue vlink=purple><br> +<br> +<div class=Section1><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'>John,<o:p></o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'><o:p>&nbsp;</o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'>Unless the file is small, the typical way to encrypt a file is<br> +to use a symmetric key, like TDES or AES.&nbsp; Asymmetric key crypto is<br> +usually too slow for bulk encryption; you use a symmetric key for that, and<br> +store/export the symmetric key using asymmetric key protection.<o:p></o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'><o:p>&nbsp;</o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'>The block size of a public key is fixed by the length of the<br> +key; in other words, if you generate a 2048 bit key, the block size is 2048<br> +bits (256 bytes).&nbsp; Symmetric key block length is set by the algorithm: 8<br> +bytes for TDES, 16 for AES.&nbsp; Any data you encrypt has to be padded to a<br> +multiple of the block length.<o:p></o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'><o:p>&nbsp;</o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'>If you use RSA, there are a couple of rules for encrypting data,<br> +one of which is that the data has to be numerically less than the public modulus.&nbsp;<br> +This is usually accomplished by setting the left-most bit (MSB) of the data<br> +block to zero; another reason why using a public key directly is not a good<br> +choice for bulk encryption.<o:p></o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'><o:p>&nbsp;</o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'>HTH,<o:p></o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'>Dean<o:p></o:p></span></p><br> +<br> +<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br> +color:#1F497D'><o:p>&nbsp;</o:p></span></p><br> +<br> +<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br> +<br> +<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br> +style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><br> +pycrypto-bounces@lists.dlitz.net [mailto:pycrypto-bounces@lists.dlitz.net] <b>On<br> +Behalf Of </b>John Matthew<br><br> +<b>Sent:</b> Tuesday, November 08, 2011 11:59 AM<br><br> +<b>To:</b> pycrypto@lists.dlitz.net<br><br> +<b>Subject:</b> [pycrypto] Public Key encryption of files<o:p></o:p></span></p><br> +<br> +</div><br> +<br> +<p class=MsoNormal><o:p>&nbsp;</o:p></p><br> +<br> +<p class=MsoNormal>First off, pycrypto is awesome! &nbsp;Thank you for creating<br> +it!<o:p></o:p></p><br> +<br> +<div><br> +<br> +<p class=MsoNormal><o:p>&nbsp;</o:p></p><br> +<br> +</div><br> +<br> +<div><br> +<br> +<p class=MsoNormal>I'd like to use Public Keys to encrypt files, is this<br> +something that seems appropriate for file encryption?<o:p></o:p></p><br> +<br> +</div><br> +<br> +<div><br> +<br> +<p class=MsoNormal><o:p>&nbsp;</o:p></p><br> +<br> +</div><br> +<br> +<div><br> +<br> +<p class=MsoNormal>I've noticed that the encrypt method for RSA keys is only<br> +256 bytes, which seems rather small.<o:p></o:p></p><br> +<br> +</div><br> +<br> +<div><br> +<br> +<p class=MsoNormal><o:p>&nbsp;</o:p></p><br> +<br> +</div><br> +<br> +<div><br> +<br> +<p class=MsoNormal>I know I could wrap that in a generator, but was hoping for<br> +some feedback on another way or a configuration change to increase that number.<o:p></o:p></p><br> +<br> +</div><br> +<br> +<div><br> +<br> +<p class=MsoNormal><o:p>&nbsp;</o:p></p><br> +<br> +</div><br> +<br> +<div><br> +<br> +<p class=MsoNormal>Thanks for your contribution, and help.<o:p></o:p></p><br> +<br> +</div><br> +<br> +<div><br> +<br> +<p class=MsoNormal><o:p>&nbsp;</o:p></p><br> +<br> +</div><br> +<br> +<div><br> +<br> +<p class=MsoNormal>J<o:p></o:p></p><br> +<br> +</div><br> +<br> +</div><br> +<br> +</body><br> +<br> +</html><br> + +</tt> |