class that implements the More...
#include "onion-routing.h"
Inheritance diagram for ns3::OnionRoutingDummyEncryption:
Collaboration diagram for ns3::OnionRoutingDummyEncryption:Public Member Functions | |
| OnionRoutingDummyEncryption (uint16_t sealPadding, const uint16_t protocolNumber) | |
Constructor – Setup parameters for the creation of onions and check that sealPadding is greter than 4 Bytes. More... | |
| virtual void | DecryptLayer (uint8_t *innerLayer, uint8_t *onion, uint16_t onionLen, uint8_t *pk, uint8_t *sk) const |
| virtual void | EncryptLayer (uint8_t *ciphertext, uint8_t *message, int len, uint8_t *key) const |
| void | GenerateNewKey (void) |
| Generate a new dummy encryption key of 4Bytes using the uniform random generator. More... | |
| uint8_t * | GetEncryptionKey (void) |
| Return the current encryption key. More... | |
Public Member Functions inherited from ns3::OnionRouting | |
| OnionRouting () | |
| OnionRouting (uint16_t keySize, uint16_t sealPadding, uint16_t addressSize) | |
| OnionRouting (uint16_t sealPadding, const uint16_t protocolNumber) | |
| Constructor – Setup parameters for the creation of onions. More... | |
| virtual | ~OnionRouting () |
| void | AddressToStream (uint8_t *ip) |
| void | AddressToStream (uint8_t *ip) |
| Output an ip address to a stream variable, used to LOG the onion message. More... | |
| int | BuildOnion (uint8_t *cipher, uint8_t **route, uint16_t routeLen, uint8_t **keys, uint8_t *content, uint16_t contentLen) |
| void | BuildOnion (uint8_t *cipher, uint8_t **route, uint8_t **keys, uint16_t routeLen) |
| Manage construction of the onion ONION_NO_CONTENT. More... | |
| void | BuildOnion (uint8_t *cipher, uint8_t **route, uint8_t **keys, uint16_t routeLen, uint8_t *endContent, uint16_t endContentLen) |
| Manage construction of the onion ONION_ENDCONTENT. More... | |
| void | BuildOnion (uint8_t *cipher, uint8_t **route, uint8_t **keys, uint8_t **layerContent, uint16_t layerContentLen, uint16_t routeLen) |
| Manage construction of the onion ONION_LAYERCONTENT. More... | |
| void | BuildOnion (uint8_t *cipher, uint8_t **route, uint8_t **keys, uint8_t **layerContent, uint16_t layerContentLen, uint16_t routeLen, uint8_t *endContent, uint16_t endContentLen) |
| Manage construction of the onion ONION_LAYERCONTENT_ENDCONTENT. More... | |
| int | CreateOnion (uint8_t *cipher, uint8_t **route, uint16_t index, uint16_t routeLen, uint8_t **keys, uint8_t *content, uint16_t contentLen) |
| void | CreateOnion (uint8_t *cipher, uint8_t **route, uint8_t **keys, uint16_t index, uint16_t routeLen, uint8_t **layerContent, uint16_t layerContentLen, uint8_t *endContent, uint16_t endContentLen) |
| Constructs the onion message *. More... | |
| enum OnionErrno | GetErrno (void) |
| Return the last error code of the OnionErrno enum. More... | |
| uint16_t | OnionLength (uint16_t routeLen, uint16_t contentLen) |
| uint16_t | OnionLength (uint16_t routeLen, uint16_t layerContentLen, uint16_t endContentLen) |
| Compute the length in bytes of the onion message at given parameters. More... | |
| orLayer * | PeelOnion (uint8_t *onion, uint16_t onionLen, uint8_t *pk, uint8_t *sk) |
| orLayer * | PeelOnion (uint8_t *onion, uint16_t onionLen, uint8_t *publicKey, uint8_t *secretKey) |
| Decipher the outer layer of the onion and return details. More... | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Register this type. More... | |
Static Public Member Functions inherited from ns3::OnionRouting | |
| static TypeId | GetTypeId (void) |
| static TypeId | GetTypeId (void) |
| Register this type. More... | |
Public Attributes | |
| uint8_t | m_encryptionkey [4] |
| the current encryption key More... | |
Public Attributes inherited from ns3::OnionRouting | |
| uint16_t | m_addressSize |
| size in bytes of the used address type (4-Ipv4, 16-Ipv6) More... | |
| enum OnionErrno | m_errno |
| error status while using the onion class More... | |
| uint16_t | m_keySize |
| std::stringstream | m_onionStream |
| stringstream used to LOG onion construction More... | |
| uint16_t | m_sealPadding |
| size increase of the ciphertext in bytes, intorduced by the encryption method More... | |
Additional Inherited Members | |
Public Types inherited from ns3::OnionRouting | |
| enum | OnionErrno { ERROR_NOTERROR, ERROR_PROT_NUMBER, ERROR_ROUTE_TO_SHORT, ERROR_ENCRYPTION, ERROR_DECRYPTION } |
| Enumeration of the possible errors using the class onion-routing. More... | |
class that implements the
Definition at line 339 of file onion-routing.h.
| ns3::OnionRoutingDummyEncryption::OnionRoutingDummyEncryption | ( | uint16_t | sealPadding, |
| const uint16_t | protocolNumber | ||
| ) |
Constructor – Setup parameters for the creation of onions and check that sealPadding is greter than 4 Bytes.
| [in] | sealPadding | size increase of the ciphertext in bytes, intorduced by the simulated encryption method |
| [in] | protocolNumber | value detailing the utilized IP protocol: IPv4–Ipv4L3Protocol::PROT_NUMBER, IPv6–Ipv6L3Protocol::PROT_NUMBER |
Definition at line 303 of file onion-routing.cc.
|
virtual |
Implements ns3::OnionRouting.
Definition at line 349 of file onion-routing.cc.
References ns3::OnionRouting::ERROR_DECRYPTION, ns3::OnionRouting::m_errno, and ns3::OnionRouting::m_sealPadding.
|
virtual |
Implements ns3::OnionRouting.
Definition at line 338 of file onion-routing.cc.
References ns3::OnionRouting::m_sealPadding.
| void ns3::OnionRoutingDummyEncryption::GenerateNewKey | ( | void | ) |
Generate a new dummy encryption key of 4Bytes using the uniform random generator.
Definition at line 323 of file onion-routing.cc.
References m_encryptionkey.
| uint8_t * ns3::OnionRoutingDummyEncryption::GetEncryptionKey | ( | void | ) |
Return the current encryption key.
Definition at line 331 of file onion-routing.cc.
References m_encryptionkey.
|
static |
| uint8_t ns3::OnionRoutingDummyEncryption::m_encryptionkey[4] |
the current encryption key
Definition at line 381 of file onion-routing.h.
Referenced by GenerateNewKey(), and GetEncryptionKey().