|
MagickCore 7.0.10
|
#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 |
Macros | |
| #define | KeymapCipher AESCipher |
| #define | KeymapMode CTRMode |
| #define | SessionKeyHash SHA2256Hash |
| #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 SessionKeyHash SHA2256Hash |
| WizardExport KeyInfo * AcquireKeyInfo | ( | void | ) |
Definition at line 111 of file key.c.
References AcquireCipherInfo(), AcquireRandomInfo(), AcquireWizardMemory(), _KeyInfo::cipher_info, CompareSplayTreeStringInfo(), DestroyNode(), GenerateCipherNonce(), GenerateSessionKey(), _KeyInfo::id, _KeyInfo::key_map, KeymapCipher, KeymapDomain, KeymapMode, MemoryError, NewSplayTree(), _KeyInfo::nonce, _KeyInfo::random_info, SessionKeyHash, _KeyInfo::signature, ThrowWizardFatalError, _KeyInfo::timestamp, and WizardSignature.
| WizardExport KeyInfo * DestroyKeyInfo | ( | KeyInfo * | key_info | ) |
Definition at line 154 of file key.c.
References _KeyInfo::cipher_info, CipherDomain, DestroyCipherInfo(), DestroyRandomInfo(), DestroySplayTree(), DestroyStringInfo(), GetWizardModule, _KeyInfo::id, _KeyInfo::key_map, LogWizardEvent(), _KeyInfo::nonce, _KeyInfo::random_info, RelinquishWizardMemory(), _KeyInfo::signature, TraceEvent, WizardAssert, and WizardSignature.
|
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 AcquireHMACInfo(), AddValueToSplayTree(), CipherDomain, CloneStringInfo(), ConstructHMAC(), DestroyHMACInfo(), DestroyStringInfo(), GetHMACDigest(), GetRandomKey(), GetWizardModule, _KeyInfo::id, _KeyInfo::key_map, KeyError, KeymapDomain, LogWizardEvent(), _KeyInfo::random_info, SessionKeyHash, SessionKeyLength, SetKeyInfo(), _KeyInfo::signature, ThrowWizardFatalError, _KeyInfo::timestamp, TraceEvent, WizardAssert, WizardFalse, and WizardSignature.
Referenced by AcquireKeyInfo().
| WizardExport StringInfo * GetKeyInfo | ( | KeyInfo * | key_info, |
| const StringInfo * | id | ||
| ) |
Definition at line 255 of file key.c.
References _KeyInfo::cipher_info, CipherDomain, CloneStringInfo(), DecipherCipher(), GetValueFromSplayTree(), GetWizardModule, _KeyInfo::id, _KeyInfo::key_map, KeyError, KeymapDomain, LogWizardEvent(), _KeyInfo::nonce, SetCipherKey(), SetCipherNonce(), ThrowWizardFatalError, TraceEvent, and WizardAssert.
| WizardExport WizardBooleanType SetKeyInfo | ( | KeyInfo * | key_info, |
| const StringInfo * | id, | ||
| const StringInfo * | key | ||
| ) |
Definition at line 305 of file key.c.
References AddValueToSplayTree(), _KeyInfo::cipher_info, CipherDomain, CloneStringInfo(), EncipherCipher(), GetValueFromSplayTree(), GetWizardModule, _KeyInfo::id, _KeyInfo::key_map, KeyError, KeymapDomain, LogWizardEvent(), _KeyInfo::nonce, SetCipherKey(), SetCipherNonce(), ThrowWizardFatalError, TraceEvent, and WizardAssert.
Referenced by GenerateSessionKey().