(self, key)
return False
Check if the given key is valid
Check if the given key is valid
Check if the given key is valid
def check_pubkey(self, key):
        """Check if the given key is valid"""
        if key > 2 and key < self.prime - 1:
            if pow(key, (self.prime - 1) / 2, self.prime) == 1:
                return True
        return False
def check_pubkey ( self , key ) : if key > 2 and key < self . prime - 1 : if pow ( key , ( self . prime - 1 ) / 2 , self . prime ) == 1 : return True return False