Without further ado, I want to introduce John Dunlap and he's currently a pen tester at GES. I'll let him explain everything that he's about as he goes through DNA encryption discussion. All right. I don't think I'm hot. There we go. Hey everybody. Who's ready to encrypt some stuff in living organisms. My name is John Dunlap. I am a security researcher, reverse engineer, pen tester, whole nine yards to do security. I work for a firm called GES Security. We have offices in New York, London. They don't do much with DNA, but I thought I would just on a lark. I'll tell you more about how I got interested in that and using DNA as a side channel for encrypted messages. Now let's be clear. I'm a hacker. I'm a researcher. I'm a programmer. I'm curious, stubborn, and I'm perhaps foolhardy. I am not a biologist. I'm not a geneticist. I'm not a lab professional. I'm not a full-time cryptographer. But none of this has dissuaded me from synthesizing DNA and making synthetic life forms. Maybe it should, but it doesn't. So what was the emphasis for this talk? Well, I've had a long-term interest in biology. I mean, like many hacker-type people, I have a wide range of special interests, deep hobbies. I really liked reading about biology, and there was a local sort of biohacker space that was offering classes on doing PCR. I went and did some gene editing on E. coli to implant a glowing fluorescent protein. You can see this is the results of my experiment. These are E. coli bacteria inserted with green fluorescent protein. Actually, no, it's red cherry. Yeah, red cherry MX or something like that. Fluorescent protein. So, I began, like, talking with the people who ran the space about, like, you know, I'm a security researcher. I'm a security engineer. I think I have a project that we can do. I'm willing to become a member of the space and pay the monthly fee if you guys will help enable me to do some crazy security stuff with these living organisms. And I did. You know, and just a note on that is you have a local community biohacker space. You know, this is a new idea in life. Please support them. Please be responsible. Shoutouts to Mike and Will at Genspace for helping me out with all this. That's my local biohacker space, by the way, Genspace in New York. There are so few of these. And you'll see in a second why I couldn't have done this without a community space to do it in. We'll talk about it. So, what is what we're going to attempt here is a form of DNA data storage, which is not a new thing. I didn't invent a lot of these. I have a lot of ideas. I'm just looking for a DIY implementation of it that someone with a minimal molecular biology background could implement on a minimal budget and do successfully. And if you want to think about the dream attack here, what we're looking to do is take, you know, the codes, maybe the launch codes, and put them into a bacteria where your local TSA agent, where it's not going to think to look for them and, you know, oh, hey, this is just my bottle of E. coli, think nothing of it. They can't ask you to decrypt that hard drive. And then even if they were to be smart enough to sequence your DNA, they wouldn't know where the heck to look for it. It's such a big space of area to look for that data. And it's encrypted, is the other thing, what we're going to do here. So, we're going to attempt to implement biological encryption, you know, living stego, if you will. Now, people have been trying this on a research and experimental level for a while. There's some great, going back to the 90s even, some great papers suggesting this and going through the viability of various encryption schemes, all the way from, you know, one-time pads to RSA and that kind of stuff, or, you know, doing public key cryptography in DNA. The vast majority of it is sort of theoretical. There are groups working on this in practical terms, but there's limitations. I'll talk about that in a second. It's not really the same as what I'm trying to do. And there are definitely limitations that hold you back from doing this. You know, if you read my slides later on, you can take in the breadth of the research. A lot of it proposes using something called a DNA chip, which is sort of a hybrid between something you buy and something you cook up in the lab that lets you have a stable binding of the DNA that can be easily read and written to. Too expensive for me, so I am disregarding it entirely. And this sort of side channel attack or segmentography in DNA was proposed as far back as 1999 and continues to be talked about. Here's what one of those DNA chips looks like, by the way. But in general, there's a lot of cryptography. There's a lot of cryptography. There's a lot of papers, papers from cryptographers less than biologists, talking about how you would do this, the data science of whether it's viable, how you would implement the encryption, but not a whole lot of practical lab results. And again, I get the sense that people are doing this, but it's a lot of the actual experimental data isn't public. Like for instance, I'm aware there's a lot of DNA data storage research going on at like IBM, and you know their practical results are not public. So my idea is to do it small and do it simple. I don't have a lab of my own or funding or a team of grad students or microarrays... I'm just going to cook some cryptography up in an ECO-like culture that can be replicated by DIY people, and the way I'm gonna do that is to edit a plasmid we'll talk a little bit later. a little bit about what that is in a second, via restriction enzyme digestion, which is the classic gene editing technique that goes back to the 70s with Watson and Crick. And we'll sequence the culture and see if we can get the plain text back out. And then maybe giggle at the results madly because this is just too cool. So what we're gonna wanna do is first construct something called Oligo, and for our purposes, simplifying this talk, we're just going to make a little crust of DNA that we're going to implant into our host organism. If you're going to get DNA synthesized, if you're going to have some arbitrary DNA made up for you, the various DNA shops that will build the DNA for you have guidelines on what Oligo should be. We'll talk about the practicalities of how that falls into my project in a second. But there are a few no-gos for what can go into DNA. And we're going to put our Oligo into a plasmid. And a plasmid, you can think of as like a DNA donut. For our purposes, in our host organism, plasmid is like a little ring of DNA that exists outside of the chromosome, which is nice for a couple of purposes, mainly that it's unlikely to directly negatively affect, you know, the host organism. And that's the life cycle of the host organism. And also, bacteria share these plasmids between each other rather promiscuously, so it's a very easy environment to do gene editing in. Bacteria normally just swap out these plasmids on their own. So like, inserting them forcibly into the bacteria is actually not going to be abnormal to their life cycle. If you've ever heard of antibiotic-resistant bacteria, one way that that property is sort of passed between bacteria is via plasmid transfer. Here's what a plasmid looks like under a scanning electron microscope. Again, this is a donut structure. And here are some bacterias sharing plasmids via what's called bacterial conjugation. They actually sort of reach out this long kind of tendril and swap stuff out, which is pretty freaking cool. So, step one, we're going to pick an amenable model organism. In my case, I picked E. coli because it is cheap, easy to work with, readily available, and I've worked with it before. Next we're going to pick an amenable encryption strategy. We want something that works with a small amount of data, that's low complexity, high integrity, and low cost. And it's cheap, and it's cheap. And I can do it in a community lab. Okay? Affordable DNA synthesis, and if you're a little confused when I keep talking about synthesis, you can just pay a company to make you arbitrary DNA. You can order DNA in the mail, which is freaking cool. Every time I explain that to people, they're like, no, really? So, but size is a factor. Anything over about 60 nucleotides gets radically more expensive. And things like Health complements are palindromes, basically any time that the complimentary DNA nucleotides are repeated backwards on each other creates the situation where you can get something like a hairpin that will ruin your synthesis. Repeating patterns can be a problem for sequencing. We want to avoid all that complex. And, you know, there are papers that attempt to do this in DNA, but it would involve sequencing a lot more DNA than I want to spend money on. We'll talk about practical costs in a few slides. So I decided to keep things classic and keep it simple and go with a one-time pad. It can be small. It can be perfect. I don't want to mess with key sharing for DNA. And the likelihood of anyone even finding where the encrypted data is pretty low. And since our message sharing is going to be so slow anyway, and we're talking about mailing or walking DNA back and forth between our crypto partners, you know, the keypad problem with one-time pads isn't going to really be a practical problem. So, you know, here is just some nucleotides. We have to find a way to encode our message. Right? We've got to turn ASCII text into nucleotides. So we're going to convert ASCII into ACGT. And the exact method by which we do this determines the density of data we can encode. Let's check that out. So we can map 0, 1, 2, 3. I had no idea before that a base 4 integer is called a quat, by the way. I think that's really funny. There is no standardized term for a base 4 byte either. Because there's bytes for, you know, normal bits to bytes. And then trits to trites. But quats to quites? You know? I think everyone just gives up at that point. You know, I think everyone just gives up at that point. I found only fragmentary data of what you're supposed to call that. So we have our base 4 integer. And then we have to decide, and this is the most important thing, is like byte width. How big our bytes are going to be is going to affect how much data we can encode. And also like the size of our ASCII table. Yeah, some people call base 4 quat bytes crumbs. I've run into that. That's really weird. And here's our comparison. So if we use a 4 quat byte, we can get the entire ASCII table. 3 is acceptable. 2 is kind of sketchy. So for simplicity's sake, I went with 4. Next we have to design a primer. And so easiest way to think about this is that when we make our oligo, we're going to have encrypted data, right? And on each side of that data, we need some sticky bits that are going to help anneal that data onto our plasmid. So we have like most of a plasmid ready to go. Just bought from the lab. And we're just going to stick on our data that's synthesized. So what we want is a 20 nucleotide primer, binding site, and 20 nucleotide reverse primer. And it's going to be in the shape of a primer binding site payload and reverse primer. And, you know, I had to check with my lab to make sure that format would work. And then I had to check with synthesis people to make sure they were okay with it. Lots of advising going on. If you check with each of the synthesis companies, they'll give you some advice on what's good for them. It might vary, synthesis company, synthesis company. I use a company called IDT in my case. Usually, they have some pretty elaborate like JavaScript toys to like try and give an idea of the sequence you've given them. It works, but it's not bulletproof. You want to avoid, like I said before, repeating sequences can cause some problems. Self-complements can cause some problems. There's a good explanation of the self-complement problem right there. Basically, each nucleotide has a complementary sort of letter, and it can cause the DNA to fold in and sort of bind with itself, which is bad. You also have to do some analysis on annealing temperatures depending on exactly what base pairs you put on. It affects the annealing temperature, and if the primer and the verse primer have radically different annealing temperatures, that can throw off the entire experiment. Then, once you've done all that, you can put your little oligo into BLAST, which the National Institute of Health has a website where you can search for the DNA. You can search to make sure that your oligo isn't part of some pathogen or something like that. Here's the results for my oligo that I most recently had synthesized. It comes up. It's such a small pattern. It comes up in all kinds of other fragments from other organisms. Nothing too scary in there. I automated this process with a program. It converts ASCII into, our base four representation, and applies a one-time pad. You can configure the byte size and just the description as well. It's up on my GitHub. It's still marked private right now. I'm going to send it public right after this thought. Let's do a POC on that. We're going to convert some leetspeak into DNA because that makes me laugh. A commercial synthesis company actually took this same leetspeak and synthesized it for me and made DNA without any complaints, which also amuses me. What it doesn't do is do some of the more robust structural checks on the DNA, like self-complement, temperature. I use the external tools for that. That's on the to-do list for the tool itself. Also, again, when you order from synthesis companies, they will do some of that for you. For our one-time pad, you need a key that's the same size as message. User-specified by the tool. Believe me, you'll have plenty of time to figure out new keys in between one-time messages in this process because it's like a two-week turnaround to get the entire E. coli gene editing thing going. If you're not familiar with one-time pad encryption, you need a book of unique keys that are never reused. Having that going between two labs, it's doable. The plaintext we're going to use is Elite Feet because we accomplished something cool. The key is going to be CryptKid because we're using this script to become a genetic engineering script kitty. Here are the help and arguments for my tool. You can load the key from a file. You can do different byte sizes and whatnot if you want to do this at home. If you need to squeeze in more information, you can use a smaller byte size, etc. Here's what it looks like being run. It spits out some nice nucleotide encodings, which is cool. Here's a decryption. Decrypts to Elite Feet. Once I had that and pasted on my primer and reverse primer, I could order the DNA for synthesis. Except not. This is where the community lab thing comes in. For better or for worse, at least in the United States, in our system, you can't just order stuff from labs anymore, which is kind of sad, but I guess it's for the best. If you're ordering DNA from a place like IDT, they're going to ask for your credentials as a biologist, what lab you work for, etc. Which is some pluses and minuses, but it sucks if you're a hacker. In my case, without the relationship with the community lab, I would be unable to order this DNA, period, even though there's not much I could do with it without a lab in the first place. There's a lot of stuff in science you can't order without access to a legitimate lab. Which kind of sucks. It would be pretty tough to do the synthesis on your own because it requires some nasty chemicals that are hard to handle. You'd end up having to do it in a lab in the first place. Unless you're very brave. Next step, we're going to be editing our E. coli. High-level protocol here. We're going to use a restriction enzyme to edit our plasmid. Same technique. Watson and Crick. Hughes and 70s. We're going to snip the plasmid, leaving some sticky ends, which are synthetic DNA you may attach to. If you want to see lab protocols for how to do that, I give you some suggestions. Genscript.com is a really great site for checking out genetics protocols. They list out stuff like this or how to do really accessible versions of PCR. One of the reasons I did this version of the experiment because it's very well documented. There are many protocols on it. There's lots of advice on it. People do it in college all the time. Let's show some cool pictures because it's not real until you see it. Here's the DNA I ordered from IDT. It comes in little vials like this. Here's some more. That's leetspeak-carrying DNA. The PCR machine had to do some amplification on this. Plates, little carriers for the vials, more plates, and PCR gels, trying to amplify the stuff pre-sequencing. Here's Genscript's protocol on this. A little too nitty-gritty to go through in deep detail, but you add a bunch of reagents together, do some centrifuging, and there's a temperature cycling step that gets the plasmid to accept our DNA. Tons of variations on this. Once we have this done, we can verify that the DNA is in our E. coli. We want to send it out for sequencing. Again, this is another thing you're going to have trouble doing with a DNA test. You can't do this without access to a legit lab. A lot of places will sequence your human DNA. It's a little different than getting stuff like 23andMe. Asking people to sequence bacteria is a little different. They want to know that you know what you're doing. They're also going to charge you more if you don't know what you're doing because you can send them a plate of bacteria and ask them to figure it out, but they're going to charge you a lot more than if you have something very purified for them. At that stage, once you've done that, you're free to go interpret your results. The lab's going to send you basically chromatograph readings. They're going to turn out to be a bunch of nucleotide strings. It's your time to check and see if things went wrong or right. Results look kind of like this. That's where, if you had the repeating pattern, or the self-compliments, things could have gone very badly because, again, the repeating patterns tend to throw the sequencing machine for a loop. It makes the head kind of think like it's gotten stuck or something like that. Once you have done all that, you can take your secret data anywhere. Anywhere that E. coli is accepted. I don't know if that's the airport or not. How much did this cost me? Maybe about $300. $300 for lab membership. Synthesis cost me about $40 for a pretty good quantity of the DNA. I did pay about a couple hundred bucks for lab expendables like enzymes and that kind of thing. That's more than enough to last me for a while. Sequencing cost me a bit more because I paid for a primo sequencing kind of situation. About $800. If I did it again, or I'm continuing to do it right now, it costs less. Less every time because I don't have to buy most of that upfront stuff. What's the benefit? What's the point? No one is going to ever guess your data is in that bacteria. No one's going to ask you to decrypt it. It's not an obvious storage medium. There will never be any key escrow on your bacteria. It would take a very dedicated effort for the NSA to backdoor your bacteria. You get to birth synthetic life, which is pretty cool. But it is pretty expensive. It's slow. Keeping one-time pad books sucks. And there is a problem of, since our synthetic DNA or whatever does not provide any evolutionary advantage to the bacteria, to E. coli, it has a high chance of generationally just doing away with it, evolving away the plasmid you put in there because it has no reason to keep it. Bacteria sort of evolves pretty quickly. And, you know, you can't really do this without the involvement of several labs. But if you're really dedicated, you can. Yeah, the cost per bite is a little high compared to on-chip AES. Just saying. So what am I going to do with this in the future? I'm going to try this out in new model organisms. Put it on stuff like yeast genomes with CRISPR. Try and implement some new models. Some more lab algorithms, yet cheaply. And then maybe a viable method to package a living colony for stealthy transport. And to do some longer-term testing to see how long our encrypted information is capable of living in the bacteria without being corrupted. There's a lot of talk in literature about error code implementations to make sure that your stuff doesn't go bad. And, you know, making the lab people less mad with fewer bags for health. So, you know, promising idea, yeast. Might be able to make a dried yeast or something where our information stays alive pretty well. So I hope you guys had fun. If you're a well-informed molecular biologist, I'm so sorry. This has got to be like when I watch CSI Cyber or something. Yeah. But I'm a hacker. I dabble. That's what I do. You know, please get involved in biohacking community if you're not already. This stuff is... is pretty accessible and there's people who are willing to teach you. Just, you know, make sure you're around people with the right credentials to teach you to handle lab equipment safely and, you know, you don't get bacteria in your eye or something. There's also a lot of fun bioinformatics work to be done. If you're thinking of starting a community lab, please do that. The world needs more of those. And please do hit me up on GitHub or Twitter if you're interested or have questions about my project. And in general, you know, have a happy time biohacking. Thank you. Thank you.