Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exact match mode with multiple keys output #42

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

y8
Copy link

@y8 y8 commented Nov 18, 2024

This PR adds new --exact mode, that prints all exact matches for given mask.

Example output

./profanity2.x64 -z $HEX_PUBLIC_KEY_128_CHARS_LONG  --exact 1337________________________________C0DE

<snip>

Initialization time: 2 seconds
Hex string mask: 1337________________________________c0de

Running...
  Always verify that a private key generated by this program corresponds to the
  public key printed by importing it to a wallet of your choice. This program
  like any software might contain bugs and it does by design cut corners to
  improve overall performance.

  Time:     6s Private: 0x00003d93acbde69f615e498ccad72e653c18623564f35ee0899cee3965e8f7c8 Address: 0x13370b854805e1ed2e660d9e1c9a9a7346f1c0de
  Time:     8s Private: 0x00003d93acc639bf615e498ccad72e653c18623564f35ee0899cee3965e8f82f Address: 0x1337fce5c65a04659b925c3cb745c0cb74f9c0de
  Time:    20s Private: 0x00003d93acb92186615e498ccad72e653c18623564f35ee0899cee3965e8fb0c Address: 0x13370e9ae56041b7e0a89558fe4817074adec0de
Total: 515.328 MH/s - GPU0: 256.512 MH/s GPU1: 258.816 MH/s

Rationale: Output of--match mode is limited to 1 key per score increase, but producing some "close enough" results before full match happens. This is good for quick searches, but if you want to get more options, you have to restart profanity2 each time.

--exact mode skip scoring system entirely, gives produces only exact matches, but keeps giving out matches until cancelled. This will take more time than --match to get first results, but will give more choice without need to restart profanity2

Implementation: new kernel profanity_exact_match treats pResult as circular buffer, reserving first element as write cursor position. On the host, when exact mode is set m_memResult handled as circular buffer as well, keeping read cursor position in Device struct.

@y8
Copy link
Author

y8 commented Nov 22, 2024

Merge conflict is resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant