Opened 4 years ago

Closed 4 years ago

#19134 closed defect (fixed)

Shared Random: INT_8 means 8 bytes, not 8 bits

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:
Parent ID: #16943 Points: 0.5
Reviewer: Sponsor:

Description (last modified by teor)

generate_srv should take 8 bytes of reveal_num and version, not 8 bits.

This is going to require a synchronous upgrade of our test network, isn't it?

It will also require a htonll() that works on all platforms, which we don't currently have. We should move the htonll() code from test_util.c to util.c.

We have tor_htonll() to convert to network/big-endian byte order.

(And arma shouldn't deploy shared random until this is done, right?)

Child Tickets

Change History (3)

comment:1 Changed 4 years ago by teor

Description: modified (diff)

comment:2 Changed 4 years ago by asn

Not sure if we should consider this a code bug, or a spec bug. I'm personally fine with fitting those fields in a single byte. We are still quite far away from anything close to 255 dirauths or 255 SR protocol versions.

I'll let David decide if this is worth the engineering changes. I'm fine either way.

comment:3 Changed 4 years ago by dgoulet

Resolution: fixed
Status: newclosed

The reveal number is not a uint64_t so a INT_8 in the spec and version is now a uint32_t and INT_4 in the spec. Closing this, fix has been applied to the main prop250 branch (commit: ab79e6a)

Note: See TracTickets for help on using tickets.