Skip to content
Snippets Groups Projects
Commit 2be53e2b authored by Niels Möller's avatar Niels Möller
Browse files

(DSA_MIN_P_BITS): New constant (was DSA_MINIMUM_BITS).

(DSA_Q_OCTETS, DSA_Q_BITS): New constants.
(dsa_keypair_from_sexp_alist, dsa_keypair_from_sexp): New
prototypes.

Rev: src/nettle/dsa.h:1.4
parent 726d9bd7
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,9 @@ ...@@ -34,7 +34,9 @@
/* For nettle_random_func */ /* For nettle_random_func */
#include "nettle-meta.h" #include "nettle-meta.h"
#define DSA_MINIMUM_BITS 512 #define DSA_MIN_P_BITS 512
#define DSA_Q_OCTETS 20
#define DSA_Q_BITS 160
struct dsa_public_key struct dsa_public_key
{ {
...@@ -140,4 +142,23 @@ dsa_generate_keypair(struct dsa_public_key *pub, ...@@ -140,4 +142,23 @@ dsa_generate_keypair(struct dsa_public_key *pub,
* NIS key sizes. */ * NIS key sizes. */
unsigned bits); unsigned bits);
struct sexp_iterator;
int
dsa_keypair_from_sexp_alist(struct dsa_public_key *pub,
struct dsa_private_key *priv,
unsigned limit,
struct sexp_iterator *i);
/* If PRIV is NULL, expect a public-key expression. If PUB is NULL,
* expect a private key expression and ignore the parts not needed for
* the public key. */
/* Keys must be initialized before calling this function, as usual. */
int
dsa_keypair_from_sexp(struct dsa_public_key *pub,
struct dsa_private_key *priv,
unsigned limit,
unsigned length, const uint8_t *expr);
#endif /* NETTLE_DSA_H_INCLUDED */ #endif /* NETTLE_DSA_H_INCLUDED */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment