Fixes #1200 -- disallow GCM truncation by default

Or even still 4 perhaps?


On Mon, Jun 30, 2014 at 9:57 AM, Paul Kehrer <notifications@github.com>
wrote:

> In cryptography/hazmat/primitives/ciphers/modes.py:
>
> >          # len(initialization_vector) must in [1, 2 ** 64), but it's impossible
> >          # to actually construct a bytes object that large, so we don't check
> >          # for it
> > -        if tag is not None and len(tag) < 4:
> > +        if tag is not None and len(tag) < min_tag_length:
>
> Since you can now pass 0 here you can pass an empty string as tag, which
> will cause an assertion failure in the OpenSSL backend. This was prevented
> previously by having a minimum tag length. Maybe we should still enforce it
> being >= 1?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pyca/cryptography/pull/1201/files#r14361243>.
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084