diff --git a/assets/styles.css b/assets/styles.css index e726a21..57ccf58 100644 --- a/assets/styles.css +++ b/assets/styles.css @@ -72,6 +72,13 @@ a { a.bigBtn { margin-right: 8px; } +code { + display: block; + padding: 8px; + background-color: #eee; + border: solid 1px #ddd; + user-select: all; +} textarea { width: 100%; height: 128px; diff --git a/index.php b/index.php index 3fe74f9..5fb6397 100644 --- a/index.php +++ b/index.php @@ -14,6 +14,8 @@ $router->map('GET', '/proofs', function() {}, 'proofs'); $router->map('GET', '/verify/[:uid]', function() {}, 'verifyUid'); $router->map('GET', '/encrypt/[:uid]', function() {}, 'encryptUid'); $router->map('GET', '/proofs/[:uid]', function() {}, 'proofsUid'); +$router->map('GET', '/guides', function() {}, 'guides'); +$router->map('GET', '/guides/[:id]', function() {}, 'guideId'); $router->map('GET', '/faq', function() {}, 'faq'); $router->map('GET', '/[:uid]', function() {}, 'profile'); @@ -58,6 +60,22 @@ if(is_array($match) && is_callable($match['target'])) { echo($content); break; + case 'guides': + readfile('pages/guides.html'); + break; + + case 'guideId': + $id = $match['params']['id']; + $content = file_get_contents("pages/template.html"); + $guideTitle = file_get_contents("pages/guides/$id.title.html"); + $guideContent = file_get_contents("pages/guides/$id.content.html"); + $guideContent = "

Back to guides

".$guideContent; + $content = str_replace('%TITLE%', $guideTitle, $content); + $content = str_replace('%CONTENT%', $guideContent, $content); + header('Content-Type: text/html; charset=utf-8'); + echo($content); + break; + case 'faq': readfile('pages/faq.html'); break; diff --git a/pages/guides.html b/pages/guides.html new file mode 100644 index 0000000..74e5ba5 --- /dev/null +++ b/pages/guides.html @@ -0,0 +1,51 @@ + + + + + + + Guides - Keyoxide + + + +
+
+ Keyoxide +
+ +
+
+ +
+

Guides

+
+

Using keyoxide.org

+ Migrating from Keybase
+ +

Adding proofs

+ Adding a DNS proof
+ Adding a Mastodon proof
+ Adding a Twitter proof
+ Adding a Hackernews proof
+ Adding a Reddit proof
+ Adding a Github proof
+
+ + +
+ + + diff --git a/pages/guides/dns.content.html b/pages/guides/dns.content.html new file mode 100644 index 0000000..333b428 --- /dev/null +++ b/pages/guides/dns.content.html @@ -0,0 +1,29 @@ +

Let's add a decentralized DNS proof to your OpenPGP keys.

+ +

Update DNS records for your website

+ +

Add the following TXT record to the DNS records of the (sub)domain you want to prove control over (make sure to replace FINGERPRINT):

+ +openpgp4fpr:FINGERPRINT + + +

No specific TTL value is required.

+ +

Update the PGP key

+ +

First, edit the key (make sure to replace FINGERPRINT):

+gpg --edit-key FINGERPRINT + +

Add a new notation:

+notation + +

Enter the notation (make sure to replace DOMAIN, don't include https://):

+proof@metacode.biz=dns:DOMAIN?type=TXT + +

Save the key:

+save + +

Upload the key to the HKP servers (make sure to replace FINGERPRINT):

+gpg --send-keys FINGERPRINT + +

And you're done! Reload your profile page, it should now show a verified domain.

diff --git a/pages/guides/dns.title.html b/pages/guides/dns.title.html new file mode 100644 index 0000000..d246865 --- /dev/null +++ b/pages/guides/dns.title.html @@ -0,0 +1 @@ +Adding a DNS proof diff --git a/pages/guides/github.content.html b/pages/guides/github.content.html new file mode 100644 index 0000000..344e403 --- /dev/null +++ b/pages/guides/github.content.html @@ -0,0 +1,33 @@ +

Let's add a decentralized Github proof to your OpenPGP keys.

+ +

Post a Github proof message

+ +

Log in to github.com and click on New gist.

+ +

Name the file openpgp.md and copy the following content into it (make sure to replace FINGERPRINT and USERNAME):

+ +This is an OpenPGP proof that connects [my OpenPGP key](https://keyoxide.org/FINGERPRINT) to [this Github account](https://github.com/USERNAME). +For details check out https://keyoxide.org/guides/proofs +

[Verifying my OpenPGP key: openpgp4fpr:FINGERPRINT] +
+ +

After creating a public gist, copy the link to the gist.

+ +

Update the PGP key

+ +

First, edit the key (make sure to replace FINGERPRINT):

+gpg --edit-key FINGERPRINT + +

Add a new notation:

+notation + +

Enter the notation (make sure to update with the link to the post copied above):

+proof@metacode.biz=https://gist.github.com/USERNAME/12345678912345678912345678912345 + +

Save the key:

+save + +

Upload the key to the HKP servers (make sure to replace FINGERPRINT):

+gpg --send-keys FINGERPRINT + +

And you're done! Reload your profile page, it should now show a verified Github account.

diff --git a/pages/guides/github.title.html b/pages/guides/github.title.html new file mode 100644 index 0000000..c607227 --- /dev/null +++ b/pages/guides/github.title.html @@ -0,0 +1 @@ +Adding a Github proof diff --git a/pages/guides/hackernews.content.html b/pages/guides/hackernews.content.html new file mode 100644 index 0000000..d0c4398 --- /dev/null +++ b/pages/guides/hackernews.content.html @@ -0,0 +1,31 @@ +

Let's add a decentralized Hackernews proof to your OpenPGP keys.

+ +

Update the Hackernews account

+ +

Log in to Hackernews and click on your username.

+ +

Add the following lines to your about (make sure to replace FINGERPRINT):

+ +This is an OpenPGP proof that connects my OpenPGP key to this Hackernews account. +For details check out https://keyoxide.org/guides/proofs +

[Verifying my OpenPGP key: openpgp4fpr:FINGERPRINT] +
+ +

Update the PGP key

+ +

First, edit the key (make sure to replace FINGERPRINT):

+gpg --edit-key FINGERPRINT + +

Add a new notation:

+notation + +

Enter the notation (make sure to replace USERNAME):

+proof@metacode.biz=https://news.ycombinator.com/user?id=USERNAME + +

Save the key:

+save + +

Upload the key to the HKP servers (make sure to replace FINGERPRINT):

+gpg --send-keys FINGERPRINT + +

And you're done! Reload your profile page, it should now show a verified Hackernews account.

diff --git a/pages/guides/hackernews.title.html b/pages/guides/hackernews.title.html new file mode 100644 index 0000000..a968901 --- /dev/null +++ b/pages/guides/hackernews.title.html @@ -0,0 +1 @@ +Adding a Hackernews proof diff --git a/pages/guides/mastodon.content.html b/pages/guides/mastodon.content.html new file mode 100644 index 0000000..3747713 --- /dev/null +++ b/pages/guides/mastodon.content.html @@ -0,0 +1,25 @@ +

Let's add a decentralized Mastodon proof to your OpenPGP keys.

+ +

Update the Mastodon account

+ +

Log in to your Mastodon instance and click on Edit profile.

+

Add a new item under Profile metadata with the label OpenPGP and your PGP fingerprint as the content.

+ +

Update the PGP key

+ +

First, edit the key (make sure to replace FINGERPRINT):

+gpg --edit-key FINGERPRINT + +

Add a new notation:

+notation + +

Enter the notation (make sure to update the link):

+proof@metacode.biz=https://INSTANCE.ORG/@USERNAME + +

Save the key:

+save + +

Upload the key to the HKP servers (make sure to replace FINGERPRINT):

+gpg --send-keys FINGERPRINT + +

And you're done! Reload your profile page, it should now show a verified Mastodon account.

diff --git a/pages/guides/mastodon.title.html b/pages/guides/mastodon.title.html new file mode 100644 index 0000000..d720d5b --- /dev/null +++ b/pages/guides/mastodon.title.html @@ -0,0 +1 @@ +Adding a Mastodon proof diff --git a/pages/guides/migrating-from-keybase.content.html b/pages/guides/migrating-from-keybase.content.html new file mode 100644 index 0000000..e4a479d --- /dev/null +++ b/pages/guides/migrating-from-keybase.content.html @@ -0,0 +1,9 @@ +

Let's see how easy it is to get a Keyoxide profile when you already have a Keybase account.

+ +

Claim your Keyoxide profile

+ +

Have you uploaded your public key to a HKP server like keys.openpgp.org? Well, then you are all set, you have a Keyoxide profile, congratulations!

+ +

Link to your Keyoxide profile

+ +

Append your OpenPGP key's fingerprint to the domain (like https://keyoxide.org/FINGERPRINT) and there's your profile page.

diff --git a/pages/guides/migrating-from-keybase.title.html b/pages/guides/migrating-from-keybase.title.html new file mode 100644 index 0000000..1a0ecfb --- /dev/null +++ b/pages/guides/migrating-from-keybase.title.html @@ -0,0 +1 @@ +Migrating from Keybase diff --git a/pages/guides/reddit.content.html b/pages/guides/reddit.content.html new file mode 100644 index 0000000..6cb1fa4 --- /dev/null +++ b/pages/guides/reddit.content.html @@ -0,0 +1,31 @@ +

Let's add a decentralized Reddit proof to your OpenPGP keys.

+ +

Post a Reddit proof message

+ +

Log in to www.reddit.com and compose a new tweet with the following text (make sure to replace FINGERPRINT):

+ +This is an OpenPGP proof that connects my OpenPGP key to this Reddit account. +For details check out https://keyoxide.org/guides/proofs +

[Verifying my OpenPGP key: openpgp4fpr:FINGERPRINT] +
+ +

After posting, copy the link to the post.

+ +

Update the PGP key

+ +

First, edit the key (make sure to replace FINGERPRINT):

+gpg --edit-key FINGERPRINT + +

Add a new notation:

+notation + +

Enter the notation (make sure to update with the link to the post copied above):

+proof@metacode.biz=https://www.reddit.com/user/USERNAME/comments/123123/TITLE/ + +

Save the key:

+save + +

Upload the key to the HKP servers (make sure to replace FINGERPRINT):

+gpg --send-keys FINGERPRINT + +

And you're done! Reload your profile page, it should now show a verified Reddit account.

diff --git a/pages/guides/reddit.title.html b/pages/guides/reddit.title.html new file mode 100644 index 0000000..d8c6d90 --- /dev/null +++ b/pages/guides/reddit.title.html @@ -0,0 +1 @@ +Adding a Reddit proof diff --git a/pages/guides/twitter.content.html b/pages/guides/twitter.content.html new file mode 100644 index 0000000..5e96bce --- /dev/null +++ b/pages/guides/twitter.content.html @@ -0,0 +1,31 @@ +

Let's add a decentralized Twitter proof to your OpenPGP keys.

+ +

Post a Twitter proof message

+ +

Log in to twitter.com and compose a new tweet with the following text (make sure to replace FINGERPRINT):

+ +This is an OpenPGP proof that connects my OpenPGP key to this Twitter account. +For details check out https://keyoxide.org/guides/proofs +

[Verifying my OpenPGP key: openpgp4fpr:FINGERPRINT] +
+ +

After posting, copy the link to the tweet.

+ +

Update the PGP key

+ +

First, edit the key (make sure to replace FINGERPRINT):

+gpg --edit-key FINGERPRINT + +

Add a new notation:

+notation + +

Enter the notation (make sure to update with the link to the tweet copied above):

+proof@metacode.biz=https://twitter.com/USERNAME/status/1234567891234567891 + +

Save the key:

+save + +

Upload the key to the HKP servers (make sure to replace FINGERPRINT):

+gpg --send-keys FINGERPRINT + +

And you're done! Reload your profile page, it should now show a verified Twitter account.

diff --git a/pages/guides/twitter.title.html b/pages/guides/twitter.title.html new file mode 100644 index 0000000..b06e8d2 --- /dev/null +++ b/pages/guides/twitter.title.html @@ -0,0 +1 @@ +Adding a Twitter proof diff --git a/pages/index.html b/pages/index.html index 41cb375..d7c7455 100644 --- a/pages/index.html +++ b/pages/index.html @@ -29,9 +29,13 @@ encrypt message verify proofs

+

Getting started

+

+ guides + FAQ +

About

Keyoxide is a lightweight and FOSS solution to make basic cryptography operations accessible to regular humans.

-

Read more in the FAQ.

Made by Yarmo Mackenbach.
diff --git a/pages/template.html b/pages/template.html new file mode 100644 index 0000000..0ed5a10 --- /dev/null +++ b/pages/template.html @@ -0,0 +1,42 @@ + + + + + + + %TITLE% - Keyoxide + + + +

+
+ Keyoxide +
+ +
+
+ +
+

%TITLE%

+
+ %CONTENT% +
+ + +
+ + +