|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.tor.OnionRouter
public class OnionRouter
Field Summary | |
---|---|
private static org.bouncycastle.crypto.params.DHParameters |
DH_PARAMS
|
private int |
m_circID
|
private MyAES |
m_decryptionEngine
|
private ORDescriptor |
m_description
|
private org.bouncycastle.crypto.agreement.DHBasicAgreement |
m_dhe
|
private org.bouncycastle.crypto.digests.SHA1Digest |
m_digestDb
|
private org.bouncycastle.crypto.digests.SHA1Digest |
m_digestDf
|
private MyAES |
m_encryptionEngine
|
private boolean |
m_extended
|
private OnionRouter |
m_nextOR
|
private static java.math.BigInteger |
MAXKEY
|
private static java.math.BigInteger |
MINKEY
|
private static java.math.BigInteger |
SAFEPRIME
|
Constructor Summary | |
---|---|
OnionRouter(int circID,
ORDescriptor description)
Constructor |
Method Summary | |
---|---|
boolean |
checkCreatedCell(Cell cell)
checks the created cell if the answer was right |
boolean |
checkExtendedCell(RelayCell cell)
checks if the extendedcell has the right parameters and hash |
private void |
checkExtendParameters(byte[] param,
int offset,
int len)
checks the parameters of a extend cell and calculate the secrets |
CreateCell |
createConnection()
create cell this cell is needed to connect to the first OR. |
private byte[] |
createExtendOnionSkin()
creates the onion skin for a create or extend cell |
RelayCell |
decryptCell(RelayCell cell)
decrypts a RelayCell |
RelayCell |
encryptCell(RelayCell cell)
encrypts a RelayCell |
RelayCell |
extendConnection(ORDescriptor description)
extends the connction to another OR and encrypts the data |
private RelayCell |
extendConnection(java.lang.String address,
int port)
extends the connection to another OR |
ORDescriptor |
getDescription()
returns a description of this router |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.math.BigInteger SAFEPRIME
private static final java.math.BigInteger MINKEY
private static final java.math.BigInteger MAXKEY
private static final org.bouncycastle.crypto.params.DHParameters DH_PARAMS
private ORDescriptor m_description
private org.bouncycastle.crypto.agreement.DHBasicAgreement m_dhe
private MyAES m_encryptionEngine
private MyAES m_decryptionEngine
private OnionRouter m_nextOR
private int m_circID
private org.bouncycastle.crypto.digests.SHA1Digest m_digestDf
private org.bouncycastle.crypto.digests.SHA1Digest m_digestDb
private boolean m_extended
Constructor Detail |
---|
public OnionRouter(int circID, ORDescriptor description) throws java.io.IOException
circID
- circID of the circuit where it is useddescription
- ORDescription of the onionrouter
java.io.IOException
Method Detail |
---|
public ORDescriptor getDescription()
public RelayCell encryptCell(RelayCell cell) throws java.lang.Exception
cell
- unencrypted cell
java.lang.Exception
public RelayCell decryptCell(RelayCell cell) throws java.lang.Exception
cell
- encrypted cell
java.lang.Exception
public CreateCell createConnection() throws java.lang.Exception
java.lang.Exception
public boolean checkCreatedCell(Cell cell)
cell
- createdcell
java.lang.Exception
private RelayCell extendConnection(java.lang.String address, int port) throws java.io.IOException, org.bouncycastle.crypto.InvalidCipherTextException, java.lang.Exception
address
- address of the ORport
- port
java.io.IOException
org.bouncycastle.crypto.InvalidCipherTextException
java.lang.Exception
public RelayCell extendConnection(ORDescriptor description) throws java.io.IOException, org.bouncycastle.crypto.InvalidCipherTextException, java.lang.Exception
description
- ORDescription
java.io.IOException
org.bouncycastle.crypto.InvalidCipherTextException
java.lang.Exception
public boolean checkExtendedCell(RelayCell cell)
cell
- cell
java.lang.Exception
private byte[] createExtendOnionSkin() throws java.io.IOException, org.bouncycastle.crypto.InvalidCipherTextException, java.lang.Exception
java.io.IOException
org.bouncycastle.crypto.InvalidCipherTextException
java.lang.Exception
private void checkExtendParameters(byte[] param, int offset, int len) throws java.lang.Exception
param
- parametersoffset
- offset of the parameterslen
- length of the parameters
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |