
Go to the source code of this file.
Classes | |
| struct | SLogOptions |
Macros | |
| #define | AES_BLOCKSIZE 16 |
| #define | IV_LENGTH 12 |
| #define | KEY_LENGTH 32 |
| #define | CMAC_LENGTH 16 |
| #define | KEY_ERROR 0x20 |
| #define | KEY_FILE_ERROR 0x20 |
| #define | KEY_READ_ERROR 0x21 |
| #define | KEY_WRITE_ERROR 0x22 |
| #define | COLON 1 |
| #define | BLANK 1 |
| #define | COUNTER_LENGTH 12 |
| #define | CTR_LEN_SIMPLE 20 |
| #define | IPAD 0x36 |
| #define | OPAD 0x5C |
| #define | EPAD 0x6A |
| #define | MIN_BUF_SIZE 10 |
| #define | MAX_BUF_SIZE 1073741823 |
| #define | DEF_BUF_SIZE 1000 |
| #define | FILE_ERROR "Invalid path or non existing regular file: " |
Functions | |
| void | outputByteBuffer (unsigned char *buf, int length) |
| void | evolveKey (unsigned char *key) |
| int | sLogEncrypt (unsigned char *plaintext, int plaintext_len, unsigned char *key, unsigned char *iv, unsigned char *ciphertext, unsigned char *tag) |
| int | sLogDecrypt (unsigned char *ciphertext, int ciphertext_len, unsigned char *tag, unsigned char *key, unsigned char *iv, unsigned char *plaintext) |
| void | cmac (unsigned char *key, const void *input, gsize length, unsigned char *out, gsize *outlen, gsize out_capacity) |
| gchar * | convertToBase64 (unsigned char *input, gsize len) |
| guchar * | convertToBin (char *input, gsize *outLen) |
| void | deriveKey (unsigned char *dst, guint64 index, guint64 currentKey) |
| void | sLogEntry (guint64 numberOfLogEntries, GString *text, unsigned char *key, unsigned char *inputBigMac, GString *output, unsigned char *outputBigMac, gsize outputBigMac_capacity) |
| int | generateMasterKey (guchar *masterkey) |
| int | deriveHostKey (guchar *masterkey, gchar *macAddr, gchar *serial, guchar *hostkey) |
| int | readBigMAC (gchar *filename, char *outputBuffer) |
| int | writeBigMAC (gchar *filename, char *outputBuffer) |
| int | readKey (char *destKey, guint64 *destCounter, gchar *keypath) |
| int | writeKey (char *key, guint64 counter, gchar *keypath) |
| int | fileVerify (unsigned char *key, char *inputFileName, char *outputFileName, unsigned char *bigMac, guint64 entriesInFile, int chunkLength) |
| int | initVerify (guint64 entriesInFile, unsigned char *key, guint64 *nextLogEntry, guint64 *startingEntry, GString **input, GHashTable **tab) |
| int | iterateBuffer (guint64 entriesInBuffer, GString **input, guint64 *nextLogEntry, unsigned char *key, unsigned char *keyZero, guint keyNumber, GString **output, guint64 *numberOfLogEntries, unsigned char *cmac_tag, gsize cmac_tag_capacity, GHashTable *tab) |
| int | finalizeVerify (guint64 startingEntry, guint64 entriesInFile, unsigned char *bigMac, unsigned char *cmac_tag, GHashTable *tab) |
| int | iterativeFileVerify (unsigned char *previousMAC, unsigned char *previousKey, char *inputFileName, unsigned char *currentMAC, char *outputFileName, guint64 entriesInFile, int chunkLength, guint64 keyNumber) |
| void | deriveEncSubKey (unsigned char *mainKey, unsigned char *encKey) |
| void | deriveMACSubKey (unsigned char *mainKey, unsigned char *MACKey) |
| void | PRF (unsigned char *key, unsigned char *originalInput, guint64 inputLength, unsigned char *output, guint64 outputLength) |
| int | slog_usage (GOptionContext *ctx, GOptionGroup *grp, GString *errormsg) |
| gboolean | validFileNameArg (const gchar *option_name, const gchar *value, gpointer data, GError **error) |
| #define AES_BLOCKSIZE 16 |
| #define BLANK 1 |
| #define CMAC_LENGTH 16 |
| #define COLON 1 |
| #define COUNTER_LENGTH 12 |
| #define CTR_LEN_SIMPLE 20 |
| #define DEF_BUF_SIZE 1000 |
| #define EPAD 0x6A |
| #define FILE_ERROR "Invalid path or non existing regular file: " |
| #define IPAD 0x36 |
| #define IV_LENGTH 12 |
| #define KEY_ERROR 0x20 |
| #define KEY_FILE_ERROR 0x20 |
| #define KEY_LENGTH 32 |
| #define KEY_READ_ERROR 0x21 |
| #define KEY_WRITE_ERROR 0x22 |
| #define MAX_BUF_SIZE 1073741823 |
| #define MIN_BUF_SIZE 10 |
| #define OPAD 0x5C |
| void cmac | ( | unsigned char * | key, |
| const void * | input, | ||
| gsize | length, | ||
| unsigned char * | out, | ||
| gsize * | outlen, | ||
| gsize | out_capacity | ||
| ) |
| gchar* convertToBase64 | ( | unsigned char * | input, |
| gsize | len | ||
| ) |
| guchar* convertToBin | ( | char * | input, |
| gsize * | outLen | ||
| ) |
| void deriveEncSubKey | ( | unsigned char * | mainKey, |
| unsigned char * | encKey | ||
| ) |
| int deriveHostKey | ( | guchar * | masterkey, |
| gchar * | macAddr, | ||
| gchar * | serial, | ||
| guchar * | hostkey | ||
| ) |
| void deriveKey | ( | unsigned char * | dst, |
| guint64 | index, | ||
| guint64 | currentKey | ||
| ) |
| void deriveMACSubKey | ( | unsigned char * | mainKey, |
| unsigned char * | MACKey | ||
| ) |
| void evolveKey | ( | unsigned char * | key | ) |
| int fileVerify | ( | unsigned char * | key, |
| char * | inputFileName, | ||
| char * | outputFileName, | ||
| unsigned char * | bigMac, | ||
| guint64 | entriesInFile, | ||
| int | chunkLength | ||
| ) |
| int finalizeVerify | ( | guint64 | startingEntry, |
| guint64 | entriesInFile, | ||
| unsigned char * | bigMac, | ||
| unsigned char * | cmac_tag, | ||
| GHashTable * | tab | ||
| ) |
| int generateMasterKey | ( | guchar * | masterkey | ) |
| int initVerify | ( | guint64 | entriesInFile, |
| unsigned char * | key, | ||
| guint64 * | nextLogEntry, | ||
| guint64 * | startingEntry, | ||
| GString ** | input, | ||
| GHashTable ** | tab | ||
| ) |
| int iterateBuffer | ( | guint64 | entriesInBuffer, |
| GString ** | input, | ||
| guint64 * | nextLogEntry, | ||
| unsigned char * | key, | ||
| unsigned char * | keyZero, | ||
| guint | keyNumber, | ||
| GString ** | output, | ||
| guint64 * | numberOfLogEntries, | ||
| unsigned char * | cmac_tag, | ||
| gsize | cmac_tag_capacity, | ||
| GHashTable * | tab | ||
| ) |
| int iterativeFileVerify | ( | unsigned char * | previousMAC, |
| unsigned char * | previousKey, | ||
| char * | inputFileName, | ||
| unsigned char * | currentMAC, | ||
| char * | outputFileName, | ||
| guint64 | entriesInFile, | ||
| int | chunkLength, | ||
| guint64 | keyNumber | ||
| ) |
| void outputByteBuffer | ( | unsigned char * | buf, |
| int | length | ||
| ) |
| void PRF | ( | unsigned char * | key, |
| unsigned char * | originalInput, | ||
| guint64 | inputLength, | ||
| unsigned char * | output, | ||
| guint64 | outputLength | ||
| ) |
| int readBigMAC | ( | gchar * | filename, |
| char * | outputBuffer | ||
| ) |
| int readKey | ( | char * | destKey, |
| guint64 * | destCounter, | ||
| gchar * | keypath | ||
| ) |
| int slog_usage | ( | GOptionContext * | ctx, |
| GOptionGroup * | grp, | ||
| GString * | errormsg | ||
| ) |
| int sLogDecrypt | ( | unsigned char * | ciphertext, |
| int | ciphertext_len, | ||
| unsigned char * | tag, | ||
| unsigned char * | key, | ||
| unsigned char * | iv, | ||
| unsigned char * | plaintext | ||
| ) |
| int sLogEncrypt | ( | unsigned char * | plaintext, |
| int | plaintext_len, | ||
| unsigned char * | key, | ||
| unsigned char * | iv, | ||
| unsigned char * | ciphertext, | ||
| unsigned char * | tag | ||
| ) |
| void sLogEntry | ( | guint64 | numberOfLogEntries, |
| GString * | text, | ||
| unsigned char * | key, | ||
| unsigned char * | inputBigMac, | ||
| GString * | output, | ||
| unsigned char * | outputBigMac, | ||
| gsize | outputBigMac_capacity | ||
| ) |
| gboolean validFileNameArg | ( | const gchar * | option_name, |
| const gchar * | value, | ||
| gpointer | data, | ||
| GError ** | error | ||
| ) |
| int writeBigMAC | ( | gchar * | filename, |
| char * | outputBuffer | ||
| ) |
| int writeKey | ( | char * | key, |
| guint64 | counter, | ||
| gchar * | keypath | ||
| ) |