diff options
author | Eric Biggers | 2019-03-31 13:04:20 -0700 |
---|---|---|
committer | Herbert Xu | 2019-04-08 14:42:55 +0800 |
commit | c31a871985cac1a594a7e61e7ab808c0f81845ee (patch) | |
tree | 9568d0b3776f19b7619fb369cd4551bfb2f60fa8 /scripts/faddr2line | |
parent | c5c46887cfe7d0dff743d9eda7c91de625e96960 (diff) |
crypto: cts - don't support empty messages
My patches to make testmgr fuzz algorithms against their generic
implementation detected that the arm64 implementations of
"cts(cbc(aes))" handle empty messages differently from the cts template.
Namely, the arm64 implementations forbids (with -EINVAL) all messages
shorter than the block size, including the empty message; but the cts
template permits empty messages as a special case.
No user should be CTS-encrypting/decrypting empty messages, but we need
to keep the behavior consistent. Unfortunately, as noted in the source
of OpenSSL's CTS implementation [1], there's no common specification for
CTS. This makes it somewhat debatable what the behavior should be.
However, all CTS specifications seem to agree that messages shorter than
the block size are not allowed, and OpenSSL follows this in both CTS
conventions it implements. It would also simplify the user-visible
semantics to have empty messages no longer be a special case.
Therefore, make the cts template return -EINVAL on *all* messages
shorter than the block size, including the empty message.
[1] https://github.com/openssl/openssl/blob/master/crypto/modes/cts128.c
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'scripts/faddr2line')
0 files changed, 0 insertions, 0 deletions