..

Enabling Trust in a FOAF Document

This blog post follows on from my previous one signing and verifying files with GnuPG, whereby I showed (he says), in its simplest form, how one can digitally sign and verify a document. This in turn allows anyone reading the document to verify whether or not it has been tampered with since it was signed.

In this post I will describe two methods of linking to a digital signature from a RDF document. The RDF document I will be describing in this post is a FOAF document, but is is needless to say that this approach can be used from any RDF file.

The method described below makes use of the Web of Trust ontology (WOT). WOT allows for RDF documents to be signed using Digital Signatures and Public Key Cryptography.

Whilst putting together the foaf validator, which checks the semantics of a RDF document to ensure that it is a well formed foaf:PersonalProfileDocument, I came across these two different methods of using the Web of Trust ontology.

Linking to an armored digital signature using the WOT ontology from your FOAF file:

Step 0: Declare the wot namespace in the FOAF file

<BR><br /> @prefix wot: <http://xmlns.com/wot/0.1/> .<BR><br />

Step 1

Add a triple from the Document pointing to the digital signature like so:

<BR><br /> <> wot:assurance <http://foo.com/foaf.rdf.asc> .<BR><br />

Step 2

Add a triples associating the public key used to sign the FOAF document to the FOAF person. This can be done in one of two ways, like so:

Style 1

<BR><br /> _:bnode0 a <http://xmlns.com/wot/0.1/PubKey> .<br /> _:bnode0 dc:title &#8220;Public Key Bnode&#8221; .<br /> _:bnode0 wot:fingerprint &#8220;FW89F7WF78SD8F7SD7FG21JL213192&#8221; .<br /> _:bnode0 wot:hex_id &#8220;12A75E9B&#8221; .<br /> _:bnode0 wot:identity <#me> .<br /> _:bnode0 wot:pubkeyAddress <http://foo.com/me.pubkey.asc> <br />

This is how I sign my FOAF file

Style 2

<BR><br /> <#me> wot:hasKey _:bnode0 .<br /> _:bnode0 a <http://xmlns.com/wot/0.1/PubKey> .<br /> _:bnode0 wot:pubkeyAddress <http://foo.com/me.pubkey.asc> <br /> _:bnode0 dc:title &#8220;Public Key Bnode&#8221; .<br /> _:bnode0 wot:fingerprint &#8220;FW89F7WF78SD8F7SD7FG21JL213192&#8221; .<br /> _:bnode0 wot:hex_id &#8220;12A75E9B&#8221; .<br />

This is how Kjetil signs his FOAF file

These two methods of associating a publicKey to a FOAF WebID, which is in turn can be used to digitally sign a FOAF file are both supported by Garlikā€™s FOAF validator.