[Cryptography-dev] Landing AES

Donald Stufft donald at stufft.io
Tue Aug 27 14:53:59 CEST 2013


On Aug 27, 2013, at 8:50 AM, Hynek Schlawack <hs at ox.cx> wrote:

> 
>> We've slowed a bit in the last week or so. I want to get the AES patch landed so we can get the momentum back up (https://github.com/alex/cryptography/pull/28). There's a few outstanding issues we need to resolve:
>> 
>> * How the heck do we test error conditions in OpenSSL? OpenSSL is totally negligent in how we reproduce them. Should we monkeypatching the cffi functions to return error codes so we can at least test our code paths?
> 
> That sounds rather sketchy TBH but I don't know the innards of both.

I agree on this sounding sketchy but it might be the best way forward.

> 
>> * Since the BlockCipher object doesn't know if it's in encrypt or decrypt mode until the first call it can't really initialize itself in the constructor. Is that fine?
> 
> I see two options:
> 
>  1. Explicit factory methods.
>  2. Init on first use.
> 
> I tend to prefer 1., ideally with separate types. I love me some types.

I prefer just init on first use, it's currently setup to switch into decrypt or encrypt modes based on if you call BlockCipher.decrypt() or BlockCipher.encrypt() first. FWIW Encrypt/Decrypt mode only makes sense for certain combinations of things, some block ciphers can use the same operation.

> 
> —h
> _______________________________________________
> Cryptography-dev mailing list
> Cryptography-dev at python.org
> http://mail.python.org/mailman/listinfo/cryptography-dev

FWIW there are a few outstanding issues inside the Pull Request comments as well.

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20130827/de7ddf38/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20130827/de7ddf38/attachment.sig>


More information about the Cryptography-dev mailing list