Re: Fix length checks in AES_{un,}wrap_key()

2018-10-17 Thread Brent Cook
This makes sense, ok bcook@ On Wed, Oct 17, 2018 at 6:28 PM Theo Buehler wrote: > The spec, https://tools.ietf.org/html/rfc3394, section 2, states that > we need at least two 64 bit blocks for wrapping and, accordingly, three > 64 bit blocks for unwrapping. That is: we need at least 16 bytes

Fix length checks in AES_{un,}wrap_key()

2018-10-17 Thread Theo Buehler
The spec, https://tools.ietf.org/html/rfc3394, section 2, states that we need at least two 64 bit blocks for wrapping and, accordingly, three 64 bit blocks for unwrapping. That is: we need at least 16 bytes for wrapping and 24 bytes for unwrapping. This also matches the lower bounds that OpenSSL