[tor-commits] [torspec/master] prop224: Clarify INT_N truncation

nickm at torproject.org nickm at torproject.org
Wed Jan 11 14:33:28 UTC 2017


commit 2cc9fb1b891e62c1dde5e9553d1cb602440f33ae
Author: David Goulet <dgoulet at torproject.org>
Date:   Tue Jan 10 09:39:06 2017 -0500

    prop224: Clarify INT_N truncation
    
    Closes #19133
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 proposals/224-rend-spec-ng.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/proposals/224-rend-spec-ng.txt b/proposals/224-rend-spec-ng.txt
index 0b23fc1..94ad1f8 100644
--- a/proposals/224-rend-spec-ng.txt
+++ b/proposals/224-rend-spec-ng.txt
@@ -155,7 +155,8 @@ Table of contents:
 
    We use INT_N(val) to denote the network (big-endian) encoding of the
    unsigned integer "val" in N bytes. For example, INT_4(1337) is [00 00
-   05 39].
+   05 39]. Values are truncated like so: val % (2 ^ (N * 8)). For example,
+   INT_4(42) is 42 % 4294967296 (32 bit).
 
 0.3. Cryptographic building blocks
 





More information about the tor-commits mailing list