Граф коммитов

26 Коммитов

Автор SHA1 Сообщение Дата
Simon Tatham 2d1287b9ca Added a command-line key generation tool. Currently builds and runs
on Linux, but the (very few) platform-specific bits are already
abstracted out of the main code, so it should port to other
platforms with a minimum of fuss.

[originally from svn r3762]
2004-01-22 19:15:32 +00:00
Simon Tatham d36a4c3685 Introduced wrapper macros snew(), snewn() and sresize() for the
malloc functions, which automatically cast to the same type they're
allocating the size of. Should prevent any future errors involving
mallocing the size of the wrong structure type, and will also make
life easier if we ever need to turn the PuTTY core code from real C
into C++-friendly C. I haven't touched the Mac frontend in this
checkin because I couldn't compile or test it.

[originally from svn r3014]
2003-03-29 16:14:26 +00:00
Ben Harris 9671370f14 dss_sign() is unused outside this file. Make it static.
[originally from svn r2480]
2003-01-05 23:14:04 +00:00
Ben Harris 24d299bbe8 Replace implict char-*-to-unsigned-char-* casts with explicit ones.
[originally from svn r2463]
2003-01-05 14:00:16 +00:00
Simon Tatham 5f2c53790c Fix compiler warnings
[originally from svn r1469]
2001-12-11 18:47:35 +00:00
Simon Tatham 6608016fc2 INCOMPATIBLE CHANGE to the SSH2 private key file format. There is
now a passphrase-keyed MAC covering _all_ important data in the
file, including the public blob and the key comment. Should
conclusively scupper any attacks based on nobbling the key file in
an attempt to sucker the machine that decrypts it. MACing the
comment field also protects against a key-substitution attack (if
someone's worked out a way past our DSA protections and can extract
the private key from a signature, swapping key files and
substituting comments might just enable them to get the signature
they need to do this. Paranoid, but might as well).

[originally from svn r1413]
2001-11-25 14:31:46 +00:00
Simon Tatham 36e6d63b66 Fix various fiddly little warnings.
[originally from svn r1298]
2001-09-25 19:59:14 +00:00
Simon Tatham 8306df80a4 Add extra explanatory comment about the DSA k generation.
[originally from svn r1285]
2001-09-22 21:00:16 +00:00
Simon Tatham d345ebc2a5 Add support for DSA authentication in SSH2, following clever ideas
on how to get round the problem of generating a good k.

[originally from svn r1284]
2001-09-22 20:52:21 +00:00
Simon Tatham 3730ada5ce Run entire source base through GNU indent to tidy up the varying
coding styles of the various contributors! Woohoo!

[originally from svn r1098]
2001-05-06 14:35:20 +00:00
Simon Tatham 522f130391 Pageant interface changes. You can now do `pageant -c command' to
spawn another command after starting Pageant. Also, if Pageant is
already running, `pageant keyfile' and `pageant -c command' will do
the Right Thing, that is, add the key to the _first_ Pageant and/or
run a command and then exit. The only time you now get the `Pageant
is already running' error is if you try to start the second copy
with no arguments.
NB the affected files in this checkin are rather wide-ranging
because I renamed the not really SSH1-specific
`ssh1_bignum_bitcount' function to just `bignum_bitcount'.

[originally from svn r1044]
2001-04-16 11:16:58 +00:00
Simon Tatham 1f168926d7 Add support for the OpenSSH SSH2 agent protocol.
[originally from svn r976]
2001-03-03 15:31:35 +00:00
Simon Tatham 28b1fc766c Preliminary support for RSA user authentication in SSH2! Most of the
error messages are currently wrong, and Pageant doesn't yet support
the new key type, and I haven't thoroughly tested that falling back
to password authentication and trying invalid keys etc all work. But
what I have here has successfully performed a public key
authentication, so it's working to at least some extent.

[originally from svn r973]
2001-03-03 11:54:34 +00:00
Simon Tatham 1d4009402e Include key type in SSH2 key fingerprints, now we have more than one
[originally from svn r971]
2001-03-02 17:16:22 +00:00
Simon Tatham 902d0636fc Extra crash-safety in decoding a DSS signature blob
[originally from svn r968]
2001-03-02 17:13:16 +00:00
Simon Tatham f72b5aa95f Remove the last lingering knowledge, outside sshbn.c, of the
internal structure of the Bignum type. Bignum is now a fully opaque
type unless you're inside sshbn.c.

[originally from svn r960]
2001-03-01 17:41:26 +00:00
Simon Tatham d5240d4157 Make memory management uniform: _everything_ now goes through the
smalloc() macros and thence to the safemalloc() functions in misc.c.
This should allow me to plug in a debugging allocator and track
memory leaks and segfaults and things.

[originally from svn r818]
2000-12-12 10:33:13 +00:00
Simon Tatham 8eca227b92 Improve SSH2 host key abstraction into a generic `signing key'
abstraction, so as to be able to re-use the same abstraction for
user authentication keys and probably in the SSH2 agent (when that
happens) as well.

[originally from svn r815]
2000-12-02 12:48:15 +00:00
Simon Tatham e51b4da9f7 Make the frankly ridiculous prototypes for modpow() and modmul() more sane
[originally from svn r752]
2000-10-23 16:11:31 +00:00
Simon Tatham bf2744aabf Update DSS implementation to use new bignum routines
[originally from svn r751]
2000-10-23 16:03:21 +00:00
Simon Tatham 43304f1fca Fix a bug which was causing occasional failed-host-key-check
messages. Also left some diagnostics in, under #if 0, so that next
time this happens it'll be easier to debug.

[originally from svn r749]
2000-10-23 15:18:37 +00:00
Simon Tatham 01ca2d8077 Work around DSA formatting bug in commercial-SSH 2.0.13
[originally from svn r665]
2000-10-03 09:05:56 +00:00
Simon Tatham 8191249d86 DSS key format string was missing some commas
[originally from svn r646]
2000-09-28 11:05:43 +00:00
Simon Tatham aad0a52dfb Rationalised host key storage. Also started code reorg: persistent-state
routines have been moved out into a replaceable module winstore.c.

[originally from svn r639]
2000-09-27 15:21:04 +00:00
Simon Tatham d9af8f4b90 RSA key authentication in ssh1 works; SSH2 is nearly there
[originally from svn r572]
2000-09-07 16:33:49 +00:00
Simon Tatham 35205e5cb7 SSH 2 support, phase 1, debugging. Currently does Diffie-Hellman and gets
the same results as the server, which is a pretty good start.

[originally from svn r569]
2000-09-05 14:28:17 +00:00