Re: Current examples for creating keys, updating and getting freesites

Michael Pearce <michaelgpearce-/[email protected]> Tue, 12 Nov 2013 01:16:40 -0800 (PST)
Newsgroups gmane.network.freenet.technical
Message-ID <[email protected]>
--===============2105802156==
Content-Type: multipart/alternative; boundary="1018116533-356992574-1384247800=:59375"

--1018116533-356992574-1384247800=:59375
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

I just noticed... the AntiSpamHash should also include the sender's identif=
ier to avoid the sender using a nonce from a message already sent to the re=
cipient and avoiding calculating the AntiSpamHash.=0A=0A=0A=0AOn Tuesday, N=
ovember 12, 2013 1:07 AM, Michael Pearce <michaelgpearce-/[email protected]> wrote:=
=0A =0AThanks for the response! =A0All good information. =A0Its fun to thin=
k about how to build a system with the very specific constraints that Freen=
et imposes.=0A=0AI'm not building a messaging application per se, but users=
 will need to communicate and most identities will not be very long-lived. =
=A0This is leading me towards thinking I can get away with a single key to =
announce new messages. =A0I was also thinking about adding a Nonce to the m=
essage combined with an expensive hashing algorithm (i.e. BCrypt) so spammi=
ng a user takes some work on the spammer's side.=A0=0A=0AA sender would cre=
ate a message similar to:=0A=0ASender <- my public identifier=0A=0ARecipien=
t <- recipient's public identifer=0ANonce <- unique value to this recipient=
 from the sender for this message=0A=0ASenderSignature <- sender signs mess=
age with (recipient, nonce) to ensure sender is who he says he is=0AAntiSpa=
mHash <- Bcrypt(recipient, nonce, minimum_rounds) to force some work on the=
 sender=0A=0AMessageBodyId <- location of signed/encrypted message body loc=
ated at a different Freenet key=0A=0AAs a receiver checking for incoming me=
ssages, he only fetches the message body for messages that:=0A=0A* Have him=
self as the recipient=0A* Have a unique Nonce from the sender (no duplicate=
s to avoid signature / anti-spam value stealing)=0A* Correct signature at S=
enderSignature=0A* Correct AntiSpamHash=0A=0AIf all of these match, the rec=
eiver will then retrieve the message body.=0A=0AI think the above scheme wi=
ll allow for looking at the shared key pretty quickly, and a computationall=
y expensive AntiSpamHash will disincentivize large amounts of spam. =A0Defi=
nitely not perfect but it may be good enough for my needs.=0A=0A=0A=0AOn Su=
nday, November 10, 2013 2:38 PM, Steve Dougherty <steve-kVTqj8yhOEv2eFz/[email protected]> wrot=
e:=0A =0AOn 11/10/2013 12:45 AM, Michael Pearce wrote:=0A> Hi Steve.=0A> =
=0A> I'm using Ruby and the library for Ruby is... well... a little out of=
=0A> date.=A0 There were a couple of quick changes to make (syntax for Ruby=
=0A> 1.9 and library changes), but i was having a hard time getting things=
=0A> to work with making a blocking=0A request...=A0 Since i really want to=
 do=0A> just a few simple things, i'll most likely roll my own library and=
=0A> publish as a Ruby Gem.=0A=0AAlright, sounds good.=0A=0A> I did have an=
other question: How do applications such as a "chat"=0A> work?=A0 The only =
way that I could think of is to have multiple clients=0A> sharing the same =
SSK private key, publish to a USK to write a new=0A> message, then read all=
 versions of with the public key to see what=0A> others have written.=A0 Is=
 this even close?=0A=0AThat could work, but it would be problematic. With t=
his kind of approach=0Aone malicious person can spam messages to that singl=
e key so that no one=0Acan reliably send messages.=0A=0AThe problem to solv=
e=0A here is finding other identities to fetch messages=0Afrom. My understa=
nding is that FMS and FLIP (examples of forums and chat=0Arespectively) hav=
e a shared key for announcing identities, and after=0Athat each identity in=
serts messages to their own private SSK.=0AIndividuals can then be ignored =
at will, and all a malicious individual=0Acan do - at least at a key level =
- is overwhelm the announcement=0Amechanism. This is often coupled with a t=
rust/scoring system where in=0Aaddition to publishing messages, identities =
publish a trust list, and=0Agive bad scores to spammers or those who abuse =
their trust list.=0A=0AIf you want to do something like this, you could rol=
l your own identity=0Aannouncement, or make use of an established system li=
ke Web of=0A Trust=0A(WoT) or Less Crappy Web of Trust (LCWoT). [0][1] WoT =
provides identity=0Acreation and announcement. Unlike FMS and FLIP, it does=
 not use a shared=0Aannouncement key. Instead it ships with a list of trust=
ed "seed=0Aidentities" that already run the software, and add at neutral tr=
ust=0Athose who solve CAPTCHAs they publish. LCWoT was written due to=0Afru=
stration with WoT's performance and stability, and only supports=0Aestablis=
hed identities.=0A=0A-Steve=0A=0A[0] https://github.com/freenet/plugin-WoT-=
staging/=0A=0A[1] https://github.com/tmarkus/LessCrappyWebOfTrust=0A=0A=0A_=
______________________________________________=0ATech mailing list=0ATech@f=
reenetproject.org=0Ahttps://emu.freenetproject.org/cgi-bin/mailman/listinfo=
/tech=0A=0A=0A=0A_______________________________________________=0ATech mai=
ling [email protected]=0Ahttps://emu.freenetproject.org/cgi-bi=
n/mailman/listinfo/tech
--1018116533-356992574-1384247800=:59375
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"color:#000; background-color:#fff; font-family:He=
lveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;fo=
nt-size:10pt"><div>I just noticed... the AntiSpamHash should also include t=
he sender's identifier to avoid the sender using a nonce from a message alr=
eady sent to the recipient and avoiding calculating the AntiSpamHash.</div>=
<div class=3D"yahoo_quoted" style=3D"display: block;"> <br> <br> <div style=
=3D"font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida=
 Grande', sans-serif; font-size: 10pt;"> <div style=3D"font-family: Helveti=
caNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; fo=
nt-size: 12pt;"> <div dir=3D"ltr"> <font size=3D"2" face=3D"Arial"> On Tues=
day, November 12, 2013 1:07 AM, Michael Pearce &lt;michaelgpearce-/[email protected]=
&gt; wrote:<br> </font> </div>  <div class=3D"y_msg_container"><div id=3D"y=
iv2746378782"><div><div style=3D"color: rgb(0, 0, 0); background-color: rgb=
(255, 255,
 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Luc=
ida Grande', sans-serif; font-size: 10pt;"><div id=3D"yiv2746378782"><div><=
div style=3D"background-color: rgb(255, 255, 255); font-family: HelveticaNe=
ue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"><div =
id=3D"yiv2746378782yui_3_13_0_8_1384062362554_8" style=3D"color: rgb(0, 0, =
0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida=
 Grande', sans-serif; font-size: 10pt;">Thanks for the response! &nbsp;All =
good information. &nbsp;Its fun to think about how to build a system with t=
he very specific constraints that Freenet imposes.</div><div id=3D"yiv27463=
78782yui_3_13_0_8_1384062362554_8" style=3D"color: rgb(0, 0, 0); font-famil=
y: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans=
-serif; font-size: 10pt;"><br clear=3D"none"></div><div id=3D"yiv2746378782=
yui_3_13_0_8_1384062362554_8" style=3D"color: rgb(0, 0, 0); font-family:
 HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-s=
erif; font-size: 10pt;">I'm not building a messaging application per se, bu=
t users will need to communicate and most identities will not be very long-=
lived. &nbsp;This is leading me towards thinking I can get away with a sing=
le key to announce new messages. &nbsp;I was also thinking about adding a N=
once to the message combined with an expensive hashing algorithm (i.e. BCry=
pt) so spamming a user takes some work on the spammer's side.&nbsp;</div><d=
iv id=3D"yiv2746378782yui_3_13_0_8_1384062362554_8" style=3D"color: rgb(0, =
0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Luc=
ida Grande', sans-serif; font-size: 10pt;"><br clear=3D"none"></div><div id=
=3D"yiv2746378782yui_3_13_0_8_1384062362554_8" style=3D"color: rgb(0, 0, 0)=
; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida G=
rande', sans-serif; font-size: 10pt;">A sender would create a message=0A si=
milar to:</div><div id=3D"yiv2746378782yui_3_13_0_8_1384062362554_8" style=
=3D"color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helv=
etica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"><br clear=3D"n=
one"></div><div id=3D"yiv2746378782yui_3_13_0_8_1384062362554_8" style=3D"c=
olor: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica=
, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"><span style=3D"font=
-size:10pt;">Sender &lt;- my public identifier</span><br clear=3D"none"></d=
iv><div id=3D"yiv2746378782yui_3_13_0_8_1384062362554_8"><div id=3D"yiv2746=
378782yui_3_13_0_8_1384062362554_8">Recipient &lt;- recipient's public iden=
tifer</div><div id=3D"yiv2746378782yui_3_13_0_8_1384062362554_8"><span styl=
e=3D"font-size:10pt;">Nonce &lt;- unique value to this recipient from the s=
ender for this message</span><br clear=3D"none"></div><div id=3D"yiv2746378=
782yui_3_13_0_8_1384062362554_8">SenderSignature &lt;- sender signs message=
 with (recipient,
 nonce) to ensure sender is who he=0A says he is</div><div id=3D"yiv2746378=
782yui_3_13_0_8_1384062362554_8"><span style=3D"font-size:10pt;">AntiSpamHa=
sh &lt;- Bcrypt(recipient, nonce, minimum_rounds) to force some work on the=
 sender</span><br clear=3D"none"></div><div id=3D"yiv2746378782yui_3_13_0_8=
_1384062362554_8">MessageBodyId &lt;- location of signed/encrypted message =
body located at a different Freenet key</div><div style=3D"color: rgb(0, 0,=
 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucid=
a Grande', sans-serif; font-size: 10pt;"><br clear=3D"none"></div><div styl=
e=3D"color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Hel=
vetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;">As a receiver=
 checking for incoming messages, he only fetches the message body for messa=
ges that:</div><div style=3D"color: rgb(0, 0, 0); font-family: HelveticaNeu=
e, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-si=
ze: 10pt;"><br clear=3D"none"></div><div
 style=3D"color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue'=
, Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;">* Have h=
imself as the recipient</div><div style=3D"color: rgb(0, 0, 0); font-family=
: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-=
serif; font-size: 10pt;">* Have a unique Nonce from the sender (no duplicat=
es to avoid signature / anti-spam value stealing)</div><div style=3D"color:=
 rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Ari=
al, 'Lucida Grande', sans-serif; font-size: 10pt;">* Correct signature at S=
enderSignature</div><div style=3D"color: rgb(0, 0, 0); font-family: Helveti=
caNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; fo=
nt-size: 10pt;">* Correct AntiSpamHash</div><div style=3D"color: rgb(0, 0, =
0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida=
 Grande', sans-serif; font-size: 10pt;"><br clear=3D"none"></div><div
 style=3D"color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue'=
, Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;">If all o=
f these match, the receiver will then retrieve the message body.</div><div =
style=3D"color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue',=
 Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"><br clear=
=3D"none"></div><div style=3D"color: rgb(0, 0, 0); font-family: HelveticaNe=
ue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-s=
ize: 10pt;">I think the above scheme will allow for looking at the shared k=
ey pretty quickly, and a computationally expensive AntiSpamHash will disinc=
entivize large amounts of spam. &nbsp;Definitely not perfect but it may be =
good enough for my needs.</div></div><div class=3D"yiv2746378782yahoo_quote=
d" id=3D"yiv2746378782yui_3_13_0_8_1384062362554_10" style=3D"display: bloc=
k;"> <br clear=3D"none"> <br clear=3D"none"> <div
 class=3D"yiv2746378782yui_3_13_0_1_1384062362554_15116" style=3D"font-fami=
ly: HelveticaNeue, 'Helvetica  Neue', Helvetica, Arial, 'Lucida Grande', sa=
ns-serif; font-size: 10pt;"> <div class=3D"yiv2746378782yui_3_13_0_1_138406=
2362554_15117" style=3D"font-family: HelveticaNeue, 'Helvetica Neue', Helve=
tica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div class=3D"=
yiv2746378782yqt0784170282" id=3D"yiv2746378782yqtfd33506"><div class=3D"yi=
v2746378782yqt5938547798" id=3D"yiv2746378782yqtfd15879"><div dir=3D"ltr"> =
<font size=3D"2" face=3D"Arial"> On Sunday, November 10, 2013 2:38 PM, Stev=
e Dougherty &lt;steve-kVTqj8yhOEv2eFz/[email protected]&gt; wrote:<br clear=3D"none"> </font> <=
/div>  <div class=3D"yiv2746378782y_msg_container">On 11/10/2013 12:45 AM, =
Michael Pearce wrote:<br clear=3D"none">&gt; Hi Steve.<br clear=3D"none">&g=
t; <br clear=3D"none">&gt; I'm using Ruby and the library for Ruby is... we=
ll... a little out of<br clear=3D"none">&gt; date.&nbsp; There were a coupl=
e of quick changes to make
 (syntax for Ruby<br clear=3D"none">&gt; 1.9 and library changes), but i wa=
s having a hard time getting things<br clear=3D"none">&gt; to work with mak=
ing a blocking=0A request...&nbsp; Since i really want to do<br clear=3D"no=
ne">&gt; just a few simple things, i'll most likely roll my own library and=
<br clear=3D"none">&gt; publish as a Ruby Gem.<br clear=3D"none"><br clear=
=3D"none">Alright, sounds good.<br clear=3D"none"><br clear=3D"none">&gt; I=
 did have another question: How do applications such as a "chat"<br clear=
=3D"none">&gt; work?&nbsp; The only way that I could think of is to have mu=
ltiple clients<br clear=3D"none">&gt; sharing the same SSK private key, pub=
lish to a USK to write a new<br clear=3D"none">&gt; message, then read all =
versions of with the public key to see what<br clear=3D"none">&gt; others h=
ave written.&nbsp; Is this even close?<br clear=3D"none"><br clear=3D"none"=
>That could work, but it would be problematic. With this kind of approach<b=
r clear=3D"none">one malicious person can spam messages to that single key =
so that no one<br clear=3D"none">can reliably send messages.<br clear=3D"no=
ne"><br clear=3D"none">The problem to solve=0A here is finding other identi=
ties to fetch messages<br clear=3D"none">from. My understanding is that FMS=
 and FLIP (examples of forums and chat<br clear=3D"none">respectively) have=
 a shared key for announcing identities, and after<br clear=3D"none">that e=
ach identity inserts messages to their own private SSK.<br clear=3D"none">I=
ndividuals can then be ignored at will, and all a malicious individual<br c=
lear=3D"none">can do - at least at a key level - is overwhelm the announcem=
ent<br clear=3D"none">mechanism. This is often coupled with a trust/scoring=
 system where in<br clear=3D"none">addition to publishing messages, identit=
ies publish a trust list, and<br clear=3D"none">give bad scores to spammers=
 or those who abuse their trust list.<br clear=3D"none"><br clear=3D"none">=
If you want to do something like this, you could roll your own identity<br =
clear=3D"none">announcement, or make use of an established system like Web =
of=0A Trust<br clear=3D"none">(WoT) or Less Crappy Web of Trust (LCWoT). [0=
][1] WoT provides identity<br clear=3D"none">creation and announcement. Unl=
ike FMS and FLIP, it does not use a shared<br clear=3D"none">announcement k=
ey. Instead it ships with a list of trusted "seed<br clear=3D"none">identit=
ies" that already run the software, and add at neutral trust<br clear=3D"no=
ne">those who solve CAPTCHAs they publish. LCWoT was written due to<br clea=
r=3D"none">frustration with WoT's performance and stability, and only suppo=
rts<br clear=3D"none">established identities.<br clear=3D"none"><br clear=
=3D"none">-Steve<br clear=3D"none"><br clear=3D"none">[0] <a rel=3D"nofollo=
w" shape=3D"rect" target=3D"_blank" href=3D"https://github.com/freenet/plug=
in-WoT-staging/">https://github.com/freenet/plugin-WoT-staging/</a><div cla=
ss=3D"yiv2746378782yqt2883222496" id=3D"yiv2746378782yqtfd18893"><br clear=
=3D"none">[1] </div><a rel=3D"nofollow" shape=3D"rect" target=3D"_blank"
 href=3D"https://github.com/tmarkus/LessCrappyWebOfTrust">https://github.co=
m/tmarkus/LessCrappyWebOfTrust</a><div class=3D"yiv2746378782yqt2883222496"=
 id=3D"yiv2746378782yqtfd24784"><br clear=3D"none"></div><br clear=3D"none"=
><div class=3D"yiv2746378782yqt2883222496" id=3D"yiv2746378782yqtfd68668">_=
______________________________________________<br clear=3D"none">Tech maili=
ng list<br clear=3D"none"><a rel=3D"nofollow" shape=3D"rect" ymailto=3D"mai=
lto:[email protected]" target=3D"_blank" href=3D"mailto:Tech@freenetp=
roject.org">[email protected]</a><br clear=3D"none"><a rel=3D"nofollo=
w" shape=3D"rect" target=3D"_blank" href=3D"https://emu.freenetproject.org/=
cgi-bin/mailman/listinfo/tech">https://emu.freenetproject.org/cgi-bin/mailm=
an/listinfo/tech</a></div><br clear=3D"none"><br clear=3D"none"></div>  </d=
iv></div></div><div class=3D"yiv2746378782yqt5938547798" id=3D"yiv274637878=
2yqtfd50487"><div class=3D"yiv2746378782yqt0784170282" id=3D"yiv2746378782y=
qtfd23966"> </div></div></div><div
 class=3D"yiv2746378782yqt5938547798" id=3D"yiv2746378782yqtfd65539"><div c=
lass=3D"yiv2746378782yqt0784170282" id=3D"yiv2746378782yqtfd02499">  </div>=
</div></div><div class=3D"yiv2746378782yqt5938547798" id=3D"yiv2746378782yq=
tfd08077"><div class=3D"yiv2746378782yqt0784170282" id=3D"yiv2746378782yqtf=
d19802" style=3D"color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetic=
a Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"> =
</div></div></div></div></div></div></div></div><br><div class=3D"yqt593854=
7798" id=3D"yqtfd47484">_______________________________________________<br =
clear=3D"none">Tech mailing list<br clear=3D"none"><a shape=3D"rect" ymailt=
o=3D"mailto:[email protected]" href=3D"mailto:[email protected]=
">[email protected]</a><br clear=3D"none"><a shape=3D"rect" href=3D"h=
ttps://emu.freenetproject.org/cgi-bin/mailman/listinfo/tech" target=3D"_bla=
nk">https://emu.freenetproject.org/cgi-bin/mailman/listinfo/tech</a></div><=
br><br></div>  </div> </div>=20
 </div> </div></body></html>
--1018116533-356992574-1384247800=:59375--

--===============2105802156==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tech mailing list
[email protected]
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/tech
--===============2105802156==--