ard to use
    ``a`` and ``ct`` to get ``b``.

    Parameters
    ==========

    digit : minimum number of binary digits for key

    Returns
    =======

    (p, r, d) : p = prime number, r = primitive root, d = random number

    Notes
    =====

    For testing purposes, the ``seed`` parameter may be set to control
    the output of this routine. See sympy.utilities.randtest._randrange.

    Examples
    ========

    >>> from sympy.crypto.crypto import elgamal_private_key
    >>> from sympy.ntheory import is_primitive_root, isprime
    >>> a, b, _ = elgamal_private_key()
    >>> isprime(a)
    True
    >>> is_primitive_root(b, a)
    True

    rb