Boot.dev Blog
(Very) Basic Intro To White-Box Cryptography
by Lane Wagner - Boot.dev co-founder and backend engineer
White-box cryptography combines methods of encryption and obfuscation to embed secret keys within application code. The goal is to combine code and keys in such a way that the two are indistinguishable to an attacker, and the new "white-box" program can be safely run in an insecure environment.
Using 'Go Generate' To Deploy Multi-Process Apps
by Lane Wagner - Boot.dev co-founder and backend engineer
In microservice architectures, it's fairly common to have a project that includes different worker types. A Makefile can be used to manage the creation of multiple programs, but the Go toolchain has a tool that can be used as well, go generate. Here are some examples of how it can be used:
What Are Golang's Anonymous Structs?
by Lane Wagner - Boot.dev co-founder and backend engineer
An anonymous struct is just like a normal struct, but it is defined without a name and therefore cannot be referenced elsewhere in the code.
Quantum Programming 101: Superdense Coding Tutorial
by Macauley Coggins - Researcher and Founder of Quantum Computing UK
Superdense coding is a quantum communications protocol that allows a user to send 2 classical bits by sending only 1 qubit.
Announcing Go-TinyTime, Go-TinyDate's Sister Package
by Lane Wagner - Boot.dev co-founder and backend engineer
time.Time is the perfect choice for handling times in Go in most cases, it even comes in the standard library! The problem is that the time.Time{} struct uses more than 24 bytes of memory under most conditions. Go-TinyTime solves this problem by restricting the available dates to the range between 1970 - 2106, and only supporting UTC timezones. This brings data usage down to just 4 bytes of memory.
Golang Conversions - Ints To Strings And Strong Typing
by Lane Wagner - Boot.dev co-founder and backend engineer
Go is a strongly typed language, which means at any point a developer should know exactly what type of value they are dealing with. For example, if we have a function that prints a string, we can't just give it an integer and expect it to work. We have to cast it to a string explicitly:
How To Separate Library Packages in Go
by Lane Wagner - Boot.dev co-founder and backend engineer
I've often seen, and have been responsible for, throwing code into packages without much thought. I've quickly drawn a line in the sand and started putting code into different folders (which in Go are different packages by definition) just for the sake of findability. Learning to properly build small and reusable packages can take your Go career to the next level.
I Wrote Go-TinyDate, The Missing Golang Date Package
by Lane Wagner - Boot.dev co-founder and backend engineer
time.Time makes dealing with dates and times in Go a breeze, and it even comes bundled in the standard library! However, a time.Time{} struct uses more than 24 bytes of memory under most conditions, and I've run into situations where I need to store millions of them in memory, but all I really needed was a UTC date! Go-TinyDate solves this with just 4 bytes of memory.
How to Use Mutexes in Go
by Lane Wagner - Boot.dev co-founder and backend engineer
Golang is King when it comes to concurrency. No other language has so many tools right out of the box, and one of those tools is the standard library's sync.Mutex{}. Mutexes let us safely control access to data across multiple goroutines.
Best Practices for Interfaces in Go
by Lane Wagner - Boot.dev co-founder and backend engineer
Interfaces in Go allow us to treat different types as the same data type temporarily because both types implement the same kind of behavior. They're central to a Go programmer's toolbelt and are often used improperly by new Go developers, which leads to unreadable and often buggy code.
Wrapping Errors in Go - How to Handle Nested Errors
by Lane Wagner - Boot.dev co-founder and backend engineer
Errors in Go are a hot topic. Many newcomers to the language immediately level their first criticism, "errors in go are clunky! Let me just use try/catch!" This criticism is well-meaning but misguided.
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.
