|
WizardsToolkit
1.0.7
|
#include "wizard/studio.h"#include "wizard/cipher.h"#include "wizard/exception.h"#include "wizard/exception-private.h"#include "wizard/hmac.h"#include "wizard/key.h"#include "wizard/memory_.h"#include "wizard/random_.h"#include "wizard/splay-tree.h"
Go to the source code of this file.
Data Structures | |
| struct | _KeyInfo |
Defines | |
| #define | KeymapCipher AESCipher |
| #define | KeymapMode CTRMode |
| #define | SessionKeyHash SHA256Hash |
| #define | SessionKeyLength 512 |
Functions | |
| static void * | DestroyNode (void *entry) |
| WizardExport KeyInfo * | AcquireKeyInfo (void) |
| WizardExport KeyInfo * | DestroyKeyInfo (KeyInfo *key_info) |
| WizardExport StringInfo * | GenerateSessionKey (KeyInfo *key_info) |
| WizardExport StringInfo * | GetKeyInfo (KeyInfo *key_info, const StringInfo *id) |
| WizardExport WizardBooleanType | SetKeyInfo (KeyInfo *key_info, const StringInfo *id, const StringInfo *key) |
| #define KeymapCipher AESCipher |
Definition at line 56 of file key.c.
Referenced by AcquireKeyInfo().
| #define KeymapMode CTRMode |
Definition at line 57 of file key.c.
Referenced by AcquireKeyInfo().
| #define SessionKeyHash SHA256Hash |
Definition at line 58 of file key.c.
Referenced by AcquireKeyInfo(), and GenerateSessionKey().
| #define SessionKeyLength 512 |
Definition at line 59 of file key.c.
Referenced by GenerateSessionKey().
| WizardExport KeyInfo* AcquireKeyInfo | ( | void | ) |
Definition at line 111 of file key.c.
References AcquireWizardMemory(), ThrowWizardFatalError, KeymapDomain, MemoryError, ResetWizardMemory(), _KeyInfo::key_map, NewSplayTree(), CompareSplayTreeStringInfo(), DestroyNode(), _KeyInfo::cipher_info, AcquireCipherInfo(), KeymapCipher, KeymapMode, _KeyInfo::nonce, GenerateCipherNonce(), _KeyInfo::random_info, AcquireRandomInfo(), SessionKeyHash, _KeyInfo::timestamp, _KeyInfo::signature, WizardSignature, _KeyInfo::id, and GenerateSessionKey().
Definition at line 154 of file key.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, CipherDomain, _KeyInfo::signature, WizardSignature, _KeyInfo::cipher_info, DestroyCipherInfo(), _KeyInfo::random_info, DestroyRandomInfo(), _KeyInfo::nonce, DestroyStringInfo(), _KeyInfo::id, _KeyInfo::key_map, DestroySplayTree(), and RelinquishWizardMemory().
| static void* DestroyNode | ( | void * | entry | ) | [static] |
Definition at line 105 of file key.c.
References DestroyStringInfo().
Referenced by AcquireKeyInfo().
| WizardExport StringInfo* GenerateSessionKey | ( | KeyInfo * | key_info | ) |
Definition at line 196 of file key.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, CipherDomain, _KeyInfo::signature, WizardSignature, GetRandomKey(), _KeyInfo::random_info, SessionKeyLength, AcquireHMACInfo(), SessionKeyHash, ConstructHMAC(), CloneStringInfo(), GetHMACDigest(), DestroyHMACInfo(), DestroyStringInfo(), _KeyInfo::id, SetKeyInfo(), AddValueToSplayTree(), _KeyInfo::key_map, WizardFalse, ThrowWizardFatalError, KeymapDomain, KeyError, and _KeyInfo::timestamp.
Referenced by AcquireKeyInfo().
| WizardExport StringInfo* GetKeyInfo | ( | KeyInfo * | key_info, |
| const StringInfo * | id | ||
| ) |
Definition at line 255 of file key.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, CipherDomain, GetValueFromSplayTree(), _KeyInfo::key_map, _KeyInfo::id, ThrowWizardFatalError, KeymapDomain, KeyError, SetCipherKey(), _KeyInfo::cipher_info, SetCipherNonce(), _KeyInfo::nonce, CloneStringInfo(), and DecipherCipher().
| WizardExport WizardBooleanType SetKeyInfo | ( | KeyInfo * | key_info, |
| const StringInfo * | id, | ||
| const StringInfo * | key | ||
| ) |
Definition at line 305 of file key.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, CipherDomain, GetValueFromSplayTree(), _KeyInfo::key_map, _KeyInfo::id, ThrowWizardFatalError, KeymapDomain, KeyError, SetCipherKey(), _KeyInfo::cipher_info, SetCipherNonce(), _KeyInfo::nonce, CloneStringInfo(), EncipherCipher(), and AddValueToSplayTree().
Referenced by GenerateSessionKey().