Inspiration

We wanted to experiment with creative ways to represent data! Converting text into images seemed like an interesting and plausible way to do this. During development, we noticed an opportunity to give PictoCrypt a purpose-- and took it.

What it does

PictoCrypt can encrypt and decrypt messages! PictoCrypt encrypts text files into images using a passphrase given by the user. That same passphrase is used by the recipient of the images to convert those files back into text!

And as an added bonus-- the encryption also compresses the data!

How we built it

We used the Python Imaging Library (PIL), which allowed us to edit the RGBA values of each individual pixel in an image. To encrypt or decrypt a character, our program must first rebuild the dictionary which maps characters to RGB values and vice versa. PictoCrypt then uses that dictionary to encode or decode our text and images.

Challenges we ran into

A huge challenge for us was actually creating the GUI. Our first GUI was built using tkinter, one of the standard Python libraries for building a GUI. While it was functional enough, the fact that it implemented its own GUI widget set meant that it always looked out of place. Thus, our second GUI was then built with the wxPython library. Since it interfaced with OS API, programs built with wxPython always looked aesthetically pleasing, no matter the OS. Unfortunately, we found it difficult to work with. While it seems to be a powerful library, we couldn't spend the time to learn it, considering the time restraint. Finally, we found PyQt5 which allowed us to design a UI and then bind our functions directly to its events.

Accomplishments that we're proud of

PictoCrypt's compression appears to get more efficient the larger the file size. In encrypting one 170KB text file, we measured a space savings of 60%!

What we learned

_ James: _ I'd never worked with Git before, so this was my excuse to learn it. I also hadn't had much experience creating GUI's. Of the three libraries we tried, I really enjoyed learning to work with PyQt5 and its Qt Designer. All of these things will help me immensely in my current and future projects.

_ Paul _: I've never done any major projects in Python before, and this is my first time building a GUI, so this whole experience was completely new for me. I learned a lot about the process of building a GUI, and Python's unique implementation of code gave me a new perspective on programming in general.

What's next for PictoCrypt

We want to ensure that PictoCrypt is intuitive, and that our program is of quality work.

There's always room to improve! We're close to implementing multithreading that could speed up encryption and decryption speeds, but bugs kept us from pushing the update before the deadline. After that, since we'll no longer be constrained by a deadline, refactoring the code will definitely be good for the long-term health of the program. Not only would we be able to push the code to run as efficiently as it can, but we'd also make it more readable for future collaborators. In addition, we'll also be able to distribute the software so that we can hear from users what we can do to make it more intuitive. Finally, bundling the software into a windows executable would go a long way to make the program more accessible to interested users. Linux and Macintosh support could be provided if there was enough interest.

Built With

Share this project:

Updates