Py-tlsh

Latest version: v4.7.2

Safety actively analyzes 638361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 13

3.11.1

<PRE>
31/May/2019
tidy up:
1. use fast_b_mapping() instead of b_mapping()
2. remove declaration of unsigned r which is never used
3. remove include which is not required
</PRE>

3.11.0

<PRE>
19/Mar/2019
Make calculation of TLSH digests approx 7 times faster (for large files)
done by
- inline functions
- unrolling loops
- fixing the -O2 optimization option

<H3>Timing on Amazon linux</H3>
"Amazon Linux 2 AMI (HVM), SSD Volume Type"
Description: Amazon Linux 2 comes with five years support. It provides Linux kernel 4.14 tuned for optimal performance
on Amazon EC2, systemd 219, GCC 7.3, Glibc 2.26, Binutils 2.29.1, and the latest software packages through extras.

BEFORE
$ ./tlsh_3_10_0/bin/timing_unittest
build a buffer with a million bytes...
eval TLSH (3.9.9 compact hash 1 byte checksum sliding_window=5) 50 times...
TLSH(buffer) = A12500088C838B0A0F0EC3C0ACAB82F3B8228B0308CFA302338C0F0AE2C24F28000008
Test 1: Evaluate TLSH digest
BEFORE ms=1552963428277
AFTER ms=1552963433258
TIME ms=4981
TIME ms=99 per iteration

eval TLSH distance 50 million times...
Test 2: Calc distance TLSH digest
dist=138
BEFORE ms=1552963433362
AFTER ms=1552963440723
TIME ms=7361
TIME ms=147 per million iterations

AFTER
$ ./tlsh_3_11_0/bin/timing_unittest
build a buffer with a million bytes...
eval TLSH (3.11.0 compact hash 1 byte checksum sliding_window=5) 50 times...
TLSH(buffer) = A12500088C838B0A0F0EC3C0ACAB82F3B8228B0308CFA302338C0F0AE2C24F28000008
Test 1: Evaluate TLSH digest
BEFORE ms=1552963419037
AFTER ms=1552963419628
TIME ms=591
TIME ms=11 per iteration

eval TLSH distance 50 million times...
Test 2: Calc distance TLSH digest
dist=138
BEFORE ms=1552963419642
AFTER ms=1552963421519
TIME ms=1877
TIME ms=37 per million iterations


<H3>Timing on a Mac (Processor 3.1 GHz - running Sierra)</H3>

BEFORE using tlsh_3_10_0
$ bin/timing_unittest
build a buffer with a million bytes...
eval TLSH (3.10.0 compact hash 1 byte checksum sliding_window=5) 50 times...
TLSH(buffer) = A12500088C838B0A0F0EC3C0ACAB82F3B8228B0308CFA302338C0F0AE2C24F28000008
Test 1: Evaluate TLSH digest
BEFORE ms=1552963383885
AFTER ms=1552963387866
TIME ms=3981
TIME ms=79 per iteration

eval TLSH distance 50 million times...
Test 2: Calc distance TLSH digest
dist=138
BEFORE ms=1552963387951
AFTER ms=1552963392498
TIME ms=4547
TIME ms=90 per million iterations

AFTER using tlsh_3_11_0
$ bin/timing_unittest
build a buffer with a million bytes...
eval TLSH (3.11.0 compact hash 1 byte checksum sliding_window=5) 50 times...
TLSH(buffer) = A12500088C838B0A0F0EC3C0ACAB82F3B8228B0308CFA302338C0F0AE2C24F28000008
Test 1: Evaluate TLSH digest
BEFORE ms=1552963360177
AFTER ms=1552963360791
TIME ms=614
TIME ms=12 per iteration

eval TLSH distance 50 million times...
Test 2: Calc distance TLSH digest
dist=138
BEFORE ms=1552963360808
AFTER ms=1552963365502
TIME ms=4694
TIME ms=93 per million iterations
</PRE>

3.10.0

<PRE>
19/Mar/2019
Adding // access function - required by tools using TLSH library
int BucketValue(int bucket);
int Checksum(int k);
</PRE>

3.9.9

<PRE>
19/Mar/2019
resolve issue 62
remove dependancy on GNUInstallDirs
</PRE>

3.9.8

<PRE>
19/Mar/2019
timing_unittest measures the time taken to do distance calculations
add a command line option -size - so that you can measure the time taken to evaluate different sizes of string
</PRE>

3.9.7

<PRE>
19/Mar/2019
resolving issue 50 for bin/timing_unittest
</PRE>

Page 6 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.