aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/main/java/com/trilead/ssh2/packets/PacketKexDHReply.java
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2013-04-10 18:43:35 -0700
committerKenny Root <kenny@the-b.org>2013-04-10 20:14:43 -0700
commit8e00d2fc37bc277a50c495938cc1ec7ab32aef66 (patch)
treeb821012175ee2a4afb5faa5d16632be4f609301d /lib/src/main/java/com/trilead/ssh2/packets/PacketKexDHReply.java
parent1ad1f57886747362abb2e6f7eb91a221369eed35 (diff)
downloadsshlib-8e00d2fc37bc277a50c495938cc1ec7ab32aef66.tar.gz
sshlib-8e00d2fc37bc277a50c495938cc1ec7ab32aef66.tar.bz2
sshlib-8e00d2fc37bc277a50c495938cc1ec7ab32aef66.zip
Add ECDH support
Add support for the ECDH methods required by RFC 5656 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521
Diffstat (limited to 'lib/src/main/java/com/trilead/ssh2/packets/PacketKexDHReply.java')
-rw-r--r--lib/src/main/java/com/trilead/ssh2/packets/PacketKexDHReply.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/src/main/java/com/trilead/ssh2/packets/PacketKexDHReply.java b/lib/src/main/java/com/trilead/ssh2/packets/PacketKexDHReply.java
index 0803ff9..461f262 100644
--- a/lib/src/main/java/com/trilead/ssh2/packets/PacketKexDHReply.java
+++ b/lib/src/main/java/com/trilead/ssh2/packets/PacketKexDHReply.java
@@ -2,8 +2,6 @@ package com.trilead.ssh2.packets;
import java.io.IOException;
-import java.math.BigInteger;
-
/**
* PacketKexDHReply.
*
@@ -15,7 +13,7 @@ public class PacketKexDHReply
byte[] payload;
byte[] hostKey;
- BigInteger f;
+ byte[] publicKey;
byte[] signature;
public PacketKexDHReply(byte payload[], int off, int len) throws IOException
@@ -32,15 +30,15 @@ public class PacketKexDHReply
+ packet_type + ")");
hostKey = tr.readByteString();
- f = tr.readMPINT();
+ publicKey = tr.readByteString();
signature = tr.readByteString();
if (tr.remain() != 0) throw new IOException("PADDING IN SSH_MSG_KEXDH_REPLY!");
}
- public BigInteger getF()
+ public byte[] getF()
{
- return f;
+ return publicKey;
}
public byte[] getHostKey()