Author Topic: Cryptography Implementation Discussion  (Read 18184 times)

we'll discuss implementing crypto in torquescript here.

discussion started here: http://forum.blockland.us/index.php?topic=245048.msg7036211#msg7036211

i have a github and stuff ready: https://github.com/Tungul/Support_Cryptography
« Last Edit: November 11, 2013, 12:28:59 AM by Lugnut »

I'm working on the benchmarks for the three libraries right now.

Don't benchmark mine quite yet; I have optimizations and such that I haven't gotten around to uploading. (I'll upload in the morning)
It might be faster even still, but I'm just saying.

you can just commit the changes to the repo or something Ip

greek, none of those libraries are mine - it's red_guy, mctwist, and ipquarx.

Don't benchmark mine quite yet; I have optimizations and such that I haven't gotten around to uploading. (I'll upload in the morning)
It might be faster even still, but I'm just saying.
Please rename your functions as well. "add" can easily be overwritten by accident.

Please rename your functions as well. "add" can easily be overwritten by accident.
Will do. I'll post here when the file at http://Ipquarx.com/Math.cs is updated.

Will do. I'll post here when the file at http://Ipquarx.com/Math.cs is updated.

I can tell you already that yours is much faster at multiplying than McTwist's. You're also missing a division function.

I'm having trouble benchmarking Red Guy's since his uses objects, and those don't play nicely with the benchmarker.




edit:
Here are the initial results. http://pastebin.com/zYtrXQ6d

Please note that these are not formatted yet. They do not include Ip's updated math library and do not include Red Guy's library (see above).

I'll get new results once Ip finishes his updates.
« Last Edit: November 11, 2013, 01:36:43 AM by Greek2me »

Here's a better first question: What do you need high-level cryptography in Blockland for?!

Here's a better first question: What do you need high-level cryptography in Blockland for?!
i swear someone asked you a similar question once

the answer is and was "because we can"

I can tell you already that yours is much faster at multiplying than McTwist's. You're also missing a division function.

I'm having trouble benchmarking Red Guy's since his uses objects, and those don't play nicely with the benchmarker.




edit:
Here are the initial results. http://pastebin.com/zYtrXQ6d

Please note that these are not formatted yet. They do not include Ip's updated math library and do not include Red Guy's library (see above).

I'll get new results once Ip finishes his updates.
i'm really digging those results

i'm really digging those results
Wow, it actually seems mine is winning by a longshot even without those optimizations.

Okay, the file has been updated. It now supports exponentiation by squaring and some optimizations for multiplication and subtraction.

I didn't include the modulus function as the one provided by the SS library does not actually function correctly. I'm going to look into other libraries where it is functional.

http://Ipquarx.com/Math.cs

Here are the initial results. http://pastebin.com/zYtrXQ6d

$benchmark_div__mctwist__1234567890__2 = "0";
$benchmark_mul__ipquarx__150__150 = "0";
$benchmark_sub__ipquarx__200__150 = "0";


Are you a wizard?
Anyway, we really need better benchmarking and unit testing suites in general.

$benchmark_div__mctwist__1234567890__2 = "0";
$benchmark_mul__ipquarx__150__150 = "0";
$benchmark_sub__ipquarx__200__150 = "0";


Are you a wizard?
Anyway, we really need better benchmarking and unit testing suites in general.
Zero probably means <31.25ms. Not sure how they did it.

Zero probably means <31.25ms. Not sure how they did it.

Asking for precision to 1000th of a second is not too much to ask.