Re:SSH gets protection against side-channel attacks
by loeg on Friday June 21, 2019 @10:45AM
(#20242906)
Sure, although this is a non-standard and potentially non-portable extension. memset_s in Annex K is standard, but all of Annex K is optional, and like the rest of Annex K, it has an awful interface.
Re:SSH gets protection against side-channel attacks
by rurban on Saturday June 22, 2019 @10:08AM
(#20249618)
explicit_bzero or SecureZeroMemory are all insecure against those new sidechannel attacks we are talking about here.
Only memset_s is.
You really need a mfence (full memory barrier), not just a compiler barrier, maybe even a clflush.
Or you can use explicit_bzero(), which is designed for that use case.