def cmp_private_numbers(pn1, pn2):
    """
    Compare 2 sets of private numbers. This is for comparing 2
    private RSA keys.

    :param pn1: The set of values belonging to the 1st key
    :param pn2: The set of values belonging to the 2nd key
    :return: True is the sets are the same otherwise False.
    """
    if not cmp_public_numbers(pn1.public_numbers, pn2.public_numbers):
        return False

    for param in ['d', 'p', 'q']:
        if getattr(pn1, param) != getattr(pn2, param):
            return False
    return True