1 /* 2 * Common code for the STRIP format. 3 * 4 * This file takes replicated but common code, shared between the CPU 5 * and the GPU formats, and places it into one common location. 6 */ 7 8 #include "formats.h" 9 10 #define FORMAT_NAME "Password Manager" 11 12 #define FORMAT_TAG "$strip$*" 13 #define FORMAT_TAG_LEN (sizeof(FORMAT_TAG)-1) 14 15 #define ITERATIONS 4000 16 #define FILE_HEADER_SZ 16 17 #define SQLITE_FILE_HEADER "SQLite format 3" 18 #define HMAC_SALT_MASK 0x3a 19 #define FAST_PBKDF2_ITER 2 20 #define SQLITE_MAX_PAGE_SIZE 65536 21 22 struct custom_salt { 23 unsigned char salt[16]; 24 unsigned char data[1024]; 25 }; 26 27 extern struct fmt_tests strip_tests[]; 28 29 int strip_valid(char *ciphertext, struct fmt_main *self); 30 31 void *strip_get_salt(char *ciphertext); 32 33 int strip_verify_page(unsigned char *page1); 34