diff options
author | Damien Miller <djm@mindrot.org> | 2014-01-10 10:58:53 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-01-10 10:58:53 +1100 |
commit | b3051d01e505c9c2dc00faab472a0d06fa6b0e65 (patch) | |
tree | c0ca49b5fc4e5e1a066157b4dbd9c68cfcd41d63 /schnorr.h | |
parent | e00e413dd16eb747fb2c15a099971d91c13cf70f (diff) |
- djm@cvs.openbsd.org 2014/01/09 23:20:00
[digest.c digest.h hostfile.c kex.c kex.h kexc25519.c kexc25519c.c]
[kexc25519s.c kexdh.c kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c]
[kexgexs.c key.c key.h roaming_client.c roaming_common.c schnorr.c]
[schnorr.h ssh-dss.c ssh-ecdsa.c ssh-rsa.c sshconnect2.c]
Introduce digest API and use it to perform all hashing operations
rather than calling OpenSSL EVP_Digest* directly. Will make it easier
to build a reduced-feature OpenSSH without OpenSSL in future;
feedback, ok markus@
Diffstat (limited to 'schnorr.h')
-rw-r--r-- | schnorr.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: schnorr.h,v 1.1 2009/03/05 07:18:19 djm Exp $ */ | 1 | /* $OpenBSD: schnorr.h,v 1.2 2014/01/09 23:20:00 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2009 Damien Miller. All rights reserved. | 3 | * Copyright (c) 2009 Damien Miller. All rights reserved. |
4 | * | 4 | * |
@@ -27,7 +27,7 @@ struct modp_group { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | BIGNUM *bn_rand_range_gt_one(const BIGNUM *high); | 29 | BIGNUM *bn_rand_range_gt_one(const BIGNUM *high); |
30 | int hash_buffer(const u_char *, u_int, const EVP_MD *, u_char **, u_int *); | 30 | int hash_buffer(const u_char *, u_int, int, u_char **, u_int *); |
31 | void debug3_bn(const BIGNUM *, const char *, ...) | 31 | void debug3_bn(const BIGNUM *, const char *, ...) |
32 | __attribute__((__nonnull__ (2))) | 32 | __attribute__((__nonnull__ (2))) |
33 | __attribute__((format(printf, 2, 3))); | 33 | __attribute__((format(printf, 2, 3))); |
@@ -40,7 +40,7 @@ void modp_group_free(struct modp_group *); | |||
40 | /* Signature and verification functions */ | 40 | /* Signature and verification functions */ |
41 | int | 41 | int |
42 | schnorr_sign(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g, | 42 | schnorr_sign(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g, |
43 | const EVP_MD *evp_md, const BIGNUM *x, const BIGNUM *g_x, | 43 | int hash_alg, const BIGNUM *x, const BIGNUM *g_x, |
44 | const u_char *id, u_int idlen, BIGNUM **r_p, BIGNUM **e_p); | 44 | const u_char *id, u_int idlen, BIGNUM **r_p, BIGNUM **e_p); |
45 | int | 45 | int |
46 | schnorr_sign_buf(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g, | 46 | schnorr_sign_buf(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g, |
@@ -48,7 +48,7 @@ schnorr_sign_buf(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g, | |||
48 | u_char **sig, u_int *siglen); | 48 | u_char **sig, u_int *siglen); |
49 | int | 49 | int |
50 | schnorr_verify(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g, | 50 | schnorr_verify(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g, |
51 | const EVP_MD *evp_md, const BIGNUM *g_x, const u_char *id, u_int idlen, | 51 | int hash_alg, const BIGNUM *g_x, const u_char *id, u_int idlen, |
52 | const BIGNUM *r, const BIGNUM *e); | 52 | const BIGNUM *r, const BIGNUM *e); |
53 | int | 53 | int |
54 | schnorr_verify_buf(const BIGNUM *grp_p, const BIGNUM *grp_q, | 54 | schnorr_verify_buf(const BIGNUM *grp_p, const BIGNUM *grp_q, |