I was thinking about the RSA encryption algorithm, and I was wondering how they picked the two large primes, p and q. I wondered if they had to be 100% guaranteed to be prime or if "probably prime" was good enough. So I asked Google's AI, and it said they had to be prime numbers and that close enough wouldn't work: If they had to be guaranteed to be prime, how did they guarantee that since they're…
I wonder what benefits you might get if you used an "optical guitar or bass pickup". Imagine a camera looking at the strings and then using software to turn the visual vibrations into sound. You could do all sorts of other cute tricks like have certain hand shapes result in certain sounds or even ignore string vibrations that were clearly unintentional. You can play lots of games with harmonics in…
I'm definitely not worried about good hackers [i.e. software engineers] getting replaced with LLMs. LLMs are a cute trick, even useful. I don't believe they'll generalize to AGI--I just don't believe it. Something will, but not LLMs.
Notion sat down on the curb, crushed his cigarette into the pavement, put his face into his hands, and sobbed. It felt good to finally let it out. He thought back on the good times. 2020. Sure, a lot of people were dying, but with everyone working from home, it was a real heyday for guys like him. He got married to a hot, young startup. This was the second marriage for both of them. Shit–what was…
Heh, I passed Google Cloud's Cloud Digital Leader certification! I started by taking GCP for Beginners - Become a Google Cloud Digital Leader on Udemy. It was about 10 hours of video. It took me a while, though, because I wrote 95 pages of notes. I was perhaps overcompensating for my poor memory. I studied for an extra couple of days reading random things on the web. The exam was about 90 minutes.…
These are my takeaways from the Stack Overflow Developer Survey : Programming languages: JavaScript, HTML/CSS, and SQL are still dominant. Python is the #2 programming language, followed by TypeScript. Only 5% of developers still code in assembly. Lisp moved up two spots to 1.33% of respondents. Rust is the language that the highest number of people want to either start coding in or continue…
No, ChatGPT, that's not right ;) If you try solving this puzzle yourself, it's not actually that hard if you start by picking the last word first. I picked "poems on a quick snake". One of the reasons this is hard for ChatGPT is that it picks the words in order.
A lot of people use mock.patch() in their tests, but it's also sometimes useful to monkey-patch code at runtime. This blog post talks about why and how. Let's imagine that you're using some library (perhaps something big, like a web framework), and for whatever reason, you're unable to update the version you're using. Meanwhile, someone comes along and reports a major vulnerability . You need to…
When I was first learning AppSec, my buddy, Josh Bonnett, sent me Cryptographic Right Answers . I read it 3 times and still barely understood it. But, now, it's my favorite page for figuring out the right thing to do when it comes to cryptography. Suppose you need to create a secret (i.e. a symmetric key). You need it to be long enough. That page says 256 bits is enough. You want it to not get…
This was my third time going to BSidesSF, which is a friendly, volunteer-run security conference. In the past, I've always avoided the CTF (Capture the Flag) hacking competitions because I was afraid of making a fool of myself, but, this time around, I decided to give it a go! In the last 3 years, I've spent a ton of time practicing thanks to @thecybermentor's Practical Ethical Hacking course…
People are understandably frightened by ChatGPT. They fear that it might put software engineers like me out of business. Some of my friends have even suggested that it's the beginning of a Terminator 2 situation ! I'm here to put those fears to rest: First of all, Microsoft is investing in OpenAI. From their purchase of Skype to their development of .NET, Microsoft has always shown itself to be a…
I thought of a cute way of infinitely generating prime numbers that I call the Streaming Sieve of Eratosthenes: #!/usr/bin/env python3 """ Streaming Sieve of Eratosthenes I thought of a cute way of infinitely generating prime numbers. """ from collections import defaultdict # upcoming is a defaultdict. Each key is an upcoming number. Each value is a list # of prime factors of that number. upcoming…
I finished reading Web Application Security: Exploitation and Countermeasures for Modern Web Applications by Andrew Hoffman. In summary: It's not very broad. It's not very deep. It's not very complete. It's not very polished--I plan on submitting a bunch of errata. I was surprised at Hoffman's choice to rely on Chrome DevTools and JavaScript for all his exploits. I think most web pentesters rely…
I finished "Monolith to Microservices: Evolutionary Patterns to Transform Your Monolith" by Sam Newman. It was great :) There were a lot of things that surprised me in the book. He's a lot more in favor of modular monoliths than I would have expected. He doesn't believe that microservices are the one true way. He thinks startups should stick with monoliths when they're trying to find their place…
I've been spending a lot of time practicing on LeetCode recently, so I thought I'd share some of my favorite intermediate-level Python tricks. I'll also cover some newer features of Python you may not have started using yet. I'll start with basic tips and then move to more advanced ones. Get help() Python's documentation is pretty great, and some of these examples are taken from there. For…
Opening Remarks The theme this year is "from the ground up". They're focusing on community, collaboration, and education. It's a 100% volunteer team. 25 people work year-round. They had speed mentoring sessions. They really need some new volunteers. See bsides.sf/jobs . The talks will be on their YouTube channel. They have a stringent photo policy. You must have the permission of everyone in the…
My buddy, Hy Carrel, joked that the Heisenberg Uncertainty Principle as applied to queues suggests that the more sure you want to be that an item in a queue is going to get processed, the less sure you can be of how long it'll take :-P
TL;DR A world that scrolls infinitely in any direction, an RPG-like UI, and simple, real-time fighting. My younger kids and I built this entry for PyWeek 32 based on the theme "Neverending". The key innovations are: It has a neverending world. As the player walks along, it picks up tiles and places new ones invisibly. It uses an LRUDict to remember the last million tiles you've seen. This matches…
I was wondering what percentage of passwords are pure ASCII. Hence, I threw together some code: #!/usr/bin/env python3 PASSWORD_LIST = "example.txt" num_pure_ascii = 0 num_iso_8859_1_not_ascii = 0 num_passwords = 0 with open(PASSWORD_LIST, mode="rb") as f: for line in f: password = line.rstrip(b"\n") num_passwords += 1 try: password.decode('ASCII') num_pure_ascii += 1 print("Pure ASCII:",…
(I'm talking about stuff I don't understand, so feel free to ignore me.) Space isn't entirely empty. There are a few hydrogen atoms hanging out here and there. Imagine if a spacecraft was flying really fast, and it was collecting those tiny few. It could either use a massive funnel at the front of it, or it could use something electromagnetic. Once it collects them, it could use fusion to release…
I was using the command line to quickly build out a file hierarchy. I wrote something that looked basically like: mkdir -p "~/dir/a b/c d" I meant for dir to be in my home directory. I should have put the ~/ outside the doublequotes. Hence, it actually ended up creating a directory called ~ . I thought, "Well that was dumb. Let me delete that and start over..." So I wrote: rm -rf ~ As you can…