Skip to content

Investigate correctness of RSA example #60

Open
@syreal17

Description

@syreal17

https://discord.com/channels/575006934089072650/759508515403726858/1337172891883671674

Hello! I guess, I found a mistake in the CTF Primer, section 6.5 Modern Cryptography. In the first point of RSA key generation algorithm says "Generate two large co-prime numbers, p and q.". But it's incorrect because we need to generate two large prime numbers, otherwise the Euler's totient function won't be equal (p-1)(q-1) in general, because p or q if they are just co-prime may not be prime. And further in the example we have p = 13 and q = 9. Since q isn't a prime number the Euler's totient function in the example is wrong calculated and algorithm don't work in some cases. For example if we try to encode number 105, we will get 27. If we try to decode it, we will get 27 again (not 105 as expected).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions