Update your stuff, folks. I’ve had a fun day at work.

  • Err(()).unwrap()@lemmy.world
    link
    fedilink
    English
    arrow-up
    18
    ·
    edit-2
    6 hours ago

    The encryption that SSL/TLS provides (that puts the “secure” in HTTPS) uses a public–private key pair and a specific mathematical function. Generating the key pair requires a cryptographically secure random number that is impossible or very difficult to guess, which must be kept secret at all times. If this random number is leaked or guessed by a malicious actor, the private key can be reconstructed and used to impersonate a website or break the encryption.

    The security of the encryption comes from the fact that the function is easy to calculate one way, but difficult to calculate its inverse. To demonstrate: multiplying the prime numbers 88117 and 44543 is easy, but the inverse, factorizing the semiprime 3924995531, is extremely lengthy in comparison.

    One of the factors that determine the security of the key is the size of the number, i.e. the number of digits. In this case, a proper key should’ve had a length of 384 bits (or 116 decimal digits). In reality, the keys that eMudhra used had eight bits, which can only represent 256 possible values, and can be easily guessed even by brute force. The specific private keys were the numbers 4, 56, 66, 115, 155, 156, 230, and 237.