提交 7748168c 编写于 作者: T Tommi Hirvola 提交者: Herbert Xu

crypto: x86/poly1305 - Clear key material from stack in SSE2 variant

1-block SSE2 variant of poly1305 stores variables s1..s4 containing key
material on the stack. This commit adds missing zeroing of the stack
memory. Benchmarks show negligible performance hit (tested on i7-3770).
Signed-off-by: NTommi Hirvola <tommi@hirvola.fi>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 30724445
...@@ -272,6 +272,10 @@ ENTRY(poly1305_block_sse2) ...@@ -272,6 +272,10 @@ ENTRY(poly1305_block_sse2)
dec %rcx dec %rcx
jnz .Ldoblock jnz .Ldoblock
# Zeroing of key material
mov %rcx,0x00(%rsp)
mov %rcx,0x08(%rsp)
add $0x10,%rsp add $0x10,%rsp
pop %r12 pop %r12
pop %rbx pop %rbx
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册