Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#30309 closed defect (fixed)

Rename tor_mem_is_zero to fast_mem_is_zero; use it consistently

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: technical-debt easy dgoulet-merge
Cc: Actual Points: .1
Parent ID: Points: 0.1
Reviewer: mikeperry 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()

Child Tickets

Change History (7)

comment:1 Changed 18 months ago by nickm

Actual Points: .1

See branch ticket30309 with PR in .

comment:2 Changed 18 months ago by rl1987

Status: newneeds_review

comment:3 Changed 18 months ago by asn

Reviewer: mikeperry

comment:4 Changed 18 months ago by mikeperry

Status: needs_reviewmerge_ready

This looks good to me.

comment:5 Changed 18 months ago by nickm

Keywords: dgoulet-merge added

comment:6 Changed 18 months ago by dgoulet

Resolution: fixed
Status: merge_readyclosed


comment:7 Changed 18 months ago by gaba

Points: .10.1
Note: See TracTickets for help on using tickets.