]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - dsa/dsa.h
fixing E-Mail-Address & Copyright
[avr-crypto-lib.git] / dsa / dsa.h
index 6a894f6c8e0d487b164c6d7efb208efa1e971b5b..c882f82f24175e232209533ef1a5002108c6652b 100644 (file)
--- a/dsa/dsa.h
+++ b/dsa/dsa.h
@@ -1,7 +1,7 @@
 /* dsa.h */
 /*
     This file is part of the AVR-Crypto-Lib.
-    Copyright (C) 2010 Daniel Otte (daniel.otte@rub.de)
+    Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
 
     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
@@ -32,6 +32,7 @@ typedef struct{
 
 typedef bigint_t dsa_pubkey_t;
 typedef bigint_t dsa_privkey_t;
+
 typedef struct{
        bigint_t r;
        bigint_t s;
@@ -43,17 +44,19 @@ typedef struct{
        dsa_domainparameters_t domain;
 } dsa_ctx_t;
 
+typedef uint8_t(*rand_func_ptr_t)(void);
+
 #define DSA_SIGNATURE_OK 1
 #define DSA_SIGNATURE_FAIL 0
 
-uint8_t dsa_sign_bigint(dsa_signature_t* s, const bigint_t* m,
-                               const dsa_ctx_t* ctx, const bigint_t* k);
-uint8_t dsa_sign_message(dsa_signature_t* s, const void* m, uint16_t m_len_b,
-                               const hfdesc_t* hash_desc, const dsa_ctx_t* ctx,
-                               const uint8_t(*rand_in)(void));
-uint8_t dsa_verify_bigint(const dsa_signature_t* s, const bigint_t* m,
-                                 const dsa_ctx_tctx);
-uint8_t dsa_verify_message(const dsa_signature_t* s, const void* m, uint16_t m_len_b,
-                                                 const hfdesc_t* hash_desc, const dsa_ctx_t* ctx);
+uint8_t dsa_sign_bigint(dsa_signature_t *s, const bigint_t *m,
+                               const dsa_ctx_t *ctx, const bigint_t *k);
+uint8_t dsa_sign_message(dsa_signature_t *s, const void *m, uint16_t m_len_b,
+                               const hfdesc_t *hash_desc, const dsa_ctx_t *ctx,
+                               const rand_func_ptr_t rand_in);
+uint8_t dsa_verify_bigint(const dsa_signature_t *s, const bigint_t *m,
+                                 const dsa_ctx_t *ctx);
+uint8_t dsa_verify_message(const dsa_signature_t *s, const void *m, uint16_t m_len_b,
+                                                 const hfdesc_t *hash_desc, const dsa_ctx_t *ctx);
 
 #endif /* DSA_H_ */