EldoS | Feel safer!

Software components for data protection, secure storage and transfer

use PGP public key with multiple subkeys to encrypt file

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#29106
Posted: 04/03/2014 07:19:12
by Jacob jvandiermen (Standard support level)
Joined: 08/09/2013
Posts: 55

Hello Eldos,

I want to encrypt a file with PGP. I have a pgp public key file in a plain txt file.
For the public key I use TElPGPKeyring object to load the pgp key file with the load procedure.In the public key file there are multiple sub keys.
For the encryption I use a TElPGPWriter object. The property SigningKeys is assigned to the TElPGPKeyring object.The properties EcryptionType := EtPublicKey and HashAlgorithm := SB_PGP_ALGORITHM_MD_SHA1.

When the file is encrypted I inspect the encrypted file on the website http://www.pgpdump.net/.
The public key and all the sub keys are displayed.
When I send the file for validation the file is rejected.

When I try to encrypt the file on website http://www.igolder.com/PGP/encryption/ and use the same pgp public key file the file is validated and accepted.
I then inspect the file on the website http://www.pgpdump.net/.
Here I see that the public key is displayed but the subkey aren't displayed.

I suspect that the encrypted file is rejected because of the sub keys.
What does the TElPGPWriter object do with the sub keys?
Are the sub keys used for encryption?
Is it possible to use only a specifiek sub key or the primary key for the encryption?
And if this is the case how can I do this?

Regards,

Jacob
#29107
Posted: 04/03/2014 07:23:51
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Subkey can be used for encryption. You can disable a subkey using TElPGPSecretSubkey.Enabled property and it will not be used during encryption process.

Reply

Statistics

Topic viewed 994 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!