]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - ecdsa/ecdsa_sign.h
fixing and extending ecdsa
[avr-crypto-lib.git] / ecdsa / ecdsa_sign.h
diff --git a/ecdsa/ecdsa_sign.h b/ecdsa/ecdsa_sign.h
new file mode 100644 (file)
index 0000000..6edb836
--- /dev/null
@@ -0,0 +1,39 @@
+/* ecdsa_sign.h */
+/*
+    This file is part of the AVR-Crypto-Lib.
+    Copyright (C) 2012 Daniel Otte (daniel.otte@rub.de)
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef ECDSA_SIGN_H_
+#define ECDSA_SIGN_H_
+
+#include "bigint.h"
+#include "ecc.h"
+#include "ecdsa.h"
+#include "hfal-basic.h"
+
+uint8_t ecdsa_signature_alloc(ecdsa_signature_t* s, size_t length_B);
+
+void ecdsa_signature_free(ecdsa_signature_t* s);
+
+uint8_t ecdsa_sign_bigint(ecdsa_signature_t* s, const bigint_t* m,
+                          const ecdsa_ctx_t* ctx, const bigint_t* k);
+
+uint8_t ecdsa_sign_message(ecdsa_signature_t* s, const void* m, uint16_t m_len_b,
+                           const hfdesc_t* hash_desc, const ecdsa_ctx_t* ctx,
+                           const void *rand_in);
+
+#endif /* ECDSA_SIGN_H_ */