[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #30309 [Core Tor/Tor]: Rename tor_mem_is_zero to fast_mem_is_zero; use it consistently



#30309: Rename tor_mem_is_zero to fast_mem_is_zero; use it consistently
-------------------------------+---------------------------------
     Reporter:  nickm          |      Owner:  (none)
         Type:  defect         |     Status:  new
     Priority:  Medium         |  Milestone:  Tor: 0.4.1.x-final
    Component:  Core Tor/Tor   |    Version:
     Severity:  Normal         |   Keywords:  technical-debt easy
Actual Points:                 |  Parent ID:
       Points:  .1             |   Reviewer:
      Sponsor:  Sponsor31-can  |
-------------------------------+---------------------------------
 By convention, tor_memeq() means "constant time" and fast_memeq() means
 "variable-time."  But tor_mem_is_zero is variable-time, whereas its
 constant-time variant is safe_mem_is_zero.

 I'm fine with the "safe_" name, but we should rename tor_mem_is_zero() to
 indicate that it is the fast one, not the safe one.  We should also audit
 its users, particularly tor_digest{256,}_is_zero()

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30309>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs