revamp taxonomies

This commit is contained in:
Michael Zhang 2021-07-06 16:32:34 -05:00
parent 849c0c3bb6
commit 796cb7eb08
Signed by: michael
GPG Key ID: BDA47A31A3C8EE6B
14 changed files with 76 additions and 28 deletions

View File

@ -3,6 +3,10 @@ languageCode = "en-us"
title = "michael's blog"
enableGitInfo = true
[taxonomies]
tag = "tags"
language = "languages"
[markup.tableOfContents]
endLevel = 4
ordered = true

View File

@ -1,8 +1,6 @@
+++
title = "my new life stack"
date = 2018-02-01
[taxonomies]
tags = ["arch", "linux", "setup", "computers"]
+++

View File

@ -1,9 +1,8 @@
+++
title = "cleaning up your shell"
date = 2018-02-25
[taxonomies]
tags = ["computers", "linux", "bash", "terminal"]
tags = ["computers", "linux", "terminal"]
languages = ["bash"]
+++
Is your shell loading slower than it used to? Maybe you've been sticking a bit more into your `.bashrc`/`.zshrc` than you thought.

View File

@ -1,9 +1,7 @@
+++
title = "fixing tmux colors"
date = 2018-04-23
[taxonomies]
tags = ["computers", "terminal"]
tags = ["computers"]
+++
Put this in your `~/.tmux.conf`.

View File

@ -1,9 +1,8 @@
+++
title = "web apps"
date = 2018-05-28
[taxonomies]
tags = ["computers", "javascript", "web-dev", "rant", "things-that-are-bad"]
tags = ["computers", "web", "rant", "things-that-are-bad"]
languages = ["javascript"]
+++
The other day, I just turned off JavaScript from my browser. "fucking neckbeard", "you'll turn it back in 2 weeks", "living without JavaScript is like living without electricity" were some of the responses I got. And they might be right. But let's see why things are the way they are and what we can do about it.

View File

@ -2,9 +2,8 @@
title = "twenty years of attacks on rsa with examples"
date = 2018-10-26
toc = true
[taxonomies]
tags = ["math", "crypto", "python"]
tags = ["crypto"]
languages = ["python"]
+++
## 1. introduction

View File

@ -1,9 +1,8 @@
+++
title = "magic forms with proc macros: ideas"
date = 2019-02-01
[taxonomies]
tags = ["computers", "rust", "web-dev", "macros"]
tags = ["computers", "web"]
languages = ["rust"]
+++
Procedural macros (proc macros for short) in Rust are incredible because they allow pre-compile source transformation. Many of the greatest abstractions in Rust take advantage of this feature. For example, you can

View File

@ -1,8 +1,6 @@
+++
title = "accept server analogy"
date = 2019-03-04
[taxonomies]
tags = ["computers"]
+++

View File

@ -1,8 +1,6 @@
+++
title = "password managers"
date = 2020-04-01
[taxonomies]
tags = ["computers", "things-that-are-good", "privacy"]
+++

View File

@ -1,9 +1,7 @@
+++
title = "email tracking links"
date = 2021-06-17
[taxonomies]
tags = ["email", "computers", "things-that-are-bad", "privacy"]
tags = ["email", "rant", "computers", "things-that-are-bad", "privacy"]
+++
You probably get emails every day, and spend a lot of time reading them. And

View File

@ -3,9 +3,8 @@ title = "sending https requests from scratch"
date = 2021-07-05
draft = true
toc = true
[taxonomies]
tags = ["computers", "web", "python"]
tags = ["computers", "web", "crypto"]
languages = ["python"]
+++
The web is [so complicated][4] these days, I began wondering exactly how big of a feat it would be to formally verify everything. At this point I realized all I knew about web protocols were from fiddling around with HTTP 1.0 requests from doing CTFs in the past. You'd pop open a socket to wherever you wanted, stick `GET` and then whatever path you wanted, and then add a version number at the end.
@ -394,7 +393,35 @@ print("res", res)
### Encrypted tunnel
Now we should be ready to communicate with the server through our encrypted tunnel. But we forgot to keep around our key negotiation parameters! How will we encrypt our communication? Let's go back and update these functions to let us keep the parameters, and then we can move on to implementing some of these crypto algorithms.
Now we should be ready to communicate with the server through our encrypted tunnel. But we forgot to keep around our key negotiation parameters! How will we encrypt our communication? Let's go back and update these functions to let us keep the parameters, using the crypto functions we just defined.
The key sharing function:
```py
def ext_key_share(Q):
kex = b"\x04" + Q.x + Q.y
key_share = struct.pack(">H", 23) + struct.pack(">H", len(kex)) + kex
ext = struct.pack(">H", len(key_share)) + key_share
return (struct.pack(">H", 51) # code number for alpn
+ struct.pack(">H", len(ext))
+ ext)
```
Finally, the new `client_hello_extensions`:
```py
def client_hello_extensions(hostname: str):
d, Q = ecdsa_keypair()
data = b"".join([
ext_supported_versions(),
ext_signature_algorithms(),
ext_supported_groups(),
ext_key_share(Q),
ext_server_name(hostname),
ext_alpn(),
])
return (data, d, Q)
```
## HTTP 2

View File

@ -1,5 +1,7 @@
{{- define "content" -}}
hellosu
{{ .Content }}
{{- end -}}

View File

@ -4,4 +4,12 @@
{{ partial "post-list" $posts }}
<hr />
<small>
List of posts by:
<a href="/languages">[languages]</a> &middot;
<a href="/tags">[tags]</a>
</small>
{{- end -}}

View File

@ -0,0 +1,21 @@
{{- define "content" -}}
<h1>{{ .Name }}</h1>
<ul>
{{- range $name, $value := sort .Data.Pages "Title" -}}
<li style="margin-bottom: 15px;">
<a href="{{ $value.RelPermalink }}">{{ $value.Title }}</a>
({{ len $value.Pages }})
<br />
<small>
{{- range $index, $page := $value.Pages -}}
{{ if $index }},{{ end }}
<a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a>
{{- end -}}
</small>
</li>
{{- end -}}
</ul>
{{- end -}}