Opened 2 years ago

Closed 2 years ago

#19126 closed defect (fixed)

Consistently use uint64_t for integers in shared random structs

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs
Cc: Actual Points: 0.1
Parent ID: #16943 Points: 0.1
Reviewer: Sponsor:

Description (last modified by teor)

Rather than using int sometimes and uint32_t other times, we could consistently use uint64_t in shared random structs.

Note that reveal_num and version need to be 8 bytes for the SRV hash.

My branch sr-uint32 at https://github.com/teor2345/tor.git has a fix for this.

Child Tickets

Change History (5)

comment:1 Changed 2 years ago by teor

Status: newneeds_review

comment:2 Changed 2 years ago by teor

Resolution: invalid
Status: needs_reviewclosed

Obsoleted by #19134, because the spec says 8 bytes of reveal_num, not 8 bits.

comment:3 Changed 2 years ago by teor

Description: modified (diff)
Resolution: invalid
Status: closedreopened
Summary: Consistently use uint32_t for integers in shared random structsConsistently use uint64_t for integers in shared random structs

Re-opened, but recommend 64 bit now.

comment:4 Changed 2 years ago by asn

FWIW, I folded this patch in my latest prop250 branch. See comment:72:ticket:16943.

Maybe we should remove this from review-group-2? Not sure if there is a point in someone reviewing this two line change when it's on top of the gigantic prop250 branch. In any case, I reviewed the change before merging it :)

comment:5 Changed 2 years ago by dgoulet

Resolution: fixed
Status: reopenedclosed

In the giant prop250 branch. Closing.

Note: See TracTickets for help on using tickets.