aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorMarcelo Cerri <[email protected]>2013-08-29 11:36:39 -0300
committerHerbert Xu <[email protected]>2013-09-02 20:32:55 +1000
commitdec0ed6c1b2c8c2aa37c04feccaf4784764c95f1 (patch)
tree8d49a66edd8468c22598ae8aa13af9c6aae799f1 /tools/perf/util/trace-event-scripting.c
parent41e3173daf4e2d2f2dcc48ae7ffc8d0c4f3ecec9 (diff)
crypto: nx - fix GCM for zero length messages
The NX CGM implementation doesn't support zero length messages and the current implementation has two flaws: - When the input data length is zero, it ignores the associated data. - Even when both lengths are zero, it uses the Crypto API to encrypt a zeroed block using ctr(aes) and because of this it allocates a new transformation and sets the key for this new tfm. Both operations are intended to be used only in user context, while the cryptographic operations can be called in both user and softirq contexts. This patch replaces the nested Crypto API use and adds two special cases: - When input data and associated data lengths are zero: it uses NX ECB mode to emulate the encryption of a zeroed block using ctr(aes). - When input data is zero and associated data is available: it uses NX GMAC mode to calculate the associated data MAC. Reviewed-by: Joy Latten <[email protected]> Signed-off-by: Marcelo Cerri <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions