EldoS | Feel safer!

Software components for data protection, secure storage and transfer

PGP newbie question

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#20873
Posted: 07/24/2012 12:45:52
by GERALD MORRIS (Standard support level)
Joined: 11/08/2010
Posts: 27

Need to know which keys to use when creating an encrypted file.
Here is where I am at:
I used the Keys sample program to generate a public (mypublickey.pgp) and private key (myprivatekey.skr). I exported the public key and sent it to client.

The client encrypted a test file and sent it to me.
I also received a public key from them (clientpublickey.pgp)

I was able to successfully decrypt their file using the keys clientpublickey.pgp and myprivatekey.skr. I used the Files sample program to do this.

Now I need to encrypt and send a file to them.
I used the keys clientpublickey.pgp and myprivatekey.skr.

Is that correct?
The output I am getting is binary (whereas the test file I got from the client had -----BEGIN PGP MESSAGE----- at the start.

Gerald
#20874
Posted: 07/24/2012 12:55:34
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Hi.
To encrypt a file, so client will be able to decrypt it - you should use only his public key.
Your private key can be used to sign file, so client will be sure that this file is from you (by verifying signature, using your public key).
#20875
Posted: 07/24/2012 15:05:59
by GERALD MORRIS (Standard support level)
Joined: 11/08/2010
Posts: 27

Ok, using the FilesExample program I used the clientpublic key for both the public and private key
I get this error
No suitable OpenPGP public key for encryption found
#20876
Posted: 07/24/2012 15:12:42
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

This can happen if public key is DSA one, without a subkey. To encrypt you should use RSA key or DSA/El-Gamal key with subkey.
#20877
Posted: 07/24/2012 15:21:47
by GERALD MORRIS (Standard support level)
Joined: 11/08/2010
Posts: 27

The key seems fine:
The key is DSA 1024bit with a SubKey - Elgamal(encrypt only) 2048bit.
I can upload it for you to see if that would help
#20879
Posted: 07/24/2012 15:33:55
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Just try another thing - probably, when choosing encryption key, you select main key (dsa), instead of El-Gamal subkey.
#20880
Posted: 07/24/2012 15:37:45
by GERALD MORRIS (Standard support level)
Joined: 11/08/2010
Posts: 27

I got it to work by selecting the subkey as the recipient (instead of the key)
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 819 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!