commit 1adde73d6cd05c253346abdaad199b9337cefc68 Author: Damian Johnson atagar@torproject.org Date: Sat Aug 25 14:28:54 2018 -0700
Further explain our RelayCell's 'recognized' field
Few months back this field throughly confused me so I asked Roger about it. Passing on the helpful explanation I got from him. --- stem/client/cell.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/stem/client/cell.py b/stem/client/cell.py index 3f247af4..b40a30e1 100644 --- a/stem/client/cell.py +++ b/stem/client/cell.py @@ -518,10 +518,16 @@ class RelayCell(CircuitCell): """ Command concerning a relay circuit.
+ Our 'recognized' attribute provides a cheap (but incomplete) check for if our + cell payload is encrypted. If non-zero our payload *IS* encrypted, but if + zero we're *PROBABLY* fully decrypted. This uncertainty is because encrypted + cells have a small chance of coincidently producing zero for this value as + well. + :var stem.client.RelayCommand command: command to be issued :var int command_int: integer value of our command :var bytes data: payload of the cell - :var int recognized: zero if cell is decrypted, non-zero otherwise + :var int recognized: non-zero if payload is encrypted :var int digest: running digest held with the relay :var int stream_id: specific stream this concerns """
tor-commits@lists.torproject.org