OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Functions
ecp_nistp256.c File Reference
#include <openssl/opensslconf.h>
#include <stdint.h>
#include <string.h>
#include <openssl/err.h>
#include "ec_lcl.h"

Go to the source code of this file.

Classes

struct  NISTP256_PRE_COMP
 

Macros

#define NLIMBS   4
 
#define two105m41m9   (((limb)1) << 105) - (((limb)1) << 41) - (((limb)1) << 9)
 
#define two105   (((limb)1) << 105)
 
#define two105m41p9   (((limb)1) << 105) - (((limb)1) << 41) + (((limb)1) << 9)
 
#define two107m43m11   (((limb)1) << 107) - (((limb)1) << 43) - (((limb)1) << 11)
 
#define two107   (((limb)1) << 107)
 
#define two107m43p11   (((limb)1) << 107) - (((limb)1) << 43) + (((limb)1) << 11)
 
#define two64m0   (((limb)1) << 64) - 1
 
#define two110p32m0   (((limb)1) << 110) + (((limb)1) << 32) - 1
 
#define two64m46   (((limb)1) << 64) - (((limb)1) << 46)
 
#define two64m32   (((limb)1) << 64) - (((limb)1) << 32)
 
#define two100m36m4   (((limb)1) << 100) - (((limb)1) << 36) - (((limb)1) << 4)
 
#define two100   (((limb)1) << 100)
 
#define two100m36p4   (((limb)1) << 100) - (((limb)1) << 36) + (((limb)1) << 4)
 

Typedefs

typedef uint8_t u8
 
typedef uint32_t u32
 
typedef uint64_t u64
 
typedef int64_t s64
 
typedef u8 felem_bytearray [32]
 
typedef uint128_t limb
 
typedef limb felem [NLIMBS]
 
typedef limb longfelem [NLIMBS *2]
 
typedef u64 smallfelem [NLIMBS]
 

Functions

const EC_METHODEC_GFp_nistp256_method (void)
 
int ec_GFp_nistp256_group_init (EC_GROUP *group)
 
int ec_GFp_nistp256_group_set_curve (EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
int ec_GFp_nistp256_point_get_affine_coordinates (const EC_GROUP *group, const EC_POINT *point, BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
 
int ec_GFp_nistp256_points_mul (const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx)
 
int ec_GFp_nistp256_precompute_mult (EC_GROUP *group, BN_CTX *ctx)
 
int ec_GFp_nistp256_have_precompute_mult (const EC_GROUP *group)
 

Macro Definition Documentation

#define NLIMBS   4

Definition at line 107 of file ecp_nistp256.c.

#define two100   (((limb)1) << 100)

Definition at line 692 of file ecp_nistp256.c.

#define two100m36m4   (((limb)1) << 100) - (((limb)1) << 36) - (((limb)1) << 4)

Definition at line 691 of file ecp_nistp256.c.

#define two100m36p4   (((limb)1) << 100) - (((limb)1) << 36) + (((limb)1) << 4)

Definition at line 693 of file ecp_nistp256.c.

#define two105   (((limb)1) << 105)

Definition at line 251 of file ecp_nistp256.c.

#define two105m41m9   (((limb)1) << 105) - (((limb)1) << 41) - (((limb)1) << 9)

Definition at line 250 of file ecp_nistp256.c.

#define two105m41p9   (((limb)1) << 105) - (((limb)1) << 41) + (((limb)1) << 9)

Definition at line 252 of file ecp_nistp256.c.

#define two107   (((limb)1) << 107)

Definition at line 291 of file ecp_nistp256.c.

#define two107m43m11   (((limb)1) << 107) - (((limb)1) << 43) - (((limb)1) << 11)

Definition at line 290 of file ecp_nistp256.c.

#define two107m43p11   (((limb)1) << 107) - (((limb)1) << 43) + (((limb)1) << 11)

Definition at line 292 of file ecp_nistp256.c.

#define two110p32m0   (((limb)1) << 110) + (((limb)1) << 32) - 1

Definition at line 354 of file ecp_nistp256.c.

#define two64m0   (((limb)1) << 64) - 1

Definition at line 353 of file ecp_nistp256.c.

#define two64m32   (((limb)1) << 64) - (((limb)1) << 32)

Definition at line 356 of file ecp_nistp256.c.

#define two64m46   (((limb)1) << 64) - (((limb)1) << 46)

Definition at line 355 of file ecp_nistp256.c.

Typedef Documentation

typedef limb felem[NLIMBS]

Definition at line 110 of file ecp_nistp256.c.

typedef u8 felem_bytearray[32]

Definition at line 60 of file ecp_nistp256.c.

typedef uint128_t limb

Definition at line 109 of file ecp_nistp256.c.

typedef limb longfelem[NLIMBS *2]

Definition at line 111 of file ecp_nistp256.c.

typedef int64_t s64

Definition at line 53 of file ecp_nistp256.c.

typedef u64 smallfelem[NLIMBS]

Definition at line 112 of file ecp_nistp256.c.

typedef uint32_t u32

Definition at line 51 of file ecp_nistp256.c.

typedef uint64_t u64

Definition at line 52 of file ecp_nistp256.c.

typedef uint8_t u8

Definition at line 50 of file ecp_nistp256.c.

Function Documentation

int ec_GFp_nistp256_group_init ( EC_GROUP group)

Definition at line 1725 of file ecp_nistp256.c.

int ec_GFp_nistp256_group_set_curve ( EC_GROUP group,
const BIGNUM p,
const BIGNUM a,
const BIGNUM b,
BN_CTX ctx 
)

Definition at line 1733 of file ecp_nistp256.c.

int ec_GFp_nistp256_have_precompute_mult ( const EC_GROUP group)

Definition at line 2160 of file ecp_nistp256.c.

const EC_METHOD* EC_GFp_nistp256_method ( void  )

Returns 64-bit optimized methods for nistp256

Returns
EC_METHOD object

Definition at line 1616 of file ecp_nistp256.c.

int ec_GFp_nistp256_point_get_affine_coordinates ( const EC_GROUP group,
const EC_POINT point,
BIGNUM x,
BIGNUM y,
BN_CTX ctx 
)

Definition at line 1767 of file ecp_nistp256.c.

int ec_GFp_nistp256_points_mul ( const EC_GROUP group,
EC_POINT r,
const BIGNUM scalar,
size_t  num,
const EC_POINT points[],
const BIGNUM scalars[],
BN_CTX ctx 
)

Definition at line 1829 of file ecp_nistp256.c.

int ec_GFp_nistp256_precompute_mult ( EC_GROUP group,
BN_CTX ctx 
)

Definition at line 2037 of file ecp_nistp256.c.