trendmicro / tlsh

Other
732 stars 136 forks source link

how to set tlsh to use 48 buckets? #126

Closed lizhangtan closed 8 months ago

lizhangtan commented 2 years ago

In the CmakeLists: set(TLSH_BUCKETS_128 1) is to set the number of buckets. After I change the code to set(TLSH_BUCKETS_48 1), run the make.sh failed. So how to set the number of buckets?

trend-mark-chang commented 1 year ago

Hi @lizhangtan

48 buckets is unmaintained from tlsh 4.0.0 and there is no expected results for unit tests, If you would like to use 48 buckets, you can modify include/tlsh.h, at line 106, change the definition as below to generate tlsh binaries:

define TLSH_STRING_LEN 30

           to 
#define TLSH_STRING_LEN_REQ 33
#if defined BUCKETS_48
  // No 3 Byte checksum option for 48 Bucket min hash
  #define TLSH_STRING_LEN_REQ 33
  // changed the minimum data length to 256 for version 3.3
  #define MIN_DATA_LENGTH       10
  // added the -force option for version 3.5
  #define MIN_CONSERVATIVE_DATA_LENGTH  10
#endif

but make.sh will still failed in unit tests because of the lack of expected result files

jonjoliver commented 8 months ago

MarkChg That is correct. Closing this issue.