![]() |
Zero Trust IoT library
|
Data Structures | |
class | ZtPolicyEngine |
Implements policy enforcement for Zero Trust security in NS-3 simulations. More... | |
class | ZtTlsHandshake |
Simulates a Zero Trust-based TLS handshake mechanism between NS-3 nodes. More... | |
Functions | |
std::string | EncryptPayload (const std::string &data, const byte *key, std::string &ivOut) |
Encrypts a plaintext string using AES-CBC mode with a randomly generated IV. | |
std::string | DecryptPayload (const std::string &cipher, const byte *key) |
Decrypts a ciphertext string encrypted with EncryptPayload. | |
SecByteBlock | HexDecodeKey (const std::string &hex) |
Decodes a hex-encoded AES key string into a raw key byte block. | |
std::vector< CryptoPP::byte > | HexToBytes (const std::string &hex) |
Converts a hexadecimal string into a byte vector. | |
std::string | EncryptPayload (const std::string &data, const CryptoPP::byte *key, std::string &ivOut) |
Encrypts the given plaintext using AES-CBC with a randomly generated IV. | |
std::string | DecryptPayload (const std::string &cipher, const CryptoPP::byte *key) |
Decrypts the given ciphertext using AES-CBC. | |
NS_LOG_COMPONENT_DEFINE ("ZtPolicyEngine") | |
NS_LOG_COMPONENT_DEFINE ("ZtTlsHandshake") | |
std::string ns3::DecryptPayload | ( | const std::string & | cipher, |
const byte * | key | ||
) |
Decrypts a ciphertext string encrypted with EncryptPayload.
cipher | The ciphertext with the IV prepended. |
key | The AES key used for decryption. |
Definition at line 48 of file zt-encryption-utils.cc.
std::string ns3::DecryptPayload | ( | const std::string & | cipher, |
const CryptoPP::byte * | key | ||
) |
Decrypts the given ciphertext using AES-CBC.
cipher | The ciphertext with the IV prepended. |
key | Pointer to the AES key used for decryption. |
std::string ns3::EncryptPayload | ( | const std::string & | data, |
const byte * | key, | ||
std::string & | ivOut | ||
) |
Encrypts a plaintext string using AES-CBC mode with a randomly generated IV.
data | The plaintext data to encrypt. |
key | The AES key used for encryption. |
ivOut | Reference to store the generated IV. |
Definition at line 22 of file zt-encryption-utils.cc.
std::string ns3::EncryptPayload | ( | const std::string & | data, |
const CryptoPP::byte * | key, | ||
std::string & | ivOut | ||
) |
Encrypts the given plaintext using AES-CBC with a randomly generated IV.
data | The plaintext to encrypt. |
key | Pointer to the AES key used for encryption. |
ivOut | Reference to store the generated IV used during encryption. |
CryptoPP::SecByteBlock ns3::HexDecodeKey | ( | const std::string & | hex | ) |
Decodes a hex-encoded AES key string into a raw key byte block.
Converts a hexadecimal string into a raw AES key.
hex | Hexadecimal string representing the AES key. |
hex | The hex-encoded AES key string. |
Definition at line 71 of file zt-encryption-utils.cc.
std::vector< CryptoPP::byte > ns3::HexToBytes | ( | const std::string & | hex | ) |
Converts a hexadecimal string into a byte vector.
hex | The hexadecimal string to convert. |
hex | The hex string to convert. |
Definition at line 84 of file zt-encryption-utils.cc.
ns3::NS_LOG_COMPONENT_DEFINE | ( | "ZtPolicyEngine" | ) |
ns3::NS_LOG_COMPONENT_DEFINE | ( | "ZtTlsHandshake" | ) |