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

Brainstorming: OpenCL dynamic, OpenCL external mode #1564

Open
magnumripper opened this issue Jul 18, 2015 · 3 comments
Open

Brainstorming: OpenCL dynamic, OpenCL external mode #1564

magnumripper opened this issue Jul 18, 2015 · 3 comments
Labels
non-trivial RFC / discussion Help or comments wanted

Comments

@magnumripper
Copy link
Member

Given we do a run-time compile of OpenCL kernels, "how hard can it be" to do things like

  1. Dynamic-compiler format, that whips up a semi optimized OpenCL kernel and runs it.
  2. An External mode, that wips up an OpenCL kernel for producing candidates.

It's just a matter of really wanting to do it. Both ideas have tumbled around in my head for quite a while.

@jfoug
Copy link
Collaborator

jfoug commented Jul 18, 2015

Dynamic-compiler format, that whips up a semi optimized OpenCL kernel and runs it.

You could give this a try:

Take the existing dynamic_compiler_fmt.c and make a new one, dynamic_compiler_opencl_fmt.c. Within this format you could 'obtain' a valid working dynamic script, which is basically a step by step explanation of what needs to be done. Then generate your kernel based upon those instructions. I can easily provide a hook into the dyna-compiler to simply return the script. I had a function at one time (but removed it), where you could call the compiler (gives you a handle), and then pass that handle back to a function to get the script. I think I removed that code (just stub functions) here: 329c4ab

But adding things like this should be very easy, or even just a mode of the compiler to build the script only, and not link into the dynamic engine.

@frank-dittrich
Copy link
Collaborator

Only few external modes will produce enough candidates to fully utilize the GPU.

BTW: should we warn the user when an attack running on a GPU produces less than 50% of the candidates the GPU needs for optimal performance?

@magnumripper
Copy link
Member Author

You could give this a try:

This is what I meant. We actually know how to do it, we just lack the real incentive. We could easily use your existing dynamic functions more or less as-is, and in OpenCL they'd be functions or macros or what not and it wouldn't matter. It would rock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-trivial RFC / discussion Help or comments wanted
Projects
None yet
Development

No branches or pull requests

3 participants