Results 1 to 3 of 3
I am having a lot of trouble with a question that requires me to encrypt a message and decrypt a message. the question is:
create a file called makesecret and ...
- 10-27-2009 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 9
scripting - encrypting and decrypting a message.
I am having a lot of trouble with a question that requires me to encrypt a message and decrypt a message. the question is:
create a file called makesecret and readsecret. makesecret takes the content of the file msg-norm and performs some encoding to the message to scramble it up and outputs the encrypted message to the file msg-mixed. readsecret then decrypts the msg-mixed file back to the origional message. (hints: tr, sed; use multiple layers of encryption to mix them up more or try creating a "shared key" that can be shared separately to decode the message).
if anyone can help with this question it would be greatly appreciated.
- 10-27-2009 #2Linux Newbie
- Join Date
- Nov 2007
- Location
- Planet Earth
- Posts
- 152
openssl does the job:
To encrypt the input file:
To decrypt the file:Code:openssl bf -in input_file -out cryp_file
Much more secure than simply scramble the contents... or is that a school homework??Code:openssl bf -d -in cryp_file -out output_file
EOF
- 10-27-2009 #3Just Joined!
- Join Date
- Oct 2009
- Posts
- 9
yes, this is just a preparation question for a test next week. I think in the hints section of the question Im suppose to use those commands i.e. tr and sed.


Reply With Quote