|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.KeyVault
This class manages the personal key of local node and all of the neighborhood keys and certificates.
Constructor Summary | |
KeyVault(hypercast.HyperCastConfig _config)
Constructor. |
Method Summary | |
void |
addCert(hypercast.I_LogicalAddress LA,
java.security.cert.X509Certificate cert)
Add a new certificate corresponding to the node at the given address. |
boolean |
addEntry(hypercast.I_AddressPair ap,
long now)
Add an entry in the key neighbor table. |
void |
addKey(hypercast.I_LogicalAddress LA,
javax.crypto.spec.SecretKeySpec key,
long timestamp)
Add a new key corresponding to the neighbor at the given address. |
void |
certReplyReceived(hypercast.I_AddressPair ap)
Resets the time of last certificate request is sent to zero for a entry in the key neighbor table. |
void |
certRequestSent(hypercast.I_AddressPair ap,
long now)
Sets the time of last certificate request is sent for a entry in the key neighbor table. |
boolean |
checkSequenceNum(hypercast.I_LogicalAddress src,
int sequenceNum)
Check if a sequence number is valid for a node. |
void |
clearExpiredNeighbors(long key_neighbor_timeout,
long now)
Clean up the key neighbor table by removing all entries which are timeout. |
boolean |
contains(hypercast.I_AddressPair ap)
Checks (with address pair) if a node is in the key neighbor table. |
boolean |
contains(hypercast.I_LogicalAddress src)
Checks (with logical address) if a node is in the neighbor key table. |
hypercast.I_AddressPair |
getAddressPairByPA(hypercast.I_NetworkAddress pa)
Get the addresspair according to the physical address |
hypercast.I_AddressPair[] |
getAllKeyNeighbors()
|
java.security.cert.X509Certificate |
getCACertificate()
Gets the CA certificate. |
java.security.cert.X509Certificate |
getCertificate(hypercast.I_LogicalAddress LA)
Gets the certificate of the given node. |
java.lang.String |
getConfidentialityAlgorithm()
Gets the algorithm for encryption/decryption. |
hypercast.KeyVaultEntry |
getEntry(hypercast.I_AddressPair ap)
Gets an entry (with address pair) from the key neighbor table. |
hypercast.KeyVaultEntry |
getEntry(hypercast.I_LogicalAddress la)
Gets an entry (with logical address) from the key neighbor table. |
javax.crypto.spec.SecretKeySpec |
getGroupKey()
|
java.lang.String |
getIntegrityAlgorithm()
Gets the algorithm for MAC calculation. |
java.security.Key |
getKey(hypercast.I_LogicalAddress LA)
Get a neighbor's personal key. |
java.lang.String |
getKeyMode()
Determines the key distribution model to be used for the overlay. |
int |
getKeySize()
Get the key size. |
long |
getKeyTimestamp(hypercast.I_LogicalAddress LA)
Get the creation time of a neighbor's key. |
long |
getLastTimeSecureMessageRecieved(hypercast.I_AddressPair ap)
Gets the time of last secure message is received for a entry in the key neighbor table. |
java.security.cert.X509Certificate |
getMyCertificate()
Gets the user certificate. |
javax.crypto.spec.SecretKeySpec |
getMyKeyFor(hypercast.I_AddressPair dst_ap,
hypercast.I_AddressPair src_ap)
get the neigborhood key for this entry |
long |
getMyKeyTimestamp()
Get the timestamp of when the personal key was created. |
long |
getMyKeyTimestampFor(hypercast.I_AddressPair dst_ap,
hypercast.I_AddressPair src_ap)
get the neighborhood key timestamp for |
javax.crypto.spec.SecretKeySpec |
getMyPersonalKey()
Get the personal key of this node |
java.security.PrivateKey |
getMyPrivateKey()
Gets the user private key. |
java.security.PublicKey |
getMyPublicKey()
Gets the public key of this node |
java.lang.String |
getNeighborKeyMode()
|
javax.crypto.SecretKey |
getNewMsgKey()
Get the message key. |
int |
getNextSequenceNum()
Gets the next valid sequence number for protocol messages. |
hypercast.I_Node |
getNode()
Gets the reference to the overlay node. |
hypercast.I_PhysicalAddress |
getPhysicalAddress(hypercast.I_LogicalAddress la)
Gets the physical address of a node if this node is in the key neighbor table. |
java.lang.String |
getProtoSecPolicy()
Gets the security policy applied to protocol messages. |
java.security.PublicKey |
getPublicKey(hypercast.I_LogicalAddress LA)
Gets the public key of the given node. |
java.lang.String |
getSecPolicy()
Gets the security policy applied to overlay messages. |
int |
getWrappedKeySize()
Gets the wrapped message key length. |
boolean |
haveCert(hypercast.I_LogicalAddress LA)
Check the certificate store to see if there is an entry for the given node. |
boolean |
haveKey(hypercast.I_LogicalAddress LA)
Check the key store to see if there is an entry for the given node. |
boolean |
isKeyInvalid(hypercast.I_LogicalAddress LA)
Check the key store to see if the key has been mark as invalid. |
boolean |
isWaitingCertReply(hypercast.I_AddressPair ap,
long cert_request_timeout,
long now)
Check if this node is waiting for the certificate reply from specified node. |
boolean |
isWaitingKeyUpdate(hypercast.I_AddressPair ap,
long key_request_timeout,
long now)
Check if this node is waiting for the key update from specified node. |
void |
keyRequestSent(hypercast.I_AddressPair ap,
long now)
Sets the time of last key request is sent for a entry in the key neighbor table. |
void |
keyUpdateReceived(hypercast.I_AddressPair ap)
Resets the time of last key request is sent to zero for a entry in the key neighbor table. |
void |
removeCert(hypercast.I_LogicalAddress LA)
Remove the certificate corresponding to the node at the given address. |
void |
removeEntry(hypercast.I_LogicalAddress la)
Remove an entry which has the specified logical address from the key neighbor table. |
void |
removeKey(hypercast.I_LogicalAddress LA)
Remove the key corresponding to the neighbor at the given address. |
void |
secureMessageReceived(hypercast.I_AddressPair ap,
long now)
Updates the time of last secure message is received for a entry in the key neighbor table. |
void |
setEntryToNeighbor(hypercast.I_LogicalAddress la)
Set an entry as the overlay neighbor |
void |
setEntryToNoNeighbor(hypercast.I_LogicalAddress la)
Set entry as no neighbor |
void |
setKeyInvalid(hypercast.I_LogicalAddress LA,
boolean inValid)
|
void |
setLastSecureMessageTime(hypercast.I_LogicalAddress nodeLA)
Set the time when the last secure message was received from the given node. |
void |
setMyKeyTimestamp(long timestamp)
Set the creation time to be associated with my personal key. |
void |
setMyPrivateKey(java.security.PrivateKey pKey)
Sets the private key to specified value. |
void |
setSecurityProcessor(hypercast.SecurityProcessor spObj)
Sets the security processor reference in the object. |
void |
setSequenceNum(hypercast.I_LogicalAddress nodeLA,
int seqNum)
Sets the sequence number for the given node in sequence number hashtable. |
void |
setSequenceNum(int seqNum)
Sets the sequence number to given value. |
void |
updateEntry(hypercast.I_AddressPair ap,
long now)
Updates the time for a entry in the key neighbor table when it is modified. |
javax.crypto.spec.SecretKeySpec |
updateMyPersonalKey()
Update the personal key to a new value |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyVault(hypercast.HyperCastConfig _config)
_config
- Overlay socket configuration object.
java.lang.IllegalArgumentException
- when the seetings for security implementation
contains errors.Method Detail |
public int getKeySize()
public java.lang.String getKeyMode()
public java.lang.String getNeighborKeyMode()
public java.lang.String getSecPolicy()
public java.lang.String getProtoSecPolicy()
public java.lang.String getConfidentialityAlgorithm()
public java.lang.String getIntegrityAlgorithm()
public java.security.cert.X509Certificate getMyCertificate()
public java.security.cert.X509Certificate getCACertificate()
public java.security.PublicKey getMyPublicKey()
public java.security.PrivateKey getMyPrivateKey()
public javax.crypto.spec.SecretKeySpec getMyPersonalKey()
public void setMyKeyTimestamp(long timestamp)
timestamp
- the creation time of the keypublic long getMyKeyTimestamp()
public void setMyPrivateKey(java.security.PrivateKey pKey)
pKey
- a private key.public javax.crypto.spec.SecretKeySpec updateMyPersonalKey()
java.lang.IllegalArgumentException
- if the algorithm specified does not
existpublic void addKey(hypercast.I_LogicalAddress LA, javax.crypto.spec.SecretKeySpec key, long timestamp)
LA
- The address of the neighbor whose key is being addedkey
- The neighbor's keytimestamp
- The creation time of the neighbor's keypublic void removeKey(hypercast.I_LogicalAddress LA)
LA
- The address of the neighbor whose key is being removed.public boolean haveKey(hypercast.I_LogicalAddress LA)
LA
- the Logical address of the node.
public boolean isKeyInvalid(hypercast.I_LogicalAddress LA)
LA
- the Logical address of the node.
public void setKeyInvalid(hypercast.I_LogicalAddress LA, boolean inValid)
public java.security.Key getKey(hypercast.I_LogicalAddress LA)
LA
- Logical Address of the neighbor whose key is requested.
public javax.crypto.spec.SecretKeySpec getGroupKey()
public long getKeyTimestamp(hypercast.I_LogicalAddress LA)
LA
- Logical Address of the neighbor whose key timestamp is
requested
public void addCert(hypercast.I_LogicalAddress LA, java.security.cert.X509Certificate cert)
LA
- The address of the node whose certificate is being added.cert
- a certificate.public void removeCert(hypercast.I_LogicalAddress LA)
LA
- The address of the node whose certificate is being removed.public boolean haveCert(hypercast.I_LogicalAddress LA)
LA
- the Logical address of the node.
public java.security.cert.X509Certificate getCertificate(hypercast.I_LogicalAddress LA)
LA
- logical address of a node.
public java.security.PublicKey getPublicKey(hypercast.I_LogicalAddress LA)
LA
- logical address of a node.
public javax.crypto.SecretKey getNewMsgKey()
java.lang.IllegalArgumentException
- if the encryption/decryption
algorithm is not supported.public int getWrappedKeySize()
public boolean checkSequenceNum(hypercast.I_LogicalAddress src, int sequenceNum)
src
- logical address of the node from which the sequence
number is obtained.sequenceNum
- the received sequence number.
public int getNextSequenceNum()
public void setSequenceNum(hypercast.I_LogicalAddress nodeLA, int seqNum)
nodeLA
- the logical address of the node to which the
sequence number is bound.seqNum
- the sequence number.public void setSequenceNum(int seqNum)
seqNum
- the sequence number.public void setSecurityProcessor(hypercast.SecurityProcessor spObj)
spObj
- the security processor.public hypercast.I_Node getNode()
public void setLastSecureMessageTime(hypercast.I_LogicalAddress nodeLA)
nodeLA
- the logical address of the node from which the secure
message is received.public void setEntryToNeighbor(hypercast.I_LogicalAddress la)
la
- public hypercast.I_AddressPair getAddressPairByPA(hypercast.I_NetworkAddress pa)
public void setEntryToNoNeighbor(hypercast.I_LogicalAddress la)
la
- public javax.crypto.spec.SecretKeySpec getMyKeyFor(hypercast.I_AddressPair dst_ap, hypercast.I_AddressPair src_ap)
public long getMyKeyTimestampFor(hypercast.I_AddressPair dst_ap, hypercast.I_AddressPair src_ap)
public hypercast.I_PhysicalAddress getPhysicalAddress(hypercast.I_LogicalAddress la)
la
- the logical address of a neighbor.
public boolean addEntry(hypercast.I_AddressPair ap, long now)
ap
- the address pair of a node.now
- the time that this entry is added to the key neighbor table.public boolean contains(hypercast.I_LogicalAddress src)
src
- the logical address of a node.
public boolean contains(hypercast.I_AddressPair ap)
ap
- the logical address of a node.
public hypercast.KeyVaultEntry getEntry(hypercast.I_LogicalAddress la)
la
- logical address of a node.
public hypercast.KeyVaultEntry getEntry(hypercast.I_AddressPair ap)
ap
- address pair of a node.
public void removeEntry(hypercast.I_LogicalAddress la)
la
- the logical address of a node.public void clearExpiredNeighbors(long key_neighbor_timeout, long now)
key_neighbor_timeout
- timeout time of an entry in the key neighbor
table.now
- current time.public hypercast.I_AddressPair[] getAllKeyNeighbors()
public boolean isWaitingCertReply(hypercast.I_AddressPair ap, long cert_request_timeout, long now)
ap
- address pair of the node to be checked.cert_request_timeout
- the timeout time of waiting for certificate reply.now
- current time.
public boolean isWaitingKeyUpdate(hypercast.I_AddressPair ap, long key_request_timeout, long now)
ap
- address pair of the node to be checked.key_request_timeout
- the timeout time of waiting for key update reply.now
- current time.
public void certRequestSent(hypercast.I_AddressPair ap, long now)
ap
- address pair of the node to which the certificate request is sent.now
- the time when the certificate request is sent.public void certReplyReceived(hypercast.I_AddressPair ap)
ap
- address pair of the node from which the certificate reply is received.public void keyRequestSent(hypercast.I_AddressPair ap, long now)
ap
- address pair of the node to which the key request is sent.now
- the time when the key request is sent.public void keyUpdateReceived(hypercast.I_AddressPair ap)
ap
- address pair of the node from which the key update is received.public void updateEntry(hypercast.I_AddressPair ap, long now)
ap
- address pair of a node.now
- the time when the entry corresponding to the address pair is modified.public void secureMessageReceived(hypercast.I_AddressPair ap, long now)
ap
- address pair of the node from which the secure message is received.now
- the time when secure message is received.public long getLastTimeSecureMessageRecieved(hypercast.I_AddressPair ap)
ap
- address pair of a node.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |