Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3436

Python • Using Python with PARI/GP

$
0
0
I use Python with rpicam-apps/utils/timestamp.py in my GS camera GScrop script:
https://gist.github.com/Hermann-SW/e604 ... 4e0e9f6b9c

Also Python is part in both of my multi language repos (RSA_numbers_factored, planar_graph_playground).

Lately I mostly use PARI/GP for number theory and factorization stuff, although Python is good in that area as well.
Two days ago I published a factoring challenge with 100 USD price money:
https://github.com/Hermann-SW/RSA_numbe ... _semiprime

I used Python time.time_ns to get epoch time at nanosecond resolution (PARI/GP getwalltime() only provides millisecond resolution). I used that as seed for random generator, to make sure I cannot figure out the seed used.

In addition I used Python stdiomask.getpass() to input a factor (with only asterisks displayed)
to make sure nobody else can have an idea of the random seed used.

Finally challenge.py executes challenge.gp.

So not all done in Python, but part of it.
peek.gif

Statistics: Posted by HermannSW — Wed Oct 30, 2024 11:02 pm — Replies 0 — Views 20



Viewing all articles
Browse latest Browse all 3436

Trending Articles