summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dsa.c9
-rw-r--r--dsa.h15
2 files changed, 12 insertions, 12 deletions
diff --git a/dsa.c b/dsa.c
index 1f759f60..8b9a37d6 100644
--- a/dsa.c
+++ b/dsa.c
@@ -79,13 +79,4 @@ dsa_signature_clear(struct dsa_signature *signature)
mpz_clear(signature->s);
}
-void
-_dsa_hash(mpz_t x, struct sha1_ctx *hash)
-{
- uint8_t digest[SHA1_DIGEST_SIZE];
- sha1_digest(hash, sizeof(digest), digest);
-
- nettle_mpz_set_str_256_u(x, sizeof(digest), digest);
-}
-
#endif /* WITH_PUBLIC_KEY */
diff --git a/dsa.h b/dsa.h
index 5416b77f..beb15dda 100644
--- a/dsa.h
+++ b/dsa.h
@@ -113,9 +113,6 @@ dsa_signature_clear(struct dsa_signature *signature);
void
-_dsa_hash(mpz_t x, struct sha1_ctx *hash);
-
-void
dsa_sign(const struct dsa_public_key *pub,
const struct dsa_private_key *key,
void *random_ctx, nettle_random_func random,
@@ -128,6 +125,18 @@ dsa_verify(const struct dsa_public_key *key,
struct sha1_ctx *hash,
const struct dsa_signature *signature);
+void
+dsa_sign_digest(const struct dsa_public_key *pub,
+ const struct dsa_private_key *key,
+ void *random_ctx, nettle_random_func random,
+ const uint8_t *digest,
+ struct dsa_signature *signature);
+
+int
+dsa_verify_digest(const struct dsa_public_key *key,
+ const uint8_t *digest,
+ const struct dsa_signature *signature);
+
/* Key generation */
int