aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec.h
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2002-06-18 08:38:59 +0000
committerBodo Möller <bodo@openssl.org>2002-06-18 08:38:59 +0000
commit5f3d6f70f693474df58863f1e51d436242f16405 (patch)
tree427fff77c70e9a00870a5156355313b6e90605f7 /crypto/ec/ec.h
parentece0bdf1fda9d3695ea9feca57c0f516c85f8bf2 (diff)
downloadopenssl-5f3d6f70f693474df58863f1e51d436242f16405.tar.gz
Implement handling of EC parameter seeds (new functions
EC_GROUP_set_seed(), EC_GROUP_get0_seed(), EC_GROUP_get_seed_len()). New functions ECPKParameters_print(), ECPKParameters_print_fp(). Submitted by: Nils Larsch
Diffstat (limited to 'crypto/ec/ec.h')
-rw-r--r--crypto/ec/ec.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/crypto/ec/ec.h b/crypto/ec/ec.h
index e3bae734f1..85883e2ffd 100644
--- a/crypto/ec/ec.h
+++ b/crypto/ec/ec.h
@@ -86,6 +86,7 @@ typedef struct ec_group_st
-- curve coefficients
-- optional generator with associated information (order, cofactor)
-- optional extra data (TODO: precomputed table for fast computation of multiples of generator)
+ -- ASN1 stuff
*/
EC_GROUP;
@@ -116,9 +117,18 @@ EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *);
int EC_GROUP_get_order(const EC_GROUP *, BIGNUM *order, BN_CTX *);
int EC_GROUP_get_cofactor(const EC_GROUP *, BIGNUM *cofactor, BN_CTX *);
-void EC_GROUP_set_nid(EC_GROUP *, int);
+void EC_GROUP_set_nid(EC_GROUP *, int); /* curve name */
int EC_GROUP_get_nid(const EC_GROUP *);
+void EC_GROUP_set_asn1_flag(EC_GROUP *, int flag);
+int EC_GROUP_get_asn1_flag(const EC_GROUP *);
+
+void EC_GROUP_set_point_conversion_form(EC_GROUP *, point_conversion_form_t);
+point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
+
+unsigned char *EC_GROUP_get0_seed(const EC_GROUP *);
+size_t EC_GROUP_get_seed_len(const EC_GROUP *);
+size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
/* We don't have types for field specifications and field elements in general.
* Otherwise we could declare
@@ -242,11 +252,6 @@ DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS)
EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *);
ECPKPARAMETERS *EC_ASN1_group2pkparameters(const EC_GROUP *, ECPKPARAMETERS *);
-void EC_GROUP_set_asn1_flag(EC_GROUP *, int flag);
-int EC_GROUP_get_asn1_flag(const EC_GROUP *);
-
-void EC_GROUP_set_point_conversion_form(EC_GROUP *, point_conversion_form_t);
-point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
EC_GROUP *d2i_ECParameters(EC_GROUP **, const unsigned char **in, long len);
int i2d_ECParameters(const EC_GROUP *, unsigned char **out);
@@ -255,6 +260,13 @@ EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
+#ifndef OPENSSL_NO_BIO
+int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
+#endif
+#ifndef OPENSSL_NO_FP_API
+int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
+#endif
+
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
@@ -269,6 +281,8 @@ void ERR_load_EC_strings(void);
#define EC_F_D2I_ECDSAPARAMETERS 154
#define EC_F_D2I_ECPARAMETERS 155
#define EC_F_D2I_ECPKPARAMETERS 161
+#define EC_F_ECPKPARAMETERS_PRINT 166
+#define EC_F_ECPKPARAMETERS_PRINT_FP 167
#define EC_F_EC_ASN1_GROUP2CURVE 159
#define EC_F_EC_ASN1_GROUP2FIELDID 156
#define EC_F_EC_ASN1_GROUP2PARAMETERS 160