summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-08-31 22:41:14 +1000
committerDamien Miller <djm@mindrot.org>2010-08-31 22:41:14 +1000
commiteb8b60e320cdade9f4c07e2abacfb92c52e01348 (patch)
tree4e5bc25790566402e5b7ae00cefd2c57e867ef09 /packet.c
parentda108ece6843f1268aa36d7c8ed0030dc53acd15 (diff)
- djm@cvs.openbsd.org 2010/08/31 11:54:45
[PROTOCOL PROTOCOL.agent PROTOCOL.certkeys auth2-jpake.c authfd.c] [authfile.c buffer.h dns.c kex.c kex.h key.c key.h monitor.c] [monitor_wrap.c myproposal.h packet.c packet.h pathnames.h readconf.c] [ssh-add.1 ssh-add.c ssh-agent.1 ssh-agent.c ssh-keygen.1 ssh-keygen.c] [ssh-keyscan.1 ssh-keyscan.c ssh-keysign.8 ssh.1 ssh.c ssh2.h] [ssh_config.5 sshconnect.c sshconnect2.c sshd.8 sshd.c sshd_config.5] [uuencode.c uuencode.h bufec.c kexecdh.c kexecdhc.c kexecdhs.c ssh-ecdsa.c] Implement Elliptic Curve Cryptography modes for key exchange (ECDH) and host/user keys (ECDSA) as specified by RFC5656. ECDH and ECDSA offer better performance than plain DH and DSA at the same equivalent symmetric key length, as well as much shorter keys. Only the mandatory sections of RFC5656 are implemented, specifically the three REQUIRED curves nistp256, nistp384 and nistp521 and only ECDH and ECDSA. Point compression (optional in RFC5656 is NOT implemented). Certificate host and user keys using the new ECDSA key types are supported. Note that this code has not been tested for interoperability and may be subject to change. feedback and ok markus@
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index 49aa97335..a06c5e3ef 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.169 2010/08/31 09:58:37 djm Exp $ */ 1/* $OpenBSD: packet.c,v 1.170 2010/08/31 11:54:45 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -641,6 +641,12 @@ packet_put_bignum2(BIGNUM * value)
641 buffer_put_bignum2(&active_state->outgoing_packet, value); 641 buffer_put_bignum2(&active_state->outgoing_packet, value);
642} 642}
643 643
644void
645packet_put_ecpoint(const EC_GROUP *curve, const EC_POINT *point)
646{
647 buffer_put_ecpoint(&active_state->outgoing_packet, curve, point);
648}
649
644/* 650/*
645 * Finalizes and sends the packet. If the encryption key has been set, 651 * Finalizes and sends the packet. If the encryption key has been set,
646 * encrypts the packet before sending. 652 * encrypts the packet before sending.
@@ -1511,6 +1517,12 @@ packet_get_bignum2(BIGNUM * value)
1511 buffer_get_bignum2(&active_state->incoming_packet, value); 1517 buffer_get_bignum2(&active_state->incoming_packet, value);
1512} 1518}
1513 1519
1520void
1521packet_get_ecpoint(const EC_GROUP *curve, EC_POINT *point)
1522{
1523 buffer_get_ecpoint(&active_state->incoming_packet, curve, point);
1524}
1525
1514void * 1526void *
1515packet_get_raw(u_int *length_ptr) 1527packet_get_raw(u_int *length_ptr)
1516{ 1528{