Added curve25519

This commit is contained in:
nathan 2016-03-10 23:35:29 +01:00
parent dd908b63df
commit 2f29fc5d15

View File

@ -51,6 +51,9 @@ import java.util.Arrays;
public final public final
class CryptoECC { class CryptoECC {
public static final String p521_curve = "secp521r1"; public static final String p521_curve = "secp521r1";
public static final String curve25519 = "curve25519";
public static final String default_curve = curve25519;
public static final int macSize = 512; public static final int macSize = 512;
// more info about ECC from: http://www.johannes-bauer.com/compsci/ecc/?menuid=4 // more info about ECC from: http://www.johannes-bauer.com/compsci/ecc/?menuid=4
// http://stackoverflow.com/questions/7419183/problems-implementing-ecdh-on-android-using-bouncycastle // http://stackoverflow.com/questions/7419183/problems-implementing-ecdh-on-android-using-bouncycastle
@ -59,7 +62,6 @@ class CryptoECC {
// https://github.com/nelenkov/ecdh-kx/blob/master/src/org/nick/ecdhkx/Crypto.java // https://github.com/nelenkov/ecdh-kx/blob/master/src/org/nick/ecdhkx/Crypto.java
// http://nelenkov.blogspot.com/2011/12/using-ecdh-on-android.html // http://nelenkov.blogspot.com/2011/12/using-ecdh-on-android.html
// http://www.secg.org/collateral/sec1_final.pdf // http://www.secg.org/collateral/sec1_final.pdf
static final String ECC_NAME = "EC";
/** /**
* Uses SHA512 * Uses SHA512