mirror of
https://github.com/albertobsd/keyhunt.git
synced 2025-10-09 20:44:00 +02:00
mode bsgs for fast key search and bloom filter updated
This commit is contained in:
15
CHANGELOG.md
15
CHANGELOG.md
@@ -1,25 +1,30 @@
|
|||||||
|
#Version 0.1.20210112 BSGS
|
||||||
|
- Added mode BSGS this work with a file with uncompressed keys
|
||||||
|
- Updated bloom filter to allow More items
|
||||||
|
|
||||||
|
|
||||||
#Version 0.1.20201228
|
#Version 0.1.20201228
|
||||||
- Change Quicksort to Introsort, this solve some edge cases of quicksort.
|
- Change Quicksort to Introsort, this solve some edge cases of quicksort.
|
||||||
- Introsort is avaible to keyhunt and hexcharstoraw. worst case. O(N log N).
|
- Introsort is avaible to keyhunt and hexcharstoraw. worst case. O(N log N).
|
||||||
- Aling of some output text
|
- Aling of some output text
|
||||||
|
|
||||||
Version 0.1.20201223
|
#Version 0.1.20201223
|
||||||
- Added new tool hexcharstoraw to create a raw binary file for xpoint from a text-hexadecimal file
|
- Added new tool hexcharstoraw to create a raw binary file for xpoint from a text-hexadecimal file
|
||||||
- Added option -w to work with raw binary file, this file contains xpoint in binary format fixed to 32 bytes
|
- Added option -w to work with raw binary file, this file contains xpoint in binary format fixed to 32 bytes
|
||||||
|
|
||||||
Version 0.1.20201222
|
#Version 0.1.20201222
|
||||||
- Fixed some ugly bug in the searchbinary function thanks to Ujang
|
- Fixed some ugly bug in the searchbinary function thanks to Ujang
|
||||||
- Added to stdout the vanitykeys found with -v option
|
- Added to stdout the vanitykeys found with -v option
|
||||||
|
|
||||||
Version 0.1.20201221
|
#Version 0.1.20201221
|
||||||
- Fixed search by xpoint.
|
- Fixed search by xpoint.
|
||||||
- Added -e option to skip the sort process whe the file is already sorted.
|
- Added -e option to skip the sort process whe the file is already sorted.
|
||||||
- Fixed debugcount when upto N is less than debugcount.
|
- Fixed debugcount when upto N is less than debugcount.
|
||||||
- Changed "-R upto" to "-R" and added "-n upto" option.
|
- Changed "-R upto" to "-R" and added "-n upto" option.
|
||||||
|
|
||||||
Version 0.1.20201218
|
#Version 0.1.20201218
|
||||||
- Minor bugs fixed.
|
- Minor bugs fixed.
|
||||||
|
|
||||||
Version 0.1.20201217
|
#Version 0.1.20201217
|
||||||
- First Realease
|
- First Realease
|
||||||
- Thanks to all CryptoHunters to make this code possible
|
- Thanks to all CryptoHunters to make this code possible
|
||||||
|
@@ -97,18 +97,18 @@ int bloom_init2(struct bloom * bloom, unsigned int entries, double error)
|
|||||||
bloom->entries = entries;
|
bloom->entries = entries;
|
||||||
bloom->error = error;
|
bloom->error = error;
|
||||||
|
|
||||||
double num = -log(bloom->error);
|
long double num = -log(bloom->error);
|
||||||
double denom = 0.480453013918201; // ln(2)^2
|
long double denom = 0.480453013918201; // ln(2)^2
|
||||||
bloom->bpe = (num / denom);
|
bloom->bpe = (num / denom);
|
||||||
|
|
||||||
long double dentries = (long double)entries;
|
long double dentries = (long double)entries;
|
||||||
long double allbits = dentries * bloom->bpe;
|
long double allbits = dentries * bloom->bpe;
|
||||||
bloom->bits = (unsigned int)allbits;
|
bloom->bits = (unsigned long long int)allbits;
|
||||||
|
|
||||||
if (bloom->bits % 8) {
|
if (bloom->bits % 8) {
|
||||||
bloom->bytes = (bloom->bits / 8) + 1;
|
bloom->bytes = (unsigned int) (bloom->bits / 8) + 1;
|
||||||
} else {
|
} else {
|
||||||
bloom->bytes = bloom->bits / 8;
|
bloom->bytes = (unsigned int) bloom->bits / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
bloom->hashes = (unsigned char)ceil(0.693147180559945 * bloom->bpe); // ln(2)
|
bloom->hashes = (unsigned char)ceil(0.693147180559945 * bloom->bpe); // ln(2)
|
||||||
@@ -146,7 +146,7 @@ void bloom_print(struct bloom * bloom)
|
|||||||
printf(" ->version = %d.%d\n", bloom->major, bloom->minor);
|
printf(" ->version = %d.%d\n", bloom->major, bloom->minor);
|
||||||
printf(" ->entries = %u\n", bloom->entries);
|
printf(" ->entries = %u\n", bloom->entries);
|
||||||
printf(" ->error = %f\n", bloom->error);
|
printf(" ->error = %f\n", bloom->error);
|
||||||
printf(" ->bits = %u\n", bloom->bits);
|
printf(" ->bits = %llu\n", bloom->bits);
|
||||||
printf(" ->bits per elem = %f\n", bloom->bpe);
|
printf(" ->bits per elem = %f\n", bloom->bpe);
|
||||||
printf(" ->bytes = %u", bloom->bytes);
|
printf(" ->bytes = %u", bloom->bytes);
|
||||||
unsigned int KB = bloom->bytes / 1024;
|
unsigned int KB = bloom->bytes / 1024;
|
||||||
|
@@ -25,7 +25,7 @@ struct bloom
|
|||||||
// Client code may read these values if desired. Client code MUST NOT
|
// Client code may read these values if desired. Client code MUST NOT
|
||||||
// modify any of these.
|
// modify any of these.
|
||||||
unsigned int entries;
|
unsigned int entries;
|
||||||
unsigned int bits;
|
unsigned long long int bits;
|
||||||
unsigned int bytes;
|
unsigned int bytes;
|
||||||
unsigned char hashes;
|
unsigned char hashes;
|
||||||
double error;
|
double error;
|
||||||
|
Reference in New Issue
Block a user