I'm a high school student taking IB and for my EE on Maths, I'm comparing the effectiveness of Euler's totient function and Carmichael's totient function in generating the public key in RSA encryption.

In order to compare the 'effectiveness' of these functions, I will firstly compare how fast they can generate the public key and then secondly, compare the security of the generated key. For the 'fastness' part I will use time complexity. But I have no idea how to compare their security. Can anyone help me figure this out? Maybe an algorithm that is often used to test the security of an encryption key? Or should I just write a code to execute encryption keys made using either Euler's or Carmichael's totient function and see how long it takes to decrypt each key?



Not strictly an answer because I reject the question, but too long for comments. Related but not quite (cross)dupe:

Although mathematically RSA can use any d and e that are inverses modulo either Euler's totient (commonly phi) or Carmichael's (commonly lambda), in practice we use a predetermined small e (commonly 3 or 65537, the latter being the Fermat prime F4) and compute d as the inverse of that. Thus which mod is used for the inverse has no effect on the public exponent and public key, only the private exponent and naive private key. Since the phi inverse is almost always larger than the lambda inverse, naive decryption using the former would be slightly slower. But in practice we don't use naive decryption, we use the Chinese Remainder Theorem method with d mod p-1 and d mod q-1, and those are the same no matter which way d was computed, so it makes no difference to either time or security of encryption or decryption. It may make a tiny difference to time of key generation, but key generation is normally done only rarely, and is very heavily dominated by prime testing, or prime building for provable methods.

And if it did make a difference to security you couldn't determine that by measuring the time or even computing the time complexity.

PS: at least in US, we normally use 'effective' to describe or measure only that something works correctly, and 'efficient' to describe or measure that it is fast (uses little time) and/or uses little of other relevant resources such as memory, bandwidth, power, etc.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.