8f070c4d1b4ed39ff4403ed5354cdbddd8a64429
[platform/upstream/nss.git] / nss / lib / freebl / loader.h
1 /*
2  * loader.h - load platform dependent DSO containing freebl implementation.
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7
8 #ifndef _LOADER_H_
9 #define _LOADER_H_ 1
10
11 #include "blapi.h"
12
13 #define FREEBL_VERSION 0x030F
14
15 struct FREEBLVectorStr {
16
17   unsigned short length;  /* of this struct in bytes */
18   unsigned short version; /* of this struct. */
19
20   RSAPrivateKey * (* p_RSA_NewKey)(int         keySizeInBits,
21                                  SECItem *   publicExponent);
22
23   SECStatus (* p_RSA_PublicKeyOp) (RSAPublicKey *   key,
24                                  unsigned char *  output,
25                                  const unsigned char *  input);
26
27   SECStatus (* p_RSA_PrivateKeyOp)(RSAPrivateKey *  key,
28                                   unsigned char *  output,
29                                   const unsigned char *  input);
30
31   SECStatus (* p_DSA_NewKey)(const PQGParams *    params, 
32                             DSAPrivateKey **      privKey);
33
34   SECStatus (* p_DSA_SignDigest)(DSAPrivateKey *   key,
35                                 SECItem *         signature,
36                                 const SECItem *   digest);
37
38   SECStatus (* p_DSA_VerifyDigest)(DSAPublicKey *  key,
39                                   const SECItem *  signature,
40                                   const SECItem *  digest);
41
42   SECStatus (* p_DSA_NewKeyFromSeed)(const PQGParams *params, 
43                                      const unsigned char * seed,
44                                      DSAPrivateKey **privKey);
45
46   SECStatus (* p_DSA_SignDigestWithSeed)(DSAPrivateKey * key,
47                                         SECItem *             signature,
48                                         const SECItem *       digest,
49                                         const unsigned char * seed);
50
51  SECStatus (* p_DH_GenParam)(int primeLen, DHParams ** params);
52
53  SECStatus (* p_DH_NewKey)(DHParams *           params, 
54                            DHPrivateKey **      privKey);
55
56  SECStatus (* p_DH_Derive)(SECItem *    publicValue, 
57                            SECItem *    prime, 
58                            SECItem *    privateValue, 
59                            SECItem *    derivedSecret,
60                            unsigned int maxOutBytes);
61
62  SECStatus (* p_KEA_Derive)(SECItem *prime, 
63                             SECItem *public1, 
64                             SECItem *public2, 
65                             SECItem *private1, 
66                             SECItem *private2,
67                             SECItem *derivedSecret);
68
69  PRBool (* p_KEA_Verify)(SECItem *Y, SECItem *prime, SECItem *subPrime);
70
71  RC4Context * (* p_RC4_CreateContext)(const unsigned char *key, int len);
72
73  void (* p_RC4_DestroyContext)(RC4Context *cx, PRBool freeit);
74
75  SECStatus (* p_RC4_Encrypt)(RC4Context *cx, unsigned char *output,
76                             unsigned int *outputLen, unsigned int maxOutputLen,
77                             const unsigned char *input, unsigned int inputLen);
78
79  SECStatus (* p_RC4_Decrypt)(RC4Context *cx, unsigned char *output,
80                             unsigned int *outputLen, unsigned int maxOutputLen,
81                             const unsigned char *input, unsigned int inputLen);
82
83  RC2Context * (* p_RC2_CreateContext)(const unsigned char *key, 
84                      unsigned int len, const unsigned char *iv, 
85                      int mode, unsigned effectiveKeyLen);
86
87  void (* p_RC2_DestroyContext)(RC2Context *cx, PRBool freeit);
88
89  SECStatus (* p_RC2_Encrypt)(RC2Context *cx, unsigned char *output,
90                             unsigned int *outputLen, unsigned int maxOutputLen,
91                             const unsigned char *input, unsigned int inputLen);
92
93  SECStatus (* p_RC2_Decrypt)(RC2Context *cx, unsigned char *output,
94                             unsigned int *outputLen, unsigned int maxOutputLen,
95                             const unsigned char *input, unsigned int inputLen);
96
97  RC5Context *(* p_RC5_CreateContext)(const SECItem *key, unsigned int rounds,
98                      unsigned int wordSize, const unsigned char *iv, int mode);
99
100  void (* p_RC5_DestroyContext)(RC5Context *cx, PRBool freeit);
101
102  SECStatus (* p_RC5_Encrypt)(RC5Context *cx, unsigned char *output,
103                             unsigned int *outputLen, unsigned int maxOutputLen,
104                             const unsigned char *input, unsigned int inputLen);
105
106  SECStatus (* p_RC5_Decrypt)(RC5Context *cx, unsigned char *output,
107                             unsigned int *outputLen, unsigned int maxOutputLen,
108                             const unsigned char *input, unsigned int inputLen);
109
110  DESContext *(* p_DES_CreateContext)(const unsigned char *key, 
111                                      const unsigned char *iv,
112                                      int mode, PRBool encrypt);
113
114  void (* p_DES_DestroyContext)(DESContext *cx, PRBool freeit);
115
116  SECStatus (* p_DES_Encrypt)(DESContext *cx, unsigned char *output,
117                             unsigned int *outputLen, unsigned int maxOutputLen,
118                             const unsigned char *input, unsigned int inputLen);
119
120  SECStatus (* p_DES_Decrypt)(DESContext *cx, unsigned char *output,
121                             unsigned int *outputLen, unsigned int maxOutputLen,
122                             const unsigned char *input, unsigned int inputLen);
123
124  AESContext * (* p_AES_CreateContext)(const unsigned char *key, 
125                             const unsigned char *iv, 
126                             int mode, int encrypt, unsigned int keylen, 
127                             unsigned int blocklen);
128
129  void (* p_AES_DestroyContext)(AESContext *cx, PRBool freeit);
130
131  SECStatus (* p_AES_Encrypt)(AESContext *cx, unsigned char *output,
132                             unsigned int *outputLen, unsigned int maxOutputLen,
133                             const unsigned char *input, unsigned int inputLen);
134
135  SECStatus (* p_AES_Decrypt)(AESContext *cx, unsigned char *output,
136                             unsigned int *outputLen, unsigned int maxOutputLen,
137                             const unsigned char *input, unsigned int inputLen);
138
139  SECStatus (* p_MD5_Hash)(unsigned char *dest, const char *src);
140
141  SECStatus (* p_MD5_HashBuf)(unsigned char *dest, const unsigned char *src,
142                              PRUint32 src_length);
143
144  MD5Context *(* p_MD5_NewContext)(void);
145
146  void (* p_MD5_DestroyContext)(MD5Context *cx, PRBool freeit);
147
148  void (* p_MD5_Begin)(MD5Context *cx);
149
150  void (* p_MD5_Update)(MD5Context *cx,
151                        const unsigned char *input, unsigned int inputLen);
152
153  void (* p_MD5_End)(MD5Context *cx, unsigned char *digest,
154                     unsigned int *digestLen, unsigned int maxDigestLen);
155
156  unsigned int (* p_MD5_FlattenSize)(MD5Context *cx);
157
158  SECStatus (* p_MD5_Flatten)(MD5Context *cx,unsigned char *space);
159
160  MD5Context * (* p_MD5_Resurrect)(unsigned char *space, void *arg);
161
162  void (* p_MD5_TraceState)(MD5Context *cx);
163
164  SECStatus (* p_MD2_Hash)(unsigned char *dest, const char *src);
165
166  MD2Context *(* p_MD2_NewContext)(void);
167
168  void (* p_MD2_DestroyContext)(MD2Context *cx, PRBool freeit);
169
170  void (* p_MD2_Begin)(MD2Context *cx);
171
172  void (* p_MD2_Update)(MD2Context *cx,
173                        const unsigned char *input, unsigned int inputLen);
174
175  void (* p_MD2_End)(MD2Context *cx, unsigned char *digest,
176                     unsigned int *digestLen, unsigned int maxDigestLen);
177
178  unsigned int (* p_MD2_FlattenSize)(MD2Context *cx);
179
180  SECStatus (* p_MD2_Flatten)(MD2Context *cx,unsigned char *space);
181
182  MD2Context * (* p_MD2_Resurrect)(unsigned char *space, void *arg);
183
184  SECStatus (* p_SHA1_Hash)(unsigned char *dest, const char *src);
185
186  SECStatus (* p_SHA1_HashBuf)(unsigned char *dest, const unsigned char *src,
187                               PRUint32 src_length);
188
189  SHA1Context *(* p_SHA1_NewContext)(void);
190
191  void (* p_SHA1_DestroyContext)(SHA1Context *cx, PRBool freeit);
192
193  void (* p_SHA1_Begin)(SHA1Context *cx);
194
195  void (* p_SHA1_Update)(SHA1Context *cx, const unsigned char *input,
196                         unsigned int inputLen);
197
198  void (* p_SHA1_End)(SHA1Context *cx, unsigned char *digest,
199                      unsigned int *digestLen, unsigned int maxDigestLen);
200
201  void (* p_SHA1_TraceState)(SHA1Context *cx);
202
203  unsigned int (* p_SHA1_FlattenSize)(SHA1Context *cx);
204
205  SECStatus (* p_SHA1_Flatten)(SHA1Context *cx,unsigned char *space);
206
207  SHA1Context * (* p_SHA1_Resurrect)(unsigned char *space, void *arg);
208
209  SECStatus (* p_RNG_RNGInit)(void);
210
211  SECStatus (* p_RNG_RandomUpdate)(const void *data, size_t bytes);
212
213  SECStatus (* p_RNG_GenerateGlobalRandomBytes)(void *dest, size_t len);
214
215  void  (* p_RNG_RNGShutdown)(void);
216
217  SECStatus (* p_PQG_ParamGen)(unsigned int j, PQGParams **pParams,  
218                               PQGVerify **pVfy);    
219
220  SECStatus (* p_PQG_ParamGenSeedLen)( unsigned int j, unsigned int seedBytes, 
221                                      PQGParams **pParams, PQGVerify **pVfy); 
222
223  SECStatus (* p_PQG_VerifyParams)(const PQGParams *params, 
224                                   const PQGVerify *vfy, SECStatus *result);
225
226   /* Version 3.001 came to here */
227
228   SECStatus (* p_RSA_PrivateKeyOpDoubleChecked)(RSAPrivateKey *key,
229                               unsigned char *output,
230                               const unsigned char *input);
231
232   SECStatus (* p_RSA_PrivateKeyCheck)(RSAPrivateKey *key);
233
234   void (* p_BL_Cleanup)(void);
235
236   /* Version 3.002 came to here */
237
238  SHA256Context *(* p_SHA256_NewContext)(void);
239  void (* p_SHA256_DestroyContext)(SHA256Context *cx, PRBool freeit);
240  void (* p_SHA256_Begin)(SHA256Context *cx);
241  void (* p_SHA256_Update)(SHA256Context *cx, const unsigned char *input,
242                         unsigned int inputLen);
243  void (* p_SHA256_End)(SHA256Context *cx, unsigned char *digest,
244                      unsigned int *digestLen, unsigned int maxDigestLen);
245  SECStatus (* p_SHA256_HashBuf)(unsigned char *dest, const unsigned char *src,
246                                 PRUint32 src_length);
247  SECStatus (* p_SHA256_Hash)(unsigned char *dest, const char *src);
248  void (* p_SHA256_TraceState)(SHA256Context *cx);
249  unsigned int (* p_SHA256_FlattenSize)(SHA256Context *cx);
250  SECStatus (* p_SHA256_Flatten)(SHA256Context *cx,unsigned char *space);
251  SHA256Context * (* p_SHA256_Resurrect)(unsigned char *space, void *arg);
252
253  SHA512Context *(* p_SHA512_NewContext)(void);
254  void (* p_SHA512_DestroyContext)(SHA512Context *cx, PRBool freeit);
255  void (* p_SHA512_Begin)(SHA512Context *cx);
256  void (* p_SHA512_Update)(SHA512Context *cx, const unsigned char *input,
257                         unsigned int inputLen);
258  void (* p_SHA512_End)(SHA512Context *cx, unsigned char *digest,
259                      unsigned int *digestLen, unsigned int maxDigestLen);
260  SECStatus (* p_SHA512_HashBuf)(unsigned char *dest, const unsigned char *src,
261                                 PRUint32 src_length);
262  SECStatus (* p_SHA512_Hash)(unsigned char *dest, const char *src);
263  void (* p_SHA512_TraceState)(SHA512Context *cx);
264  unsigned int (* p_SHA512_FlattenSize)(SHA512Context *cx);
265  SECStatus (* p_SHA512_Flatten)(SHA512Context *cx,unsigned char *space);
266  SHA512Context * (* p_SHA512_Resurrect)(unsigned char *space, void *arg);
267
268  SHA384Context *(* p_SHA384_NewContext)(void);
269  void (* p_SHA384_DestroyContext)(SHA384Context *cx, PRBool freeit);
270  void (* p_SHA384_Begin)(SHA384Context *cx);
271  void (* p_SHA384_Update)(SHA384Context *cx, const unsigned char *input,
272                         unsigned int inputLen);
273  void (* p_SHA384_End)(SHA384Context *cx, unsigned char *digest,
274                      unsigned int *digestLen, unsigned int maxDigestLen);
275  SECStatus (* p_SHA384_HashBuf)(unsigned char *dest, const unsigned char *src,
276                                 PRUint32 src_length);
277  SECStatus (* p_SHA384_Hash)(unsigned char *dest, const char *src);
278  void (* p_SHA384_TraceState)(SHA384Context *cx);
279  unsigned int (* p_SHA384_FlattenSize)(SHA384Context *cx);
280  SECStatus (* p_SHA384_Flatten)(SHA384Context *cx,unsigned char *space);
281  SHA384Context * (* p_SHA384_Resurrect)(unsigned char *space, void *arg);
282
283   /* Version 3.003 came to here */
284
285  AESKeyWrapContext * (* p_AESKeyWrap_CreateContext)(const unsigned char *key, 
286                    const unsigned char *iv, int encrypt, unsigned int keylen);
287
288  void (* p_AESKeyWrap_DestroyContext)(AESKeyWrapContext *cx, PRBool freeit);
289
290  SECStatus (* p_AESKeyWrap_Encrypt)(AESKeyWrapContext *cx, 
291             unsigned char *output,
292             unsigned int *outputLen, unsigned int maxOutputLen,
293             const unsigned char *input, unsigned int inputLen);
294
295  SECStatus (* p_AESKeyWrap_Decrypt)(AESKeyWrapContext *cx, 
296             unsigned char *output,
297             unsigned int *outputLen, unsigned int maxOutputLen,
298             const unsigned char *input, unsigned int inputLen);
299
300   /* Version 3.004 came to here */
301
302  PRBool (*p_BLAPI_SHVerify)(const char *name, PRFuncPtr addr);
303  PRBool (*p_BLAPI_VerifySelf)(const char *name);
304
305   /* Version 3.005 came to here */
306
307  SECStatus (* p_EC_NewKey)(ECParams *           params, 
308                            ECPrivateKey **      privKey);
309
310  SECStatus (* p_EC_NewKeyFromSeed)(ECParams *   params, 
311                              ECPrivateKey **    privKey,
312                              const unsigned char * seed,
313                              int                seedlen);
314
315  SECStatus (* p_EC_ValidatePublicKey)(ECParams *   params, 
316                              SECItem *          publicValue);
317
318  SECStatus (* p_ECDH_Derive)(SECItem *          publicValue, 
319                              ECParams *         params,
320                              SECItem *          privateValue,
321                              PRBool             withCofactor,
322                              SECItem *          derivedSecret);
323
324  SECStatus (* p_ECDSA_SignDigest)(ECPrivateKey * key,
325                              SECItem *          signature,
326                              const SECItem *    digest);
327
328  SECStatus (* p_ECDSA_VerifyDigest)(ECPublicKey * key,
329                              const SECItem *    signature,
330                              const SECItem *    digest);
331
332  SECStatus (* p_ECDSA_SignDigestWithSeed)(ECPrivateKey * key,
333                              SECItem *          signature,
334                              const SECItem *    digest,
335                              const unsigned char * seed,
336                              const int          seedlen);
337
338   /* Version 3.006 came to here */
339
340   /* no modification to FREEBLVectorStr itself 
341    * but ECParamStr was modified 
342    */
343
344   /* Version 3.007 came to here */
345
346  SECStatus (* p_AES_InitContext)(AESContext *cx,
347                                  const unsigned char *key, 
348                                  unsigned int keylen, 
349                                  const unsigned char *iv, 
350                                  int mode, 
351                                  unsigned int encrypt,
352                                  unsigned int blocklen);
353  SECStatus (* p_AESKeyWrap_InitContext)(AESKeyWrapContext *cx,
354                                  const unsigned char *key, 
355                                  unsigned int keylen, 
356                                  const unsigned char *iv, 
357                                  int mode, 
358                                  unsigned int encrypt,
359                                  unsigned int blocklen);
360  SECStatus (* p_DES_InitContext)(DESContext *cx,
361                                  const unsigned char *key, 
362                                  unsigned int keylen,
363                                  const unsigned char *iv, 
364                                  int mode,
365                                  unsigned int encrypt,
366                                  unsigned int );
367  SECStatus (* p_RC2_InitContext)(RC2Context *cx,
368                                  const unsigned char *key, 
369                                  unsigned int keylen,
370                                  const unsigned char *iv, 
371                                  int mode, 
372                                  unsigned int effectiveKeyLen,
373                                  unsigned int );
374  SECStatus (* p_RC4_InitContext)(RC4Context *cx, 
375                                  const unsigned char *key, 
376                                  unsigned int keylen,
377                                  const unsigned char *, 
378                                  int, 
379                                  unsigned int ,
380                                  unsigned int );
381
382  AESContext *(*p_AES_AllocateContext)(void);
383  AESKeyWrapContext *(*p_AESKeyWrap_AllocateContext)(void);
384  DESContext *(*p_DES_AllocateContext)(void);
385  RC2Context *(*p_RC2_AllocateContext)(void);
386  RC4Context *(*p_RC4_AllocateContext)(void);
387
388  void (* p_MD2_Clone)(MD2Context *dest, MD2Context *src);
389  void (* p_MD5_Clone)(MD5Context *dest, MD5Context *src);
390  void (* p_SHA1_Clone)(SHA1Context *dest, SHA1Context *src);
391  void (* p_SHA256_Clone)(SHA256Context *dest, SHA256Context *src);
392  void (* p_SHA384_Clone)(SHA384Context *dest, SHA384Context *src);
393  void (* p_SHA512_Clone)(SHA512Context *dest, SHA512Context *src);
394
395  SECStatus (* p_TLS_PRF)(const SECItem *secret, const char *label, 
396                          SECItem *seed, SECItem *result, PRBool isFIPS);
397
398  const SECHashObject *(* p_HASH_GetRawHashObject)(HASH_HashType hashType);
399
400  HMACContext * (* p_HMAC_Create)(const SECHashObject *hashObj, 
401                                  const unsigned char *secret, 
402                                  unsigned int secret_len, PRBool isFIPS);
403  SECStatus (* p_HMAC_Init)(HMACContext *cx, const SECHashObject *hash_obj, 
404                            const unsigned char *secret, 
405                            unsigned int secret_len, PRBool isFIPS);
406  void (* p_HMAC_Begin)(HMACContext *cx);
407  void  (* p_HMAC_Update)(HMACContext *cx, const unsigned char *data, 
408                          unsigned int data_len);
409  HMACContext * (* p_HMAC_Clone)(HMACContext *cx);
410  SECStatus (* p_HMAC_Finish)(HMACContext *cx, unsigned char *result, 
411                              unsigned int *result_len, 
412                              unsigned int max_result_len);
413  void (* p_HMAC_Destroy)(HMACContext *cx, PRBool freeit);
414
415  void (* p_RNG_SystemInfoForRNG)(void);
416
417   /* Version 3.008 came to here */
418
419  SECStatus (* p_FIPS186Change_GenerateX)(unsigned char *XKEY,
420                                          const unsigned char *XSEEDj,
421                                          unsigned char *x_j);
422  SECStatus (* p_FIPS186Change_ReduceModQForDSA)(const unsigned char *w,
423                                                 const unsigned char *q,
424                                                 unsigned char *xj);
425
426   /* Version 3.009 came to here */
427
428  SECStatus (* p_Camellia_InitContext)(CamelliaContext *cx,
429                                  const unsigned char *key, 
430                                  unsigned int keylen, 
431                                  const unsigned char *iv, 
432                                  int mode, 
433                                  unsigned int encrypt,
434                                  unsigned int unused);
435
436  CamelliaContext *(*p_Camellia_AllocateContext)(void);
437  CamelliaContext * (* p_Camellia_CreateContext)(const unsigned char *key, 
438                                                 const unsigned char *iv, 
439                                                 int mode, int encrypt,
440                                                 unsigned int keylen);
441  void (* p_Camellia_DestroyContext)(CamelliaContext *cx, PRBool freeit);
442
443  SECStatus (* p_Camellia_Encrypt)(CamelliaContext *cx, unsigned char *output,
444                                   unsigned int *outputLen,
445                                   unsigned int maxOutputLen,
446                                   const unsigned char *input,
447                                   unsigned int inputLen);
448
449  SECStatus (* p_Camellia_Decrypt)(CamelliaContext *cx, unsigned char *output,
450                                   unsigned int *outputLen,
451                                   unsigned int maxOutputLen,
452                                   const unsigned char *input,
453                                   unsigned int inputLen);
454
455  void (* p_PQG_DestroyParams)(PQGParams *params);
456
457  void (* p_PQG_DestroyVerify)(PQGVerify *vfy);
458
459   /* Version 3.010 came to here */
460
461  SECStatus (* p_SEED_InitContext)(SEEDContext *cx,
462                                  const unsigned char *key,
463                                  unsigned int keylen,
464                                  const unsigned char *iv,
465                                  int mode,
466                                  unsigned int encrypt,
467                                  unsigned int );
468
469  SEEDContext *(*p_SEED_AllocateContext)(void);
470
471  SEEDContext *(* p_SEED_CreateContext)(const unsigned char *key,
472                                      const unsigned char *iv,
473                                      int mode, PRBool encrypt);
474
475  void (* p_SEED_DestroyContext)(SEEDContext *cx, PRBool freeit);
476
477  SECStatus (* p_SEED_Encrypt)(SEEDContext *cx, unsigned char *output,
478                             unsigned int *outputLen, unsigned int maxOutputLen,
479                             const unsigned char *input, unsigned int inputLen);
480
481  SECStatus (* p_SEED_Decrypt)(SEEDContext *cx, unsigned char *output,
482                             unsigned int *outputLen, unsigned int maxOutputLen,
483                             const unsigned char *input, unsigned int inputLen);
484
485
486
487  SECStatus (* p_BL_Init)(void);
488  void ( * p_BL_SetForkState)(PRBool);
489
490  SECStatus (* p_PRNGTEST_Instantiate)(const PRUint8 *entropy, 
491                                       unsigned int entropy_len, 
492                                       const PRUint8 *nonce, 
493                                       unsigned int nonce_len,
494                                       const PRUint8 *personal_string, 
495                                       unsigned int ps_len);
496
497  SECStatus (* p_PRNGTEST_Reseed)(const PRUint8 *entropy, 
498                                  unsigned int entropy_len, 
499                                  const PRUint8 *additional, 
500                                  unsigned int additional_len);
501
502  SECStatus (* p_PRNGTEST_Generate)(PRUint8 *bytes, 
503                                    unsigned int bytes_len, 
504                                    const PRUint8 *additional, 
505                                    unsigned int additional_len);
506
507  SECStatus (* p_PRNGTEST_Uninstantiate)(void);
508    /* Version 3.011 came to here */
509
510  SECStatus (*p_RSA_PopulatePrivateKey)(RSAPrivateKey *key);
511
512  SECStatus (*p_DSA_NewRandom)(PLArenaPool * arena, const SECItem * q,
513                               SECItem * seed);
514
515  SECStatus (*p_JPAKE_Sign)(PLArenaPool * arena, const PQGParams * pqg,
516                            HASH_HashType hashType, const SECItem * signerID,
517                            const SECItem * x, const SECItem * testRandom,
518                            const SECItem * gxIn, SECItem * gxOut,
519                            SECItem * gv, SECItem * r);
520
521  SECStatus (*p_JPAKE_Verify)(PLArenaPool * arena, const PQGParams * pqg,
522                              HASH_HashType hashType, const SECItem * signerID,
523                              const SECItem * peerID, const SECItem * gx,
524                              const SECItem * gv, const SECItem * r);
525
526  SECStatus (*p_JPAKE_Round2)(PLArenaPool * arena, const SECItem * p,
527                              const SECItem  *q, const SECItem * gx1,
528                              const SECItem * gx3, const SECItem * gx4,
529                              SECItem * base, const SECItem * x2,
530                              const SECItem * s, SECItem * x2s);
531
532  SECStatus (*p_JPAKE_Final)(PLArenaPool * arena, const SECItem * p,
533                             const SECItem  *q, const SECItem * x2,
534                             const SECItem * gx4, const SECItem * x2s,
535                             const SECItem * B, SECItem * K);
536
537   /* Version 3.012 came to here */
538
539  SECStatus (* p_TLS_P_hash)(HASH_HashType hashAlg,
540                             const SECItem *secret,
541                             const char *label,
542                             SECItem *seed,
543                             SECItem *result,
544                             PRBool isFIPS);
545
546  SHA224Context *(*p_SHA224_NewContext)(void);
547  void (* p_SHA224_DestroyContext)(SHA224Context *cx, PRBool freeit);
548  void (* p_SHA224_Begin)(SHA224Context *cx);
549  void (* p_SHA224_Update)(SHA224Context *cx, const unsigned char *input,
550                         unsigned int inputLen);
551  void (* p_SHA224_End)(SHA224Context *cx, unsigned char *digest,
552                      unsigned int *digestLen, unsigned int maxDigestLen);
553  SECStatus (*p_SHA224_HashBuf)(unsigned char *dest, const unsigned char *src,
554                                PRUint32 src_length);
555  SECStatus (*p_SHA224_Hash)(unsigned char *dest, const char *src);
556  void (*p_SHA224_TraceState)(SHA224Context *cx);
557  unsigned int (* p_SHA224_FlattenSize)(SHA224Context *cx);
558  SECStatus (* p_SHA224_Flatten)(SHA224Context *cx,unsigned char *space);
559  SHA224Context * (* p_SHA224_Resurrect)(unsigned char *space, void *arg);
560  void (* p_SHA224_Clone)(SHA224Context *dest, SHA224Context *src);
561  PRBool (*p_BLAPI_SHVerifyFile)(const char *name);
562
563   /* Version 3.013 came to here */
564
565  SECStatus (* p_PQG_ParamGenV2)( unsigned int L, unsigned int N,
566                                 unsigned int seedBytes, 
567                                 PQGParams **pParams, PQGVerify **pVfy); 
568  SECStatus (*p_PRNGTEST_RunHealthTests)(void);
569
570   /* Version 3.014 came to here */
571
572  SECStatus (* p_HMAC_ConstantTime)(
573      unsigned char *result,
574      unsigned int *resultLen,
575      unsigned int maxResultLen,
576      const SECHashObject *hashObj,
577      const unsigned char *secret,
578      unsigned int secretLen,
579      const unsigned char *header,
580      unsigned int headerLen,
581      const unsigned char *body,
582      unsigned int bodyLen,
583      unsigned int bodyTotalLen);
584
585  SECStatus (* p_SSLv3_MAC_ConstantTime)(
586      unsigned char *result,
587      unsigned int *resultLen,
588      unsigned int maxResultLen,
589      const SECHashObject *hashObj,
590      const unsigned char *secret,
591      unsigned int secretLen,
592      const unsigned char *header,
593      unsigned int headerLen,
594      const unsigned char *body,
595      unsigned int bodyLen,
596      unsigned int bodyTotalLen);
597
598   /* Version 3.015 came to here */
599  };
600
601 typedef struct FREEBLVectorStr FREEBLVector;
602
603 SEC_BEGIN_PROTOS
604
605 typedef const FREEBLVector * FREEBLGetVectorFn(void);
606
607 extern FREEBLGetVectorFn FREEBL_GetVector;
608
609 SEC_END_PROTOS
610
611 #endif