EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ElPGPWriter hexcode generated when adding public key?

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#14530
Posted: 09/22/2010 03:46:35
by C3 TechSupport (Premium support level)
Joined: 05/28/2008
Posts: 12

I have had an enquiry from a client regarding hexcodes generated as part of the PGP encryption process. They are using perl on a unix system and they have been having some problems decrypting messages we have signed using thier public key.

"Can you provide the hexcode generated when adding our public key. We expect this to be 0x5194F54D."

I can't see any return types on the encrypt methods, is there some way of obtaining said hexcode?
#14531
Posted: 09/22/2010 04:25:04
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

You cannot sign, using public key - signing is done with secret key.
Public key is used for encryption.

It looks like they asks about Key ID, which you can obtain using TElPGPPublicKey.KeyID property, and convert to hex string via SBPGPUtils.KeyIdToStr function.
#14542
Posted: 09/22/2010 14:55:20
by C3 TechSupport (Premium support level)
Joined: 05/28/2008
Posts: 12

Thanks for your assistance, sorry about my typo in the post, I ended up using this code to get the hex string as I could not locate SBPGPUtils.KeyIdToStr.

Code
BitConverter.ToString(publicKey.KeyID())


This returned "58-2A-1F-0E-51-94-F5-4D" which equates to the 8bit ID, i guess they must be using the 4bit key as explained in your documentation.

Quote
Please note that many PGP implementations display only 4 low bytes of the key id to the user. However, internally they use the 8-byte key id value


Many thanks for the prompt resolution of my issue.
#14543
Posted: 09/22/2010 15:42:30
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

I did not notice that you are using .NET. There it should be called as SBPGPUtils.Unit.KeyIDToStr

Reply

Statistics

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