(Draft) Lattice-based crypto - introduction

During the Corona situation, I decided to learn something new, and it was lattice-based cryptography. Intro to LWE from knapsack problem From this slide 1D (modular) knapsack problem Given $a_1, a_2,\cdots, a_n$ and $t$, $q$, where all variables are integers. Find $\{x_i\}_{i=1}^{n}\in\{0, 1\}^{n}$ s.t. , $$ t=\sum_{i=1}^{n}x_1a_i \bmod q. $$ Vector modular knapsack problem Given $\pmb{a}_1, \pmb{a}_2,\cdots, \pmb{a}_n$ and $\pmb{t}$, $q$, where $\pmb{a},\pmb{t}\in\mathbb{Z}^{m\times1}$ and $q \in \mathbb{Z}$. Find $\pmb{x}=\{x_i\}_{i=1}^{n}\in\{0,1\}^{m\times1}$ s.t. , $$ \pmb{t}=\sum_{i=1}^{n}x_i\pmb{a}_i \bmod q.

Git under the hood

Materials https://gitready.com/beginner/2009/02/17/how-git-stores-your-data.html https://de.slideshare.net/JeffKunkle/understanding-git Object types in Git Blob Tree Commit Tag <= pass this time These objects are stored in .git/objects/. How to read the objects Git objects are compressed. # Get file information $ git ls-files -s {{ my_git-managed_file }} 100644 4be0b2b8b0fd36b8b3c94c46b4af4cfb2558d11c 0 {{ my_git-managed_file }} # Decompress the Git object $ pigz -d < .git/objeccts/4b/e0b2b8b0fd36b8b3c94c46b4af4cfb2558d11c blob 7572my Markdown file!! # Another object (tree) $ git ls-tree HEAD // --- snipp --- // 040000 tree 423d17368f16ff18aac8ee494e27bafef8587afa content $ pigz -d < .

Galois Theory (Updating continuously)

Good material Visual Group Theory - Lecture 6 on YouTube is the best Galois theroy lecture. https://www.youtube.com/watch?v=Buv4Y74_z7I&list=PLwV-9DG53NDxU337smpTwm6sef4x-SCLv&index=31 You can fined slides of the lecture at below. http://www.math.clemson.edu/~macaule/classes/m20_math4120/ Kelin four group Hasse diagrams complex number is algebraically closed. fundamental theorem of algebra Any plynomial with complex coefficients, having degree d, has at least one complex root.(Gauss) How to listen it I listened 6.1 - 6.3 at the first day.

Refer images in Hugo blog

TL;DR Place your image file under static directory. E.g., static/cat1/my_image.png. Refer the image without static. e.g., /cat1/my_image.png. ![alt text](/cat1/my_image.png "This is a caption.")

Category Theory (Apr.2021. updating continuously)

Materials Category Theory by Steve Awodey Very kind “Category Theory For Beginners” by Richard Southwell. My memo: Introduction done My memo: Functor done Definition of a category Objects and arrows exist. There should be identity arrows for all objects. Arrows should be composited. Associativity holds. Terminology: domain and codomain $\mathrm{dom}(f)\xrightarrow{f} \mathrm{cod}(f)$ Directed graphs and categories If $f:A\rightarrow B$ and $g:B\rightarrow C$ exist but $h := g\cdot f$ doesn’t, it violates the rule of composition.

kind - local Kubernetes cluster using Docker container nodes

My environment Pop!_OS $ uname -a Linux system76 5.11.0-7620-generic #21~1624379747~20.10~3abeff8-Ubuntu SMP Wed Jun 23 02:23:59 UTC x86_64 x86_64 x86_64 GNU/Linux Set up pre-requirements for kind Install latest Go cd /usr/local/src sudo curl -L -O https://golang.org/dl/go1.16.5.linux-amd64.tar.gz tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin /etc/profile PATH=/usr/local/go/bin:$PATH Rootless Docker Refer to my post. Install kubectl https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-using-native-package-management sudo apt install -y apt-transport-https ca-certificates curl sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.

Rootless Docker

My environment Pop!_OS $ uname -a Linux system76 5.11.0-7620-generic #21~1624379747~20.10~3abeff8-Ubuntu SMP Wed Jun 23 02:23:59 UTC x86_64 x86_64 x86_64 GNU/Linux Configure rootless Docker https://docs.docker.com/engine/security/rootless/ $ dockerd-rootless-setuptool.sh install [ERROR] Missing system requirements. Run the following commands to [ERROR] install the requirements and run this tool again. ########## BEGIN ########## sudo sh -eux <<EOF # Install newuidmap & newgidmap binaries apt-get install -y uidmap EOF ########## END ########## OK… Run the command above and try again.

Rust - Getting Started (May. 2021. updating continuously)

What’s this page? As of Jan. 2021, I work as a DevOps (or infrastructure) engineer, but I like to solve problems with codes (front, back, whatever. it depends on the purposes.) For a year, my motivation abour learning Rust surges enough. This page is a memo while I’ve learned with Rust official document so that I can easily reminde the key feafures of Rust. Most part of this post consist of quotes from the document, but I also leave my opinions (could be wrong.

Basic sort algorithms in Rust

Disclamer The implementations in this post has a lot of room to improvement. As of Apr. 2021, they are more like code monkey’s code :( Reverse a string fn main() { let s1 = String::from("Please reverse me with spaces!日本語.한국어"); println!("Original string: {}",s1); let mut s2 = String::from(""); for c in s1.chars().rev() { s2.push(c); } println!("Reversed: {}",s2); } In Rust, both String and a string slice &str are UTF-8 encoded.

Custom configuration, and inject JavaScript in posts

Motivation To enable TikZ in my note, I add a header in layout/partial/header.html at first. But this change injects the javascript lines into all my posts which don’t need to include the TikZ. So I want to inject JavaScript in case that I mark the post as “TikZ enabled”. How to Create a HTML template In layouts/partials/header.html. {{ if and .IsPage (eq (.Param "tikz") true) }} <link rel="stylesheet" type="text/css" href="https://tikzjax.com/v1/fonts.css"> <script src="https://tikzjax.