EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Cades signature and sha256 with rsa encryption

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#32280
Posted: 02/19/2015 09:24:27
by Stefano Massone (Standard support level)
Joined: 02/06/2015
Posts: 10

Hello!

I'm using the example "Samples\C#\PKIBlackbox\Desktop\CertTokenDemo\" to generate a cades signature (p7m) using a smart card token, and it works just fine.

Now we are asked to generate an RSA-SHA256 signature instead of RSA-SHA1.

Is it possible with SBB?

Thanks a lot!
Stefano
#32281
Posted: 02/19/2015 09:43:24
by Ken Ivanov (EldoS Corp.)

Hi Stefano,

Please set the HashAlgorithm property of your TElMessageSigner object to SBConstants.Unit.SB_ALGORITHM_DGST_SHA256 to make it create RSA-SHA256 signatures.

Cheers,

Ken
#32284
Posted: 02/19/2015 11:47:36
by Stefano Massone (Standard support level)
Joined: 02/06/2015
Posts: 10

Hello Ken,

thanks for your prompt answer, can I ask which is the property of the TElMessageSigner object to be evaluated?

I've something like:

TElMessageSigner Signer = new TElMessageSigner();

..
..

res = Signer.Sign(InBuffer, ref OutBuffer, ref OutSize, false);

Thanks for your undestanding

Stefano
#32285
Posted: 02/19/2015 12:22:10
by Ken Ivanov (EldoS Corp.)

Stefano,

That's

Signer.HashAlgorithm = SBConstants.Unit.SB_ALGORITHM_DGST_SHA256;

The property should be set before the signing operation is performed.

Ken
#32289
Posted: 02/20/2015 02:52:16
by Stefano Massone (Standard support level)
Joined: 02/06/2015
Posts: 10

Ken, Thank you very much for you patience, that worked

Stefano
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.

Reply

Statistics

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