|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectexternalInformationPort.ExternalInformationPortController
public class ExternalInformationPortController
Controller class of component ExternalInformationPort
.
Implements the architecture interface
ExternalInformationPortInterface
.
Used for Information
(for example a public key) exchange with
"external" communication partners (for example other mixes or clients). This
component doesn't affect the sending of mix messages directly (That's done
by the InputOutputHandler
: see
architectureInterface.InputOutputHandlerInterface
).
Each exchangeable type of information is specified in the enumeration
Information
.
Field Summary | |
---|---|
private InformationProvider |
informationProvider
Provides information about this mix (cascade). |
private static InternalInformationPortController |
internalInformationPort
Reference on component InternalInformationPort . |
private static java.util.logging.Logger |
LOGGER
Logger used to log and display information. |
private MessageProcessorController |
messageProcessor
Reference on MessageProcessor component. |
Constructor Summary | |
---|---|
ExternalInformationPortController()
Generates a new ExternalInformationPort component. |
Method Summary | |
---|---|
void |
acceptRequests()
Make component start listening for requests (on communication channel). |
java.lang.Object |
getInformation(java.net.InetAddress informationProviderAddress,
int informationProviderPort,
Information informationOfInterest)
Generic method to receive some Information from a
specified ExternalInformationPort component. |
java.lang.Object |
getInformation(java.net.InetAddress informationProviderAddress,
int informationProviderPort,
Information informationOfInterest,
byte[] data)
Generic method to receive some Information from a
specified ExternalInformationPort component, sending the
bypassed data. |
java.lang.Object[] |
getInformationFromAll(java.net.InetAddress informationProviderAddress,
int informationProviderPort,
Information informationOfInterest)
Generic method to receive some Information from several
ExternalInformationPort components. |
java.lang.Object[] |
getInformationFromAll(java.net.InetAddress informationProviderAddress,
int informationProviderPort,
Information informationOfInterest,
byte[] data)
Generic method to receive some Information from several
ExternalInformationPort components, sending the bypassed
data. |
private javax.crypto.spec.IvParameterSpec |
getInterMixIV(java.net.InetAddress nexMixInformationProviderAddress,
int nexMixInformationProviderPort)
Retrieves the specified mix' IV . |
private javax.crypto.SecretKey |
getInterMixKey(java.net.InetAddress nexMixInformationProviderAddress,
int nexMixInformationProviderPort)
Retrieves the specified's mix SYMMETRIC_KEY . |
private java.net.InetAddress |
getNextMixAddress(java.net.InetAddress informationProviderAddress,
int informationProviderPort)
Retrieves the specified mix' NEXT_MIX_ADDRESS . |
private int |
getNextMixInfoPort(java.net.InetAddress informationProviderAddress,
int informationProviderPort)
Retrieves the specified mix' NEXT_MIX_INFO_PORT . |
private java.security.PublicKey |
getPublicKey(java.net.InetAddress informationProviderAddress,
int informationProviderPort)
Retrieves the specified mix' PUBLIC_KEY . |
private java.security.PublicKey[] |
getPublicKeys(java.net.InetAddress informationProviderAddress,
int informationProviderPort)
Retrieves the PUBLIC_KEY s of all mixes in the specified
cascade. |
void |
initialize()
Initialization method for this component. |
void |
initialize(java.security.PublicKey publicKey,
MessageProcessorController messageProcessor)
Initialization method for this component. |
void |
setInterMixIVWithPreviousMix(javax.crypto.spec.IvParameterSpec interMixIV)
Makes the bypassed initialization vector available via InformationProvider . |
void |
setInterMixKeyWithPreviousMix(javax.crypto.SecretKey interMixKey)
Makes the bypassed key available via InformationProvider . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 MessageProcessorController messageProcessor
MessageProcessor
component. Used to encrypt
certain kinds of Information
.
private InformationProvider informationProvider
Constructor Detail |
---|
public ExternalInformationPortController()
ExternalInformationPort
component.
Used for Information
(for example a public key) exchange
with "external" communication partners (for example other mixes or
clients). This component doesn't affect the sending of mix messages
directly (That's done by the InputOutputHandler
: see
architectureInterface.InputOutputHandlerInterface
).
Each exchangeable type of information is specified in the enumeration
Information
.
Component can't be used before calling initialize()
.
initialize()
,
initialize(PublicKey, MessageProcessorController)
Method Detail |
---|
public void initialize(java.security.PublicKey publicKey, MessageProcessorController messageProcessor)
Information
(see
initialize()
for receival only). Must be called before
using an instance of this class for anything but dispensing references
on the instance itself.
publicKey
- The mix' public key, this object belongs to
(will be made available via
InformationProvider
).messageProcessor
- Used to encrypt certain kinds of
Information
.initialize()
public void initialize()
Information
from a
communication partner's ExternalInformationPort
(see
initialize(PublicKey, MessageProcessorController)
for
providing Information
, too). Must be called before
using an instance of this class for anything but dispensing references
on the instance itself.
initialize(PublicKey, MessageProcessorController)
public void setInterMixKeyWithPreviousMix(javax.crypto.SecretKey interMixKey)
InformationProvider
.
This key is used to encrypt data between mixes.
interMixKey
- Key used to encrypt data between mixes.public void setInterMixIVWithPreviousMix(javax.crypto.spec.IvParameterSpec interMixIV)
InformationProvider
. This initialization vector is used to
encrypt data between mixes.
interMixIV
- Initialization vector used to encrypt data
between mixes.public java.lang.Object getInformation(java.net.InetAddress informationProviderAddress, int informationProviderPort, Information informationOfInterest) throws InformationRetrieveException
Information
from a
specified ExternalInformationPort
component.
If communication channel isn't safe, but transmitted data is sensitive, cryptographic measures (like authentication and encryption) should be applied.
getInformation
in interface ExternalInformationPortInterface
informationProviderAddress
- Address of the
ExternalInformationPort
component to receive data from.informationProviderPort
- Port the
ExternalInformationPort
component to receive data from
runs on.informationOfInterest
- Type of Information
,
that shall be received.
Information
.
InformationRetrieveException
- Thrown, when requested
Information
not
available.public java.lang.Object getInformation(java.net.InetAddress informationProviderAddress, int informationProviderPort, Information informationOfInterest, byte[] data) throws InformationRetrieveException
Information
from a
specified ExternalInformationPort
component, sending the
bypassed data.
If communication channel isn't safe, but transmitted data is sensitive, cryptographic measures (like authentication and encryption) should be applied.
getInformation
in interface ExternalInformationPortInterface
informationProviderAddress
- Address of the
ExternalInformationPort
component to receive data from.informationProviderPort
- Port the
ExternalInformationPort
component to receive data from
runs on.informationOfInterest
- Type of Information
,
that shall be received.data
- Data to be transmitted.
Information
.
InformationRetrieveException
- Thrown, when requested
Information
not
available.public java.lang.Object[] getInformationFromAll(java.net.InetAddress informationProviderAddress, int informationProviderPort, Information informationOfInterest) throws InformationRetrieveException
Information
from several
ExternalInformationPort
components. The first component's
address and port number must be specified. The other components
addresses are received by their predecessor (= telescope
implementation).
If communication channel isn't safe, but transmitted data is sensitive, cryptographic measures (like authentication and encryption) should be applied.
getInformationFromAll
in interface ExternalInformationPortInterface
informationProviderAddress
- Address of the
InformationProvider
-component to receive data from.informationProviderPort
- Port the InformationProvider
-component to receive data
from runs on.informationOfInterest
- Type of Information
,
that shall be received.
Information
s.
InformationRetrieveException
- Thrown, when requested
Information
not
available.public java.lang.Object[] getInformationFromAll(java.net.InetAddress informationProviderAddress, int informationProviderPort, Information informationOfInterest, byte[] data) throws InformationRetrieveException
Information
from several
ExternalInformationPort
components, sending the bypassed
data. The first component's address and port number must be specified.
The other components' addresses are received by their predecessor (=
telescope implementation).
If communication channel isn't safe, but transmitted data is sensitive, cryptographic measures (like authentication and encryption) should be applied.
getInformationFromAll
in interface ExternalInformationPortInterface
informationProviderAddress
- Address of the
InformationProvider
component to receive data from.informationProviderPort
- Port the InformationProvider
component to receive data
from runs on.informationOfInterest
- Type of Information
,
that shall be received.data
- Data to be transmitted.
Information
s.
InformationRetrieveException
- Thrown, when requested
Information
not
available.public void acceptRequests()
acceptRequests
in interface ExternalInformationPortInterface
private javax.crypto.SecretKey getInterMixKey(java.net.InetAddress nexMixInformationProviderAddress, int nexMixInformationProviderPort) throws InformationRetrieveException
SYMMETRIC_KEY
.
nexMixInformationProviderAddress
- Address of the next mix'
ExternalInformationPort
component.nexMixInformationProviderPort
- Port the
ExternalInformationPort
component to receive data
from runs on.
SYMMETRIC_KEY
.
InformationRetrieveException
- Thrown, when requested
Information
not
available.private javax.crypto.spec.IvParameterSpec getInterMixIV(java.net.InetAddress nexMixInformationProviderAddress, int nexMixInformationProviderPort) throws InformationRetrieveException
IV
.
nexMixInformationProviderAddress
- Address of the next mix'
ExternalInformationPort
component.nexMixInformationProviderPort
- Port the
ExternalInformationPort
component to receive data
from runs on.
IV
.
InformationRetrieveException
- Thrown, when requested
Information
not
available.private java.net.InetAddress getNextMixAddress(java.net.InetAddress informationProviderAddress, int informationProviderPort) throws InformationRetrieveException
NEXT_MIX_ADDRESS
.
informationProviderAddress
- Address of the next mix'
ExternalInformationPort
component.informationProviderPort
- Port the
ExternalInformationPort
component to receive data from runs
on.
NEXT_MIX_ADDRESS
.
InformationRetrieveException
- Thrown, when requested
Information
not
available.private int getNextMixInfoPort(java.net.InetAddress informationProviderAddress, int informationProviderPort) throws InformationRetrieveException
NEXT_MIX_INFO_PORT
.
informationProviderAddress
- Address of the next mix'
ExternalInformationProvider
component (to receive data from).informationProviderPort
- Port the
ExternalInformationProvider
component (to receive data from)
runs on.
NEXT_MIX_INFO_PORT
.
InformationRetrieveException
- Thrown, when requested
Information
not
available.private java.security.PublicKey getPublicKey(java.net.InetAddress informationProviderAddress, int informationProviderPort) throws InformationRetrieveException
PUBLIC_KEY
.
informationProviderAddress
- Address of the next mix'
ExternalInformationProvider
component (to receive data from).informationProviderPort
- Port the
ExternalInformationProvider
component (to receive data from)
runs on.
PUBLIC_KEY
.
InformationRetrieveException
- Thrown, when requested
Information
not
available.private java.security.PublicKey[] getPublicKeys(java.net.InetAddress informationProviderAddress, int informationProviderPort) throws InformationRetrieveException
PUBLIC_KEY
s of all mixes in the specified
cascade.
informationProviderAddress
- Address of the next mix'
ExternalInformationProvider
component (to receive data from).informationProviderPort
- Port the
ExternalInformationProvider
component (to receive data from)
runs on.
PUBLIC_KEY
s of
all mixes in the specified cascade.
InformationRetrieveException
- Thrown, when requested
Information
not
available.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |