EldoS | Feel safer!

Software components for data protection, secure storage and transfer

OpenPGP Writer - Doesn't Sign....

Posted: 02/07/2011 10:41:08
by Alex Mottram (Standard support level)
Joined: 12/23/2010
Posts: 4

I'm trying to use OpenPGPWriter in an orchestration to EncryptAndSign a message.

TraceLevel: Debug
TraceToEventLog: True

In the message log, I get the following for each message:

Running Execute()
Encrypting and signing the message

So I set the OpenPGPWriter properties to Sign only, and the output simply is not signed.

These are what I believe are the important settings:

Operation: Sign
SecKeyRing C:\temp\secring.gpg
SecretKeyRingSource: File
SecretKeyRingValue: <blank>
Passphrase: <populated>

I can reproduce the same with openpgp command line options if no default signing key is set using the same ring.

What am I doing wrong here?

Posted: 02/07/2011 10:58:37
by Ken Ivanov (Team)

Thank you for contacting us.

Please use KeyPassphrase property to provide a passphrase for a secret key (Passphrase property is used to pass a conventional encryption passphrase). If this doesn't help, could you please try to specify a path to the sample secret keyring (included to the BizCrypto distribution) and check if the signing is done as expected with it?
Posted: 02/07/2011 12:57:51
by Alex Mottram (Standard support level)
Joined: 12/23/2010
Posts: 4

I was able to successfully sign with both my key and the example provided with BizCrypto.

However, when I EncryptAndSign, I need to specify a KeyFilter parameter to define which public key I'm encrypting for. It seems that when I apply a KeyFilter parameter, the signing function doesn't sign.

My guess is that the KeyFilter parameter selects both the encyrption key (public) and signing key (private).

In my case, these two are different (encrypt with recipient's public key, encrypt with my private key).

How do I tell the OpenPGPWriter that the two keys are different and still be able to use keyring files?
Posted: 02/07/2011 13:28:01
by Alex Mottram (Standard support level)
Joined: 12/23/2010
Posts: 4

Additional note. I originally stated "orchestration." This is getting done in a pipeline, not an orchestration.
Posted: 02/07/2011 13:35:15
by Ken Ivanov (Team)

The value of KeyFilter property is used to filter keys from both public and secret keyrings. Unfortunately, there is no way to provide separate filters for each particular keyring. The only solution for your case would be to extract public and secret keys to individual files and pass the corresponding paths to the pipeline via PubKeyring and SecKeyring properties.

You can use the OpenPGPKeyTool command-line utility from BizCrypto Tools to extract keys from the keyrings.
Posted: 02/07/2011 13:41:44
by Alex Mottram (Standard support level)
Joined: 12/23/2010
Posts: 4

That was the answer I was afraid I'd get. :)

Going to proceed with single key keyring files.

Thanks for the prompt responses!



Topic viewed 6125 times

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


Back to top

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

Got it!