The RSA calculation I kept looking up during CTFs
I kept bumping into RSA puzzles, opening somebody else’s blog, and scrolling around to find the same handful of equations. This is the version I wanted on my own blog: what do I already know, what’s missing, and which calculation gets me there?
Going from a message to a ciphertextCall the original message $m$ and the encrypted number $c$. The public key has two parts, $(n,e)$. To build it, pick two large, distinct primes $p$ and $q$ and multiply them:
$$n=pq$$
The public exponent $e$ needs to be ...
BUUCTF Reverse WriteUp 1
BUUCTF Reverse WriteUpeasyreI opened the file in IDA and checked it with PEiD, which reported that it was not a valid PE file.
In main, the program reads two integers and prints the flag if they are equal. That is the whole check:
12345678910111213int __cdecl main(int argc, const char **argv, const char **envp){ int b; // [rsp+28h] [rbp-8h] int a; // [rsp+2Ch] [rbp-4h] _main(); scanf("%d%d", &a, &b); if ( a == b ) printf("flag{this_Is_a_EaSyRe}" ...
Why my Hexo upgrade kept leaving me on 3.9.0
I liked how clean my NexT theme looked, but then I’d see what people were doing with WordPress and start itching to change things up. Butterfly was the theme that finally got me to try. I installed it, went to generate the site, and my terminal filled with errors. So much for a quick theme change. Time to upgrade Hexo.
[toc]
How I upgraded the wrong thingThe advice I kept finding was to run this:
1npm i hexo-cli -g
The command worked. That was what threw me. I’d upgraded the command-line tool o ...
Troubleshooting an Android Studio Emulator Startup Failure
Troubleshooting an Android Studio Emulator Startup FailureWhen I tried to open an Android Virtual Device (AVD), Android Studio suddenly displayed: Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT.
Most of the solutions I found recommended creating an ANDROID_SDK_ROOT environment variable, but that made no difference in my case.
What worked was creating an ANDROID_SDK_HOME environment variable and setting its value to the directory where I wanted the virtual machine ...
What the dot, alias, and underscore mean in Go imports
I used to look at a Go import and wonder why some packages had a name in front of them, some had a dot, and some had an underscore. It helps to separate two questions: where does Go find the package, and how do I refer to it in this file?
Where the package lives1234import ( "./mypackage" // relative path "github/myrepo/mypackage" // full import path)
Of the two styles in my notes, I prefer the full import path. If I move the importing file, a relative path ...






