Quick draft https://github.com/pyca/cryptography/pull/713/files#diff-9c5dedc98e79a81f0606e9dfc3d7fc2aR57 
https://github.com/pyca/cryptography/pull/713/files#diff-bbf328bff524bcecbbba5c8b7786c802R342