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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-06-2009, 07:46 AM
|
#1
|
LQ Newbie
Registered: Dec 2008
Posts: 3
Rep:
|
GPG PROBLEM: some characters textfile that was decryrted were altered
Hi,
I'm Having problem with gpg decrypted file. I can successfully encrypt file in Linux and try to decrypt in in a windows workstation. Here is the thing when i try to open the decrypt file in notepad the "next line (enter)" was change to a "box character" and the messages was read as a one linner, i already tried openning it using Word and it looks fine, but the problem is i need to open it in notepad because "the process should be like that". I also tried signing the encrypt file logically the file was not altered since the sign is the same but the box character are still appeared, also tried to tar first the file before encryption again same thing happen.Is there a way so the box character wont change the "nextline"? Hope you can help me in this one
|
|
|
01-07-2009, 09:47 AM
|
#2
|
LQ Newbie
Registered: Dec 2008
Location: South Wales, UK
Distribution: Ubuntu 12.10; have used Fedora in the past
Posts: 28
Rep:
|
I'm very much a Linux Newbie, but I suspect that the "box" characters you are seeing displayed on the screen are characters that your version of Window$ will not allow to be displayed, or is unable to display. They could be characters in the extended ASCII character set (such as e-acute - é), or perhaps the matter is more serious and the file is somehow being corrupted. Have you tried to compare the original unencrypted text with the decrypted text? Remember that Micro$oft Internet Explorer has a mind of its own - I ran a spelling check on this posting, and it wanted to change Newbie and é (though left Micro$oft alone.....)
|
|
|
01-07-2009, 06:18 PM
|
#3
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,397
|
Well, Linux (& Unix) use \n as a newline char, MSDOS (WIN) uses \r\n. It may be that Word can cope, but Notepad can't.
I can't test that as I don't have MS at home.
You can try using /usr/bin/unix2dos to convert before encryption.
|
|
|
01-08-2009, 06:00 AM
|
#4
|
LQ Newbie
Registered: Dec 2008
Posts: 3
Original Poster
Rep:
|
thanks but i already found a solution in this matter, turns out gpg has the option were you can specify that the file is a textfile i include the -t or -textmode in the gpg command just like below
gpg --output /root/quia_praktis/EM11081118.txt.gpg -cts EM11081118.txt
then after the i transfered the gpg file from linux to windows and decrypt it, i got the same data without any alteration. In the mannual for gpg it explains that -t or -textmode "Treat input files as text and store them in the OpenPGP canonical text form with standard "CRLF" line endings. This also sets the necessary flags to inform the recipient that the encrypted or signed data is text and may need its line endings converted back to whatever the local system uses. This option is use-ful when communicating between two platforms that have different line ending conventions (UNIX-like to Mac, Mac to Windows, etc)."
thanks=D...
|
|
|
All times are GMT -5. The time now is 01:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|