Attached is my code. I posted this twice on accident earlier, and I didnt attach the code which caused the users discomfort.
My problem is that i keep getting a segmentation fault and I can't understand why. The problem occurs during the decryption part of the program. My other question is how can i make my decryption part shorter and less "for" and "if/else if" statements.