Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations
blapit.h File Reference
#include "seccomon.h"
#include "prlink.h"
#include "plarena.h"
#include "ecl-exp.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RSAPublicKeyStr
struct  RSAPrivateKeyStr
struct  PQGParamsStr
struct  PQGVerifyStr
struct  DSAPublicKeyStr
struct  DSAPrivateKeyStr
struct  DHParamsStr
struct  DHPublicKeyStr
struct  DHPrivateKeyStr
struct  ECFieldIDStr
struct  ECCurveStr
struct  ECParamsStr
struct  ECPublicKeyStr
struct  ECPrivateKeyStr
union  ECFieldIDStr.u

Defines

#define NSS_RC2   0
#define NSS_RC2_CBC   1
#define NSS_RC5   0
#define NSS_RC5_CBC   1
#define NSS_DES   0
#define NSS_DES_CBC   1
#define NSS_DES_EDE3   2
#define NSS_DES_EDE3_CBC   3
#define DES_KEY_LENGTH   8 /* Bytes */
#define NSS_AES   0
#define NSS_AES_CBC   1
#define DSA_SIGNATURE_LEN   40 /* Bytes */
#define DSA_SUBPRIME_LEN   20 /* Bytes */
#define MAX_ECKEY_LEN   72 /* Bytes */
#define MD2_LENGTH   16 /* Bytes */
#define MD5_LENGTH   16 /* Bytes */
#define SHA1_LENGTH   20 /* Bytes */
#define SHA256_LENGTH   32 /* bytes */
#define SHA384_LENGTH   48 /* bytes */
#define SHA512_LENGTH   64 /* bytes */
#define HASH_LENGTH_MAX   SHA512_LENGTH
#define MD2_BLOCK_LENGTH   64 /* bytes */
#define MD5_BLOCK_LENGTH   64 /* bytes */
#define SHA1_BLOCK_LENGTH   64 /* bytes */
#define SHA256_BLOCK_LENGTH   64 /* bytes */
#define SHA384_BLOCK_LENGTH   128 /* bytes */
#define SHA512_BLOCK_LENGTH   128 /* bytes */
#define HASH_BLOCK_LENGTH_MAX   SHA512_BLOCK_LENGTH
#define AES_KEY_WRAP_IV_BYTES   8
#define AES_KEY_WRAP_BLOCK_SIZE   8 /* bytes */
#define AES_BLOCK_SIZE   16 /* bytes */
#define NSS_FREEBL_DEFAULT_CHUNKSIZE   2048
#define RSA_MIN_MODULUS_BITS   128
#define DH_MIN_P_BITS   128
#define DH_MAX_P_BITS   2236
#define DSA_Q_BITS   160
#define DSA_MAX_P_BITS   1024
#define DSA_MIN_P_BITS   512
#define PQG_PBITS_TO_INDEX(bits)
#define PQG_INDEX_TO_PBITS(j)   (((unsigned)(j) > 8) ? -1 : (512 + 64 * (j)))

Typedefs

typedef struct DESContextStr
typedef struct RC2ContextStr
typedef struct RC4ContextStr
typedef struct RC5ContextStr
typedef struct AESContextStr
typedef struct MD2ContextStr
typedef struct MD5ContextStr
typedef struct SHA1ContextStr
typedef struct SHA256ContextStr
typedef struct SHA512ContextStr
typedef struct AESKeyWrapContextStr
typedef struct RSAPublicKeyStr
typedef struct RSAPrivateKeyStr
typedef struct PQGParamsStr
typedef struct PQGVerifyStr
typedef struct DSAPublicKeyStr
typedef struct DSAPrivateKeyStr
typedef struct DHParamsStr
typedef struct DHPublicKeyStr
typedef struct DHPrivateKeyStr
typedef struct ECFieldIDStr
typedef struct ECCurveStr
typedef struct ECParamsStr
typedef struct ECPublicKeyStr
typedef struct ECPrivateKeyStr
typedef void *(* BLapiAllocateFunc )(void)
typedef void(* BLapiDestroyContextFunc )(void *cx, PRBool freeit)
typedef SECStatus(* BLapiInitContextFunc )(void *cx, const unsigned char *key, unsigned int keylen, const unsigned char *, int, unsigned int, unsigned int)
typedef SECStatus(* BLapiEncrypt )(void *cx, unsigned char *output, unsigned int *outputLen, unsigned int maxOutputLen, const unsigned char *input, unsigned int inputLen)

Enumerations

enum  ECParamsType { ec_params_explicit, ec_params_named, ec_params_explicit, ec_params_named }
enum  ECFieldType { ec_field_GFp = 1, ec_field_GF2m, ec_field_GFp = 1, ec_field_GF2m }

Class Documentation

struct RSAPublicKeyStr

Definition at line 199 of file blapit.h.

Class Members
PRArenaPool * arena
SECItem modulus
SECItem publicExponent
struct RSAPrivateKeyStr

Definition at line 207 of file blapit.h.

Class Members
PRArenaPool * arena
SECItem coefficient
SECItem exponent1
SECItem exponent2
SECItem modulus
SECItem prime1
SECItem prime2
SECItem privateExponent
SECItem publicExponent
SECItem version
struct PQGParamsStr

Definition at line 226 of file blapit.h.

Class Members
PRArenaPool * arena
SECItem base
SECItem prime
SECItem subPrime
struct PQGVerifyStr

Definition at line 235 of file blapit.h.

Class Members
PRArenaPool * arena
unsigned int counter
SECItem h
SECItem seed
struct DSAPublicKeyStr

Definition at line 243 of file blapit.h.

Class Members
PQGParams params
SECItem publicValue
struct DSAPrivateKeyStr

Definition at line 249 of file blapit.h.

Class Members
PQGParams params
SECItem privateValue
SECItem publicValue
struct DHParamsStr

Definition at line 261 of file blapit.h.

Class Members
PRArenaPool * arena
SECItem base
SECItem prime
struct DHPublicKeyStr

Definition at line 268 of file blapit.h.

Class Members
PRArenaPool * arena
SECItem base
SECItem prime
SECItem publicValue
struct DHPrivateKeyStr

Definition at line 276 of file blapit.h.

Class Members
PRArenaPool * arena
SECItem base
SECItem prime
SECItem privateValue
SECItem publicValue
struct ECFieldIDStr

Definition at line 303 of file blapit.h.

Collaboration diagram for ECFieldIDStr:
Class Members
int k1
int k2
int k3
int size
ECFieldType type
union ECFieldIDStr u
union ECFieldIDStr u
struct ECCurveStr

Definition at line 318 of file blapit.h.

Class Members
SECItem a
SECItem b
SECItem seed
struct ECParamsStr

Definition at line 327 of file blapit.h.

Collaboration diagram for ECParamsStr:
Class Members
PRArenaPool * arena
SECItem base
int cofactor
ECCurve curve
SECItem curveOID
SECItem DEREncoding
ECFieldID fieldID
ECCurveName name
SECItem order
ECParamsType type
struct ECPublicKeyStr

Definition at line 341 of file blapit.h.

Class Members
ECParams ecParams
SECItem publicValue
struct ECPrivateKeyStr

Definition at line 349 of file blapit.h.

Class Members
ECParams ecParams
SECItem privateValue
SECItem publicValue
SECItem version
union ECFieldIDStr.u

Definition at line 306 of file blapit.h.

Class Members
SECItem poly
SECItem prime

Define Documentation

#define AES_BLOCK_SIZE   16 /* bytes */

Definition at line 108 of file blapit.h.

Definition at line 107 of file blapit.h.

Definition at line 106 of file blapit.h.

#define DES_KEY_LENGTH   8 /* Bytes */

Definition at line 66 of file blapit.h.

#define DH_MAX_P_BITS   2236

Definition at line 120 of file blapit.h.

#define DH_MIN_P_BITS   128

Definition at line 119 of file blapit.h.

#define DSA_MAX_P_BITS   1024

Definition at line 146 of file blapit.h.

Definition at line 147 of file blapit.h.

#define DSA_Q_BITS   160

Definition at line 145 of file blapit.h.

#define DSA_SIGNATURE_LEN   40 /* Bytes */

Definition at line 72 of file blapit.h.

#define DSA_SUBPRIME_LEN   20 /* Bytes */

Definition at line 73 of file blapit.h.

Definition at line 104 of file blapit.h.

Definition at line 92 of file blapit.h.

#define MAX_ECKEY_LEN   72 /* Bytes */

Definition at line 81 of file blapit.h.

#define MD2_BLOCK_LENGTH   64 /* bytes */

Definition at line 98 of file blapit.h.

#define MD2_LENGTH   16 /* Bytes */

Definition at line 86 of file blapit.h.

#define MD5_BLOCK_LENGTH   64 /* bytes */

Definition at line 99 of file blapit.h.

#define MD5_LENGTH   16 /* Bytes */

Definition at line 87 of file blapit.h.

#define NSS_AES   0

Definition at line 69 of file blapit.h.

Definition at line 70 of file blapit.h.

#define NSS_DES   0

Definition at line 61 of file blapit.h.

Definition at line 62 of file blapit.h.

Definition at line 63 of file blapit.h.

Definition at line 64 of file blapit.h.

Definition at line 110 of file blapit.h.

#define NSS_RC2   0

Definition at line 53 of file blapit.h.

Definition at line 54 of file blapit.h.

#define NSS_RC5   0

Definition at line 57 of file blapit.h.

Definition at line 58 of file blapit.h.

#define PQG_INDEX_TO_PBITS (   j)    (((unsigned)(j) > 8) ? -1 : (512 + 64 * (j)))

Definition at line 161 of file blapit.h.

Value:
(((bits) < 512 || (bits) > 1024 || (bits) % 64) ? \
    -1 : (int)((bits)-512)/64)

Definition at line 153 of file blapit.h.

Definition at line 118 of file blapit.h.

#define SHA1_BLOCK_LENGTH   64 /* bytes */

Definition at line 100 of file blapit.h.

#define SHA1_LENGTH   20 /* Bytes */

Definition at line 88 of file blapit.h.

Definition at line 101 of file blapit.h.

#define SHA256_LENGTH   32 /* bytes */

Definition at line 89 of file blapit.h.

#define SHA384_BLOCK_LENGTH   128 /* bytes */

Definition at line 102 of file blapit.h.

#define SHA384_LENGTH   48 /* bytes */

Definition at line 90 of file blapit.h.

#define SHA512_BLOCK_LENGTH   128 /* bytes */

Definition at line 103 of file blapit.h.

#define SHA512_LENGTH   64 /* bytes */

Definition at line 91 of file blapit.h.


Typedef Documentation

typedef struct AESContextStr

Definition at line 184 of file blapit.h.

typedef struct AESKeyWrapContextStr

Definition at line 192 of file blapit.h.

typedef void*(* BLapiAllocateFunc)(void)

Definition at line 357 of file blapit.h.

Definition at line 358 of file blapit.h.

typedef SECStatus(* BLapiEncrypt)(void *cx, unsigned char *output, unsigned int *outputLen, unsigned int maxOutputLen, const unsigned char *input, unsigned int inputLen)

Definition at line 366 of file blapit.h.

typedef SECStatus(* BLapiInitContextFunc)(void *cx, const unsigned char *key, unsigned int keylen, const unsigned char *, int, unsigned int, unsigned int)

Definition at line 359 of file blapit.h.

typedef struct DESContextStr

Definition at line 180 of file blapit.h.

typedef struct DHParamsStr

Definition at line 266 of file blapit.h.

typedef struct DHPrivateKeyStr

Definition at line 283 of file blapit.h.

typedef struct DHPublicKeyStr

Definition at line 274 of file blapit.h.

typedef struct DSAPrivateKeyStr

Definition at line 254 of file blapit.h.

typedef struct DSAPublicKeyStr

Definition at line 247 of file blapit.h.

typedef struct ECCurveStr

Definition at line 325 of file blapit.h.

typedef struct ECFieldIDStr

Definition at line 316 of file blapit.h.

typedef struct ECParamsStr

Definition at line 339 of file blapit.h.

typedef struct ECPrivateKeyStr

Definition at line 355 of file blapit.h.

typedef struct ECPublicKeyStr

Definition at line 347 of file blapit.h.

typedef struct MD2ContextStr

Definition at line 185 of file blapit.h.

typedef struct MD5ContextStr

Definition at line 186 of file blapit.h.

typedef struct PQGParamsStr

Definition at line 233 of file blapit.h.

typedef struct PQGVerifyStr

Definition at line 241 of file blapit.h.

typedef struct RC2ContextStr

Definition at line 181 of file blapit.h.

typedef struct RC4ContextStr

Definition at line 182 of file blapit.h.

typedef struct RC5ContextStr

Definition at line 183 of file blapit.h.

typedef struct RSAPrivateKeyStr

Definition at line 219 of file blapit.h.

typedef struct RSAPublicKeyStr

Definition at line 204 of file blapit.h.

typedef struct SHA1ContextStr

Definition at line 187 of file blapit.h.

typedef struct SHA256ContextStr

Definition at line 188 of file blapit.h.

typedef struct SHA512ContextStr

Definition at line 189 of file blapit.h.


Enumeration Type Documentation

Enumerator:
ec_field_GFp 
ec_field_GF2m 
ec_field_GFp 
ec_field_GF2m 

Definition at line 299 of file blapit.h.

Enumerator:
ec_params_explicit 
ec_params_named 
ec_params_explicit 
ec_params_named 

Definition at line 295 of file blapit.h.