def partiallyVerifyRootGeneration(p: int, q: int, g: int) -> bool:
    """Checks partial validity of DSA parameters according to algorithm from FIPS 186-4, Appendix A.2.2

    Note that this function verifies correctness, but not security. As standard states:
    'The non-existence of a potentially exploitable relationship of g to another genrator g' (that is known to the entity
    that generated g, but may not be know by other entities) cannot be checked'

    Parameters:
        p: int
            Bigger prime
        
        q: int
            Smaller prime
        
        g: int
            Primitive root
    
    Returns:
        status: bool
            True if parameters is partially valid.
            False if parameters are definitely not valid
    """

    if g < 2 or g > p - 1: return False
    if pow(g, q, p) == 1: return True
    return False