jvdsn / crypto-attacks

Python implementations of cryptographic attacks and utilities.
MIT License
947 stars 124 forks source link

memory usage in hencel lift #20

Open uvicorn opened 9 months ago

uvicorn commented 9 months ago

https://github.com/jvdsn/crypto-attacks/blob/master/shared/hensel.py#L33 FIX:

#        roots = list(range(p))
        roots = range(p)

because list(range(big_p)) will use so much memory

uvicorn commented 9 months ago

https://github.com/jvdsn/crypto-attacks/blob/master/shared/hensel.py#L43 same problem. seems need rewrite when polynomial f=0

jvdsn commented 9 months ago

Why are you using hensel_roots for f=0?