Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-17-2008, 06:49 AM   #1
Registered: Mar 2008
Posts: 75

Rep: Reputation: 15
using openssl

Dear all,

I have used following script for encryption and decryption.I feel decryption is happending but when i check the data i cant read it .I have used following script

1) In local linux(assuming mount point is /mnt/ide1)

a) mkdir /mnt/ide1/backup1
b) mount -t nfs -o tcp rsize=32768,wsize=32768 /mnt/ide1/backup1
(for mounting a folder of remote system,which is to be encryted and decryted)

c)mkdir -p /mnt/ide1/backup1/fullbackup
d) chmod 0777 /mnt/ide1/backup1/fullbackup
e) cd /mnt/ide1
f) tar -cf p1.tar guest-share
g) /etc/openssl bf -in p1.tar -out -k 111
h) cp -f /mnt/ide1/backup1/fullbackup
i) cd /mnt/ide1/backup1/fullbackup
j) /etc/openssl bf -d -in /mnt/ide1/backup1/fullbackup/ -out /mnt/ide1/backup1/fullbackup/p2.tar -k 111
k) tar -xf p2.tar
l)chmod -R 0777 /mnt/ide1/backup1/fullbackup

Where am i going wrong ? Why cant i read the data of guest-share folder

PLease help me to solve the issue

With Regards,
Old 06-18-2008, 12:02 AM   #2
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Well, I did a quick test of steps (g) and (j), and they seem OK.

Why don't you compare the 2 files in (h) with each other (start with an md5sum or something) to make sure they are in fact the same.

I'd also perhaps try decrypting directly after (g) just as a test
Old 06-18-2008, 12:03 AM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
Please post code in [code] blocks. Also capitalize the personal pronoun "I" to make your post legible, and put double spaces between sentences.

Look at "which openssl". Binary files should not be in /etc. Which distro are you using?
The command is probably located in /usr/bin/openssl or /usr/local/bin/openssl depending on whether you installed openssl from a package or compiled from source.

I tried out these commands (similar to yours) and in the end, "file test.tar" verified that the decoded file was a tarball.
openssl enc -bf -in test.tar -out test.tar.enc -k 111   
openssl enc -bf -d -in test.tar.enc -out test.tar -k 111


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
oops openssl-0.9.8e over openssl-0.9.8d bad install now 2 copies? rcorkum Slackware 4 06-29-2007 02:58 AM
openssl easy_coder Linux - Software 1 09-08-2006 10:08 PM
OpenSSL and its wonder Swakoo Linux - Newbie 9 03-22-2006 08:41 AM
Do I need openssl? erick Linux - Software 2 10-02-2003 07:41 AM
openssl sailaw Linux - General 1 01-25-2003 04:29 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration