|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
externalInformationPort.InformationProvider
final class InformationProvider
Provides Information for "external" communication partners (e.
g. other mixes or clients) vie network (UDP).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
private java.net.DatagramSocket |
datagramSocket
DatagramSocket this InformationProvider runs on. |
private byte[] |
encryptedInterMixKey
Key used to encrypt data between this mix and its predecessor, encrypted with the predecessor's public key. |
(package private) java.util.EnumMap<Information,java.lang.Integer> |
enumMap
Enumeration used to identify incoming requests. |
private ExternalInformationPortController |
externalInformationPort
Reference on component ExternalInformationPort. |
private javax.crypto.spec.IvParameterSpec |
interMixIV
Initialization vector used to encrypt data between this mix and its predecessor. |
private javax.crypto.SecretKey |
interMixKey
Key used to encrypt data between this mix and its predecessor. |
private static InternalInformationPortController |
internalInformationPort
Reference on component InternalInformationPort. |
private boolean |
isSymmetricKeyEncrypted
Indicates whether the key used to encrypt data between this mix and its predecessor has already been encrypted (= prepared for sending via an insecure channel). |
private static java.util.logging.Logger |
LOGGER
Logger used to log and display information. |
private static int |
MAX_PACKET_SIZE
Maximum size a request may have. |
private java.lang.String |
nextMixHostName
Host name of the next mix in the cascade. |
private int |
nextMixInfoPort
Port number of the next mix in the cascade. |
private int |
positionOfMixInCascade
The mix' position in the cascade this object belongs to. "1" means "first mix", "2" means "a middle mix" and "3" means "last mix" of cascade (or single mix). |
private java.net.InetAddress |
previousMixAddress
Address of the previous mix in the cascade. |
private int |
previousMixInfoPort
Port number of the previous mix' InformationProvider
component. |
private java.security.PublicKey |
publicKey
This mix' public key. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
protected |
InformationProvider(java.security.PublicKey publicKey,
ExternalInformationPortController eip)
Creates a new InformationProvider that provides
Information for "external" communication partners (e. g. |
| Method Summary | |
|---|---|
protected void |
acceptRequests()
Make this InformationProvider start listening for
requests (on communication channel). |
private byte[] |
encryptInterMixKey()
Encrypts and returns the interMixKey>/code>. |
private byte[] |
generateResponse(Information informationOfInterest,
byte[] data)
Generates a byte array containing the information specified by the bypassed value (= information, the caller is interested in). |
private byte[] |
provideInterMixIV()
Provides this mix' INTER_MIX_IV. |
private byte[] |
provideInterMixKey()
Provides this mix' INTER_MIX_KEY. |
private byte[] |
provideNextMixAddress()
Provides this mix' NEXT_MIX_ADDRESS. |
private byte[] |
provideNextMixInfoPort()
Provides this mix' NEXT_MIX_INFO_PORT. |
private byte[] |
providePublicKey()
Provides this mix' PUBLIC_KEY. |
void |
run()
Answers incoming requests. |
protected void |
setInterMixIVWithPreviousMix(javax.crypto.spec.IvParameterSpec interMixIV)
Sets the initialization vector used to encrypt data between this mix and its predecessor. |
protected void |
setInterMixKeyWithPreviousMix(javax.crypto.SecretKey interMixKey)
Sets the key used to encrypt data between this mix and its predecessor. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static InternalInformationPortController internalInformationPort
InternalInformationPort.
Used to display and/or log data and read general settings.
private static final java.util.logging.Logger LOGGER
private static final int MAX_PACKET_SIZE
private ExternalInformationPortController externalInformationPort
ExternalInformationPort.
Used to receive data from ExternalInformationPort
components on different hosts.
private java.net.DatagramSocket datagramSocket
InformationProvider runs on.
java.util.EnumMap<Information,java.lang.Integer> enumMap
Informationprivate java.security.PublicKey publicKey
private javax.crypto.SecretKey interMixKey
private byte[] encryptedInterMixKey
private javax.crypto.spec.IvParameterSpec interMixIV
private boolean isSymmetricKeyEncrypted
interMixKey,
encryptedInterMixKeyprivate int positionOfMixInCascade
private java.lang.String nextMixHostName
private int nextMixInfoPort
private java.net.InetAddress previousMixAddress
private int previousMixInfoPort
InformationProvider
component.
| Constructor Detail |
|---|
protected InformationProvider(java.security.PublicKey publicKey,
ExternalInformationPortController eip)
InformationProvider that provides
Information for "external" communication partners (e. g.
other mixes or clients) vie network (UDP).
publicKey - This mix' public key.eip - Reference on component
ExternalInformationPort. Used to reveive
Information from communication partners.| Method Detail |
|---|
protected void setInterMixKeyWithPreviousMix(javax.crypto.SecretKey interMixKey)
interMixKey - Key used to encrypt data between this mix and its
predecessor.protected void setInterMixIVWithPreviousMix(javax.crypto.spec.IvParameterSpec interMixIV)
interMixIV - Initialization vector used to encrypt data between
this mix and its predecessor.protected void acceptRequests()
InformationProvider start listening for
requests (on communication channel).
private byte[] generateResponse(Information informationOfInterest,
byte[] data)
informationOfInterest - Information, the caller is interested in.data - Data submitted by caller.
null if the requested information is not available.private byte[] providePublicKey()
PUBLIC_KEY.
Security note: Key is not signed!
PUBLIC_KEY.private byte[] provideInterMixKey()
INTER_MIX_KEY.
Security note: Key is not signed!
INTER_MIX_KEY.private byte[] provideInterMixIV()
INTER_MIX_IV.
Security note: Not signed!
INTER_MIX_IV.private byte[] provideNextMixAddress()
NEXT_MIX_ADDRESS.
Security note: Not signed!
NEXT_MIX_ADDRESS.private byte[] provideNextMixInfoPort()
NEXT_MIX_INFO_PORT.
Security note: Not signed!
NEXT_MIX_INFO_PORT.private byte[] encryptInterMixKey()
interMixKey>/code>.
- Returns:
- The encrypted
interMixKey>/code>.- See Also:
interMixKey,
isSymmetricKeyEncrypted
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||