Inspiration
We brought together two ideas we thought were quite interesting. DNA, and steganography
DNA is a relatively interesting medium of information storage.
- It's extremely space efficient. Bacteria can achieve around 1250PB per cubic centimeter, while modern tape drives peak at around 80GB/cm3
- It's incredibly stable. Scientists have been able to sequence DNA from half a million years ago.
- It's more eco-friendly than alternate means of storage, which consume more resources and costs more energy to produce.
And what's more, modern technology is becoming capable of using it. Scientists at Columbia University have achieved DNA storage at 85% of the theoretical density limit.
Steganography is the technique of hiding data inside other data.
The term is based on the Greek word steganos, meaning "covered" or "hidden". Here, information is literally being hidden from you.
The technique has been used for a wide variety of applications in many mediums:
- Some printers will print out near-invisible serial numbers and timestamps on their pages
- Terrorists have hidden messages in images and videos on social media to communicate
- People have reportedly used steganography to commit industrial espionage
So with that we thought, 'why not hide things in DNA sequences?'
And that's what we did.
What it does
On our webapp, you can upload a genetic sequence(in .FASTA), a file to be hidden, and provide an key for use in decryption. You'll recieve a genetic sequence with the file hidden within.
You can also upload encoded sequences with a key, and download its encrypted file.
Under the hood, our API uses a python script to convert A, C, T, and G nucleotides into binary data and vice versa. Given that there are 4 states, we we can use each nucleotide to represent two bits. We turn the secret file from its binary form into nucleotides, and replace sections of the preexisting sequence to store our data.
However, that's a little too easy to decrypt, and any long sequences of the same bytes will appear obvious. To counteract this, we implemented a few measures:
- To make the data less visually apparent, we did an XOR hash with a user inputted key to the binary data prior to conversion into nucleotides. Areas with low noise(e.g 00000000 or something) will appear less suspicious with this.
- To make it more difficult to decrypt, we selectively spaced out our data using certain codons(specific chains of 3 nucleotides). Whenever we identify a certain codon in our data, we skip ahead a bit until we see other specific codons. This fragmentation of data makes it more difficult to properly parse the data.
Part of the logic behind this skipping behavior is to use physical characteristics of DNA in the situation that we read from physical DNA. One codon we use is cysteine(TGC/TGT). In reality, these codons frequently form physical bridges between each other, giving us a means of easily jumping between them.
To decrypt, we just do everything above, but backwards. We read through the file, compiling a sequence of nucleotides which are then converted to binary, hash it again with the same key to restore the data, and send it back.
How we built it
We used node.js with express as our backend. Python scripts were used to encrypt and decrypt the data.
The front end was done with html, css, and a bit of javascript.
Challenges we ran into
Figuring out the algorithm was somewhat difficult. We sometimes found issues which we didn't realize prior to programming, and had to figure out how to overcome them.
Additionally, we are all relatively new to web development, and had to learn node.js, html, and javascript, and their libraries on the fly.
Accomplishments that we're proud of
- The algorithm works... somehow.
- This is our first time making a webapp, so it was quite exciting to see it all go together
What we learned
- Communication is key - we kept organized with planning documents and video calls so problems could be quickly resolved. It paid off quite well.
- How backend to frontend communication works, GET requests and all that
What's next for NucleoHide - Online DNA steganography
- Improve the algorithm
- Steps can be taken to make the sequence appear more realistic
- Use a better hash than just xor
- Improve performance - maybe transition to C?
Log in or sign up for Devpost to join the conversation.