In file /home/eternity/Source/Common/KeyManager/H/keyManager.h:

class KeyManager : public Debugable

Generic key manager

Inheritance:

KeyManager < Debugable


Public Methods

TableFieldQueue* KeyManager::CreateDefinition ()
Creates definition of acTable - used only in constructor
GMessage* KeyManager::GetMixPrivateKey (char * , char * )
Returns Mix private key
GMessage* KeyManager::GetMixPublicKey (char * , char * )
Returns Mix public key
GMessage* KeyManager::GetPrivKeyByACID (ACID acID)
Finds the key according to its keyID
KeyManager::KeyManager (ConfigFile *keyManagerConfigFile, LogFile * keyManagerLogFile, Cipherer *keyManagerCipherer, MessageQueue *keyManagerMessageQueue)
Key manager constructor
KeyManager::KeyManager (LogFile *aLogFile, Char* aTableName)
Constructor of keyManager
Err KeyManager::LoadAsymetricKeyPairIntoMemory ()
Loads asymetric keys from disk
Err KeyManager::SaveKeys (ACID acid, GMessage *pubKey, GMessage *privKey)
Inserts keys into the table
KeyManager::~KeyManager ()
Key manager destructor
KeyManager::~KeyManager ()
Destructor of keyManager

Public

attributes
GMessage* asymetricKeyPair
asymetric keys
ConfigFile* configFile
Configuration file
Cipherer* cipherer
Encryption class
MessageQueue* messageQueue
Message queue for publishing
methods
KeyManager::KeyManager (ConfigFile *configFile, LogFile * keyManagerLogFile, Cipherer *cipherer, MessageQueue *messageQueue)
Constructor
virtual ~KeyManager ()
Destructor
GMessage* GetMixPrivateKey (char *asymCipherType, char *asymCipherType)
Returns this Mix's private key
GMessage* GetMixPublicKey (char *asymCipherType, char *asymCipherType)
Returns this Mix's public key
Err CreateMixCertificate (u_short port, GMessage **certificate)
Generates Mix certificate (for this Mix)
Err LoadAsymetricKeyPairIntoMemory ()
Load keys from disk

Inherited from Debugable:

Public Methods

string* Debugable::CreateString(char *firstStr, int firstInt, int secondInt)
Debugable::Debugable(LogFile * debugLogFile)
int Debugable::SetDebugOptions(int newLogOptions)
void Debugable::SetLogFile(LogFile *aLogFile)
void Debugable::WriteString(LogLevel debugLevel, char * format, ...)
Debugable::~Debugable()

Documentation

Generic key manager. Generates all kinds of keys and manages them - takes care of their expiration and renewal.
attributes

GMessage* asymetricKeyPair
asymetric keys

ConfigFile* configFile
Configuration file

Cipherer* cipherer
Encryption class

MessageQueue* messageQueue
Message queue for publishing

methods

KeyManager::KeyManager(ConfigFile *configFile, LogFile * keyManagerLogFile, Cipherer *cipherer, MessageQueue *messageQueue)
Constructor

virtual ~KeyManager()
Destructor

GMessage* GetMixPrivateKey(char *asymCipherType, char *asymCipherType)
Returns this Mix's private key

GMessage* GetMixPublicKey(char *asymCipherType, char *asymCipherType)
Returns this Mix's public key

Err CreateMixCertificate(u_short port, GMessage **certificate)
Generates Mix certificate (for this Mix)

Err LoadAsymetricKeyPairIntoMemory()
Load keys from disk

TableFieldQueue* KeyManager::CreateDefinition()
Creates definition of acTable - used only in constructor. The records from the table have 3 fields: ACID, PUB_KEY and PRIVATE_KEY.
Returns:
tableFieldQueue - model queue
Author:
Marek
See Also:

GMessage* KeyManager::GetMixPrivateKey(char * , char * )
Returns Mix private key. Extracts private part from asymetric key and returns it.
Returns:
Pointer to GMessage containing asymetric private key.
Author:
Pechy
See Also:
Cipherer

GMessage* KeyManager::GetMixPublicKey(char * , char * )
Returns Mix public key. Extracts public part from asymetric key and returns it.
Returns:
Pointer to GMessage containing asymetric public key.
Author:
Pechy
See Also:
Cipherer

GMessage* KeyManager::GetPrivKeyByACID(ACID acID)
Finds the key according to its keyID. Returns private key associated with ACID from the keyManager's table.
Returns:
privKey (GMessage)
Parameters:
acid - ACID to find the key with.
Author:
Marek
See Also:

KeyManager::KeyManager(ConfigFile *keyManagerConfigFile, LogFile * keyManagerLogFile, Cipherer *keyManagerCipherer, MessageQueue *keyManagerMessageQueue)
Key manager constructor. Stores pointers to objects that are need later for various tasks.
It also loads keys saved on disk into memory in case someone wants it.
Parameters:
keyManagerConfigFile - Pointer to cinfig that we ask for configuration options.
keyManagerLogFile - Log file that we have to write debug messages to.
keyManagerCipherer - Cipherer object that is used for key generation.
keyManagerMessageQueue - Message queue that is used for publishing keys.
Author:
Pechy
See Also:
Cipherer

KeyManager::KeyManager(LogFile *aLogFile, Char* aTableName)
Constructor of keyManager. Creates the keyManager table.
Parameters:
logFile - keyManager logFile
aTableName - Name of file to create keyManager table in.
Author:
Marek
See Also:

Err KeyManager::LoadAsymetricKeyPairIntoMemory()
Loads asymetric keys from disk. If there is a problem loading keys then an error is reported and exit called.
Returns:
OK if success else KO.
Author:
Pechy
See Also:
GetMixPrivateKey(), GetMixPublicKey()

Err KeyManager::SaveKeys(ACID acid, GMessage *pubKey, GMessage *privKey)
Inserts keys into the table. Saves public and private key together with the associated ACID.
Returns:
error code
Parameters:
acid - Acid to save.
pubKey - PubKey to save.
privKey - PrivKey to save.
Author:
Marek
See Also:

KeyManager::~KeyManager()
Key manager destructor. Deletes asymetric key pair from memory.
Author:
Pechy
See Also:
KeyManager()

KeyManager::~KeyManager()
Destructor of keyManager. Deletes the keyManager's table.
Author:
Marek
See Also:


This class has no child classes.
Author:
Pechy, Venca
See Also:
Cipherer AddressManager

alphabetic index hierarchy of classes


generated by doc++