[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 2cc9fb1b891e62c1dde5e9553d1cb602440f33ae
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Tue Jan 10 09:39:06 2017 -0500

    prop224: Clarify INT_N truncation
    
    Closes #19133
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 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
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits