Package com.biglybt.core.security.impl
Class CryptoSTSEngineImpl
java.lang.Object
com.biglybt.core.security.impl.CryptoSTSEngineImpl
- All Implemented Interfaces:
CryptoSTSEngine
STS authentication protocol using a symmetric 4 message ECDH/ECDSA handshake
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CryptoSTSEngineImpl.InternalDH
private KeyPair
private final PrivateKey
private final PublicKey
private PublicKey
private byte[]
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
getAuth
(ByteBuffer message) protected byte[]
getBytes
(ByteBuffer buffer, int max_size) protected int
getInt
(ByteBuffer buffer, int max_size) void
getKeys
(ByteBuffer message) void
getMessage
(ByteBuffer buffer, boolean keys) byte[]
byte[]
void
putAuth
(ByteBuffer message) protected void
putBytes
(ByteBuffer buffer, byte[] value, int max_size) protected void
putInt
(ByteBuffer buffer, int value, int max_size) void
putKeys
(ByteBuffer message) void
putMessage
(ByteBuffer message, boolean keys)
-
Field Details
-
VERSION
public static final int VERSION- See Also:
-
ephemeralKeyPair
-
myPublicKey
-
myPrivateKey
-
remotePubKey
-
ecDH
-
-
Constructor Details
-
CryptoSTSEngineImpl
CryptoSTSEngineImpl(PublicKey _myPub, PrivateKey _myPriv) throws CryptoManagerException - Parameters:
myIdent
- keypair representing our current identity- Throws:
CryptoManagerException
-
-
Method Details
-
getKeys
- Specified by:
getKeys
in interfaceCryptoSTSEngine
- Throws:
CryptoManagerException
-
putKeys
- Specified by:
putKeys
in interfaceCryptoSTSEngine
- Throws:
CryptoManagerException
-
getAuth
- Specified by:
getAuth
in interfaceCryptoSTSEngine
- Throws:
CryptoManagerException
-
putAuth
- Specified by:
putAuth
in interfaceCryptoSTSEngine
- Throws:
CryptoManagerException
-
putMessage
- Throws:
CryptoManagerException
-
getMessage
- Throws:
CryptoManagerException
-
getRemotePublicKey
- Specified by:
getRemotePublicKey
in interfaceCryptoSTSEngine
- Throws:
CryptoManagerException
-
getInt
- Throws:
CryptoManagerException
-
getBytes
- Throws:
CryptoManagerException
-
putInt
- Throws:
CryptoManagerException
-
putBytes
protected void putBytes(ByteBuffer buffer, byte[] value, int max_size) throws CryptoManagerException - Throws:
CryptoManagerException
-