diff options
Diffstat (limited to 'src/content')
| -rw-r--r-- | src/content/aadkadocs/blogs/index.md (renamed from src/content/docs/docs/index.md) | 0 | ||||
| -rw-r--r-- | src/content/aadkadocs/blogs/test.md (renamed from src/content/docs/docs/test.md) | 0 | ||||
| -rw-r--r-- | src/content/aadkadocs/blogs/test2.md (renamed from src/content/docs/docs/test2.md) | 0 | ||||
| -rw-r--r-- | src/content/blogs/blog-0.md | 39 | ||||
| -rw-r--r-- | src/content/blogs/blog-1.md | 4 | ||||
| -rw-r--r-- | src/content/blogs/blog-2.md | 4 | ||||
| -rw-r--r-- | src/content/config.ts | 5 |
7 files changed, 49 insertions, 3 deletions
diff --git a/src/content/docs/docs/index.md b/src/content/aadkadocs/blogs/index.md index dfab5a3..dfab5a3 100644 --- a/src/content/docs/docs/index.md +++ b/src/content/aadkadocs/blogs/index.md diff --git a/src/content/docs/docs/test.md b/src/content/aadkadocs/blogs/test.md index f8e3832..f8e3832 100644 --- a/src/content/docs/docs/test.md +++ b/src/content/aadkadocs/blogs/test.md diff --git a/src/content/docs/docs/test2.md b/src/content/aadkadocs/blogs/test2.md index 02b9fbd..02b9fbd 100644 --- a/src/content/docs/docs/test2.md +++ b/src/content/aadkadocs/blogs/test2.md diff --git a/src/content/blogs/blog-0.md b/src/content/blogs/blog-0.md new file mode 100644 index 0000000..c954f97 --- /dev/null +++ b/src/content/blogs/blog-0.md @@ -0,0 +1,39 @@ +# The search for the perfect ed25519 key pair + +Todo write intro to catch attention + +### Why care about ed25519 key pairs? + +Ed25519 is a cryptographic algorithm for generating +a pair of keys, a public one that can be shared with anyone +and a private one that is kept as a secret. + +### The ssh public key format + +If you have ever accessed a remote server it was most likely by +ssh-ing into it. +You have also most likely had to copy paste something similar to this: + +``` +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBSSj+yfJLWEb+Df4r4603TOFAUBREYS43qQB+c9i9UW +``` + +Let's break it down + +- The first part `ssh-ed25519` is the algorithm type, other common algorithms are `ssh-rsa` and `ssh-ecdsa` +- The second part is a base64-encoded binary format consiting of + - the length of the algorithm string, for ed25519 it's always 11 (4 bytes long) + - the algorithm type, for ed25519 it's always `ssh-ed25519` in binary (11 bytes long) + - the length of the key, 32 bytes for ed25519 (4 bytes long) + - the actual ed25519 key (32 bytes long) + +### Embedding a word in base64 + +Base64 is a widely used format for writing binary in a compact and human readable way, +it uses A-Z, a-z, 0-9, '/' and '+' adding up to 64 unique characters. + +It's possible to choose specific bytes in a way that when encoding it with base64 +it will form a word. + +For example, to encode "Kyren" in base64, we can use the following bytes +`00101011 00101010 01001110` or in hex `2b 2a de` diff --git a/src/content/blogs/blog-1.md b/src/content/blogs/blog-1.md index ca2e3f1..75128e5 100644 --- a/src/content/blogs/blog-1.md +++ b/src/content/blogs/blog-1.md @@ -1,3 +1,7 @@ +--- +title: The search for the perfect ed25519 key pair +template: splash +--- # My Title ## Secondary diff --git a/src/content/blogs/blog-2.md b/src/content/blogs/blog-2.md index 0296fe2..c6b02c0 100644 --- a/src/content/blogs/blog-2.md +++ b/src/content/blogs/blog-2.md @@ -1,3 +1,7 @@ +--- +title: The search for the perfect ed25519 key pair +template: splash +--- # Other blog How about code blocks diff --git a/src/content/config.ts b/src/content/config.ts index 31b7476..9d8d958 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -1,6 +1,5 @@ -import { defineCollection } from 'astro:content'; -import { docsSchema } from '@astrojs/starlight/schema'; +import { defineCollection } from "astro:content"; export const collections = { - docs: defineCollection({ schema: docsSchema() }), + blogs: defineCollection({}), }; |
