[Cryptography-dev] "For Humans" Message Layout
Donald Stufft
donald at stufft.io
Fri Sep 13 20:22:57 CEST 2013
So I've been looking at playing around with the start of the
"for humans" API. I figure we need to either do a PyNaCl style
"this is what the algorithms are and that's that" or a more
flexible layout. I've opted to make the format itself flexible.
So here's my proposal for a the message layout for an
encrypted message: https://gist.github.com/dstufft/62473d7ae4b6f8b83577
I tried to make it flexible, it makes it possible for the format itself
to specify things such as the algorithm, MAC, etc. The protocol is
versioned, up to 65,535 versions, so if we ever need to change
it we can.
All in all with some assumptions as to cipher names, block size,
MAC type an estimated overhead would be 107bytes on top of
the encrypted data itself and the AAD.
This will require 3 passes with the standard python struct module
to parse (Once for the version number, once for the sizes, once
for the data).
I've sent this out to a few other people to get their opinions of it as
well as to this list to get everyone's opinion here.
-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
-------------- 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/20130913/ee86041a/attachment.sig>
More information about the Cryptography-dev
mailing list