|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.Extension | +--hypercast.SecurityExtension
This class defines the OL_Message extension with type SECURITY. In the byte array format of an overlay message, the security extension has the following format: (security policy is set to integrity) ------------------------------------------------------------------------------- |Next Header | Length | Sequence number | EP(Mk) / | 8 bits | 16 bits | 32 bits | 128 - 256 bits / ------------------------------------------------------------------------------- / SPI /Length of LA/ LA of sender / / 16 bits / 8 bits / variable / ------------------------------------------------------------------------------- / OL_H MAC Len / OL_H MAC /Payload MAC Len/ Payload MAC / / 8 bits / variable(>=128 bits) / 8 bits / variable(>=128 bits / ------------------------------------------------------------------------------- (security policy is set to privacy) ------------------------------------------------------------------------------- |Next Header | Length | Sequence number | EP(Mk) / | 8 bits | 16 bits | 32 bits | 128 - 256 bits / ------------------------------------------------------------------------------- / SPI /Length of LA/ LA of sender / / 16 bits / 8 bits / variable / ------------------------------------------------------------------------------- / OL_H MAC Len / OL_H MAC /Payload MAC Len/ Payload MAC / / 8 bits / variable(>=128 bits) / 8 bits / variable(>=128 bits / ------------------------------------------------------------------------------- This extension doesn't handle Next Header and Length fields, which are processed in OL_Message.
Field Summary |
Fields inherited from class hypercast.Extension |
FSM, HEADER_NONE, RAW_DATA, ROUTE_RECORD, SECURITY |
Constructor Summary | |
SecurityExtension(byte[] contents,
hypercast.KeyVault _kv)
Constructor. |
|
SecurityExtension(hypercast.KeyVault _kv,
hypercast.I_LogicalAddress senderla)
Constructor. |
|
SecurityExtension(hypercast.SecurityExtension se)
Constructs an SecurityExtension Extension from an existing one. |
Method Summary | |
hypercast.Extension |
Clone()
Return a new SecurityExtension extension instance by cloning this extension. |
byte |
getExtensionType()
Returns the type of extension. |
byte[] |
getHMac()
Get hmac in this extension. |
javax.crypto.Mac |
getHMacCompute()
Get hmac computation object in this extension. |
int |
getHMacLen()
Get hmac length in this extension. |
int |
getHMacLoc()
Get the location of hmac in packet. |
byte[] |
getMac()
Get mac in this extension. |
java.security.Key |
getMsgKey()
Get the message key in this extension. |
hypercast.I_LogicalAddress |
getSenderLA()
Get the source logical address. |
int |
getSequenceNumber()
Get the sequence number. |
int |
getSize()
Returns the length of the byte array of this extension. |
void |
setSenderLA(hypercast.I_LogicalAddress senderla)
Update the source logical address. |
void |
setSequenceNumber(int seqNum)
Set the sequence number. |
byte[] |
toByteArray()
Converts this object to byte array. |
void |
updateHMacCompute(byte[] contents)
Update hmac computation object with a byte array. |
void |
updateMacCompute(byte[] contents)
Update mac computation object with a byte array. |
Methods inherited from class hypercast.Extension |
createExtension, createExtension, createExtension, createExtension, createExtension, isValidHeader, toString, typeToString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SecurityExtension(hypercast.SecurityExtension se)
public SecurityExtension(hypercast.KeyVault _kv, hypercast.I_LogicalAddress senderla)
_kv
- key vault.senderla
- the logical address of message sender.public SecurityExtension(byte[] contents, hypercast.KeyVault _kv)
Method Detail |
public hypercast.Extension Clone()
Clone
in class Extension
public byte getExtensionType()
getExtensionType
in class Extension
public byte[] toByteArray()
toByteArray
in class Extension
public hypercast.I_LogicalAddress getSenderLA()
public void setSenderLA(hypercast.I_LogicalAddress senderla)
public int getSequenceNumber()
public void setSequenceNumber(int seqNum)
public void updateHMacCompute(byte[] contents)
public javax.crypto.Mac getHMacCompute()
public byte[] getHMac()
public int getHMacLen()
public int getHMacLoc()
public void updateMacCompute(byte[] contents)
public byte[] getMac()
public java.security.Key getMsgKey()
public int getSize()
getSize
in class Extension
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |