From 60507757b61e36413d40060262b3e460053f779b Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Wed, 13 Nov 2024 23:51:06 +0200 Subject: Some blog changes --- src/content/blogs/blog-0.md | 44 --------------------- src/content/blogs/blog-1.md | 41 -------------------- src/content/blogs/my-webdev-experience.md | 7 ++++ src/content/blogs/test.md | 41 ++++++++++++++++++++ .../the-search-for-the-perfect-ed25519-key.md | 45 ++++++++++++++++++++++ 5 files changed, 93 insertions(+), 85 deletions(-) delete mode 100644 src/content/blogs/blog-0.md delete mode 100644 src/content/blogs/blog-1.md create mode 100644 src/content/blogs/my-webdev-experience.md create mode 100644 src/content/blogs/test.md create mode 100644 src/content/blogs/the-search-for-the-perfect-ed25519-key.md diff --git a/src/content/blogs/blog-0.md b/src/content/blogs/blog-0.md deleted file mode 100644 index 228ff63..0000000 --- a/src/content/blogs/blog-0.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: The search for the perfect ed25519 key pair -date: 2024-12-11 ---- - -# 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 deleted file mode 100644 index 21304c2..0000000 --- a/src/content/blogs/blog-1.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Test -description: This is a test blog to... well.. test things! -date: 1970-01-01 ---- -# My Title - -## Secondary - -Testing some content with multiline thing -let's see what happens if this wraps -This should be super close - -This should be far - -- Some bullets -- Adka kda kd ak -- d kakd akd ka k - -- [ ] Check me -- [x] Already checked - -## Smaller header - -How about code blocks - -```go example.go -package main - -import "fmt" - -func main() { - fmt.Println("Hello, World!") -} -``` - -Hmm - -> Does this work - -This is `highlighting` I think is what it's called diff --git a/src/content/blogs/my-webdev-experience.md b/src/content/blogs/my-webdev-experience.md new file mode 100644 index 0000000..9909cf1 --- /dev/null +++ b/src/content/blogs/my-webdev-experience.md @@ -0,0 +1,7 @@ +--- +title: My webdev experience +description: I made a website, here are my thoughts on web development +date: 2024-12-13 +--- + +# My webdev experience diff --git a/src/content/blogs/test.md b/src/content/blogs/test.md new file mode 100644 index 0000000..21304c2 --- /dev/null +++ b/src/content/blogs/test.md @@ -0,0 +1,41 @@ +--- +title: Test +description: This is a test blog to... well.. test things! +date: 1970-01-01 +--- +# My Title + +## Secondary + +Testing some content with multiline thing +let's see what happens if this wraps +This should be super close + +This should be far + +- Some bullets +- Adka kda kd ak +- d kakd akd ka k + +- [ ] Check me +- [x] Already checked + +## Smaller header + +How about code blocks + +```go example.go +package main + +import "fmt" + +func main() { + fmt.Println("Hello, World!") +} +``` + +Hmm + +> Does this work + +This is `highlighting` I think is what it's called diff --git a/src/content/blogs/the-search-for-the-perfect-ed25519-key.md b/src/content/blogs/the-search-for-the-perfect-ed25519-key.md new file mode 100644 index 0000000..cb47772 --- /dev/null +++ b/src/content/blogs/the-search-for-the-perfect-ed25519-key.md @@ -0,0 +1,45 @@ +--- +title: The search for the perfect ed25519 key +description: Here's how you can embed your name in an SSH key +date: 2024-12-11 +--- + +# The search for the perfect ed25519 key + +Todo write intro to catch attention + +### Why care about an ed25519 key? + +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` -- cgit v1.3.1