diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/com/trilead/ssh2/crypto/dh/EcDhExchange.java | 2 | ||||
-rw-r--r-- | app/src/main/java/com/trilead/ssh2/signature/ECDSASHA2Verify.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/trilead/ssh2/crypto/dh/EcDhExchange.java b/app/src/main/java/com/trilead/ssh2/crypto/dh/EcDhExchange.java index 43d31ad..870a3b4 100644 --- a/app/src/main/java/com/trilead/ssh2/crypto/dh/EcDhExchange.java +++ b/app/src/main/java/com/trilead/ssh2/crypto/dh/EcDhExchange.java @@ -96,7 +96,7 @@ public class EcDhExchange extends GenericDhExchange { throw (IOException) new IOException("Invalid ECDH key").initCause(e); } - sharedSecret = new BigInteger(ka.generateSecret()); + sharedSecret = new BigInteger(1, ka.generateSecret()); } @Override diff --git a/app/src/main/java/com/trilead/ssh2/signature/ECDSASHA2Verify.java b/app/src/main/java/com/trilead/ssh2/signature/ECDSASHA2Verify.java index f139cdf..7d8dd3e 100644 --- a/app/src/main/java/com/trilead/ssh2/signature/ECDSASHA2Verify.java +++ b/app/src/main/java/com/trilead/ssh2/signature/ECDSASHA2Verify.java @@ -294,8 +294,8 @@ public class ECDSASHA2Verify { System.arraycopy(sig, 4, rArray, 0, rLength); System.arraycopy(sig, 6 + rLength, sArray, 0, sLength); - BigInteger r = new BigInteger(rArray); - BigInteger s = new BigInteger(sArray); + BigInteger r = new BigInteger(1, rArray); + BigInteger s = new BigInteger(1, sArray); // Write the <r,s> to its own types writer. TypesWriter rsWriter = new TypesWriter(); |