From: Jimmy Petersen Date: 2012-07-25T22:29:08+09:00 Subject: Re: modular exponentation with multiple exponents? Hi, a ** b ** c ** d ** e % f should solve your problem On 07/25/2012 03:21 PM, roob noob wrote: > I need to do a^b^c^d^e mod f > > I can do a^b mod f like this > > a.to_bn.mod_exp(b,f) > > but I have no clue how to do it when it is a^b^c^d^e mod f, and I can't > seem to find anyway to do it in ruby or with math in general, > > anyone care to point me in the right direction please? thanks! >