2

I'm just asking if the developer of a website can use the computing power of the visitors in somethings like cryptography and bitcoin mining..and if that is efficient for them or not..? I know that distributed DDOS attacks may launch by similar.. where can i read about that topic or something related...?

migrated from stackoverflow.com Mar 26 '17 at 19:58

This question came from our site for professional and enthusiast programmers.

  • 1
    For bitcoin mining, anything you could do on a normal PC (CPU or GPU), much less a tablet or phone, has been completely uncompetitive for years now; see bitcoin.stackexchange.com where there are many dupes of this question. – dave_thompson_085 Mar 27 '17 at 5:29
3

Yes, you could by running JavaScript in the browser. But although JavaScript in the browser has seen many improvements it is probably not the most efficient language to run these kind of algorithms in. The same goes for flash. Now Java applets could be seen already as a better alternative, but the age of Java applets (and possibly flash) is about over. Furthermore, many web browsers now detect ill-behaving scripts.

As dave_thomson_085 indicates in his comment bitcoin mining is now almost exclusively performed on specially developed bitcoin mining hardware. Usually bitcoin mining is not very productive on general purpose computers, even when the computers aren't actually owned by the person doing the mining. That JavaScript has horrible performance with regards to cryptography - compared to compiled languages with direct support for the underlying primitives - doesn't help here.

So I think DDoS attacks - that rely on the number of connections or the amount of data send (basically the bandwith of the upstream internet connection - are more likely applications for hijacked browsers. But yeah, you can use the resources that the host PC (to the script or application) makes available - of course.

  • 3
    There is now also WebAssembly which will bring a lot of joy to all browser malware developers, but currently isn't that much of an improvement over JavaScript code. – Josef Mar 27 '17 at 7:24
  • 1
    @Josef Looks like WASM is going to support SIMD in the near-ish future. That would certainly speed things up by allowing the use of the GPU. Chances are though that if this starts to become a problem browsers will begin taking measures to throttle offending sites. – Ajedi32 Mar 27 '17 at 15:36
2

This would be probably better as a comment but, I don't have the reputation.

You can see lots of recent web projects which is more familiar as desktop applications like emulators and advanced graphics. Thanks to JavaScript and Cloud services, theoretically you can use people's computation power for your businesses. But, I don't think it will be efficient. It is limited with browser process' CPU and GPU usage. On the other hand, it may be more reasonable querying some server attacking it's bandwidth or some other application processing issue. One example can be found here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.