Package com.wolfssl.wolfcrypt
Class Curve25519
java.lang.Object
com.wolfssl.wolfcrypt.WolfObject
com.wolfssl.wolfcrypt.NativeStruct
com.wolfssl.wolfcrypt.Curve25519
public class Curve25519 extends NativeStruct
Wrapper for the native WolfCrypt curve25519 implementation.
- Version:
- 1.0, March 2018
- Author:
- Daniele Lacamera
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Curve25519()
-
Method Summary
Modifier and Type Method Description void
checkKey()
byte[]
exportPrivate()
byte[]
exportPublic()
protected void
free()
void
importPrivate(byte[] privKey, byte[] xKey)
void
importPrivateOnly(byte[] privKey)
void
importPublic(byte[] pubKey)
protected void
init()
void
makeKey(Rng rng, int size)
void
makeKeyWithEndian(Rng rng, int size, int endian)
byte[]
makeSharedSecret(Curve25519 pubKey)
protected long
mallocNativeStruct()
void
releaseNativeStruct()
Releases the host data stored in a NativeStruct.Methods inherited from class com.wolfssl.wolfcrypt.NativeStruct
finalize, getNativeStruct, setNativeStruct
-
Constructor Details
-
Curve25519
public Curve25519()
-
-
Method Details
-
releaseNativeStruct
public void releaseNativeStruct()Description copied from class:NativeStruct
Releases the host data stored in a NativeStruct. This method provides a way to release host data without depending on the garbage collector to get around to releasing it. Derived objects whose native data structures have their own free functions, should be override this method to call that function.- Overrides:
releaseNativeStruct
in classNativeStruct
-
mallocNativeStruct
protected long mallocNativeStruct() throws java.lang.OutOfMemoryError- Specified by:
mallocNativeStruct
in classNativeStruct
- Throws:
java.lang.OutOfMemoryError
-
init
protected void init() -
free
protected void free() -
makeKey
-
makeKeyWithEndian
-
checkKey
public void checkKey() -
importPrivate
public void importPrivate(byte[] privKey, byte[] xKey) -
importPrivateOnly
public void importPrivateOnly(byte[] privKey) -
importPublic
public void importPublic(byte[] pubKey) -
exportPrivate
public byte[] exportPrivate() -
exportPublic
public byte[] exportPublic() -
makeSharedSecret
-