Find the answer to your Linux question:
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 ...
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    9

    Exclamation 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.

  2. #2
    Linux Newbie
    Join Date
    Nov 2007
    Location
    Planet Earth
    Posts
    152
    openssl does the job:

    To encrypt the input file:
    Code:
    openssl bf  -in input_file -out cryp_file
    To decrypt the file:
    Code:
    openssl bf -d -in cryp_file -out output_file
    Much more secure than simply scramble the contents... or is that a school homework??
    EOF

  3. #3
    Just 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...