summaryrefslogtreecommitdiff
path: root/pipermail/pycrypto/2013q3/000688.html
blob: f7379c3a8767481e08bf34dc47eac3b854d9da3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
 <HEAD>
   <TITLE> [pycrypto] RSA exportKey() changes set in stone for 2.7?
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20RSA%20exportKey%28%29%20changes%20set%20in%20stone%20for%202.7%3F&In-Reply-To=%3CCAGwD-jYXxfVKyDyB6d%2BCV1uMSmo_v2C-j_FV%3D_qaHJ_rvjHqtQ%40mail.gmail.com%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <style type="text/css">
       pre {
           white-space: pre-wrap;       /* css-2.1, curent FF, Opera, Safari */
           }
   </style>
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="000687.html">
   <LINK REL="Next"  HREF="000697.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[pycrypto] RSA exportKey() changes set in stone for 2.7?</H1>
    <B>Kurt Vogel</B> 
    <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20RSA%20exportKey%28%29%20changes%20set%20in%20stone%20for%202.7%3F&In-Reply-To=%3CCAGwD-jYXxfVKyDyB6d%2BCV1uMSmo_v2C-j_FV%3D_qaHJ_rvjHqtQ%40mail.gmail.com%3E"
       TITLE="[pycrypto] RSA exportKey() changes set in stone for 2.7?">kvogel at mdcom.com
       </A><BR>
    <I>Wed Jul 17 01:33:41 PDT 2013</I>
    <P><UL>
        <LI>Previous message: <A HREF="000687.html">[pycrypto] RSA exportKey question with bcrypt?
</A></li>
        <LI>Next message: <A HREF="000697.html">[pycrypto] RSA exportKey() changes set in stone for 2.7?
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#688">[ date ]</a>
              <a href="thread.html#688">[ thread ]</a>
              <a href="subject.html#688">[ subject ]</a>
              <a href="author.html#688">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Hi, quick question for the group and maintainer...

I am about ready to deploy a project and wondering how set we are on the
format of rsa.exportKey() for next pycrypto?

Is it safe to include in our requirements.pip (for now) a reference to
<A HREF="https://github.com/dlitz/pycrypto">https://github.com/dlitz/pycrypto</A> master branch?  And export my keys with
the new protection scheme?  And consequently matching importKey().

It would be super nice if we could add **kwargs for iteration_count and
salt_size to export() but beggars can't be choosers :)  It seems a simple
enough change and looks like importKey() reads those fields in, I'd do it
myself but would like any thoughts/opinions?

Thanks,
Kurt


On Mon, Jul 15, 2013 at 1:52 PM, Legrandin &lt;<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">helderijs at gmail.com</A>&gt; wrote:

&gt;<i> Hi Kurt,
</I>&gt;<i>
</I>&gt;<i> I hope I understand correctly this time.
</I>&gt;<i> The presence of a header like:
</I>&gt;<i>
</I>&gt;<i> -----BEGIN RSA PRIVATE KEY-----
</I>&gt;<i> Proc-Type: 4,ENCRYPTED
</I>&gt;<i> DEK-Info: AES-256-CBC,16D792053CB9E5981B06E020900F86EA
</I>&gt;<i> [...]
</I>&gt;<i>
</I>&gt;<i> indicates that the PEM envelope is encrypted and that the inner PKCS#8
</I>&gt;<i> structure is clear.
</I>&gt;<i>
</I>&gt;<i> A header like:
</I>&gt;<i>
</I>&gt;<i> -----BEGIN ENCRYPTED PRIVATE KEY-----
</I>&gt;<i> MIIFHzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIHI1C+JhO35cCAgPo
</I>&gt;<i> [...]
</I>&gt;<i>
</I>&gt;<i> indicates the opposite: the PEM envelope is clear and the inner PKCS#8
</I>&gt;<i> structure is encrypted. That was produced by a call like:
</I>&gt;<i>
</I>&gt;<i>     &gt;&gt; rsa.exportKey(passphrase='boo', pkcs=8,
</I>&gt;<i> protection='PBKDF2WithHMAC-SHA1AndAES256-CBC')
</I>&gt;<i>
</I>&gt;<i> I don't think you can have both PKCS#8-level encryption (with all its
</I>&gt;<i> nice properties, like ability to fine tune the algorithms and so on)
</I>&gt;<i> and nice human-readable headers in the PEM envelope (like DEK-Info)
</I>&gt;<i> describing the type of encryption that was performed.That would
</I>&gt;<i> totally confuse the receiver...
</I>&gt;<i>
</I>&gt;<i> It' also worth streessing that PEM-level encryption is not really
</I>&gt;<i> specified anywhere other than in very old RFCs like RFC 1421, which
</I>&gt;<i> only define DES as algorithm and no password key derivation. Nowadays,
</I>&gt;<i> PEM-level encryption is best avoided, even if that means that the only
</I>&gt;<i> hint that the key is encrypted is the generic &quot;BEGIN ENCRYPTED PRIVATE
</I>&gt;<i> KEY&quot; line.
</I>&gt;<i>
</I>&gt;<i> As described in the docstrings, specifying the 'protection' parameter
</I>&gt;<i> automatically implies
</I>&gt;<i> PKCS#8-level encryption, so the change of export format is actually
</I>&gt;<i> done on purpose.
</I>&gt;<i>
</I>&gt;<i> &gt; Also maybe more importantly would be the extra parameters for salt size
</I>&gt;<i> and
</I>&gt;<i> &gt; iteration count?
</I>&gt;<i>
</I>&gt;<i> I agree it would be a nice addition (along with some support for
</I>&gt;<i> bcrypt/scrypt).
</I>&gt;<i>
</I>&gt;<i> &gt; An afterthought, maybe it's time exportKey(), importKey() stay the same
</I>&gt;<i> as
</I>&gt;<i> &gt; 2.6 and have new functions that allow these extra combinations?
</I>&gt;<i>
</I>&gt;<i> Which extra combinations? Salt size and iteration count you mean?
</I>&gt;<i> They could be passed as a dictionary, since they are
</I>&gt;<i> algorithm-specific parameters.
</I>&gt;<i>
</I>&gt;<i> 2013/7/15 Kurt Vogel &lt;<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">kvogel at mdcom.com</A>&gt;:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Understood, but the format of the export changes when we add 'protection'
</I>&gt;<i> &gt; parameter.
</I>&gt;<i> &gt; Can we keep same format and have different headers, ex:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;&gt; Proc-Type: 4,ENCRYPTED
</I>&gt;<i> &gt;&gt; DEK-Info: AES-256-CBC,16D792053CB9E5981B06E020900F86EA
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Because I notice we wrap the unencrypted PEM into a PBES2 which is
</I>&gt;<i> encrypted
</I>&gt;<i> &gt; there.
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Also maybe more importantly would be the extra parameters for salt size
</I>&gt;<i> and
</I>&gt;<i> &gt; iteration count?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; An afterthought, maybe it's time exportKey(), importKey() stay the same
</I>&gt;<i> as
</I>&gt;<i> &gt; 2.6 and have new functions that allow these extra combinations?
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; Thanks,
</I>&gt;<i> &gt; Kurt
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; On Mon, Jul 15, 2013 at 2:26 AM, Legrandin &lt;<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">helderijs at gmail.com</A>&gt; wrote:
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; Hi Kurt,
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; In the PyCrypto 2.6 release, rsa.exportKey(passphrase='boo') generates
</I>&gt;<i> &gt;&gt; a TDES-encrypted private key, with encryption being done at the PEM
</I>&gt;<i> &gt;&gt; level.
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; I don't think that behavior should change (e.g. we should not silently
</I>&gt;<i> &gt;&gt; switch to AES or even to the more robust PKCS#8-level encryption).
</I>&gt;<i> &gt;&gt;
</I>&gt;<i> &gt;&gt; 2013/7/15 Kurt Vogel &lt;<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">kvogel at mdcom.com</A>&gt;:
</I>&gt;<i> &gt;&gt; &gt; And finally a comment/question/complaint :(
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; If I use protection like this for ex:
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; export = rsa.exportKey(passphrase='boo', pkcs=8,
</I>&gt;<i> &gt;&gt; &gt; protection='PBKDF2WithHMAC-SHA1AndAES256-CBC')
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; The exported key looks like this:
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; -----BEGIN ENCRYPTED PRIVATE KEY-----
</I>&gt;<i> &gt;&gt; &gt; MIIFHzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIHI1C+JhO35cCAgPo
</I>&gt;<i> &gt;&gt; &gt; MB0GCWCGSAFlAwQBKgQQ2FsezYUEaQLPHxk0z6+R4gSCBNDV++BsvKxxpo6uhUYw
</I>&gt;<i> &gt;&gt; &gt; ...
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; With export = rsa.exportKey(passphrase='boo'):
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; -----BEGIN RSA PRIVATE KEY-----
</I>&gt;<i> &gt;&gt; &gt; Proc-Type: 4,ENCRYPTED
</I>&gt;<i> &gt;&gt; &gt; DEK-Info: DES-EDE3-CBC,CE7B6EC598ED0D10
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; lPMvbYUypG+O4P/LilzGVQqP+6PMbnnLMP6eosyubcBqLtQxvMlvRRqgRu5CDApA
</I>&gt;<i> &gt;&gt; &gt; ...
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; The logic in exportKey() looks a bit convoluted, is this for some
</I>&gt;<i> &gt;&gt; &gt; backward
</I>&gt;<i> &gt;&gt; &gt; compatibility issue?  I would expect to see something like this, what
</I>&gt;<i> &gt;&gt; &gt; ssh-key does:
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; -----BEGIN RSA PRIVATE KEY-----
</I>&gt;<i> &gt;&gt; &gt; Proc-Type: 4,ENCRYPTED
</I>&gt;<i> &gt;&gt; &gt; DEK-Info: AES-256-CBC,16D792053CB9E5981B06E020900F86EA
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; oL8O6n5v1S3cgGJIwrzrAq5TQIb7OeolGJpHXiyTUj1iStulgS5vAjkht0cgq53p
</I>&gt;<i> &gt;&gt; &gt; ...
</I>&gt;<i> &gt;&gt; &gt; ..
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; Thanks,
</I>&gt;<i> &gt;&gt; &gt; Kurt
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; On Sun, Jul 14, 2013 at 11:40 PM, Kurt Vogel &lt;<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">kvogel at mdcom.com</A>&gt;
</I>&gt;<i> wrote:
</I>&gt;<i> &gt;&gt; &gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt; While I'm on the subject and appears Dwayne is merging in pull
</I>&gt;<i> requests
</I>&gt;<i> &gt;&gt; &gt;&gt; :)
</I>&gt;<i> &gt;&gt; &gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt; For RSA exportKey() think we could have **kwargs for extra
</I>&gt;<i> prot_params
</I>&gt;<i> &gt;&gt; &gt;&gt; passed to
</I>&gt;<i> &gt;&gt; &gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt; PKCS8.wrap() like iteration_count and salt size?
</I>&gt;<i> &gt;&gt; &gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt; On Sun, Jul 14, 2013 at 9:34 PM, Kurt Vogel &lt;<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">kvogel at mdcom.com</A>&gt;
</I>&gt;<i> wrote:
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; Hi,
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; Do you guys know roughly when this will go in?
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; Also with import/export RSA keys can we support bcrypt?
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; Does JCA and BouncyCastle use bcrypt, eg:
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; 'BcryptWithHMAC-SHA1AndAES256-CBC'
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; Thanks,
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; Kurt
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; On Fri, Jul 5, 2013 at 2:52 AM, Legrandin &lt;<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">helderijs at gmail.com</A>&gt;
</I>&gt;<i> wrote:
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; Hi Kurt , thanks a lot for providing feedback. It is much
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; appreciated.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; * I guess you refer to camel-casing used for several variables,
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; which
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; was due to my preference to stick to ASN.1 naming.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   I can work on that and make sure flake8 does not complain that
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; much.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; * Right. Code evolved at different points in time, and indeed it
</I>&gt;<i> is
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; now hard to follow the path of the 'parameter' value. I will try
</I>&gt;<i> to
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; fix that.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; * I used strings like 'PBKDF2WithHMAC-SHA1AndAES128-CBC' because
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; that
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; is the style used in JCA and BouncyCastle and a lot of people are
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; familiar with it.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   I am not very clear what the benefit enums might bring? One
</I>&gt;<i> option
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; I
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; considered was the ability to provide 3 independent parameters
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   instead of one (since protection mainly depends on type of KDF,
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; PRF,
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; and symmetric cipher) but at the end I guess most
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   uses case are about the desire to protect the private key using
</I>&gt;<i> a
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; password in a strong way, and the ability to tweak the various
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; parameters
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   is not that relevant. Plus, exportKey() parameter list becomes
</I>&gt;<i> to
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; long.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; * I am really ashamed to admit that I actually have 9 pull
</I>&gt;<i> requests
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; open, not 2 so I am totally giving headaches to the maintainer.
</I>&gt;<i> :-)
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   It is of course only up to him to decide which features should
</I>&gt;<i> go
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; in; given that he has not much time these days, it is likely that
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; only
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   few features and bugfixes may go into any next release.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   The release merge window seems to roughly be once per year and I
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; find it is natural to have so many outstanding pull requests by
</I>&gt;<i> now.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   To my defense, I can only say that the all pull requests cover
</I>&gt;<i> one
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; feature only and that I try to keep them as independent as
</I>&gt;<i> possible.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   Most of them apply cleanly to master (e.g. HKDF, CCM, PKCS#8,
</I>&gt;<i> bug
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; fixes, etc).
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   In some cases though, they do depend on an existing pull request
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; (as
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; in the case of DSA import/export depending on PKCS8 be applied
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; first),
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;   because keeping them separated is honestly too much work for me
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; *and* they are indeed extensions of other extensions.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; Hi, I was looking at the pycrypto pull request
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; <A HREF="https://github.com/dlitz/pycrypto/pull/32.">https://github.com/dlitz/pycrypto/pull/32.</A>  Just a few
</I>&gt;<i> comments...
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; * For readability can you pep8 format the code?
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; * RSA, for import/export the protection parameter maybe rename
</I>&gt;<i> to
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; algo or
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; wrap algo?  It evolves from: 'protection' to 'wrap_algo' to
</I>&gt;<i> 'mode'
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; as
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; it
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; goes down the call stack.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; * Also maybe make this parameter an enum/value?  Since the long
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; string can
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; be error prone, low level code would need to change anyway if it
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; were
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; either
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; string or int if we support more modes.
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; * And last but not least... I'm new to this email list and not
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; sure
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; how
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; often pull requests are accepted but maybe you could reduce the
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; amount of
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; features going in?  I know you have another one, 51, after
</I>&gt;<i> this...
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; Maintainer may reluctant to do massive changes all at once?
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; Anyway just ideas...
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; Thanks for your time,
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; Sincerely,
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt; Kurt
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; _______________________________________________
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; pycrypto mailing list
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt; &gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I>&gt;<i> &gt;&gt; &gt;&gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;&gt;
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; &gt; _______________________________________________
</I>&gt;<i> &gt;&gt; &gt; pycrypto mailing list
</I>&gt;<i> &gt;&gt; &gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> &gt;&gt; &gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I>&gt;<i> &gt;&gt; &gt;
</I>&gt;<i> &gt;&gt; _______________________________________________
</I>&gt;<i> &gt;&gt; pycrypto mailing list
</I>&gt;<i> &gt;&gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> &gt;&gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> &gt; _______________________________________________
</I>&gt;<i> &gt; pycrypto mailing list
</I>&gt;<i> &gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> &gt; <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I>&gt;<i> &gt;
</I>&gt;<i> _______________________________________________
</I>&gt;<i> pycrypto mailing list
</I>&gt;<i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A>
</I>&gt;<i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A>
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: &lt;<A HREF="http://lists.dlitz.net/pipermail/pycrypto/attachments/20130717/5b8cab35/attachment-0001.html">http://lists.dlitz.net/pipermail/pycrypto/attachments/20130717/5b8cab35/attachment-0001.html</A>&gt;
</PRE>



<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000687.html">[pycrypto] RSA exportKey question with bcrypt?
</A></li>
	<LI>Next message: <A HREF="000697.html">[pycrypto] RSA exportKey() changes set in stone for 2.7?
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#688">[ date ]</a>
              <a href="thread.html#688">[ thread ]</a>
              <a href="subject.html#688">[ subject ]</a>
              <a href="author.html#688">[ 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>