I'm generally uncomfortable putting incomplete stuff online or even sharing it privately with friends at times. Nonetheless since multiple people at the New York Emacs Meetup expressed interest in seeing these slides during the Q&A I'm putting them out there.

For a bit of background the incident discussed in this presentation happened in late July 2018. This is the story of how I made a new OpenPGP keypair in a hurry right before the HOPE Conference, got my public key signed by Richard Stallman himself driving its cryptographic standing through the roof, deleted my only copy of the corresponding private key the next day rendering the keypair useless, and then used what amounted to crude forensic techniques to successfully recover the deleted key material four days later.

I first got a chance to talk about it publicly at the Rust NYC meetup in October 2018. Unfortunately due to a combination of having relatively short notice that yes I'd be speaking there, being busy in the days leading up to the presentation, procrastinating some of the times when I wasn't busy, being unsure if I even wanted to use a slide deck, later deciding I wanted a slide deck to help me tell the story right, and having no prior experience making slide decks I failed to complete the slides on time. Ultimately though I wound up having to go slideless for the final quarter or so of the talk overall it went pretty well. Afterwards I didn't bother refining the slides as I didn't think I'd be talking about it for a while(at least not until I scored myself a slot at DEF CON or something :-P). Hence I didn't bother finishing the slides afterwards.

I wound up giving this talk again at the New York Emacs Meetup in December 2018. That night I was there enjoying good technical content, good company, and good food. After the first few talks they were asking for more people to talk. A good friend of mine wound up giving a talk and later when I asked her if I should tell my story she said I definitely should. Though I was still on the fence about it as the speaker we were watching finished his talk his last slide included his OpenPGP fingerprint. If that wasn't another message from the universe to give the talk again I don't know what was. Unfortunately I did wind up having to reuse my incomplete Rust NYC talk slides as they were all I had.

The main problem with the slides in addition to them being incomplete was that arguably the most important slide with the command that went most of the way towards recovering the key (except for a bit of careful manual post processing in Vim to remove the binary cruft from at the beginning of the lines ending in -----BEGIN PGP PRIVATE KEY BLOCK-----) wouldn't render properly. Maybe this was because I used LibreOffice Writer to prepare the slides as opposed to LibreOffice Impress which I found too complicated to figure out on short notice. Anyway without further ado this was the literal command that saved my bacon:

cat /dev/mapper/logical_volumes-data_volume | LC_ALL=C awk '/-----BEGIN PGP PRIVATE KEY BLOCK-----/,/-----END PGP PRIVATE KEY BLOCK-----/' > /home/georgiy/RECOVERED_STUFF_LC_ALL_SET_TO_C

Special thanks goes out to my friend Paul Backus for helping me stay calm and helping me come up with the solution that worked. Though it wasn't necessarily the only way of doing things it was him who proposed the use of awk to retrieve the raw key material from the raw device file corresponding to the data volume of my encrypted LVM setup. Without Paul this story could very likely have had a different outcome.

On that note STOP WHAT YOU ARE DOING AND TAKE A MOMENT TO FOLLOW PAUL ON HERE RIGHT THE HELL NOW: https://github.com/pbackus

Seriously Paul is an absolute systems programming powerhouse and I'm only slightly exaggerating when I say he taught me everything I know about programming and good engineering. I truly believe he's well on his way to being the next Andrei Alexandrescu or Graydon Hoare.

At some point when I have the time and energy I hope to publish the completed slide deck I would like to have used for my talks in another repository and/or an appropriately detailed/nuanced blog post whose entire content will be made downloadable for offline reading in a cruft free form...