> I'm probably missing the bigger picture. It looks like you want to check whether a given key is valid. Instead of creating yet another instance of Crypt_RSA where you call loadKey() to check whether the key is valid, you should extract whatever logic loadKey() has to decide whether it is a correct key into a new method and just call that instead.

The logic to determine whether or not a key is valid is highly embedded with the logic to load a key. loadKey() is essentially a wrapper for _parseKey(). It'll do one of three things - either serve as a copy constructor, loop through the various formats until it finds one that works or it'll pass the parameters directly to _parseKey. _parseKey then returns an array that is mapped to the various object variables.

As for _parseKey...  it does its validation in-line as it's loading the keys. Here's an example:

```php
                extract(unpack('Nlength', $this->_string_shift($private, 4)));
                if (strlen($private) < $length) {
                    return false;
                }
                $components['privateExponent'] = new Math_BigInteger($this->_string_shift($private, $length), -256);
```
The two can't really be separated and if you tried you'd pretty much end up with two copies of the same function with ever so subtle differences.