瀏覽代碼

Tor's symmetric encryption doesn't have space overhead

so reflect that in EncryptedCell.size()
Ian Goldberg 4 年之前
父節點
當前提交
cce3c9534e
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      relay.py

+ 4 - 0
relay.py

@@ -117,6 +117,10 @@ class EncryptedCell(RelayCell):
             raise ValueError("EncryptedCell key mismatch")
         return self.plaintext
 
+    def size(self):
+        # Current Tor actually has no overhead for encryption
+        return self.plaintext.size()
+
 
 class RelayFallbackTerminationError(Exception):
     """An exception raised when someone tries to terminate a fallback