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 aleax, lschoe, mark.dickinson, pablogsal, pitrou, remi.lapeyre, rhettinger, serhiy.storchaka, tim.peters, vstinner, xtreak
Date 2019-02-14.08:03:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550131398.22.0.895039104962.issue35606@roundup.psfhosted.org>
In-reply-to
Content
Nice to see the arrival of the prod() function.

Just as for the built-in pow(x, y[, z]) function it would be very useful to have an optional argument z for computing 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.
History
Date User Action Args
2019-02-14 08:03:18lschoesetrecipients: + lschoe, tim.peters, aleax, rhettinger, mark.dickinson, pitrou, vstinner, serhiy.storchaka, pablogsal, remi.lapeyre, xtreak
2019-02-14 08:03:18lschoesetmessageid: <1550131398.22.0.895039104962.issue35606@roundup.psfhosted.org>
2019-02-14 08:03:18lschoelinkissue35606 messages
2019-02-14 08:03:18lschoecreate