LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-18-2009, 03:23 AM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Rep: Reputation: 57
With which program can we encrypt/decrypt text cross-plaftorm?


With which program can we encrypt/decrypt text/files cross-plaftorm?
 
Old 10-18-2009, 04:12 AM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by frenchn00b View Post
With which program can we encrypt/decrypt text/files cross-plaftorm?
Which platforms? From one Linux "platform" to another:


Encrypt:

Code:
$ openssl enc -aes-256-cbc -e -in /file/to/encrypt -out /file/to/save
(You will be prompted for a password)

Decrypt:

Code:
$ openssl enc -aes-256-cbc -d -in ~/file/to/decrypt -out ~/file/to/save
 
Old 10-18-2009, 04:53 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
http://www.gnupg.org/
http://www.gpg4win.org/
http://macgpg.sourceforge.net/
 
Old 10-18-2009, 09:28 AM   #4
sonichedgehog
Member
 
Registered: Oct 2007
Location: London UK
Distribution: Fedora Core 17
Posts: 298

Rep: Reputation: 32
there is probably a better way than this but if all else fails set up a truecrypt container of about the right size and copy your files into it. It then works like a cross-platform tarball as there are truecrypt versions for w$ & mac
 
Old 10-24-2009, 04:06 PM   #5
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by lutusp View Post
Which platforms? From one Linux "platform" to another:


Encrypt:

Code:
$ openssl enc -aes-256-cbc -e -in /file/to/encrypt -out /file/to/save
(You will be prompted for a password)

Decrypt:

Code:
$ openssl enc -aes-256-cbc -d -in ~/file/to/decrypt -out ~/file/to/save
wow that's cool

Thanks !!! very nice
 
Old 10-24-2009, 04:20 PM   #6
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,561

Original Poster
Rep: Reputation: 57
Just made a scritp, cuz I will never remind the function, seems ok:


Code:
#!/bin/sh


if [ "$1" == "--help"   ] ; then
    echo "-er to encrypt and remove, -d to decrypt, arg1 is source , arg2 is target"
	exit
	exit 0
fi


if   [  "$1" == "-e"  ]  && [ "$2" !=  "" ] && [ "$3" !=  "" ]  ; then 
	echo "Encrypting $2 to $3"	
	openssl enc -aes-256-cbc -e -in $2 -out $3
fi



if   [  "$1" == "-er"  ]  && [ "$2" !=  "" ] && [ "$3" !=  "" ]  ; then 
	echo "Encrypting $2 to $3"	
	openssl enc -aes-256-cbc -e -in "$2" -out "$3"
	rm "$2"
fi


if   [  "$1" == "-d"  ]  && [ "$2" !=  "" ] && [ "$3" !=  "" ]  ; then 
	echo "Decrypting $2 to $3"	
	openssl enc -aes-256-cbc -d -in "$2" -out "$3"
fi


if [ "$2" ==  "" ] || [ "$3" ==  "" ]  ; then
	echo "Missing one parameter for encryption"
fi
 
  


Reply



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
encrypt and decrypt using encrypt(char block[64], int edflag) rockwell_001 Linux - Security 3 08-30-2009 09:16 AM
Encrypt/Decrypt file in Linux , How to ? shipon_97 Linux - Newbie 1 09-05-2007 03:35 AM
How to use kgpg to encrypt and decrypt emails? ginda Linux - Security 6 03-16-2005 09:42 PM
how to encrypt initrd.img and decrypt in vmlinuz. AshesOfTime Programming 1 12-09-2004 03:48 PM
2048-bit encrypt/decrypt help Nappa Slackware 1 11-20-2003 11:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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