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

Steve Dougherty <steve-kVTqj8yhOEv2eFz/[email protected]> Sat, 09 Nov 2013 23:24:10 -0500
Newsgroups gmane.network.freenet.technical
Message-ID <[email protected]>
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--===============1358728716==
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="u5FOdNGapsRBDRALk6TUlTE99xRda0RWW"

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--u5FOdNGapsRBDRALk6TUlTE99xRda0RWW
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 11/08/2013 03:43 AM, Michael Pearce wrote:
> Hey all.
>=20
> I'm wanting to use Freenet to store small pieces of JSON data.  I'm
> wanting to do the following operations:
>=20
> * Generate a new Public / Private Key Pair
> * Insert / Update a JSON string of data using the above private key
> * Get the JSON string using the public key
>=20
> In the documentation for SSK, it shows an example of doing this via
> telnet (on port 2323, which i can't connect to):
> https://wiki.freenetproject.org/Signed_Subspace_Key.  I attempted the
> MAKESSK telnetting to port 9481 but it didn't work.  From what i can
> tell, this may no longer be the preferred way to do things.
>=20
> I then looked at the FCP docs at
> https://wiki.freenetproject.org/FCPv2, which i'm gonna guess is what
> i should be doing.  I then tried the following:
>=20
> ~/projects/ $ telnet 127.0.0.1 9481 Trying 127.0.0.1... Connected to
> localhost. Escape character is '^]'. GenerateSSK Identifier=3DMy
> Identifier Blah Blah EndMessage Connection closed by foreign host.
>=20
> It does not look to have generated a key.
>=20
> Is there any example that i may have missed in my googling?
>=20
> Thanks!
>=20
> -mike

Sorry for the confusion! It looks like there's a bug. In this case the
node should have responded before closing the connection:

ProtocolError
Fatal=3Dtrue
CodeDescription=3DClientHello must be first message
Code=3D1
Global=3Dfalse
EndMessage

So to generate an SSK keypair:

$ telnet localhost 9481
=2E..
ClientHello
Name=3DTestingStuff
ExpectedVersion=3D2.0
End

The node will give a NodeHello.

GenerateSSK
End

The identifier field is not required for GenerateSSK. [1]

That said, there's no particular need to build your own library unless
you'd like to. For instance, there is lib-pyFreenet for Python. [2]
Inserting and fetching files are basic operations, and I hope would not
require special work to use.

-Steve

[0] https://wiki.freenetproject.org/FCPv2/ClientHello
[1] https://wiki.freenetproject.org/FCPv2/GenerateSSK
[2] https://github.com/freenet/lib-pyFreenet-staging


--u5FOdNGapsRBDRALk6TUlTE99xRda0RWW
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJSfwpyAAoJECLJP19KqmFuJZMQAIwF3pCY7AWQElRg9Um3ckN4
8OuI6ZdVOJAwRg3JHQQY89UOE3qjlwo3mjqeWHamyxNWRSKMCvorN2NR1K6XHnIE
bWeYpc7QwI3ur4oLr5mmhSqEwXROgNDUcfJJ/NPUp4HA9nzj5H/gkKG39asVxrN1
A9krK8nMZDM3U285OoRFvv8QE/CghqTO5deRyxEECya1kAwevLOnte4BtiuJXlc6
o/3Y+3gJBtVTLNLhv4DkhnMrt0HpoQiCa4mx4qlh3ey/c9cBLNK643COrNeVPtnS
XoIAZByZMNF6X89Gc+c1Qikwd4bYwvZaQ3uBoHD5niI0tL8THt9XU92fxC47k51x
b2YhmGFrpDNAEOCpNNirZ6oIJUzQk/u8BoKO84cACKWF/2oUl10gtCElFZXHKxkl
CFQamZGtWlA2T2rYfgMOjde/Rp/CRR83RG68U+4pJqNN24wXrLFYPFyJIhOMQ9MA
M7Q+IU5jeiYGk3MmuQHu2ZXp+0JQwStrJ4CQsds27cuzkeqXWCWpLcZKXGPpERG9
BZ2iBXpzAzeAV8tqVH4bHCWIE9gy7a9f6Ib5t+mMx13xcPgYm5pHDJRRCmnOIKBu
e/IrfrzFLN+BX5tnFxtLiPJt85+GBrkj7iFx2HmmduwNl2weTiL5QtAGaeyIXNbs
HXtmmsMb0mHmqQsAG1Gj
=/ssC
-----END PGP SIGNATURE-----

--u5FOdNGapsRBDRALk6TUlTE99xRda0RWW--

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