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

Michael Pearce <michaelgpearce-/[email protected]> Sat, 9 Nov 2013 21:45:25 -0800 (PST)
Newsgroups gmane.network.freenet.technical
Message-ID <[email protected]>
--===============0175705685==
Content-Type: multipart/alternative; boundary="691502144-1810511973-1384062325=:20771"

--691502144-1810511973-1384062325=:20771
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Steve.=0A=0AI'm using Ruby and the library for Ruby is... well... a litt=
le out of date. =A0There were a couple of quick changes to make (syntax for=
 Ruby 1.9 and library changes), but i was having a hard time getting things=
 to work with making a blocking request... =A0Since i really want to do jus=
t a few simple things, i'll most likely roll my own library and publish as =
a Ruby Gem.=0A=0AI did have another question:=0AHow do applications such as=
 a "chat" work? =A0The only way that I could think of is to have multiple c=
lients sharing the same SSK private key, publish to a USK to write a new me=
ssage, then read all versions of with the public key to see what others hav=
e written. =A0Is this even close?=0A=0A=0A=0A=0AOn Saturday, November 9, 20=
13 8:24 PM, Steve Dougherty <steve-kVTqj8yhOEv2eFz/[email protected]> wrote:=0A =0AOn 11/08/201=
3 03:43 AM, Michael Pearce wrote:=0A> Hey all.=0A> =0A> I'm wanting to use =
Freenet to store small pieces of JSON data.=A0 I'm=0A> wanting to do the fo=
llowing operations:=0A> =0A> * Generate a new Public / Private Key Pair=0A>=
 * Insert / Update a JSON string of data using the above private key=0A> * =
Get the JSON string using the public key=0A> =0A> In the documentation for =
SSK, it shows an example of doing this via=0A> telnet (on port 2323, which =
i can't connect to):=0A> https://wiki.freenetproject.org/Signed_Subspace_Ke=
y.  I attempted the=0A> MAKESSK telnetting to port 9481 but it didn't work.=
=A0 From what i can=0A> tell, this may no longer be the preferred way to do=
 things.=0A> =0A> I then looked at the FCP docs at=0A> https://wiki.freenet=
project.org/FCPv2, which i'm gonna guess is what=0A> i should be doing.=A0 =
I then tried the following:=0A> =0A> ~/projects/ $ telnet 127.0.0.1 9481 Tr=
ying 127.0.0.1... Connected to=0A> localhost. Escape character is '^]'. Gen=
erateSSK Identifier=3DMy=0A> Identifier Blah Blah EndMessage Connection clo=
sed by foreign host.=0A> =0A> It does not look to have generated a key.=0A>=
 =0A> Is there any example that i may have missed in my googling?=0A> =0A> =
Thanks!=0A> =0A> -mike=0A=0ASorry for the confusion! It looks like there's =
a bug. In this case the=0Anode should have responded before closing the con=
nection:=0A=0AProtocolError=0AFatal=3Dtrue=0ACodeDescription=3DClientHello =
must be first message=0ACode=3D1=0AGlobal=3Dfalse=0AEndMessage=0A=0ASo to g=
enerate an SSK keypair:=0A=0A$ telnet localhost 9481=0A...=0AClientHello=0A=
Name=3DTestingStuff=0AExpectedVersion=3D2.0=0AEnd=0A=0AThe node will give a=
 NodeHello.=0A=0AGenerateSSK=0AEnd=0A=0AThe identifier field is not require=
d for GenerateSSK. [1]=0A=0AThat said, there's no particular need to build =
your own library unless=0Ayou'd like to. For instance, there is lib-pyFreen=
et for Python. [2]=0AInserting and fetching files are basic operations, and=
 I hope would not=0Arequire special work to use.=0A=0A-Steve=0A=0A[0] https=
://wiki.freenetproject.org/FCPv2/ClientHello=0A[1] https://wiki.freenetproj=
ect.org/FCPv2/GenerateSSK=0A=0A[2] https://github.com/freenet/lib-pyFreenet=
-staging=0A=0A_______________________________________________=0ATech mailin=
g [email protected]=0Ahttps://emu.freenetproject.org/cgi-bin/m=
ailman/listinfo/tech
--691502144-1810511973-1384062325=:20771
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><span>Hi Steve.</span></div><div style=3D"color: rgb(0, =
0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helve=
tica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; fo=
nt-style: normal;"><span><br></span></div><div style=3D"color: rgb(0, 0, 0)=
; font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica,=
 Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-st=
yle: normal;"><span>I'm using Ruby and the library for Ruby is... well... a=
 little out of date. &nbsp;There were a couple of quick changes to make (sy=
ntax for Ruby 1.9 and library changes), but i was having a hard time gettin=
g things to work with making a blocking request... &nbsp;Since i really wan=
t to do just a few simple things, i'll most likely roll my own library and
 publish as a Ruby Gem.</span></div><div style=3D"color: rgb(0, 0, 0); font=
-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial=
, 'Lucida Grande', sans-serif; background-color: transparent; font-style: n=
ormal;"><span><br></span></div><div style=3D"color: rgb(0, 0, 0); font-size=
: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lu=
cida Grande', sans-serif; background-color: transparent; font-style: normal=
;"><span>I did have another question:</span></div><div style=3D"color: rgb(=
0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', He=
lvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent;=
 font-style: normal;"><span style=3D"background-color: transparent;">How do=
 applications such as a "chat" work? &nbsp;The only way that I could think =
of is to have multiple clients sharing the same SSK private key, publish to=
 a USK to write a new message, then read all versions of with the public ke=
y
 to see what others have written. &nbsp;Is this even close?</span><br></div=
><div class=3D"yahoo_quoted" style=3D"display: block;"> <br> <br> <div styl=
e=3D"font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucid=
a Grande', sans-serif; font-size: 10pt;"> <div style=3D"font-family: Helvet=
icaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; f=
ont-size: 12pt;"> <div dir=3D"ltr"> <font size=3D"2" face=3D"Arial"> On Sat=
urday, November 9, 2013 8:24 PM, Steve Dougherty &lt;steve-kVTqj8yhOEv2eFz/[email protected]&gt=
; wrote:<br> </font> </div>  <div class=3D"y_msg_container">On 11/08/2013 0=
3:43 AM, Michael Pearce wrote:<br clear=3D"none">&gt; Hey all.<br clear=3D"=
none">&gt; <br clear=3D"none">&gt; I'm wanting to use Freenet to store smal=
l pieces of JSON data.&nbsp; I'm<br clear=3D"none">&gt; wanting to do the f=
ollowing operations:<br clear=3D"none">&gt; <br clear=3D"none">&gt; * Gener=
ate a new Public / Private Key Pair<br clear=3D"none">&gt; * Insert / Updat=
e a JSON string of data
 using the above private key<br clear=3D"none">&gt; * Get the JSON string u=
sing the public key<br clear=3D"none">&gt; <br clear=3D"none">&gt; In the d=
ocumentation for SSK, it shows an example of doing this via<br clear=3D"non=
e">&gt; telnet (on port 2323, which i can't connect to):<br clear=3D"none">=
&gt; <a shape=3D"rect" href=3D"https://wiki.freenetproject.org/Signed_Subsp=
ace_Key." target=3D"_blank">https://wiki.freenetproject.org/Signed_Subspace=
_Key. </a> I attempted the<br clear=3D"none">&gt; MAKESSK telnetting to por=
t 9481 but it didn't work.&nbsp; From what i can<br clear=3D"none">&gt; tel=
l, this may no longer be the preferred way to do things.<br clear=3D"none">=
&gt; <br clear=3D"none">&gt; I then looked at the FCP docs at<br clear=3D"n=
one">&gt; <a shape=3D"rect" href=3D"https://wiki.freenetproject.org/FCPv2,"=
 target=3D"_blank">https://wiki.freenetproject.org/FCPv2, </a>which i'm gon=
na guess is what<br clear=3D"none">&gt; i should be doing.&nbsp; I then tri=
ed the following:<br
 clear=3D"none">&gt; <br clear=3D"none">&gt; ~/projects/ $ telnet 127.0.0.1=
 9481 Trying 127.0.0.1... Connected to<br clear=3D"none">&gt; localhost. Es=
cape character is '^]'. GenerateSSK Identifier=3DMy<br clear=3D"none">&gt; =
Identifier Blah Blah EndMessage Connection closed by foreign host.<br clear=
=3D"none">&gt; <br clear=3D"none">&gt; It does not look to have generated a=
 key.<br clear=3D"none">&gt; <br clear=3D"none">&gt; Is there any example t=
hat i may have missed in my googling?<br clear=3D"none">&gt; <br clear=3D"n=
one">&gt; Thanks!<br clear=3D"none">&gt; <br clear=3D"none">&gt; -mike<br c=
lear=3D"none"><br clear=3D"none">Sorry for the confusion! It looks like the=
re's a bug. In this case the<br clear=3D"none">node should have responded b=
efore closing the connection:<br clear=3D"none"><br clear=3D"none">Protocol=
Error<br clear=3D"none">Fatal=3Dtrue<br clear=3D"none">CodeDescription=3DCl=
ientHello must be first message<br clear=3D"none">Code=3D1<br clear=3D"none=
">Global=3Dfalse<br
 clear=3D"none">EndMessage<br clear=3D"none"><br clear=3D"none">So to gener=
ate an SSK keypair:<br clear=3D"none"><br clear=3D"none">$ telnet localhost=
 9481<br clear=3D"none">...<br clear=3D"none">ClientHello<br clear=3D"none"=
>Name=3DTestingStuff<br clear=3D"none">ExpectedVersion=3D2.0<br clear=3D"no=
ne">End<br clear=3D"none"><br clear=3D"none">The node will give a NodeHello=
.<br clear=3D"none"><br clear=3D"none">GenerateSSK<br clear=3D"none">End<br=
 clear=3D"none"><br clear=3D"none">The identifier field is not required for=
 GenerateSSK. [1]<br clear=3D"none"><br clear=3D"none">That said, there's n=
o particular need to build your own library unless<br clear=3D"none">you'd =
like to. For instance, there is lib-pyFreenet for Python. [2]<br clear=3D"n=
one">Inserting and fetching files are basic operations, and I hope would no=
t<br clear=3D"none">require special work to use.<br clear=3D"none"><br clea=
r=3D"none">-Steve<br clear=3D"none"><br clear=3D"none">[0] <a shape=3D"rect=
"
 href=3D"https://wiki.freenetproject.org/FCPv2/ClientHello" target=3D"_blan=
k">https://wiki.freenetproject.org/FCPv2/ClientHello</a><br clear=3D"none">=
[1] <a shape=3D"rect" href=3D"https://wiki.freenetproject.org/FCPv2/Generat=
eSSK" target=3D"_blank">https://wiki.freenetproject.org/FCPv2/GenerateSSK</=
a><div class=3D"yqt6562693193" id=3D"yqtfd90044"><br clear=3D"none">[2] </d=
iv><a shape=3D"rect" href=3D"https://github.com/freenet/lib-pyFreenet-stagi=
ng" target=3D"_blank">https://github.com/freenet/lib-pyFreenet-staging</a><=
div class=3D"yqt6562693193" id=3D"yqtfd79904"><br clear=3D"none"></div><br>=
_______________________________________________<br clear=3D"none">Tech mail=
ing list<br clear=3D"none"><a shape=3D"rect" ymailto=3D"mailto:Tech@freenet=
project.org" href=3D"mailto:[email protected]">[email protected]=
g</a><br clear=3D"none"><a shape=3D"rect" href=3D"https://emu.freenetprojec=
t.org/cgi-bin/mailman/listinfo/tech"
 target=3D"_blank">https://emu.freenetproject.org/cgi-bin/mailman/listinfo/=
tech</a><br><br></div>  </div> </div>  </div> </div></body></html>
--691502144-1810511973-1384062325=:20771--

--===============0175705685==
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
--===============0175705685==--