How do electronic passports work? (Part 2)

In the second part of this post I will try to give code examples for some basic functionality in eMRTDs. I will add code snippets for each of the sections. The code is mostly a port of my other project eMRTD_face_access from Python to Rust (emrtd crate). It came to life because I was interested in a rewrite of the project in Golang to take it away from Python. During the initial research of PSCS libraries in Golang, I found that there wasn’t a cross platform PCSC library that supports Windows, Linux and macOS. Then taking advantage of this, I decided to learn Rust and rewrite the project in Rust instead.

Read More…

How do electronic passports work?

In this post I will try to explain how electronic passports work, how to read files from them and how to verify the authenticity of the chips inside them. Hopefully it will provide an entry point for those who have not tinkered with smart cards in the past.

Read More…

Disable AWS CloudFront Distributions if Budget is Exceeded

I am scared of using AWS. In AWS, you can’t easily put a hard cap on the money that you will spend, meaning if you are the target of a DDoS attack or if something goes wrong, you might be overcharged massively. For me, this means that if my CloudFront distributions are under a DDoS attack, I might get a budget notification in my email, but if I don’t act fast enough, I might be overcharged. I would like to avoid that. So in this post, I will try to explain how we can disable all of our CloudFront Distributions if the budget is exceeded or if we exceed some threshold we set for our CloudFront requests.

Read More…

AWS CloudFront Returns Status Code 200 on 404.html page

If you have followed my Getting a blog running with Jekyll, GitHub Actions, AWS S3, and CloudFront post, among other things you will see an issue where if you manually go to the 404.html page, CloudFront will happily serve you the 404.html page with 200 OK status code. This not only is wrong, but also hurts SEO. I don’t care much about SEO but I still want to fix the problem.

Read More…

Creating and mounting a BitLocker drive image on Linux

Last year, my internal M.2 SSD drive stopped working. I had experienced disconnection problems over the last 2 years; however, last year, it just refused to turn on. It was also encrypted with BitLocker. I took it to a repair shop that claimed they could perform data recovery. However, after waiting for a couple of days, they informed me that they couldn’t recover any data; the M.2 SSD drive was broken and not recognized. I didn’t want to lose all the data I had on that drive, so I purchased a cheap M.2 SSD drive reader and returned home.

Read More…

Getting a blog running with Jekyll, GitHub Actions, S3, and CloudFront

I have been planning on making a technical blog for a long time. I gave it a couple of tries before but never got it finished. Now, I made the final stretch and have one up. From the title, you might have seen the technologies used, and you might ask, “Why Jekyll?” The reason is that static websites are small, cheap, and fast. I am fascinated by them, and I wouldn’t like to have heavy components running for such a small blog.

Read More…