summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ecdsa/ecdsa.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/ecdsa/ecdsa.h')
-rw-r--r--src/lib/libcrypto/ecdsa/ecdsa.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecdsa.h b/src/lib/libcrypto/ecdsa/ecdsa.h
index a29e5f6f6b..ad716c24a5 100644
--- a/src/lib/libcrypto/ecdsa/ecdsa.h
+++ b/src/lib/libcrypto/ecdsa/ecdsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecdsa.h,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: ecdsa.h,v 1.3 2014/11/17 20:25:50 miod Exp $ */
2/** 2/**
3 * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions 3 * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions
4 * \author Written by Nils Larsch for the OpenSSL project 4 * \author Written by Nils Larsch for the OpenSSL project
@@ -75,11 +75,36 @@
75extern "C" { 75extern "C" {
76#endif 76#endif
77 77
78typedef struct ECDSA_SIG_st 78typedef struct ECDSA_SIG_st ECDSA_SIG;
79 { 79
80struct ecdsa_method {
81 const char *name;
82 ECDSA_SIG *(*ecdsa_do_sign)(const unsigned char *dgst, int dgst_len,
83 const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey);
84 int (*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv,
85 BIGNUM **r);
86 int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len,
87 const ECDSA_SIG *sig, EC_KEY *eckey);
88#if 0
89 int (*init)(EC_KEY *eckey);
90 int (*finish)(EC_KEY *eckey);
91#endif
92 int flags;
93 char *app_data;
94};
95
96/* If this flag is set the ECDSA method is FIPS compliant and can be used
97 * in FIPS mode. This is set in the validated module method. If an
98 * application sets this flag in its own methods it is its responsibility
99 * to ensure the result is compliant.
100 */
101
102#define ECDSA_FLAG_FIPS_METHOD 0x1
103
104struct ECDSA_SIG_st {
80 BIGNUM *r; 105 BIGNUM *r;
81 BIGNUM *s; 106 BIGNUM *s;
82 } ECDSA_SIG; 107};
83 108
84/** Allocates and initialize a ECDSA_SIG structure 109/** Allocates and initialize a ECDSA_SIG structure
85 * \return pointer to a ECDSA_SIG structure or NULL if an error occurred 110 * \return pointer to a ECDSA_SIG structure or NULL if an error occurred