EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Encrypt with Key Only

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#2977
Posted: 05/24/2007 15:53:18
by Joseph Wilcock (Standard support level)
Joined: 05/24/2007
Posts: 5

I am new user and this is my first application.

I have been give the spec to encrypt a file and sign it using only the keys. I have been using the "FileExample" demo application to help teach me the process. The problem that I have is that when I sign and encrypt but do not add a passphrase, everything goes fine until the encryption when I get the error "No key for encryption found".

The code is setting EncryptingKeys, but I cannot see what to do from here. When I process the file the same way but add a PassPhrase (EncryptionType := etBoth) it works just fine.
#2978
Posted: 05/24/2007 16:18:40
by Ken Ivanov (EldoS Corp.)

Please provide a bit more information about the problem you are encountering:
a) does this error appear with FilesExample demo,
b) does this error appear with the sample keys included to the distribution?

Most likely, the EncryptingKeys keyring contains no public keys (please check its PublicCount property).

BTW, there's also a number of 'primitive' samples (see Samples\OpenPGP\Primitives directory) which are much easier to understand than FilesExample demo (that is quite complex).
#2979
Posted: 05/24/2007 16:29:11
by Joseph Wilcock (Standard support level)
Joined: 05/24/2007
Posts: 5

This does appear in the FileExample.exe program. I did use keys that I created using the KeyExample.exe program. It loads both keys from what I can tell; Public Key Count is 1.

I have stepped ferther into the code and it appears that the function "IsPublicKeyEncryptionAlgorithm" returns false, and leaves me with no keys to use for encryption. I am not sure what to change to make the keys or the program to make it one of those listed algorithms.

Thank you for the suggestion about the primitive. I will check those at this time.
#2980
Posted: 05/24/2007 16:41:44
by Ken Ivanov (EldoS Corp.)

Quote
I have stepped ferther into the code and it appears that the function "IsPublicKeyEncryptionAlgorithm" returns false, and leaves me with no keys to use for encryption.

Hmm, it's quite strange. Would you be so kind to post a public key you've generated to the ticket? The forum accepts .ZIP files only, so please pack the key before posting.
#2981
Posted: 05/24/2007 17:12:38
by Joseph Wilcock (Standard support level)
Joined: 05/24/2007
Posts: 5

Here are the keys I'm using.


[ Download ]
#2982
Posted: 05/24/2007 17:28:18
by Ken Ivanov (EldoS Corp.)

Got it. You are selecting wrong encryption key.

Roughly speaking, most of PGP keys consist of TWO keys, a 'main' key and a 'subkey'. A main key is usually a signing key and thus can be used only for signing, while a subkey should be used for encryption purposes.

Please select a public key as is shown on the attached screen shot to make the FilesExample encrypt the file correctly.


[ Download ]
#2983
Posted: 05/24/2007 17:42:15
by Joseph Wilcock (Standard support level)
Joined: 05/24/2007
Posts: 5

Thank you. This really helped me out.

Now I'm working on the Decrypt & Verify.
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

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