EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Need to get JUST the Public Key Modulus (1024 bits = 128 bytes)

Posted: 06/05/2008 16:43:28
by Frontier  (Standard support level)
Joined: 06/03/2008
Posts: 8

Hi. I need to send JUST the public key modulus (of a 1024 bit public key pair) to another application. Not the exponent, not anything else. The other app needs this in hex char format, so it's 2 hex chars for each byte.

Since the key is 1024 bits, the public key modulus itself is 1024 bits which is 128 bytes, which is 256 hex characters.

I am trying to get at the public key via


Cert is a TElMemoryCertStorage, and that previously loaded from PEM file. (this part is hidden from me and I don't have access to any of the PEM files)

This all works great, except that the StringStream file produces a "public key" result that is 167 (binary) bytes long. This is WAY too long.

My question is this: where can I find the "format" spec for this string" I think the 128 byte modulus is somewhere in the middle, but I don't know exactly where. The last 6 hex chars are '010001' and this looks like it would be the 65537 public key exponent.



Posted: 06/05/2008 19:20:29
by Frontier  (Standard support level)
Joined: 06/03/2008
Posts: 8

never mind. I guessed at it, and got it right.



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