annotate ecdsa.h @ 1156:a8f4dade70e5

avoid getpass when not used some systems (like android's bionic) do not provide getpass. you can disable ENABLE_CLI_PASSWORD_AUTH & ENABLE_CLI_INTERACT_AUTH to avoid its use (and rely on pubkey auth), but the link still fails because the support file calls getpass. do not define this func if both of those auth methods are not used.
author Mike Frysinger <vapier@gentoo.org>
date Wed, 21 Oct 2015 22:39:55 +0800
parents deed0571cacc
children 750ec4ec4cbe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1036
deed0571cacc DROPBEAR_ prefix for include guards to avoid collisions
Thorsten Horstmann <thorsten.horstmann@web.de>
parents: 857
diff changeset
1 #ifndef DROPBEAR_ECDSA_H_
deed0571cacc DROPBEAR_ prefix for include guards to avoid collisions
Thorsten Horstmann <thorsten.horstmann@web.de>
parents: 857
diff changeset
2 #define DROPBEAR_ECDSA_H_
793
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
3
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
4 #include "includes.h"
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
5 #include "buffer.h"
795
7f604f9b3756 ecdsa is working
Matt Johnston <matt@ucc.asn.au>
parents: 794
diff changeset
6 #include "signkey.h"
793
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
7
797
45f1bc96f357 Fix build for dropbearkey and ecdsa with certain options
Matt Johnston <matt@ucc.asn.au>
parents: 795
diff changeset
8 #ifdef DROPBEAR_ECDSA
45f1bc96f357 Fix build for dropbearkey and ecdsa with certain options
Matt Johnston <matt@ucc.asn.au>
parents: 795
diff changeset
9
852
7540c0822374 Various cleanups and fixes for warnings
Matt Johnston <matt@ucc.asn.au>
parents: 846
diff changeset
10 /* Prefer the larger size - it's fast anyway */
840
5128e525c8fa Default to some larger key sizes
Matt Johnston <matt@ucc.asn.au>
parents: 797
diff changeset
11 #if defined(DROPBEAR_ECC_521)
5128e525c8fa Default to some larger key sizes
Matt Johnston <matt@ucc.asn.au>
parents: 797
diff changeset
12 #define ECDSA_DEFAULT_SIZE 521
5128e525c8fa Default to some larger key sizes
Matt Johnston <matt@ucc.asn.au>
parents: 797
diff changeset
13 #elif defined(DROPBEAR_ECC_384)
5128e525c8fa Default to some larger key sizes
Matt Johnston <matt@ucc.asn.au>
parents: 797
diff changeset
14 #define ECDSA_DEFAULT_SIZE 384
5128e525c8fa Default to some larger key sizes
Matt Johnston <matt@ucc.asn.au>
parents: 797
diff changeset
15 #elif defined(DROPBEAR_ECC_256)
794
d386defb5376 more ecdsa signkey work, not correct
Matt Johnston <matt@ucc.asn.au>
parents: 793
diff changeset
16 #define ECDSA_DEFAULT_SIZE 256
d386defb5376 more ecdsa signkey work, not correct
Matt Johnston <matt@ucc.asn.au>
parents: 793
diff changeset
17 #else
d386defb5376 more ecdsa signkey work, not correct
Matt Johnston <matt@ucc.asn.au>
parents: 793
diff changeset
18 #define ECDSA_DEFAULT_SIZE 0
d386defb5376 more ecdsa signkey work, not correct
Matt Johnston <matt@ucc.asn.au>
parents: 793
diff changeset
19 #endif
d386defb5376 more ecdsa signkey work, not correct
Matt Johnston <matt@ucc.asn.au>
parents: 793
diff changeset
20
793
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
21 ecc_key *gen_ecdsa_priv_key(unsigned int bit_size);
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
22 ecc_key *buf_get_ecdsa_pub_key(buffer* buf);
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
23 ecc_key *buf_get_ecdsa_priv_key(buffer *buf);
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
24 void buf_put_ecdsa_pub_key(buffer *buf, ecc_key *key);
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
25 void buf_put_ecdsa_priv_key(buffer *buf, ecc_key *key);
795
7f604f9b3756 ecdsa is working
Matt Johnston <matt@ucc.asn.au>
parents: 794
diff changeset
26 enum signkey_type ecdsa_signkey_type(ecc_key * key);
793
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
27
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
28 void buf_put_ecdsa_sign(buffer *buf, ecc_key *key, buffer *data_buf);
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
29 int buf_ecdsa_verify(buffer *buf, ecc_key *key, buffer *data_buf);
846
b298bb438625 refactor key generation, make it generate as required.
Matt Johnston <matt@ucc.asn.au>
parents: 845
diff changeset
30 /* Returns 1 on success */
b298bb438625 refactor key generation, make it generate as required.
Matt Johnston <matt@ucc.asn.au>
parents: 845
diff changeset
31 int signkey_is_ecdsa(enum signkey_type type);
793
70625eed40c9 A bit of work on ecdsa for host/auth keys
Matt Johnston <matt@ucc.asn.au>
parents: 766
diff changeset
32
797
45f1bc96f357 Fix build for dropbearkey and ecdsa with certain options
Matt Johnston <matt@ucc.asn.au>
parents: 795
diff changeset
33 #endif
45f1bc96f357 Fix build for dropbearkey and ecdsa with certain options
Matt Johnston <matt@ucc.asn.au>
parents: 795
diff changeset
34
1036
deed0571cacc DROPBEAR_ prefix for include guards to avoid collisions
Thorsten Horstmann <thorsten.horstmann@web.de>
parents: 857
diff changeset
35 #endif /* DROPBEAR_ECDSA_H_ */