-
Notifications
You must be signed in to change notification settings - Fork 2
Web Of Trust Development
This page is about how to compile Web Of Trust and Freetalk as a sample client of Web Of Trust from scratch. You might first want to read the page about Freenet Development.
-
Obtain the source code of Freenet by following steps 0 to 2 on Building with Eclipse, Web Of Trust needs some of it to compile.
-
In Eclipse select "File" / "Import..." to import the Web Of Trust project.
-
Repeat everything which was mentioned in step 2 of Building with Eclipse with the following git URI instead:
git://github.com/freenet/plugin-WoT-staging.git
-
In the "Select a Git repository" screen, select
plugin-WoT-staging
instead offred-staging
. -
In the "Import projects" screen, select "Web of trust" instead
-
In Eclipse select "File" / "Import..." to import the Freetalk project to get an example of a client-application which uses Web Of Trust.
-
Repeat everything which was mentioned in step 2 of Building with Eclipse with the following git URI instead:
git://github.com/freenet/plugin-Freetalk-staging.git
-
In the "Select a Git repository" screen, select "plugin-Freetalk-staging" instead of "fred-staging".
-
In the "Import projects" screen, select "Freetalk" instead
-
If you want to see an example of how to communicate with WOT via FCP, read the source code of
plugins.Freetalk.WoT/WoTIdentityManager.java
The development of Web Of Trust and Freetalk is organized heavily by the bugtracker.
The roadmap page will give you an overview of what the issues for the next few versions are.
Make sure to chose the right project at the top right.
WOT is not really an application of its own, it's primary goal is to provide spam resistance for actual Freenet client applications.
Therefore, client authors are likely to want to become a "WOT client" - an application which connects to WOT and uses it to obtain trustworthy identities. The actual content of your client application's network will only be fetched from the identities which WOT rates as trustworthy
So you might consider writing a client application before considering to do actual WOT development, it is usually better to start with writing something that uses WoT than actually trying to work on the framework on itself.
There are two ways of implementing a WOT client:
-
As a plugin to the official Freenet daemon
-
As a standalone application running outside of the Freenet daemon.
You should seriously consider writing your WOT client application as plugin for the official Freenet daemon. This will help Freenet as a whole: It will allow us to make your plugin official someday - it would be really difficult to ship non-java non-plugin applications with Freenet.
What follows is an explanation of how to write a plugin which runs inside the Freenet client.
Send messages via FCPv2-FCPPluginMessage. See FCPInterface.handle() for message types.
If you feel like the official WOT plugin cannot serve your needs, you might want to write an alternate implementation of it. Please only do this as a last resort. It took years to get WOT to where it is, and even though it currently is very slow, the performance issues can be fixed probably: In the author's opinion, they are not due to poor programming style, but due to a single part of the algorithm being wrong by design. This part of the algorithm will be redesigned soon, the work on it will start in November 2013.
Further, there already is an alternate implementation: LCWoT.
If you still want to write an alternate client: This section contains a few samples of all file types which the WOT plugin can insert onto the Freenet network. Their understanding allows you to emulate WOT's behavior.
Identities are inserted with the URI:
USK@(key_of_the_identity)/WebOfTrust/(edition)
Edition is the edition of the identity and starts at 0.
No filename is used - this would lead to the insertion of an additional metadata block.
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<WebOfTrust Version="2">
<Identity Name="xor" PublishesTrustList="true" Version="1">
<Context Name="Freetalk"/>
<Context Name="Introduction"/>
<Property Name="IntroductionPuzzleCount" Value="100"/>
<TrustList>
<Trust Comment="Trust received by solving a captcha." Identity="USK@LklwGGzT-6nAuqLPi7f5mt8qh~TW0fXY0wM9e1Yvgos,dwpIdQ-NVVNycykbCWqfA38QZ2oljQNwlygUxoBJqWU,AQACAAE/WebOfTrust/2" Value="0"/>
<Trust Comment="The main Freenet developer." Identity="USK@z9dv7wqsxIBCiFLW7VijMGXD9Gl-EXAqBAwzQ4aq26s,4Uvc~Fjw3i9toGeQuBkDARUV5mF7OTKoAhqOA9LpNdo,AQACAAE/WebOfTrust/60" Value="100"/>
<Trust Comment="DoS attempt: Board list spam." Identity="USK@KUVfqFCBL~8foa6ffoxg9zYUtq84oFpFzPxT64LBoaQ,QScQijOEy0TpLMhzqIOvspD3U8gOQqgJ-y~AAQLOo2M,AQACAAE/WebOfTrust/26" Value="-100"/>
</TrustList>
</Identity>
</WebOfTrust>
Introduction puzzles are inserted with the URI:
SSK@(key_of_the_identity)/WebOfTrust|Introduction|(yyyy-MM-dd)|(Index)
yyy-MM-dd is the date when the puzzle was inserted.
Index is an index value ranging from 0 to the amount of puzzles which the identity publishes minus 1.
The amount of published puzzles can be obtained from the identity XML as Property with key IntroductionPuzzleCount
.
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<WebOfTrust Version="2">
<IntroductionPuzzle ID="6d95a842-2fd3-4a35-9c35-76bd264da599@QeTBVWTwBldfI-lrF~xf0nqFVDdQoSUghT~PvhyJ1NE" MimeType="image/jpeg" Type="Captcha" ValidUntil="2011-04-06" Version="1">
<Data Value="(Base64 data encoded with freenet.support.Base64.encodeStandard which claims to be standard-compliant)"/>
</IntroductionPuzzle>
</WebOfTrust>
Solutions to introduction puzzles are inserted with the URI:
KSK@WebOfTrust|Introduction|(Puzzle-ID)|(Solution-text)
Puzzle-ID is the ID as seen in the puzzle XML.
Solution-text is the solution which the user entered.
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<WebOfTrust Version="1">
<IdentityIntroduction Version="1">
<Identity URI="USK@E2n0tTHrGBXTknHh19tbNzHDtCdQOtQovCbPuLcJ~Xk,2M6l-XC7myeE314~wtWIQ0oSFvnZVZR601D4c1hD3~k,AQACAAE/WebOfTrust/8"/>
</IdentityIntroduction>
</WebOfTrust>