jvdsn / crypto-attacks

Python implementations of cryptographic attacks and utilities.
MIT License
888 stars 114 forks source link

memory usage in hencel lift #20

Open uvicorn opened 6 months ago

uvicorn commented 6 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 6 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 6 months ago

Why are you using hensel_roots for f=0?