EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CrytoAPI sample on PKIBlackBox?

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#4487
Posted: 12/13/2007 16:59:07
by Cesar Calvo (Standard support level)
Joined: 12/13/2007
Posts: 5

Hello, and first of all excuses in advance if the question is already solved.
I have tried to read a big amount of messages in the forum and search, but I am newbie with cryptotoken and maybe I have not well searched.
The matter is that I am trying to extract private key from a smartcard and sign a pdf doc with it. First question is : it is possible? As far as I have read it is, but ...
And concerning pkcs#11/cryptoapi, I am trying to use now the last one and can not find a sample (only pkcs#11). Is there any based on cryptoapi? If not, which are the main differences of the classes in order to modify the pkcs#11 one?
Thanks in advance and kindest regards.
#4488
Posted: 12/14/2007 00:38:59
by Eugene Mayevski (EldoS Corp.)

You can't extract the private key from the smartcard. You can use it for PDF signing, though.

Quote
Cesar Calvo wrote:
And concerning pkcs#11/cryptoapi, I am trying to use now the last one and can not find a sample (only pkcs#11). Is there any based on cryptoapi? If not, which are the main differences of the classes in order to modify the pkcs#11 one?


What are you going to use CryptoAPI for?


Sincerely yours
Eugene Mayevski
#4489
Posted: 12/14/2007 00:57:26
by Cesar Calvo (Standard support level)
Joined: 12/13/2007
Posts: 5

Quote
What are you going to use CryptoAPI for?

Eugene, thank you for your quick answer.
I intended to use CryptoAPI for reading the private key of the smartcard. It is not necessary, maybe?
Regards
#4490
Posted: 12/14/2007 01:15:16
by Eugene Mayevski (EldoS Corp.)

This is neither necessary nor possible - the smartcard doesn't give it. It only lets you use it, but the use of the private key is hidden by high-level classes in SecureBlackbox.


Sincerely yours
Eugene Mayevski
#4491
Posted: 12/14/2007 02:28:35
by Cesar Calvo (Standard support level)
Joined: 12/13/2007
Posts: 5

Thanks again for a very quick answer (Fantastic support!!!)
But I realized that (maybe because of my ignorance in this area), I have not explained very well what I would like to do.
I would like to sign the pdf doc with the private certificate of the smart card. As smartcard reader uses crytoapi for windows, I think I should use access to this storage using ElWinCertStorage.(right?)
After that, maybe I should use the Clone method of ElX509Certificate to copy this certificate, or maybe using the certificate object directly to sign the pdf.
It is possible? Is there any example of using EIWinCertStorage?
Regards
#4492
Posted: 12/14/2007 02:55:02
by Eugene Mayevski (EldoS Corp.)

Quote
Cesar Calvo wrote:
I would like to sign the pdf doc with the private certificate of the smart card. As smartcard reader uses crytoapi for windows, I think I should use access to this storage using ElWinCertStorage.(right?)­


Yes.

Quote
Cesar Calvo wrote:
After that, maybe I should use the Clone method of ElX509Certificate to copy this certificate, or maybe using the certificate object directly to sign the pdf.


Create an instance of ElMemoryCertStorage class and add the chosen certificate to this instance. Then use the instance of ElMemoryCertStorage with ElPDFSigner. When you add the certificate, it's actually copied, but the copy knows, where it was taken from, so it will use the smartcard.

Quote
Cesar Calvo wrote:
Is there any example of using EIWinCertStorage?


Should the example be in Cobol or Fortran?


Sincerely yours
Eugene Mayevski
#4493
Posted: 12/14/2007 05:39:17
by Cesar Calvo (Standard support level)
Joined: 12/13/2007
Posts: 5

Thanks a lot again, more clear to start working.

Quote
Should the example be in Cobol or Fortran?


I was just looking for a C# .NET sample similar of the one who exists for PKCS#11 in Samples\PKIBlackbox\CerTokenDemo, but for Cryptoapi.

Regards



#4494
Posted: 12/14/2007 06:14:42
by Eugene Mayevski (EldoS Corp.)

CertDemo sample can be found in PKIBlackbox folder. It shows how to work with WinCertStorage.


Sincerely yours
Eugene Mayevski
#4495
Posted: 12/14/2007 13:26:23
by Cesar Calvo (Standard support level)
Joined: 12/13/2007
Posts: 5

Right, Eugene. Sorry about that, I was so ofuscated with the word "token"...
Thank you again.
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.

Reply

Statistics

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