Go to the documentation of this file.
82 #error EC is disabled.
87 #ifndef OPENSSL_NO_DEPRECATED
93 #elif defined(__SUNPRO_C)
94 # if __SUNPRO_C >= 0x520
95 # pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
100 #ifndef OPENSSL_ECC_MAX_FIELD_BITS
101 # define OPENSSL_ECC_MAX_FIELD_BITS 661
154 #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
171 #ifndef OPENSSL_NO_EC2M
304 #ifndef OPENSSL_NO_EC2M
365 #ifndef OPENSSL_NO_EC2M
504 #ifndef OPENSSL_NO_EC2M
550 unsigned char *buf,
size_t len,
BN_CTX *ctx);
561 const unsigned char *buf,
size_t len,
BN_CTX *ctx);
676 #ifndef OPENSSL_NO_EC2M
679 unsigned int *k2,
unsigned int *k3);
682 #define OPENSSL_EC_NAMED_CURVE 0x001
689 #define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x)
690 #define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x)
691 #define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \
692 (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x))
693 #define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \
694 (unsigned char *)(x))
696 #ifndef OPENSSL_NO_BIO
699 #ifndef OPENSSL_NO_FP_API
711 #define EC_PKEY_NO_PARAMETERS 0x001
712 #define EC_PKEY_NO_PUBKEY 0x002
715 #define EC_FLAG_NON_FIPS_ALLOW 0x1
716 #define EC_FLAG_FIPS_CHECKED 0x2
808 void *(*dup_func)(
void *),
void (*
free_func)(
void *),
void (*clear_free_func)(
void *));
810 void *(*dup_func)(
void *),
void (*
free_func)(
void *),
void (*clear_free_func)(
void *));
909 #ifndef OPENSSL_NO_BIO
926 #ifndef OPENSSL_NO_FP_API
944 #define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x)
947 #if defined(__SUNPRO_C)
948 # if __SUNPRO_C >= 0x520
949 # pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
954 #define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \
955 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, EVP_PKEY_OP_PARAMGEN, \
956 EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL)
959 #define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID (EVP_PKEY_ALG_CTRL + 1)
970 #define EC_F_BN_TO_FELEM 224
971 #define EC_F_COMPUTE_WNAF 143
972 #define EC_F_D2I_ECPARAMETERS 144
973 #define EC_F_D2I_ECPKPARAMETERS 145
974 #define EC_F_D2I_ECPRIVATEKEY 146
975 #define EC_F_DO_EC_KEY_PRINT 221
976 #define EC_F_ECKEY_PARAM2TYPE 223
977 #define EC_F_ECKEY_PARAM_DECODE 212
978 #define EC_F_ECKEY_PRIV_DECODE 213
979 #define EC_F_ECKEY_PRIV_ENCODE 214
980 #define EC_F_ECKEY_PUB_DECODE 215
981 #define EC_F_ECKEY_PUB_ENCODE 216
982 #define EC_F_ECKEY_TYPE2PARAM 220
983 #define EC_F_ECPARAMETERS_PRINT 147
984 #define EC_F_ECPARAMETERS_PRINT_FP 148
985 #define EC_F_ECPKPARAMETERS_PRINT 149
986 #define EC_F_ECPKPARAMETERS_PRINT_FP 150
987 #define EC_F_ECP_NIST_MOD_192 203
988 #define EC_F_ECP_NIST_MOD_224 204
989 #define EC_F_ECP_NIST_MOD_256 205
990 #define EC_F_ECP_NIST_MOD_521 206
991 #define EC_F_EC_ASN1_GROUP2CURVE 153
992 #define EC_F_EC_ASN1_GROUP2FIELDID 154
993 #define EC_F_EC_ASN1_GROUP2PARAMETERS 155
994 #define EC_F_EC_ASN1_GROUP2PKPARAMETERS 156
995 #define EC_F_EC_ASN1_PARAMETERS2GROUP 157
996 #define EC_F_EC_ASN1_PKPARAMETERS2GROUP 158
997 #define EC_F_EC_EX_DATA_SET_DATA 211
998 #define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY 208
999 #define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT 159
1000 #define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE 195
1001 #define EC_F_EC_GF2M_SIMPLE_OCT2POINT 160
1002 #define EC_F_EC_GF2M_SIMPLE_POINT2OCT 161
1003 #define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 162
1004 #define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 163
1005 #define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES 164
1006 #define EC_F_EC_GFP_MONT_FIELD_DECODE 133
1007 #define EC_F_EC_GFP_MONT_FIELD_ENCODE 134
1008 #define EC_F_EC_GFP_MONT_FIELD_MUL 131
1009 #define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE 209
1010 #define EC_F_EC_GFP_MONT_FIELD_SQR 132
1011 #define EC_F_EC_GFP_MONT_GROUP_SET_CURVE 189
1012 #define EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP 135
1013 #define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE 225
1014 #define EC_F_EC_GFP_NISTP224_POINTS_MUL 228
1015 #define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES 226
1016 #define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE 230
1017 #define EC_F_EC_GFP_NISTP256_POINTS_MUL 231
1018 #define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES 232
1019 #define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE 233
1020 #define EC_F_EC_GFP_NISTP521_POINTS_MUL 234
1021 #define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES 235
1022 #define EC_F_EC_GFP_NIST_FIELD_MUL 200
1023 #define EC_F_EC_GFP_NIST_FIELD_SQR 201
1024 #define EC_F_EC_GFP_NIST_GROUP_SET_CURVE 202
1025 #define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 165
1026 #define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE 166
1027 #define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP 100
1028 #define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR 101
1029 #define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102
1030 #define EC_F_EC_GFP_SIMPLE_OCT2POINT 103
1031 #define EC_F_EC_GFP_SIMPLE_POINT2OCT 104
1032 #define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137
1033 #define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES 167
1034 #define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105
1035 #define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES 168
1036 #define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128
1037 #define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES 169
1038 #define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129
1039 #define EC_F_EC_GROUP_CHECK 170
1040 #define EC_F_EC_GROUP_CHECK_DISCRIMINANT 171
1041 #define EC_F_EC_GROUP_COPY 106
1042 #define EC_F_EC_GROUP_GET0_GENERATOR 139
1043 #define EC_F_EC_GROUP_GET_COFACTOR 140
1044 #define EC_F_EC_GROUP_GET_CURVE_GF2M 172
1045 #define EC_F_EC_GROUP_GET_CURVE_GFP 130
1046 #define EC_F_EC_GROUP_GET_DEGREE 173
1047 #define EC_F_EC_GROUP_GET_ORDER 141
1048 #define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS 193
1049 #define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS 194
1050 #define EC_F_EC_GROUP_NEW 108
1051 #define EC_F_EC_GROUP_NEW_BY_CURVE_NAME 174
1052 #define EC_F_EC_GROUP_NEW_FROM_DATA 175
1053 #define EC_F_EC_GROUP_PRECOMPUTE_MULT 142
1054 #define EC_F_EC_GROUP_SET_CURVE_GF2M 176
1055 #define EC_F_EC_GROUP_SET_CURVE_GFP 109
1056 #define EC_F_EC_GROUP_SET_EXTRA_DATA 110
1057 #define EC_F_EC_GROUP_SET_GENERATOR 111
1058 #define EC_F_EC_KEY_CHECK_KEY 177
1059 #define EC_F_EC_KEY_COPY 178
1060 #define EC_F_EC_KEY_GENERATE_KEY 179
1061 #define EC_F_EC_KEY_NEW 182
1062 #define EC_F_EC_KEY_PRINT 180
1063 #define EC_F_EC_KEY_PRINT_FP 181
1064 #define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES 229
1065 #define EC_F_EC_POINTS_MAKE_AFFINE 136
1066 #define EC_F_EC_POINT_ADD 112
1067 #define EC_F_EC_POINT_CMP 113
1068 #define EC_F_EC_POINT_COPY 114
1069 #define EC_F_EC_POINT_DBL 115
1070 #define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M 183
1071 #define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116
1072 #define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117
1073 #define EC_F_EC_POINT_INVERT 210
1074 #define EC_F_EC_POINT_IS_AT_INFINITY 118
1075 #define EC_F_EC_POINT_IS_ON_CURVE 119
1076 #define EC_F_EC_POINT_MAKE_AFFINE 120
1077 #define EC_F_EC_POINT_MUL 184
1078 #define EC_F_EC_POINT_NEW 121
1079 #define EC_F_EC_POINT_OCT2POINT 122
1080 #define EC_F_EC_POINT_POINT2OCT 123
1081 #define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 185
1082 #define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124
1083 #define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M 186
1084 #define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125
1085 #define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126
1086 #define EC_F_EC_POINT_SET_TO_INFINITY 127
1087 #define EC_F_EC_PRE_COMP_DUP 207
1088 #define EC_F_EC_PRE_COMP_NEW 196
1089 #define EC_F_EC_WNAF_MUL 187
1090 #define EC_F_EC_WNAF_PRECOMPUTE_MULT 188
1091 #define EC_F_I2D_ECPARAMETERS 190
1092 #define EC_F_I2D_ECPKPARAMETERS 191
1093 #define EC_F_I2D_ECPRIVATEKEY 192
1094 #define EC_F_I2O_ECPUBLICKEY 151
1095 #define EC_F_NISTP224_PRE_COMP_NEW 227
1096 #define EC_F_NISTP256_PRE_COMP_NEW 236
1097 #define EC_F_NISTP521_PRE_COMP_NEW 237
1098 #define EC_F_O2I_ECPUBLICKEY 152
1099 #define EC_F_OLD_EC_PRIV_DECODE 222
1100 #define EC_F_PKEY_EC_CTRL 197
1101 #define EC_F_PKEY_EC_CTRL_STR 198
1102 #define EC_F_PKEY_EC_DERIVE 217
1103 #define EC_F_PKEY_EC_KEYGEN 199
1104 #define EC_F_PKEY_EC_PARAMGEN 219
1105 #define EC_F_PKEY_EC_SIGN 218
1108 #define EC_R_ASN1_ERROR 115
1109 #define EC_R_ASN1_UNKNOWN_FIELD 116
1110 #define EC_R_BIGNUM_OUT_OF_RANGE 144
1111 #define EC_R_BUFFER_TOO_SMALL 100
1112 #define EC_R_COORDINATES_OUT_OF_RANGE 146
1113 #define EC_R_D2I_ECPKPARAMETERS_FAILURE 117
1114 #define EC_R_DECODE_ERROR 142
1115 #define EC_R_DISCRIMINANT_IS_ZERO 118
1116 #define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 119
1117 #define EC_R_FIELD_TOO_LARGE 143
1118 #define EC_R_GF2M_NOT_SUPPORTED 147
1119 #define EC_R_GROUP2PKPARAMETERS_FAILURE 120
1120 #define EC_R_I2D_ECPKPARAMETERS_FAILURE 121
1121 #define EC_R_INCOMPATIBLE_OBJECTS 101
1122 #define EC_R_INVALID_ARGUMENT 112
1123 #define EC_R_INVALID_COMPRESSED_POINT 110
1124 #define EC_R_INVALID_COMPRESSION_BIT 109
1125 #define EC_R_INVALID_CURVE 141
1126 #define EC_R_INVALID_DIGEST_TYPE 138
1127 #define EC_R_INVALID_ENCODING 102
1128 #define EC_R_INVALID_FIELD 103
1129 #define EC_R_INVALID_FORM 104
1130 #define EC_R_INVALID_GROUP_ORDER 122
1131 #define EC_R_INVALID_PENTANOMIAL_BASIS 132
1132 #define EC_R_INVALID_PRIVATE_KEY 123
1133 #define EC_R_INVALID_TRINOMIAL_BASIS 137
1134 #define EC_R_KEYS_NOT_SET 140
1135 #define EC_R_MISSING_PARAMETERS 124
1136 #define EC_R_MISSING_PRIVATE_KEY 125
1137 #define EC_R_NOT_A_NIST_PRIME 135
1138 #define EC_R_NOT_A_SUPPORTED_NIST_PRIME 136
1139 #define EC_R_NOT_IMPLEMENTED 126
1140 #define EC_R_NOT_INITIALIZED 111
1141 #define EC_R_NO_FIELD_MOD 133
1142 #define EC_R_NO_PARAMETERS_SET 139
1143 #define EC_R_PASSED_NULL_PARAMETER 134
1144 #define EC_R_PKPARAMETERS2GROUP_FAILURE 127
1145 #define EC_R_POINT_AT_INFINITY 106
1146 #define EC_R_POINT_IS_NOT_ON_CURVE 107
1147 #define EC_R_SLOT_FULL 108
1148 #define EC_R_UNDEFINED_GENERATOR 113
1149 #define EC_R_UNDEFINED_ORDER 128
1150 #define EC_R_UNKNOWN_GROUP 129
1151 #define EC_R_UNKNOWN_ORDER 114
1152 #define EC_R_UNSUPPORTED_FIELD 131
1153 #define EC_R_WRONG_CURVE_PARAMETERS 145
1154 #define EC_R_WRONG_ORDER 130