public class ENCRYPT extends Protocol
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.
Modifier and Type | Class and Description |
---|---|
static class |
ENCRYPT.EncryptHeader |
Modifier and Type | Field and Description |
---|---|
protected Lock |
decrypt_lock
To synchronize access to symDecodingCipher
|
Constructor and Description |
---|
ENCRYPT() |
Modifier and Type | Method and Description |
---|---|
static String |
byteArrayToHexString(byte[] b) |
Object |
down(Event evt)
An event is to be sent down the stack.
|
protected String |
getAsymAlgorithm() |
protected Cipher |
getAsymCipher() |
protected int |
getAsymInit() |
protected String |
getAsymProvider() |
protected SecretKey |
getDesKey() |
protected Address |
getKeyServerAddr() |
protected String |
getKeyStoreName() |
protected KeyPair |
getKpair() |
protected Address |
getLocal_addr() |
protected PublicKey |
getServerPubKey() |
protected String |
getSymAlgorithm() |
protected Cipher |
getSymDecodingCipher() |
protected Cipher |
getSymEncodingCipher() |
protected int |
getSymInit() |
protected 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.
|
Object |
passItDown(Event evt) |
Object |
passItUp(Event evt) |
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) |
void |
setObserver(org.jgroups.protocols.ENCRYPT.Observer o) |
Object |
up(Event evt)
An event was received from the layer below.
|
destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, isErgonomics, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStatistics, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, start, statsEnabled, stop
protected final Lock decrypt_lock
public void setObserver(org.jgroups.protocols.ENCRYPT.Observer o)
public void init() throws Exception
Protocol
public void initSymKey() throws Exception
Exception
public static String byteArrayToHexString(byte[] b)
public void initKeyPair() throws Exception
Exception
public void reset()
public Object up(Event evt)
Protocol
down_prot.down()
or c) the event (or another event) is sent up
the stack using up_prot.up()
.public Object down(Event evt)
Protocol
down_prot.down()
. 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 up_prot.up()
.protected int getAsymInit()
protected String getAsymProvider()
protected SecretKey getDesKey()
protected KeyPair getKpair()
protected Cipher getAsymCipher()
protected PublicKey getServerPubKey()
protected String getSymAlgorithm()
protected int getSymInit()
protected String getSymProvider()
protected String getAsymAlgorithm()
protected String getKeyStoreName()
protected Cipher getSymDecodingCipher()
protected 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.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.