]> git.netwichtig.de Git - user/henk/code/shell/rif.git/blob - README.md
Include friendchecker
[user/henk/code/shell/rif.git] / README.md
1 Hello!
2
3 Are you a real IPv6 friend?
4
5 ## Introduction
6
7 People like you and me don't want or need Facebook. However, we do
8 want to securely communicate with our friends. And chat with them. And
9 know when they are online. Let's solve this problem once-and-for-all
10 in a decentralised, sustainable and future proof way.
11
12 ## Here come's the real IPv6 friend
13
14 Instead of using a single system or server, we use IPv6 to connect to
15 our friends directly. Because each of our friends is reachable by IPv6
16 if they are online (otherwise they would not be a real IPv6 friend),
17 we can easily verify if they are online. To find out who is online,
18 just connect to their computer!
19
20 ## How it works
21
22 It's a bit geeky, but it works actually rather simple.
23 To become a real IPv6 friend, you need to do the following things:
24
25 - Generate a GPG key with a comment named RIF following the URL of
26   your computer
27 - Ensure that the URL points to the IPv6 address of your computer
28 - Setup a webserver on your computer
29 - Export your key and all real IPv6 friend keys to your webserver as
30   "rifkeys.txt
31 - For each of your friends, check whether they are online!
32
33 ### Example: Generating a key with the right comment
34
35 In this example I choose to create an ECC based key that requires the
36 export option in gpg:
37
38 ```
39 [1:24] line:~% gpg --expert --full-gen-key
40 gpg (GnuPG) 2.2.12; Copyright (C) 2018 Free Software Foundation, Inc.
41 This is free software: you are free to change and redistribute it.
42 There is NO WARRANTY, to the extent permitted by law.
43
44 Please select what kind of key you want:
45    (1) RSA and RSA (default)
46    (2) DSA and Elgamal
47    (3) DSA (sign only)
48    (4) RSA (sign only)
49    (7) DSA (set your own capabilities)
50    (8) RSA (set your own capabilities)
51    (9) ECC and ECC
52   (10) ECC (sign only)
53   (11) ECC (set your own capabilities)
54   (13) Existing key
55 Your selection? 9
56 Please select which elliptic curve you want:
57    (1) Curve 25519
58    (3) NIST P-256
59    (4) NIST P-384
60    (5) NIST P-521
61    (6) Brainpool P-256
62    (7) Brainpool P-384
63    (8) Brainpool P-512
64    (9) secp256k1
65 Your selection? 1
66 Please specify how long the key should be valid.
67          0 = key does not expire
68       <n>  = key expires in n days
69       <n>w = key expires in n weeks
70       <n>m = key expires in n months
71       <n>y = key expires in n years
72 Key is valid for? (0) 0
73 Key does not expire at all
74 Is this correct? (y/N) y
75
76 GnuPG needs to construct a user ID to identify your key.
77
78 Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? c
79 Comment: RIF https://nico.ungleich.cloud
80 You selected this USER-ID:
81     "Nico Schottelius (RIF https://nico.ungleich.cloud) <ipv6@nico.ungleich.cloud>"
82
83 Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
84 We need to generate a lot of random bytes. It is a good idea to perform
85 some other action (type on the keyboard, move the mouse, utilize the
86 disks) during the prime generation; this gives the random number
87 generator a better chance to gain enough entropy.
88 We need to generate a lot of random bytes. It is a good idea to perform
89 some other action (type on the keyboard, move the mouse, utilize the
90 disks) during the prime generation; this gives the random number
91 generator a better chance to gain enough entropy.
92 gpg: key 27541E11E73F288D marked as ultimately trusted
93 gpg: directory '/home/nico/.gnupg/openpgp-revocs.d' created
94 gpg: revocation certificate stored as '/home/nico/.gnupg/openpgp-revocs.d/B982A8BABC030C66DEF5984527541E11E73F288D.rev'
95 public and secret key created and signed.
96
97 pub   ed25519 2019-09-09 [SC]
98       B982A8BABC030C66DEF5984527541E11E73F288D
99 uid                      Nico Schottelius (RIF https://nico.ungleich.cloud) <ipv6@nico.ungleich.cloud>
100 sub   cv25519 2019-09-09 [E]
101
102
103 ```
104
105 ### Example: Setting up a webserver
106
107 On a Debian/Devuan based distro:
108
109 ```
110 apt install nginx
111 sudo chown $(whoami) /var/www/html
112 ```
113
114
115 ### Exporting all keys
116
117 To make yourself accessible and expose who your real IPv6 friends are.
118
119 ```
120 gpg -a --export RIF > /var/www/html/rifkeys
121 ```
122
123 ### Example: List your friends
124
125 ```
126 [1:40] line:~% gpg --list-keys --with-colons | grep RIF | awk -F: '{ print $10 }' | sed 's/\\x3a/:/'
127 Nico Schottelius (RIF https://nico.ungleich.cloud) <ipv6@nico.ungleich.cloud>
128 Nico Schottelius (myself) (RIF https://nico2.ungleich.cloud) <nico@nico.ungleich.cloud>
129 ```
130
131 ### Example: Checking which friends are online
132
133 Use the included rif-checkfriends.sh script or iterate yourself over
134 above output.
135
136 ```
137
138
139 ```
140
141
142 ## To be added
143
144 - advanced usage -> ipv6 email
145
146 ### CLI ideas
147
148 - **rif prepare**: check webserver, keyring, etc.
149 - **rif online**: check who is online