#ifndef SHARED_H
#define SHARED_H
-#include <common.h>
-#include <constants.h>
+#include "common.h"
+#include "inc_hash_constants.h"
/**
* thread management
#define hc_sleep(x) sleep ((x));
#endif
-#include <ext_OpenCL.h>
+#include "ext_OpenCL.h"
/**
* temperature management
*/
#if _WIN
-#include <ext_ADL.h>
-#include <ext_nvapi.h>
+#include "ext_ADL.h"
+#include "ext_nvapi.h"
#else
-#include <ext_ADL.h>
-#include <ext_nvml.h>
+#include "ext_ADL.h"
+#include "ext_nvml.h"
#endif
/**
#define CL_PLATFORMS_MAX 16
#define CL_VENDOR_AMD "Advanced Micro Devices, Inc."
+#define CL_VENDOR_AMD_USE_INTEL "GenuineIntel"
#define CL_VENDOR_APPLE "Apple"
#define CL_VENDOR_INTEL_BEIGNET "Intel"
-#define CL_VENDOR_INTEL_SDK "Intel(R) OpenCL"
+#define CL_VENDOR_INTEL_SDK "Intel(R) Corporation"
#define CL_VENDOR_MESA "Mesa"
#define CL_VENDOR_NV "NVIDIA Corporation"
#define CL_VENDOR_POCL "The pocl project"
#define VENDOR_ID_APPLE (1 << 1)
#define VENDOR_ID_INTEL_BEIGNET (1 << 2)
#define VENDOR_ID_INTEL_SDK (1 << 3)
-#define VENDOR_ID INTEL (1 << 4)
-#define VENDOR_ID_MESA (1 << 5)
-#define VENDOR_ID_NV (1 << 6)
-#define VENDOR_ID_POCL (1 << 7)
+#define VENDOR_ID_MESA (1 << 4)
+#define VENDOR_ID_NV (1 << 5)
+#define VENDOR_ID_POCL (1 << 6)
+#define VENDOR_ID_AMD_USE_INTEL (1 << 7)
#define VENDOR_ID_GENERIC (1 << 31)
#define BLOCK_SIZE 64
typedef pthread_mutex_t hc_thread_mutex_t;
#endif
-#include <types.h>
+#include "types.h"
#include "rp_cpu.h"
-#include "rp_kernel.h"
+#include "inc_rp.h"
/**
* valid project specific global stuff
#define HT_02612 "PHPS"
#define HT_02711 "vBulletin > v3.8.5"
#define HT_02811 "IPB2+, MyBB1.2+"
-#define HT_06211 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 512 bit"
-#define HT_06212 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 1024 bit"
-#define HT_06213 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 1536 bit"
-#define HT_06221 "TrueCrypt 5.0+ PBKDF2-HMAC-SHA512 + XTS 512 bit"
-#define HT_06222 "TrueCrypt 5.0+ PBKDF2-HMAC-SHA512 + XTS 1024 bit"
-#define HT_06223 "TrueCrypt 5.0+ PBKDF2-HMAC-SHA512 + XTS 1536 bit"
-#define HT_06231 "TrueCrypt 5.0+ PBKDF2-HMAC-Whirlpool + XTS 512 bit"
-#define HT_06232 "TrueCrypt 5.0+ PBKDF2-HMAC-Whirlpool + XTS 1024 bit"
-#define HT_06233 "TrueCrypt 5.0+ PBKDF2-HMAC-Whirlpool + XTS 1536 bit"
-#define HT_06241 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 512 bit + boot-mode"
-#define HT_06242 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 1024 bit + boot-mode"
-#define HT_06243 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 1536 bit + boot-mode"
+#define HT_06211 "TrueCrypt PBKDF2-HMAC-RipeMD160 + XTS 512 bit"
+#define HT_06212 "TrueCrypt PBKDF2-HMAC-RipeMD160 + XTS 1024 bit"
+#define HT_06213 "TrueCrypt PBKDF2-HMAC-RipeMD160 + XTS 1536 bit"
+#define HT_06221 "TrueCrypt PBKDF2-HMAC-SHA512 + XTS 512 bit"
+#define HT_06222 "TrueCrypt PBKDF2-HMAC-SHA512 + XTS 1024 bit"
+#define HT_06223 "TrueCrypt PBKDF2-HMAC-SHA512 + XTS 1536 bit"
+#define HT_06231 "TrueCrypt PBKDF2-HMAC-Whirlpool + XTS 512 bit"
+#define HT_06232 "TrueCrypt PBKDF2-HMAC-Whirlpool + XTS 1024 bit"
+#define HT_06233 "TrueCrypt PBKDF2-HMAC-Whirlpool + XTS 1536 bit"
+#define HT_06241 "TrueCrypt PBKDF2-HMAC-RipeMD160 + XTS 512 bit + boot-mode"
+#define HT_06242 "TrueCrypt PBKDF2-HMAC-RipeMD160 + XTS 1024 bit + boot-mode"
+#define HT_06243 "TrueCrypt PBKDF2-HMAC-RipeMD160 + XTS 1536 bit + boot-mode"
+#define HT_13711 "VeraCrypt PBKDF2-HMAC-RipeMD160 + XTS 512 bit"
+#define HT_13712 "VeraCrypt PBKDF2-HMAC-RipeMD160 + XTS 1024 bit"
+#define HT_13713 "VeraCrypt PBKDF2-HMAC-RipeMD160 + XTS 1536 bit"
+#define HT_13721 "VeraCrypt PBKDF2-HMAC-SHA512 + XTS 512 bit"
+#define HT_13722 "VeraCrypt PBKDF2-HMAC-SHA512 + XTS 1024 bit"
+#define HT_13723 "VeraCrypt PBKDF2-HMAC-SHA512 + XTS 1536 bit"
+#define HT_13731 "VeraCrypt PBKDF2-HMAC-Whirlpool + XTS 512 bit"
+#define HT_13732 "VeraCrypt PBKDF2-HMAC-Whirlpool + XTS 1024 bit"
+#define HT_13733 "VeraCrypt PBKDF2-HMAC-Whirlpool + XTS 1536 bit"
+#define HT_13741 "VeraCrypt PBKDF2-HMAC-RipeMD160 + XTS 512 bit + boot-mode"
+#define HT_13742 "VeraCrypt PBKDF2-HMAC-RipeMD160 + XTS 1024 bit + boot-mode"
+#define HT_13743 "VeraCrypt PBKDF2-HMAC-RipeMD160 + XTS 1536 bit + boot-mode"
+#define HT_13751 "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 512 bit"
+#define HT_13752 "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 1024 bit"
+#define HT_13753 "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 1536 bit"
+#define HT_13761 "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 512 bit + boot-mode"
+#define HT_13762 "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 1024 bit + boot-mode"
+#define HT_13763 "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 1536 bit + boot-mode"
/**
* Outfile formats
#define DISPLAY_LEN_MAX_13400 1 + 7 + 1 + 1 + 10 + 1 + 3 + 1 + 64 + 1 + 64 + 1 + 32 + 1 + 64 + 1 + 4 + 1 + 600000 + 1 + 2 + 1 + 64
#define DISPLAY_LEN_MIN_13500 40 + 1 + 32
#define DISPLAY_LEN_MAX_13500 40 + 1 + 1024
-#define DISPLAY_LEN_MIN_13600 6 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 16 + 1 + 4 + 1 + 1 + 1 + 2 + 1 + 20 + 1 + 7
+#define DISPLAY_LEN_MIN_13600 6 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 16 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 20 + 1 + 7
#define DISPLAY_LEN_MAX_13600 6 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 32 + 1 + 4 + 1 + 4 + 1 + 8192 + 1 + 20 + 1 + 7
#define DISPLAY_LEN_MIN_11 32 + 1 + 16
#define KERN_TYPE_TCWHIRLPOOL_XTS512 6231
#define KERN_TYPE_TCWHIRLPOOL_XTS1024 6232
#define KERN_TYPE_TCWHIRLPOOL_XTS1536 6233
+#define KERN_TYPE_VCSHA256_XTS512 13751
+#define KERN_TYPE_VCSHA256_XTS1024 13752
+#define KERN_TYPE_VCSHA256_XTS1536 13753
#define KERN_TYPE_MD5AIX 6300
#define KERN_TYPE_SHA256AIX 6400
#define KERN_TYPE_SHA512AIX 6500
#define ROUNDS_ANDROIDPIN 1024
#define ROUNDS_TRUECRYPT_1K 1000
#define ROUNDS_TRUECRYPT_2K 2000
+#define ROUNDS_VERACRYPT_200000 200000
+#define ROUNDS_VERACRYPT_500000 500000
+#define ROUNDS_VERACRYPT_327661 327661
+#define ROUNDS_VERACRYPT_655331 655331
#define ROUNDS_SHA1AIX (1 << 6)
#define ROUNDS_SHA256AIX (1 << 6)
#define ROUNDS_SHA512AIX (1 << 6)
#define PARSER_PSAFE2_FILE_SIZE -13
#define PARSER_PSAFE3_FILE_SIZE -14
#define PARSER_TC_FILE_SIZE -15
-#define PARSER_SIP_AUTH_DIRECTIVE -16
+#define PARSER_VC_FILE_SIZE -16
+#define PARSER_SIP_AUTH_DIRECTIVE -17
#define PARSER_UNKNOWN_ERROR -255
#define PA_000 "OK"
#define PA_013 "Invalid psafe2 filesize"
#define PA_014 "Invalid psafe3 filesize"
#define PA_015 "Invalid truecrypt filesize"
-#define PA_016 "Invalid SIP directive, only MD5 is supported"
+#define PA_016 "Invalid veracrypt filesize"
+#define PA_017 "Invalid SIP directive, only MD5 is supported"
#define PA_255 "Unknown error"
/**
// void hm_get_opencl_busid_devid (hm_attrs_t *hm_device, uint opencl_num_devices, cl_device_id *devices);
#endif // HAVE_ADL
-int hm_get_temperature_with_device_id (const uint device_id);
-int hm_get_fanspeed_with_device_id (const uint device_id);
-int hm_get_utilization_with_device_id (const uint device_id);
+int hm_get_threshold_slowdown_with_device_id (const uint device_id);
+int hm_get_temperature_with_device_id (const uint device_id);
+int hm_get_fanspeed_with_device_id (const uint device_id);
+int hm_get_maxbuslanes_with_device_id (const uint device_id);
+int hm_get_currentbuslanes_with_device_id (const uint device_id);
+int hm_get_utilization_with_device_id (const uint device_id);
+int hm_get_memoryspeed_with_device_id (const uint device_id);
+int hm_get_corespeed_with_device_id (const uint device_id);
int hm_set_fanspeed_with_device_id_amd (const uint device_id, const int fanspeed);
int keepass_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
int pstoken_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
int zip2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
+int veracrypt_parse_hash_200000 (char *input_buf, uint input_len, hash_t *hash_buf);
+int veracrypt_parse_hash_500000 (char *input_buf, uint input_len, hash_t *hash_buf);
+int veracrypt_parse_hash_327661 (char *input_buf, uint input_len, hash_t *hash_buf);
+int veracrypt_parse_hash_655331 (char *input_buf, uint input_len, hash_t *hash_buf);
void load_kernel (const char *kernel_file, int num_devices, size_t *kernel_lengths, const u8 **kernel_sources);
void writeProgramBin (char *dst, u8 *binary, size_t binary_size);