[tor-bugs] #19531 [Core Tor/Tor]: Major cleanup in our baseXX APIs
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Apr 6 15:07:39 UTC 2017
#19531: Major cleanup in our baseXX APIs
---------------------------------------------+-----------------------------
Reporter: dgoulet | Owner:
Type: enhancement | Status: new
Priority: Medium | Milestone: Tor:
| unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: util, tor-03-unspecified-201612 | Actual Points:
Parent ID: | Points: 1
Reviewer: | Sponsor:
---------------------------------------------+-----------------------------
Comment (by catalyst):
I mean where a non-`=` character at the end of the encoding is supposed to
contain some padding bits. e.g., for a base64 encoding where the input
length is 1 mod 3, the last 4 characters are ''XY''`==`, where ''X'' can
be any base64 alphabet character, but there are only 4 valid canonical
values for ''Y'' (because it encodes the low order 2 bits of the last
input byte, along with 4 padding bits that should be zero).
To put it another way, when you're decoding a base64 encoding, you can end
up with 4 or 2 extra bits at the end that don't go into an output byte.
For a canonical encoding, these bits should be zero, but a lenient decoder
might accept nonzero bits there.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19531#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list