]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
remove plaintext-hashing code from the helper interface, to close #722
authorBrian Warner <warner@lothar.com>
Mon, 1 Jun 2009 22:49:16 +0000 (15:49 -0700)
committerBrian Warner <warner@lothar.com>
Mon, 1 Jun 2009 22:49:16 +0000 (15:49 -0700)
and deny the Helper the ability to mount a partial-information-guessing
attack. This will probably break compatibility between new clients and very
old (pre-1.0) helpers.

src/allmydata/immutable/offloaded.py
src/allmydata/immutable/upload.py
src/allmydata/interfaces.py

index 766f0bbdbec886d6cad8b34da1609a86c70d08ea..01dc1ed4ad8c0d1b6f03fa79672db26337f2c834 100644 (file)
@@ -469,11 +469,7 @@ class LocalCiphertextReader(AskUntilSuccessMixin):
         d = defer.maybeDeferred(self.f.read, length)
         d.addCallback(lambda data: [data])
         return d
-    def get_plaintext_hashtree_leaves(self, first, last, num_segments):
-        return self.call("get_plaintext_hashtree_leaves", first, last,
-                         num_segments)
-    def get_plaintext_hash(self):
-        return self.call("get_plaintext_hash")
+
     def close(self):
         self.f.close()
         # ??. I'm not sure if it makes sense to forward the close message.
index 26ff331fbbc91f4ab0b26e7a928dddacc8b66f21..4bf07fed5368cd22ee5a4dc6337f87a173462ad3 100644 (file)
@@ -577,6 +577,7 @@ class EncryptAnUploadable:
 
 
     def get_plaintext_hashtree_leaves(self, first, last, num_segments):
+        # this is currently unused, but will live again when we fix #453
         if len(self._plaintext_segment_hashes) < num_segments:
             # close out the last one
             assert len(self._plaintext_segment_hashes) == num_segments-1
@@ -907,15 +908,6 @@ class RemoteEncryptedUploadable(Referenceable):
         d.addCallback(_read)
         return d
 
-    def remote_get_plaintext_hashtree_leaves(self, first, last, num_segments):
-        log.msg("remote_get_plaintext_hashtree_leaves: %d-%d of %d" %
-                (first, last-1, num_segments),
-                level=log.NOISY)
-        d = self._eu.get_plaintext_hashtree_leaves(first, last, num_segments)
-        d.addCallback(list)
-        return d
-    def remote_get_plaintext_hash(self):
-        return self._eu.get_plaintext_hash()
     def remote_close(self):
         return self._eu.close()
 
index a123afed902b5f611f1ceaa9ae6efc5e5cc0dae7..13b96e7e62b3232ab72b7c4f8ee9b3d83a1e10ef 100644 (file)
@@ -2122,12 +2122,6 @@ class RIEncryptedUploadable(RemoteInterface):
     def read_encrypted(offset=Offset, length=ReadSize):
         return ListOf(str)
 
-    def get_plaintext_hashtree_leaves(first=int, last=int, num_segments=int):
-        return ListOf(Hash)
-
-    def get_plaintext_hash():
-        return Hash
-
     def close():
         return None