This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lschoe
Recipients lschoe, rhettinger
Date 2019-02-14.19:34:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550172876.35.0.867721234262.issue35996@roundup.psfhosted.org>
In-reply-to
Content
It's nice to see the arrival of the prod() function, see PR11359.

Just as for the built-in pow(x, y[, z]) function it would be very useful to have an optional argument z for computing integer products modulo z. Typical use case in cryptography would be:

prod((pow(x, y, z) for x, y in zip(g, s)), z)

to compute the product of all (potentially many) g[i]**s[i]'s modulo z. 

And, just as with the use of pow(), the intermediate values for prod() may in general grow quickly, hence modular reduction is essential to limit time and space usage.

Maybe an interesting option to add at this stage?
History
Date User Action Args
2019-02-14 19:34:36lschoesetrecipients: + lschoe, rhettinger
2019-02-14 19:34:36lschoesetmessageid: <1550172876.35.0.867721234262.issue35996@roundup.psfhosted.org>
2019-02-14 19:34:36lschoelinkissue35996 messages
2019-02-14 19:34:36lschoecreate