RSA Security Projection Television 5.2.2 Manual de usuario Pagina 298

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 376
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 297
Performing Elliptic Curve Operations
276 RSA BSAFE Crypto-C Developers Guide
Step 5: Final
Step 5a: Allocate memory
You must allocate sufficient memory to hold the acceleration table. According to the
Reference Manual, you can use
B_BuildTableGetBufSize to tell how much space will
be required to store the acceleration table:
Step 5b: Build the acceleration table
Finally, build the acceleration table and store it in an ITEM structure. You store it this
way for conveniencewhen you actually use the acceleration table, you will have to
provide it in an
ITEM structure to B_SetAlgorithmInfo. Building an acceleration table
can take a lot of time, so use a surrender context. See The Surrender Context on
page 118 for more information:
ITEM accelTableItem;
unsigned int maxTableLen;
if ((status = B_BuildTableGetBufSize(buildTable, &maxTableLen)) != 0)
break;
accelTableItem.data = T_malloc(maxTableLen);
if ((status = (accelTableItem.data == NULL_PTR)) != 0)
break;
ITEM accelTableItem;
generalSurrenderContext.Surrender = GeneralSurrenderFunction;
generalSurrenderContext.handle = (POINTER)&generalFlag;
generalSurrenderContext.reserved = NULL_PTR;
generalFlag = 0;
if ((status = B_BuildTableFinal(buildTable, accelTableItem.data,
&(accelTableItem.len), maxTableLen,
&generalSurrenderContext)) != 0)
break;
Vista de pagina 297
1 2 ... 293 294 295 296 297 298 299 300 301 302 303 ... 375 376

Comentarios a estos manuales

Sin comentarios