From 026f5462d958f22f38803a19064cfc7c4f2c3b0d Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Fri, 24 Jan 2025 21:07:23 -0500 Subject: rename live to docs --- live/hdb.html | 105 ---------------------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 live/hdb.html (limited to 'live/hdb.html') diff --git a/live/hdb.html b/live/hdb.html deleted file mode 100644 index 31986c6..0000000 --- a/live/hdb.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - Hosts Database | Docs | Penguin's Kiss - - - - -
- -
-

Now that we've generated our host key and gotten our server up and running, its - time to publish its public key in a hosts database file so that it can be retrieved - by clients. The TL;DR for this section is to create a file that looks like this:

-
{"keys": {"<server ip>": {"n": <number n that python spit out>, "e": 65537}}}
-

and upload it to the web somewhere. You can then supply this URL to your clients as - your hosts database. Literally even a PasteBin will work if you use the raw file - URL.

-
-

Format

-

The hosts database is essentially just a JSON object in which the PK client will - look for specific keys to retrieve information. The basic skeleton looks like - this:

-
{"keys": {<keys section>}}
-
-
-

Keys Section

-

The keys section is just a mapping from server IPs to key objects, which in - turn are just a way of representing RSA public keys. The keys section supports - multiple server IPs, but currently only one public key per server IP. Its - skeleton looks like the following:

-
{"0.1.2.3": {<key object>}, "255.255.255.255": {<key object>}}
-

Key Objects

-

A key object is just a modulus and a public exponent, both of which are integers. - The modulus is at key n and the public exponent is at key - e. The public exponent is optional and defaults to - 65537 if not supplied. These values can be pulled directly from - /etc/pk/server_key.json, but it is important to delete the - d key and its value, as this information needs to remain secret. -

-

The format of a key object is as follows:

-
{"n": 3043289324798327498257285749857984257249857245, "e": 12345}
-
-
-
- - -- cgit v1.2.3