From: sto.mar@... Date: 2012-07-26T22:40:29+09:00 Subject: Re: modular exponentation with multiple exponents? Am 25.07.2012 23:21, schrieb roob noob: > Jan E. wrote in post #1070171: >> Half baked security is probably even worse than no security at all, >> because it provides you with a false feeling of safety. > [...] > > I found the answer to my question, it is asking for > > ((((a ^ b) mod f) ^ c) mod f)) ^ d) mod f) etc (something I thought may > be the case, although I was by no means sure) > > which is equal to a^b*c*d*etc mod f (which is probably how I should have > read it in the first place, doh) What you probably really mean is: a^(b*c*d*...) mod f You should be aware of the fact that (in Mathematics as well as in Ruby) 2^3*4 and 2^(3*4) [resp. 2**3*4 and 2**(3*4)] are *not* the same. Which kind of supports the point Jan is making. Btw, there is also a huge(!) difference between 2**3**4 = 2**(3**4) and (2**3)**4. > anyway I apologize for a question that had only a minor relation to > Ruby, however I do think you are wrong to think that a well researched > project implemented from a spec and reviewed by professionals will > certainly end up being worse than a project made by someone who has > already done the research to become a professional. Regards, Marcus --