|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.stack.Protocol
org.jgroups.protocols.ENCRYPT
ENCRYPT layer. Encrypt and decrypt the group communication in JGroups The file can be used in two ways:
Each message is identified as encrypted with a specific encryption header which identifies the type of encrypt header and an MD5 digest that identifies the version of the key being used to encrypt/decrypt the messages.
Note: the current version does not support the concept of perfect forward encryption (PFE)
which means that if a peer leaves the group the keys are re-generated preventing the departed peer from
decrypting future messages if it chooses to listen in on the group. This is not included as it really requires
a suitable authentication scheme as well to make this feature useful as there is nothing to stop the peer rejoining and receiving the new
key. A future release will address this issue.
Nested Class Summary | |
static class |
ENCRYPT.EncryptHeader
|
Field Summary |
Fields inherited from class org.jgroups.stack.Protocol |
down_handler, down_prot, down_queue, down_thread, down_thread_prio, log, observer, props, stack, stats, trace, up_handler, up_prot, up_queue, up_thread, up_thread_prio, warn |
Constructor Summary | |
ENCRYPT()
|
Method Summary | |
void |
down(Event evt)
An event is to be sent down the stack. |
protected java.lang.String |
getAsymAlgorithm()
|
protected javax.crypto.Cipher |
getAsymCipher()
|
protected int |
getAsymInit()
|
protected java.lang.String |
getAsymProvider()
|
protected javax.crypto.SecretKey |
getDesKey()
|
protected Address |
getKeyServerAddr()
|
protected java.lang.String |
getKeyStoreName()
|
protected java.security.KeyPair |
getKpair()
|
protected Address |
getLocal_addr()
|
java.lang.String |
getName()
|
protected java.security.PublicKey |
getServerPubKey()
|
protected java.lang.String |
getSymAlgorithm()
|
protected javax.crypto.Cipher |
getSymDecodingCipher()
|
protected javax.crypto.Cipher |
getSymEncodingCipher()
|
protected int |
getSymInit()
|
protected java.lang.String |
getSymProvider()
|
void |
init()
Called after instance has been created (null constructor) and before protocol is started. |
void |
initKeyPair()
Generates the public/private key pair from the init params |
void |
initSymKey()
Used to initialise the symmetric key if none is supplied in a keystore. |
void |
reset()
Just remove if you don't need to reset any state |
protected void |
setKeyServerAddr(Address keyServerAddr)
|
protected void |
setLocal_addr(Address local_addr)
|
boolean |
setProperties(java.util.Properties props)
Configures the protocol initially. |
void |
up(Event evt)
An event was received from the layer below. |
Methods inherited from class org.jgroups.stack.Protocol |
destroy, downThreadEnabled, dumpStats, enableStats, getDownProtocol, getDownQueue, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, isTrace, isWarn, passDown, passUp, printStats, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setObserver, setPropertiesInternal, setProtocolStack, setTrace, setUpProtocol, setWarn, start, startDownHandler, startUpHandler, statsEnabled, stop, stopInternal, upThreadEnabled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ENCRYPT()
Method Detail |
public java.lang.String getName()
getName
in class Protocol
public boolean setProperties(java.util.Properties props)
Protocol
"loopback=false;unicast_inport=4444"
setProperties
in class Protocol
public void init() throws java.lang.Exception
Protocol
init
in class Protocol
java.lang.Exception
- Thrown if protocol cannot be initialized successfully. This will cause the
ProtocolStack to fail, so the channel constructor will throw an exceptionpublic void initSymKey() throws java.lang.Exception
java.lang.Exception
public void initKeyPair() throws java.lang.Exception
java.lang.Exception
public void reset()
public void up(Event evt)
Protocol
passDown()
or c) the event (or another event) is sent up
the stack using passUp()
.
up
in class Protocol
public void down(Event evt)
Protocol
passDown()
. In case of a GET_ADDRESS event (which tries to
retrieve the stack's address from one of the bottom layers), the layer may need to send
a new response event back up the stack using passUp()
.
down
in class Protocol
protected int getAsymInit()
protected java.lang.String getAsymProvider()
protected javax.crypto.SecretKey getDesKey()
protected java.security.KeyPair getKpair()
protected javax.crypto.Cipher getAsymCipher()
protected java.security.PublicKey getServerPubKey()
protected java.lang.String getSymAlgorithm()
protected int getSymInit()
protected java.lang.String getSymProvider()
protected java.lang.String getAsymAlgorithm()
protected java.lang.String getKeyStoreName()
protected javax.crypto.Cipher getSymDecodingCipher()
protected javax.crypto.Cipher getSymEncodingCipher()
protected Address getLocal_addr()
protected void setLocal_addr(Address local_addr)
local_addr
- The local_addr to set.protected Address getKeyServerAddr()
protected void setKeyServerAddr(Address keyServerAddr)
keyServerAddr
- The keyServerAddr to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |