RSA Security 4.3 The Session Chooser, Creating the Session Chooser, Creating the Software Chooser

Models: 4.3

1 38
Download 38 pages 55.71 Kb
Page 11
Image 11
The Session Chooser

The Session Chooser

The Session Chooser

Any Crypto-C application which uses hardware requires your application to declare two choosers:

The baseline software chooser, such as the one that is used in any Crypto-C application. This chooser must be modified to include the generic Crypto-C hardware methods that support the desired hardware.

The hardware chooser, that lists the manufacturer-specific hardware methods that can be used. This chooser has no analogue in a software-only application.

Once these choosers have been declared, you can combine them via a call to B_CreateSessionChooser. This creates the session chooser, which matches the hardware-compatible AMs in the software chooser with their actual instantiations in the hardware chooser. Specifically, for each item in the software chooser that references a hardware method, the hardware method replaces it.

Creating the Session Chooser

The following example shows how a simple session chooser can be created. This chooser is set up to access Intel’s random number generator, which can then be used via the Crypto-C AI, AI_HW_Random.

Creating the Software Chooser

The software chooser is a conventional chooser, containing pointers to Crypto-C algorithm methods. In this case, since we are going to generate random numbers using the Intel hardware random number generator, we must include AM_HW_RANDOM. This algorithm method instructs Crypto-C to use a hardware method for generating random data. In an actual application, you would also list all the software methods, such as methods for encryption and decryption, that are required by your application. For random number generation, the software chooser can be set up as follows:

B_ALGORITHM_METHOD *SOFTWARE_CHOOSER[] = { &AM_HW_RANDOM,

(B_ALGORITHM_METHOD *)NULL_PTR };

C h a p t e r 2 U s i n g I n t e l H a r d w a r e W i t h C r y p t o - C

7

Page 11
Image 11
RSA Security 4.3 manual The Session Chooser, Creating the Session Chooser, Creating the Software Chooser