Is it possible to provide in the OpenCL a private key like a int 32 array and get the private keys?
Do you have a codesnippet for this?
If you provide the private key you already have the private key. You mean get the public keys?Do you have a codesnippet for this?
Yes, but my kernel is only for one private key and use an offset to generate multiple private/public key pairs. You can easily transfer an array and don't use the offset (| global_id). https://github.com/bernardladenthin/BitcoinAddressFinder/blob/main/src/main/resources/inc_ecc_secp256k1custom.cl#L170 You need to adapt my custom method __kernel void generateKeysKernel_grid(__global u32 *r, __global const u32 *k). In k must be transfered more than one private key. Then you can calculate each k offset for every kernel and calculate for every given private key all public key pais and fetch the result.
This is also easily prossible in my project because many unit tests existing which can be adapted easily.
But keep in mind, memory access is very slow. If you transfer many private keys, it cost a lot of shared memory and this memory needs to be written and read by each kernel which is a very slow operation. Therefore I decided to pass a single key and calculate multiple keys with an offset. This operation will be done on the CPU also and is a trick that I don't need so much memory operations.
Cheers, Bernard