~ubuntu-branches/ubuntu/utopic/nettle/utopic-proposed

« back to all changes in this revision

Viewing changes to dsa.h

  • Committer: Package Import Robot
  • Author(s): Magnus Holmgren
  • Date: 2013-05-07 22:57:14 UTC
  • mfrom: (8.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130507225714-s331yr8ov53dtt17
Tags: 2.7-2
Tag some (ECC related) symbols that only exist on some architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
/* nettle, low-level cryptographics library
7
7
 *
8
 
 * Copyright (C) 2002 Niels M�ller
 
8
 * Copyright (C) 2002 Niels Möller
9
9
 *  
10
10
 * The nettle library is free software; you can redistribute it and/or modify
11
11
 * it under the terms of the GNU Lesser General Public License as published by
19
19
 * 
20
20
 * You should have received a copy of the GNU Lesser General Public License
21
21
 * along with the nettle library; see the file COPYING.LIB.  If not, write to
22
 
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23
 
 * MA 02111-1307, USA.
 
22
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
23
 * MA 02111-1301, USA.
24
24
 */
25
25
 
26
26
#ifndef NETTLE_DSA_H_INCLUDED
30
30
 
31
31
#include "nettle-types.h"
32
32
 
33
 
#include "sha.h"
34
 
 
35
 
/* For nettle_random_func */
36
 
#include "nettle-meta.h"
 
33
#include "sha1.h"
 
34
#include "sha2.h"
37
35
 
38
36
#ifdef __cplusplus
39
37
extern "C" {
152
150
int
153
151
dsa_sha1_sign(const struct dsa_public_key *pub,
154
152
              const struct dsa_private_key *key,
155
 
              void *random_ctx, nettle_random_func random,
 
153
              void *random_ctx, nettle_random_func *random,
156
154
              struct sha1_ctx *hash,
157
155
              struct dsa_signature *signature);
158
156
 
159
157
int
160
158
dsa_sha256_sign(const struct dsa_public_key *pub,
161
159
                const struct dsa_private_key *key,
162
 
                void *random_ctx, nettle_random_func random,
 
160
                void *random_ctx, nettle_random_func *random,
163
161
                struct sha256_ctx *hash,
164
162
                struct dsa_signature *signature);
165
163
 
176
174
int
177
175
dsa_sha1_sign_digest(const struct dsa_public_key *pub,
178
176
                     const struct dsa_private_key *key,
179
 
                     void *random_ctx, nettle_random_func random,
 
177
                     void *random_ctx, nettle_random_func *random,
180
178
                     const uint8_t *digest,
181
179
                     struct dsa_signature *signature);
182
180
int
183
181
dsa_sha256_sign_digest(const struct dsa_public_key *pub,
184
182
                       const struct dsa_private_key *key,
185
 
                       void *random_ctx, nettle_random_func random,
 
183
                       void *random_ctx, nettle_random_func *random,
186
184
                       const uint8_t *digest,
187
185
                       struct dsa_signature *signature);
188
186
 
202
200
dsa_generate_keypair(struct dsa_public_key *pub,
203
201
                     struct dsa_private_key *key,
204
202
 
205
 
                     void *random_ctx, nettle_random_func random,
 
203
                     void *random_ctx, nettle_random_func *random,
206
204
 
207
 
                     void *progress_ctx, nettle_progress_func progress,
 
205
                     void *progress_ctx, nettle_progress_func *progress,
208
206
                     unsigned p_bits, unsigned q_bits);
209
207
 
210
208
/* Keys in sexp form. */
277
275
int
278
276
_dsa_sign(const struct dsa_public_key *pub,
279
277
          const struct dsa_private_key *key,
280
 
          void *random_ctx, nettle_random_func random,
 
278
          void *random_ctx, nettle_random_func *random,
281
279
          unsigned digest_size,
282
280
          const uint8_t *digest,
283
281
          struct dsa_signature *signature);