The Tahoe-LAFS decentralized secure filesystem.
Go to file
Zooko O'Whielacronx b315619d6b download: refactor handling of URI Extension Block and crypttext hash tree, simplify things
Refactor into a class the logic of asking each server in turn until one of them gives an answer 
that validates.  It is called ValidatedThingObtainer.

Refactor the downloading and verification of the URI Extension Block into a class named 
ValidatedExtendedURIProxy.

The new logic of validating UEBs is minimalist: it doesn't require the UEB to contain any 
unncessary information, but of course it still accepts such information for backwards 
compatibility (so that this new download code is able to download files uploaded with old, and 
for that matter with current, upload code).

The new logic of validating UEBs follows the practice of doing all validation up front.  This 
practice advises one to isolate the validation of incoming data into one place, so that all of 
the rest of the code can assume only valid data.

If any redundant information is present in the UEB+URI, the new code cross-checks and asserts 
that it is all fully consistent.  This closes some issues where the uploader could have 
uploaded inconsistent redundant data, which would probably have caused the old downloader to 
simply reject that download after getting a Python exception, but perhaps could have caused 
greater harm to the old downloader.

I removed the notion of selecting an erasure codec from codec.py based on the string that was 
passed in the UEB.  Currently "crs" is the only such string that works, so 
"_assert(codec_name == 'crs')" is simpler and more explicit.  This is also in keeping with the 
"validate up front" strategy -- now if someone sets a different string than "crs" in their UEB, 
the downloader will reject the download in the "validate this UEB" function instead of in a 
separate "select the codec instance" function.

I removed the code to check plaintext hashes and plaintext Merkle Trees.  Uploaders do not 
produce this information any more (since it potentially exposes confidential information about 
the file), and the unit tests for it were disabled.  The downloader before this patch would 
check that plaintext hash or plaintext merkle tree if they were present, but not complain if 
they were absent.  The new downloader in this patch complains if they are present and doesn't 
check them.  (We might in the future re-introduce such hashes over the plaintext, but encrypt 
the hashes which are stored in the UEB to preserve confidentiality.  This would be a double-
check on the correctness of our own source code -- the current Merkle Tree over the ciphertext 
is already sufficient to guarantee the integrity of the download unless there is a bug in our 
Merkle Tree or AES implementation.) 

This patch increases the lines-of-code count by 8 (from 17,770 to 17,778), and reduces the 
uncovered-by-tests lines-of-code count by 24 (from 1408 to 1384).  Those numbers would be more 
meaningful if we omitted src/allmydata/util/ from the test-coverage statistics.
2008-12-05 08:17:54 -07:00
bin bin/tahoe: reflow error messages 2008-09-11 18:02:25 -07:00
contrib wui/wapi: change the default port number from 8123 to 3456 to avoid conflict with TorButton 2008-11-25 17:57:37 -07:00
docs setup: one more address to send release announcements to 2008-12-02 19:50:40 -07:00
mac fuse/impl_c: move mac tahoefuse impl out into contrib/fuse 2008-09-24 18:42:14 -07:00
misc misc/spacetime/diskwatcher.tac: remove dead code 2008-11-19 14:05:52 -07:00
src/allmydata download: refactor handling of URI Extension Block and crypttext hash tree, simplify things 2008-12-05 08:17:54 -07:00
twisted/plugins change #!/usr/bin/python to #!/usr/bin/env python 2007-03-29 14:01:28 -07:00
windows rollback change... move allmydatacontextmenu registration to installer.tmpl in tahoe-w32-client\installer 2008-11-03 15:36:47 -07:00
_auto_deps.py setup: move the requirement on simplejson from setup.py to _auto_deps.py, and loosen it from >= 2.0.5 to > 1.8.1 2008-11-25 14:37:51 -07:00
.darcs-boringfile .darcs-boringfile ignore tahoe-deps and tahoe-deps.tar.gz 2008-09-17 12:59:38 -07:00
COPYING.GPL new licences, move details from README to doc/install-details.html 2008-01-04 12:27:42 -07:00
COPYING.TGPPL.html more introductory doc cleanup 2008-01-04 18:09:19 -07:00
CREDITS New credit file entry 2008-11-14 08:05:48 -07:00
ez_setup.py setup: require the latest version of the setuptools bootstrap egg 2008-10-25 08:28:58 -07:00
Makefile makefile: added 'fuse-test' target to makefile, to run 'runtests' 2008-10-19 06:25:18 -07:00
NEWS storage: replace sizelimit with reserved_space, make the stats 'disk_avail' number incorporate this reservation 2008-12-01 17:24:21 -07:00
README setup: update README to point to known_issues.txt 2008-07-21 18:02:29 -07:00
relnotes.txt relnotes.txt: update and edit for the 1.2.0 release! 2008-07-21 18:04:03 -07:00
setup.cfg Makefile,docs: tahoe-deps.tar.gz now lives in separate source/deps/ directory on http://allmydata.org 2008-09-17 13:44:52 -07:00
setup.py setup: move the requirement on simplejson from setup.py to _auto_deps.py, and loosen it from >= 2.0.5 to > 1.8.1 2008-11-25 14:37:51 -07:00
Tahoe.home rename bin/allmydata-tahoe to bin/tahoe. Closes #155. 2007-10-11 03:38:24 -07:00

Welcome to the Tahoe project [1], a secure, decentralized,
fault-tolerant filesystem.  All of the source code is available under
a Free Software, Open Source licence (or two).

Please see docs/about.html for an introduction, docs/install.html for
install instructions, docs/running.html for usage instructions.

Finally, see docs/known_issues.txt for things that you need to know
about if you are relying on Tahoe to store your valuable data.

[1] http://allmydata.org