random thoughts a journey to nowhere

Working with SSH in Linux and macOS

Table of contents TL;DR Generate keys Start ssh-agent Add keys to ssh-agent Add keys to a remote server Remove keys from a remote server Remove host from known_hosts file Debug What is SSH? Using SSH Our demo machine Logging into the machine Generating keys Upload our keys Us... Read more

Symmetric Encryption With ChaCha20Poly1305

Table Of Contents Symmetric Encryption ChaCha20 Encryption Cipher Text Size Decryption Where to put the nonce? The Full Code Variable Sized Password This post is not completed yet Recently, I’ve started learning... Read more

String Hashing in C++

What is Hashing? Let’s think about a function unsigned int hash(string). This function will take a string as a parameter and return a unique ID let’s say an unsigned integer. This is called a hash function. It’ll generate a unique ID for every unique string. And same unique ID over and over for same string. Things get complicated when the two d... Read more