I saw this Java question on SO and ported to Python.

http://stackoverflow.com/questions/15182496/why-does-this-code-print-hello-world

Here is the searcher function:
https://github.com/shabda/search-seed-for-word/blob/master/searcher.py

It tries to find the seeds using brute force.

Is there a way to optimize the searcher function? For example finding seed
for "hello" takes less than a minute. Finding  the seed for "hello world"
was taking longer than I was willing to let the program run. (The Python
random algo is Mersenne twister, which is a non cryptographic PRNG, so it
*might* be possible to find seeds without brute forcing.).

Related, we were recently discussing these (in our office) in terms of
Bitcoin type proof of work. Finding the seed for words is cpu intensive and
is a proof of work. Verifying the seed is trivial in cpu time.

-- 
Thanks,
Shabda

Agiliq.com - Building Amazing Apps
agiliq.com/blog/ | github.com/agiliq
US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj
Our Android Apps <https://play.google.com/store/apps/developer?id=Agiliq> | Our
iOS Apps <https://itunes.apple.com/us/artist/agiliq/id407918088>
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to