Rename tor_mem_is_zero to fast_mem_is_zero()

For memeq and friends, "tor_" indicates constant-time and "fast_"
indicates optimized.  I'm fine with leaving the constant-time
"safe_mem_is_zero" with its current name, but the "tor_" prefix on
the current optimized version is misleading.

Also, make the tor_digest*_is_zero() uniformly constant-time, and
add a fast_digest*_is_zero() version to use as needed.

A later commit in this branch will fix all the users of
tor_mem_is_zero().

Closes ticket 30309.
This commit is contained in:
Nick Mathewson
2019-04-30 14:43:35 -04:00
parent 847fc3280d
commit 309467c64e
3 changed files with 13 additions and 7 deletions
+3
View File
@@ -0,0 +1,3 @@
o Code simplification and refactoring:
- Rename tor_mem_is_zero() to fast_mem_is_zero(), to emphasize that
it is not a constant-time function. Closes ticket 30309.