Updated Hellnet info
File: hellnet/crypto/hash [Diff]
-- a/hellnet/crypto/hash++ b/hellnet/crypto/hash
@@ -1,4 +1,4 @@
h1. Hashing
Current development version of Hellnet uses "SHA1":http://en.wikipedia.org/wiki/SHA1, as it's bundled in Qt4. Final version is likely to
"SHA512":http://en.wikipedia.org/wiki/SHA512. I'd use "SHA512":http://en.wikipedia.org/wiki/SHA512 or "Whirlpool":http://en.wikipedia.org/wiki/Whirlpool_(cryptography) (unlikely due just to differ, but don't want to weak support) implement it myself.
-- a/hellnet/crypto/symmetric++ b/hellnet/crypto/symmetric
@@ -1,4 +1,4 @@
h1. Asymmetric encryption
Most likely to be AES. in Hellnet
256-bit "AES":http://en.wikipedia.org/wiki/Advanced_Encryption_Standard.
-- /dev/null++ b/hellnet/hspawn/build
@@ -1 +1,22 @@
h1. Building hspawn from source
Warning: this requires lot of magic
h2. Downloading
Get the latest source from git: @git clone git://git.bitcheese.net/Hellnet@
Requirements are: "GHC":http://haskell.org/ghc 6.10 (didn't check with other compilers), "Cabal":http://haskell.org/cabal (you will have to install them manually, as described "here":#) HTTP, Lucu, Crypto (these are Cabal packages, you can install them with @cabal install name@)
Once you have all those installed, Hellnet can be built with
bc. runghc Setup.hs configure
runghc Setup.hs build
runghc Setup.hs install
On first stage, Cabal may complain about missing dependencies, you'll have to install them.
Alternatively, if you don't want to mess with Cabal, you can just run 'make', it will compile all the executables in current folder. They are static and can be safely moved.
Now, to the next step, [[use]].
-- /dev/null++ b/hellnet/hspawn/index
@@ -1 +1,4 @@
hspawn is Hellnet implementation in Haskell, currently main and only one.
How to: [[build]], [[use]]
-- /dev/null++ b/hellnet/hspawn/use
@@ -1 +1,58 @@
h1. Usage of Hellnet
Currently, the only thing Hellnet can do is file storage and retrieval.
h2. How it works
h3. Data storage
All the data in Hellnet is stored in 64kb chunks. You can see your current cache in ~/.hellnet/store.
A chunk may be a [[/hellnet/tech/recursive-filelinks|filelink]], which stores information about chunks that form a file.
So, to retrieve a piece of data, you have to know its hash (and encryption key if it's encrypted)
h3. Data retrieval & connectivity
Currently Hellnet implements simple and probably naive networking. All nodes serve their chunks via [[/hellnet/protocols/HTTP|HTTP]] and other nodes poll every node in network until they find requested chunks[1]
h2. Action!
So, let's assume you need to share a copy of GPL[2]. It's named COPYING and located in current folder. Here you go:
bc. hell-insert COPYING
COPYING: hell://file/361e6d35ac16281294314c5b40b57ccd3f0d5e6ab2ed6088e346f8e181ec4c89ac141a9a786a1f0afc454610f4db8c00af98272f44490a6f601fa08293a13be9
Hellnet *inserts* the file in local storage and gives you a link to the file. You might as well request to encrypt the file, to protect your privacy:
bc. hell-insert -e COPYING
COPYING: hell://file/04e69a4c0cf881dfe487cb76551e0cbfabde629453765dd647f2ee5bddd3d4298a78bae8bc4094e3c4df3f76ad7bdf5112592d85f6dab3571a931a145854a391.9f85e591452b21f9390bc75a5bb016da4a73a13e58e7649bc9a748c4a80b49cf
Link here consists of two parts, first is hash, second is encryption key.
You can test how file is inserted then:
bc. hell-get hell://file/04e69a4c0cf881dfe487cb76551e0cbfabde629453765dd647f2ee5bddd3d4298a78bae8bc4094e3c4df3f76ad7bdf5112592d85f6dab3571a931a145854a391.9f85e591452b21f9390bc75a5bb016da4a73a13e58e7649bc9a748c4a80b49cf > COPYING.2
diff COPYING COPYING.2
Now let's assume you have a friend who needs to receive a copy of GPL. First, you should bring up Hellnet server on your side:
bc. hell-serve 12345 &
where 12345 is port on your machine which is open to the world.
Then, your friend should run:
bc. hell-nodes add 123.12.1.0 12345
where *123.12.1.0* is *your* host and 12345 is *your* open port.
Then he can type as well:
bc. hell-get hell://file/04e69a4c0cf881dfe487cb76551e0cbfabde629453765dd647f2ee5bddd3d4298a78bae8bc4094e3c4df3f76ad7bdf5112592d85f6dab3571a931a145854a391.9f85e591452b21f9390bc75a5bb016da4a73a13e58e7649bc9a748c4a80b49cf > COPYING
And after short wait read the text of GPL.
fn1. Or run out of nodes
fn2. Which is the most seeded content on "GNUnet":http://gnunet.org
-- a/hellnet/status++ b/hellnet/status
@@ -4,5 +4,5 @@
*Hellspawn* -- Hellnet daemon in Qt/C++. Supports data inserting, retrieving, [[protocols/transfer|message]] parsing and even some network connectivity. Doesn't work out of localhost, development is stopped in favour of hspawn.
*Hspawn*
*[[hspawn|Hspawn]]* -- Hellnet daemon in Haskell. Currently supports local storage/retrieval of files. data inserting and retrieval (optionally [[crypto/symmetric|encrypted]]), with manual server discovery
-- a/hellnet/tech/extent-based-filelinks++ /dev/null
@@ -1,6 +1 @@
h1. Extent-based filelinks
Filelink is a list of hashes of chunks of file. As Hellnet has limited chunk size and filelinks have to be files too, and we can't use filelinks on filelinks, Hellnet has extent-based filelinks.
If chunk size is 64, we can fit 1024 hashes in it. If file needs more than 1023 hashes to describe it, we make another filelink chunk, fill it with the rest and append hash of that chunk to first one. Can be recursively repeated.
-- /dev/null++ b/hellnet/tech/recursive-filelinks
@@ -1 +1,8 @@
h1. Extent-based filelinks
Filelink is a list of hashes of chunks of file. As Hellnet has limited chunk size[1] and filelinks have to be files too, and we can't use filelinks on filelinks, Hellnet has extent-based filelinks.
If chunk size is 64, we can fit 1024 hashes in it. If file needs more than 1023 hashes to describe it, we make another filelink chunk, fill it with the rest and append hash of that chunk to first one. Can be recursively repeated.
fn1. Currently 64 kbytes