Boot.dev Blog
JWT Authentication in Golang
by Lane Wagner - Boot.dev co-founder and backend engineer
Go is becoming very popular for backend web development, and JWT's are one of the most popular ways to handle authentication on API requests. In this article, we'll go over the basics of JWT's and how to implement a secure authentication strategy in Go!
How Do Brute-Force Attackers Know They Found The Key?
by Lane Wagner - Boot.dev co-founder and backend engineer
To "Brute Force" something (when talking about computers) means to systematically try every possible combination until you find the right answer.
AES-256 Cipher – Python Cryptography Examples
by Lane Wagner - Boot.dev co-founder and backend engineer
Want to encrypt text with a password or private key in Python? AES-256 is a solid symmetric cipher that is commonly used to encrypt data for oneself. In other words, the same person who encrypts the data also decrypts it, the way personal password managers work.
Will Banning Cryptography Keep the Country Safe?
by Lane Wagner - Boot.dev co-founder and backend engineer
Politicians in the United States have been claiming recently that end-to-end encryption is certainly too dangerous to permit. This movement is serious. Congress even introduced a bill that would remove the protections that we currently have that allow us to legally encrypt information. Lindsey Graham is one such proponent of this restrictive legislation:
How To Cache Images - React Native Expo (Managed)
by Lane Wagner - Boot.dev co-founder and backend engineer
Caching images in React Native can be easy, even if you are using Expo's managed workflow. The problem many devs run into is that React Native only supports caching images on IOS out of the box.
Is Open-Source Cryptography Really Secure?
by Lane Wagner - Boot.dev co-founder and backend engineer
The purpose of cryptography is to keep information private, and the purpose of open-source is to make code public... So we shouldn't open-source our cryptography algorithms right?
Hashing Passwords - Python Cryptography Examples
by Lane Wagner - Boot.dev co-founder and backend engineer
Building a from-scratch server or using a lightweight framework is empowering. With that power comes responsibility, specifically the responsibility to securely store user's passwords.
Why is Exclusive Or (XOR) Important in Cryptography?
by Lane Wagner - Boot.dev co-founder and backend engineer
If you are getting into cryptography, or just trying to understand the fundamentals, you may have noticed that the exclusive or (XOR) operation is used quite often, especially in ciphers. XOR is a simple bitwise operation that allows cryptographers to create strong encryption systems, and consequently is a fundamental building block of practically all modern ciphers. Let's dive into the details and see what makes XOR so important.
JavaScript With Statement Explained – A Deep Dive
by Lane Wagner - Boot.dev co-founder and backend engineer
JavaScript's built-in with statement specifies the default object for the given property and gives us a shorthand for writing long object references. More precisely, it adds the given object to the head of the scope chain.
JavaScript Map Function Explained - A Deep Dive
by Lane Wagner - Boot.dev co-founder and backend engineer
The built-in JavaScript map function returns a new array, where each element in the new array is the result of the corresponding element in the old array after being passed through a callback function. Later in the article, we'll do a deep dive into some more advanced concepts regarding the map function and its uses.
BitBanged SPI in Go, An Explanation
by Lane Wagner - Boot.dev co-founder and backend engineer
I'm going to focus mostly on some design decisions and also how I went about writing an SPI interface using Go on a Raspberry Pi. I assume my readers have a basic understanding of what a Raspberry Pi is, and how basic electronics work. If not, read on anyway and I will be sure to include some valuable resources below.
Top 8 Online Crypto Communities
by Lane Wagner - Boot.dev co-founder and backend engineer
Crypto has been explosive in 2021. The gains have been even better than the memes! While dancing cat videos are fun, the wise will also take advantage of the various communities as an opportunity to learn more about the technology that supports decentralized money. I've put together a small list of the top crypto communities for you to check out this year!
Top 6 Golang Logging Best Practices
by Lane Wagner - Boot.dev co-founder and backend engineer
Let's discuss a few rules of thumb for logging in Go, as well as some features you may not have heard of that can make debugging easier. Best practices for logging in Go are not so obvious and sometimes we need to look closer to see what is the best choice, considering the unique situation of error handling in Go.
Cryptography Trends And News Going Into 2020
by Lane Wagner - Boot.dev co-founder and backend engineer
Quantum computing may not be coming quite as fast as some in the field had certainly feared (or perhaps hoped). Google did, however, solve an impressive problem this year.
Intro to The AES-256 Cipher
by Lane Wagner - Boot.dev co-founder and backend engineer
AES, or "Advanced Encryption Standard", is an encryption specification that uses the Rijndael cipher as its symmetric key ciphering algorithm. AES encrypts a message with a private key, and no one but the key holder can decrypt the message. A great example of a good use-case for AES-256 is encrypting all the data on the hard drive of a computer when it's not in use.
(Very) Basic Intro to Hash Functions (SHA-256, MD5, etc)
by Lane Wagner - Boot.dev co-founder and backend engineer
Hash functions are used to securely store passwords, find duplicate records, quickly store and retrieve data, among other useful computational tasks. As a practical example, all user passwords on boot.dev are hashed using Bcrypt to ensure that if an attacker were ever to gain access to our database our user's passwords wouldn't be compromised.
Basic Intro to Key Derivation Functions
by Lane Wagner - Boot.dev co-founder and backend engineer
A Key Derivation Function, or KDF, is a cryptographic algorithm that derives one or more secret keys from a secret value. If you've ever needed to store a password in a database or create a private key from a password, you may have used a KDF. Some examples of popular KDFs are Argon2, Scrypt, and PBKDF2.
Cryptology vs Cryptography - Definitions and Differences
by Lane Wagner - Boot.dev co-founder and backend engineer
Many new developers are jumping right into writing code, usually for those fat paychecks, without learning much about the history of Computer Science. Alan Turing is recognized as the father of Computer Science, though many don't know that his roots were in cryptology and mathematics. It was out of cryptology, cryptography, and mathematics that computer science was born.
Boot.dev's Lead Engineer Interviewed on "Running in Production"
by Lane Wagner - Boot.dev co-founder and backend engineer
The podcast is available here.
Building Alerts with Percolate Queries in ElasticSearch
by Lane Wagner - Boot.dev co-founder and backend engineer
Once upon a time, a company I worked for had a problem, we had thousands of messages flowing through our data pipeline every second, and we wanted to be able to send real-time emails, SMS, and Slack alerts when messages matching specific criteria were found. A simple solution built using ElasticSearch's percolate queries ended up being our saving grace.
Which Method of Iteration in JavaScript is Fastest?
by Lane Wagner - Boot.dev co-founder and backend engineer
There are many ways to traverse an array in Javascript. In this benchmark, we will look at five different ways and the pros and cons of each. Keep in mind that these benchmarks were run in a Chrome browser on Codepen.io. Results will vary by browser/interpreter.
Singletons in ES6 - The Good, The Bad, The Ugly
by Lane Wagner - Boot.dev co-founder and backend engineer
Singletons are fairly controversial as far as I can tell, especially in JavaScript programming. Let's take a look at what they are, when to (maybe) use them, and when not to.
How to Create Constant Maps, Slices, & Arrays in Golang
by Lane Wagner - Boot.dev co-founder and backend engineer
The quick answer is that Go does not support constant arrays, maps or slices. However, there are some great workarounds.
Systems and Processes that Aren't in Code are Terrifying
by Lane Wagner - Boot.dev co-founder and backend engineer
My worst enemy is processes that a developer spun up years ago on a server everyone has forgotten about. I don't know how to find these systems reliably, I don't know where they came from, what depends on them, and if they are safe to delete. For example, the dreaded 15 6 2 1 /home/lane/backup.sh. You may recognize this as a Unix cronjob, a job that is scheduled to run on a server periodically.
How to Recursively Traverse JSON Objects
by Lane Wagner - Boot.dev co-founder and backend engineer
I've found that it's pretty rare that I need recursion in application code, but every once in a while I need to write a function that operates on a tree of unknown depth, such as a JSON object, and that's often best solved recursively. Even though recursion is rare, it is important to recognize when a problem is best solved recursively so that we can implement a good solution when the time comes.
