Artifact 299fffb9d7514bca7e78055f3bd4501790b6811b:
- File wiki/try-it.md — part of check-in [eed1c3e195] at 2019-03-04 22:33:10 on branch trunk — Markdown edits (user: bernd size: 2607)
0000: 23 20 54 72 79 20 69 74 20 23 0a 0a 41 66 74 65 # Try it #..Afte 0010: 72 20 79 6f 75 20 5b 67 6f 74 20 69 74 5d 28 67 r you [got it](g 0020: 65 74 2d 69 74 2e 6d 64 29 2c 20 79 6f 75 20 63 et-it.md), you c 0030: 61 6e 20 74 72 79 20 6e 65 74 32 6f 20 28 73 65 an try net2o (se 0040: 65 20 62 65 6c 6f 77 29 20 65 69 74 68 65 72 20 e below) either 0050: 62 79 0a 73 74 61 72 74 69 6e 67 20 6e 65 74 32 by.starting net2 0060: 6f 20 77 69 74 68 0a 0a 20 20 20 20 6e 32 6f 20 o with.. n2o 0070: 63 6d 64 0a 0a 61 6e 64 20 65 6e 74 65 72 20 6e cmd..and enter n 0080: 65 74 32 6f 20 63 6f 6d 6d 61 6e 64 20 6d 6f 64 et2o command mod 0090: 65 2c 20 6f 72 20 62 79 20 72 75 6e 6e 69 6e 67 e, or by running 00a0: 20 65 61 63 68 20 63 6f 6d 6d 61 6e 64 20 77 69 each command wi 00b0: 74 68 0a 0a 20 20 20 20 6e 32 6f 20 3c 63 6f 6d th.. n2o <com 00c0: 6d 61 6e 64 3e 0a 0a 69 6e 20 74 68 65 20 73 65 mand>..in the se 00d0: 63 6f 6e 64 20 63 61 73 65 2c 20 79 6f 75 27 6c cond case, you'l 00e0: 6c 20 62 65 20 61 73 6b 65 64 20 61 67 61 69 6e l be asked again 00f0: 20 61 6e 64 20 61 67 61 69 6e 20 66 6f 72 20 79 and again for y 0100: 6f 75 72 20 70 61 73 73 77 6f 72 64 0a 77 68 65 our password.whe 0110: 6e 20 6e 65 65 64 65 64 2e 0a 0a 59 6f 75 20 63 n needed...You c 0120: 61 6e 20 65 78 65 63 75 74 65 20 74 68 65 20 66 an execute the f 0130: 6f 6c 6c 6f 77 69 6e 67 20 6e 65 74 32 6f 20 73 ollowing net2o s 0140: 63 72 69 70 74 20 63 6f 6d 6d 61 6e 64 73 20 65 cript commands e 0150: 69 74 68 65 72 20 62 79 20 65 6e 74 65 72 69 6e ither by enterin 0160: 67 0a 0a 20 20 20 20 68 65 6c 70 0a 20 20 20 20 g.. help. 0170: 6b 65 79 67 65 6e 20 3c 6e 69 63 6b 3e 0a 0a 54 keygen <nick>..T 0180: 68 69 73 20 77 69 6c 6c 20 61 73 6b 20 66 6f 72 his will ask for 0190: 20 79 6f 75 72 20 70 61 73 73 77 6f 72 64 20 61 your password a 01a0: 6e 64 20 67 65 6e 65 72 61 74 65 20 61 20 6b 65 nd generate a ke 01b0: 79 2e 20 20 57 72 69 74 65 20 64 6f 77 6e 20 74 y. Write down t 01c0: 68 65 0a 62 61 73 65 38 35 20 63 6f 64 65 20 69 he.base85 code i 01d0: 74 20 67 69 76 65 73 20 66 6f 72 20 72 65 76 6f t gives for revo 01e0: 6b 69 6e 67 20 74 68 61 74 20 6b 65 79 3b 20 74 king that key; t 01f0: 68 69 73 20 72 65 76 6f 63 61 74 69 6f 6e 20 6b his revocation k 0200: 65 79 20 69 73 20 6e 6f 74 0a 73 74 6f 72 65 64 ey is not.stored 0210: 20 61 6e 79 77 68 65 72 65 20 65 6c 73 65 2e 20 anywhere else. 0220: 20 46 6f 72 20 73 6f 6d 65 20 74 65 73 74 73 2c For some tests, 0230: 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 72 65 you want to cre 0240: 61 74 65 20 61 20 73 65 63 6f 6e 64 20 6b 65 79 ate a second key 0250: 0a 28 65 2e 67 2e 20 74 6f 20 74 65 73 74 20 63 .(e.g. to test c 0260: 68 61 74 29 2e 20 20 47 69 76 65 20 69 74 20 61 hat). Give it a 0270: 20 64 69 66 66 65 72 65 6e 74 20 70 61 73 73 20 different pass 0280: 70 68 72 61 73 65 3b 20 79 6f 75 20 63 61 6e 20 phrase; you can 0290: 63 72 65 61 74 65 0a 61 73 20 6d 61 6e 79 20 49 create.as many I 02a0: 44 73 20 61 73 20 79 6f 75 20 6c 69 6b 65 3b 20 Ds as you like; 02b0: 69 66 20 74 68 65 79 20 68 61 76 65 20 64 69 66 if they have dif 02c0: 66 65 72 65 6e 74 20 70 61 73 73 70 68 72 61 73 ferent passphras 02d0: 65 73 2c 20 6f 6e 6c 79 20 6f 6e 65 0a 6f 66 20 es, only one.of 02e0: 74 68 65 6d 20 6f 70 65 6e 73 20 61 74 20 61 20 them opens at a 02f0: 74 69 6d 65 2e 0a 0a 43 68 65 63 6b 20 77 68 61 time...Check wha 0300: 74 20 6b 65 79 73 20 79 6f 75 20 68 61 76 65 20 t keys you have 0310: 61 6c 72 65 61 64 79 20 69 6d 70 6f 72 74 65 74 already importet 0320: 3a 0a 0a 20 20 20 20 6b 65 79 6c 69 73 74 0a 0a :.. keylist.. 0330: 54 68 69 73 20 73 68 6f 75 6c 64 20 62 65 20 79 This should be y 0340: 6f 75 72 20 6b 65 79 20 61 6e 64 20 74 68 65 20 our key and the 0350: 6e 65 74 32 6f 2d 64 68 74 72 6f 6f 74 20 6b 65 net2o-dhtroot ke 0360: 79 2e 20 20 49 6d 70 6f 72 74 20 6d 79 20 6b 65 y. Import my ke 0370: 79 0a 0a 20 20 20 20 6b 65 79 73 65 61 72 63 68 y.. keysearch 0380: 20 6b 51 75 73 4a 0a 0a 41 74 20 74 68 65 20 6d kQusJ..At the m 0390: 6f 6d 65 6e 74 2c 20 61 20 33 32 20 62 69 74 20 oment, a 32 bit 03a0: 49 44 20 73 68 6f 75 6c 64 20 64 6f 20 69 74 2e ID should do it. 03b0: 2e 2e 20 20 59 6f 75 72 20 6f 77 6e 20 70 75 62 .. Your own pub 03c0: 6b 65 79 73 20 68 61 76 65 20 62 65 65 6e 0a 65 keys have been.e 03d0: 78 70 6f 72 74 65 64 20 77 69 74 68 20 74 68 65 xported with the 03e0: 20 6b 65 79 67 65 6e 20 63 6f 6d 6d 61 6e 64 20 keygen command 03f0: 69 6e 74 6f 20 61 20 3c 6e 69 63 6b 3e 2e 6e 32 into a <nick>.n2 0400: 6f 20 66 69 6c 65 2e 20 20 59 6f 75 20 63 61 6e o file. You can 0410: 0a 69 6d 70 6f 72 74 20 74 68 61 74 20 69 6e 20 .import that in 0420: 79 6f 75 72 20 6f 74 68 65 72 20 69 64 28 73 29 your other id(s) 0430: 20 77 69 74 68 0a 0a 20 20 20 20 6b 65 79 69 6e with.. keyin 0440: 20 3c 6e 69 63 6b 3e 2e 6e 32 6f 0a 09 0a 4f 72 <nick>.n2o...Or 0450: 20 79 6f 75 20 63 61 6e 20 61 6e 6e 6f 75 6e 63 you can announc 0460: 65 20 79 6f 75 72 20 69 64 65 6e 74 69 74 79 20 e your identity 0470: 74 6f 20 74 68 65 20 44 48 54 20 77 69 74 68 0a to the DHT with. 0480: 0a 20 20 20 20 61 6e 6e 6f 75 6e 63 65 0a 0a 61 . announce..a 0490: 6e 64 20 74 68 65 6e 20 69 6d 70 6f 72 74 20 74 nd then import t 04a0: 68 65 20 6b 65 79 20 69 6e 74 6f 20 6f 74 68 65 he key into othe 04b0: 72 20 61 63 63 6f 75 6e 74 73 20 62 79 20 64 6f r accounts by do 04c0: 69 6e 67 20 61 20 60 6b 65 79 73 65 61 72 63 68 ing a `keysearch 04d0: 60 0a 61 73 20 61 62 6f 76 65 20 28 62 75 74 20 `.as above (but 04e0: 77 69 74 68 20 74 68 65 20 66 69 72 73 74 20 35 with the first 5 04f0: 20 63 68 61 72 61 63 74 65 72 73 20 6f 66 20 74 characters of t 0500: 68 65 20 70 75 62 6b 65 79 20 79 6f 75 20 63 72 he pubkey you cr 0510: 65 61 74 65 64 29 2e 0a 0a 54 72 79 20 65 6e 63 eated)...Try enc 0520: 72 79 70 74 20 61 6e 64 20 64 65 63 72 79 70 74 rypt and decrypt 0530: 20 61 20 74 65 73 74 20 66 69 6c 65 20 66 6f 72 a test file for 0540: 20 79 6f 75 72 73 65 6c 66 3a 0a 0a 20 20 20 20 yourself:.. 0550: 3c 63 72 65 61 74 65 20 61 20 66 69 6c 65 3e 0a <create a file>. 0560: 20 20 20 20 65 6e 63 20 3c 66 69 6c 65 3e 0a 20 enc <file>. 0570: 20 20 20 63 61 74 20 3c 66 69 6c 65 3e 2e 76 32 cat <file>.v2 0580: 6f 0a 20 20 20 20 64 65 63 20 3c 66 69 6c 65 3e o. dec <file> 0590: 2e 76 32 6f 0a 0a 59 6f 75 20 63 61 6e 20 61 6c .v2o..You can al 05a0: 73 6f 20 63 72 65 61 74 65 20 64 65 74 61 63 68 so create detach 05b0: 65 64 20 73 69 67 6e 61 74 75 72 65 73 20 28 3c ed signatures (< 05c0: 66 69 6c 65 3e 2e 73 32 6f 29 3a 0a 0a 20 20 20 file>.s2o):.. 05d0: 20 73 69 67 6e 20 3c 66 69 6c 65 3e 0a 20 20 20 sign <file>. 05e0: 20 76 65 72 69 66 79 20 3c 66 69 6c 65 3e 0a 0a verify <file>.. 05f0: 59 6f 75 20 63 61 6e 20 74 72 79 20 61 20 67 72 You can try a gr 0600: 6f 75 70 20 63 68 61 74 20 77 69 74 68 20 73 65 oup chat with se 0610: 76 65 72 61 6c 20 69 64 73 2c 20 73 74 61 72 74 veral ids, start 0620: 20 74 68 65 20 67 72 6f 75 70 20 22 74 65 73 74 the group "test 0630: 22 20 77 69 74 68 20 3c 69 64 31 3e 0a 0a 20 20 " with <id1>.. 0640: 20 20 63 68 61 74 20 74 65 73 74 0a 0a 49 66 20 chat test..If 0650: 79 6f 75 20 77 61 6e 74 20 74 6f 20 74 61 6c 6b you want to talk 0660: 20 74 6f 20 73 6f 6d 65 6f 6e 65 20 65 6c 73 65 to someone else 0670: 2c 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 6d 61 , you need to ma 0680: 6b 65 20 73 75 72 65 20 74 68 65 79 20 61 63 63 ke sure they acc 0690: 65 70 74 0a 79 6f 75 72 20 63 6f 6e 6e 65 63 74 ept.your connect 06a0: 69 6f 6e 2c 20 73 6f 20 79 6f 75 20 66 69 72 73 ion, so you firs 06b0: 74 20 6e 65 65 64 20 74 6f 20 73 65 6e 64 20 61 t need to send a 06c0: 6e 20 69 6e 76 69 74 61 74 69 6f 6e 0a 0a 20 20 n invitation.. 06d0: 20 20 69 6e 76 69 74 65 20 40 3c 69 64 31 3e 0a invite @<id1>. 06e0: 0a 41 6e 64 20 61 66 74 65 72 20 61 63 63 65 70 .And after accep 06f0: 74 61 6e 63 65 20 6f 66 20 74 68 61 74 20 69 64 tance of that id 0700: 20 63 6f 6e 6e 65 63 74 20 66 72 6f 6d 20 74 68 connect from th 0710: 65 20 6f 74 68 65 72 20 69 64 73 20 77 69 74 68 e other ids with 0720: 0a 0a 20 20 20 20 63 68 61 74 20 74 65 73 74 40 .. chat test@ 0730: 3c 69 64 31 3e 0a 0a 4f 72 20 64 6f 20 61 20 31 <id1>..Or do a 1 0740: 3a 31 20 63 68 61 74 20 77 69 74 68 0a 0a 20 20 :1 chat with.. 0750: 20 20 63 68 61 74 20 40 3c 69 64 32 3e 0a 0a 66 chat @<id2>..f 0760: 72 6f 6d 20 3c 69 64 31 3e 20 61 6e 64 0a 0a 20 rom <id1> and.. 0770: 20 20 20 63 68 61 74 20 40 3c 69 64 31 3e 0a 0a chat @<id1>.. 0780: 66 72 6f 6d 20 3c 69 64 32 3e 20 6f 6e 20 73 65 from <id2> on se 0790: 76 65 72 61 6c 20 63 6f 6d 70 75 74 65 72 73 2f veral computers/ 07a0: 74 65 72 6d 69 6e 61 6c 73 2e 20 20 54 68 65 20 terminals. The 07b0: 63 68 61 74 20 6d 6f 64 65 20 77 6f 72 6b 73 20 chat mode works 07c0: 61 20 62 69 74 20 6c 69 6b 65 20 49 52 43 2c 0a a bit like IRC,. 07d0: 79 6f 75 20 63 61 6e 20 75 73 65 20 2f 68 65 6c you can use /hel 07e0: 70 20 74 6f 20 6c 69 73 74 20 74 68 65 20 63 6f p to list the co 07f0: 6d 6d 61 6e 64 73 2c 20 2f 70 65 65 72 73 20 74 mmands, /peers t 0800: 6f 20 73 65 65 20 74 68 65 20 64 69 72 65 63 74 o see the direct 0810: 0a 6e 65 69 67 68 62 6f 72 73 2c 20 61 6e 64 20 .neighbors, and 0820: 2f 6d 65 20 3c 61 63 74 69 6f 6e 3e 20 69 66 20 /me <action> if 0830: 79 6f 75 20 61 72 65 6e 27 74 20 61 63 74 75 61 you aren't actua 0840: 6c 6c 79 20 74 61 6c 6b 69 6e 67 2e 0a 0a 59 6f lly talking...Yo 0850: 75 20 63 61 6e 20 63 6f 70 79 20 73 6d 61 6c 6c u can copy small 0860: 20 6f 72 20 6c 61 72 67 65 20 66 69 6c 65 73 2c or large files, 0870: 20 77 68 65 6e 20 74 68 65 20 63 6f 72 72 65 73 when the corres 0880: 70 6f 6e 64 69 6e 67 20 69 64 20 68 61 73 20 74 ponding id has t 0890: 68 65 0a 6e 61 6d 65 64 20 66 69 6c 65 20 70 65 he.named file pe 08a0: 72 6d 69 73 73 69 6f 6e 2e 20 20 53 65 74 20 74 rmission. Set t 08b0: 68 65 20 70 65 72 6d 69 73 73 69 6f 6e 20 77 69 he permission wi 08c0: 74 68 0a 0a 20 20 20 20 70 65 72 6d 20 40 3c 69 th.. perm @<i 08d0: 64 32 3e 20 2b 6e 0a 0a 61 6e 64 20 73 74 61 72 d2> +n..and star 08e0: 74 20 74 68 65 20 73 65 72 76 65 72 0a 0a 20 20 t the server.. 08f0: 20 20 73 65 72 76 65 72 0a 0a 74 6f 20 73 75 70 server..to sup 0900: 70 6c 79 20 74 68 69 6e 67 73 20 6f 6e 20 3c 69 ply things on <i 0910: 64 31 3e 2c 20 61 6e 64 20 65 2e 67 2e 0a 0a 20 d1>, and e.g... 0920: 20 20 20 67 65 74 20 40 3c 69 64 31 3e 20 64 61 get @<id1> da 0930: 74 61 2f 32 30 31 31 2d 30 35 2d 32 30 5f 31 37 ta/2011-05-20_17 0940: 2d 30 31 2d 31 32 2e 6a 70 67 0a 0a 74 6f 20 63 -01-12.jpg..to c 0950: 6f 70 79 20 6f 6e 65 20 6f 66 20 74 68 65 20 74 opy one of the t 0960: 65 73 74 20 69 6d 61 67 65 73 2e 0a 0a 23 23 20 est images...## 0970: 4c 6f 77 2d 6c 65 76 65 6c 20 62 65 6e 63 68 6d Low-level benchm 0980: 61 72 6b 73 20 23 23 0a 0a 52 75 6e 20 73 6f 6d arks ##..Run som 0990: 65 20 65 6e 63 72 79 70 74 69 6f 6e 20 62 65 6e e encryption ben 09a0: 63 68 6d 61 72 6b 73 20 66 72 6f 6d 20 74 68 65 chmarks from the 09b0: 20 73 68 65 6c 6c 3a 0a 0a 20 20 20 20 67 66 6f shell:.. gfo 09c0: 72 74 68 2d 66 61 73 74 20 6e 65 74 32 6f 2f 74 rth-fast net2o/t 09d0: 65 73 74 73 2f 6b 65 63 63 61 6b 2e 66 73 0a 20 ests/keccak.fs. 09e0: 20 20 20 67 66 6f 72 74 68 2d 66 61 73 74 20 6e gforth-fast n 09f0: 65 74 32 6f 2f 74 65 73 74 73 2f 74 68 72 65 65 et2o/tests/three 0a00: 66 69 73 68 2e 66 73 0a 20 20 20 20 67 66 6f 72 fish.fs. gfor 0a10: 74 68 2d 66 61 73 74 20 6e 65 74 32 6f 2f 74 65 th-fast net2o/te 0a20: 73 74 73 2f 65 64 32 35 35 31 39 2e 66 73 0a sts/ed25519.fs.