tor/src
Micah Elizabeth Scott 1a3afeb387 hs_pow: unswap byte order of seed_head field
In proposal 327, "POW_SEED is the first 4 bytes of the seed used".

The proposal doesn't specifically mention the data type of this field,
and the code in hs_pow so far treats it as an integer but semantically
it's more like the first four bytes of an already-encoded little endian
blob. This leads to a byte swap, since the type confusion takes place
in a little-endian subsystem but the wire encoding of seed_head uses
tor's default of big endian.

This patch does not address the underlying type confusion, it's a
minimal change that only swaps the byte order and updates unit tests
accordingly. Further changes will clean up the data types.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-05-10 07:38:28 -07:00
..
app hs_pow: Replace libb2 dependency with hashx's internal blake2 2023-05-10 07:38:28 -07:00
config Merge branch 'maint-0.4.7' 2023-01-12 11:07:40 -05:00
core hs_pow: Make proof-of-work support optional in configure 2023-05-10 07:38:28 -07:00
ext hashx: trim trailing whitespace 2023-05-10 07:38:28 -07:00
feature hs_pow: unswap byte order of seed_head field 2023-05-10 07:38:28 -07:00
lib compute the client-side pow in a cpuworker thread 2023-05-10 07:37:11 -07:00
test hs_pow: unswap byte order of seed_head field 2023-05-10 07:38:28 -07:00
tools Remove broken MSVC support 2022-04-27 23:09:44 -04:00
trunnel trunnel: Centralize the INTRO1 extension type 2023-05-10 07:37:11 -07:00
arch_goals.md Document high-level architecture goals 2019-12-10 16:47:38 -06:00
include.am Remove broken MSVC support 2022-04-27 23:09:44 -04:00
mainpage.md Move description of ext contents into an md file. 2020-07-02 13:46:25 -04:00