'Return a private key object corresponsing to the Secure Shell Key
Agent v3 format.
The SSH Key Agent v3 format for a RSA key is::
string \'ssh-rsa\'
integer e
integer d
integer n
integer u
integer p
integer q
The SSH Key Agent v3 format for a DSA key is::
string \'ssh-dss\'
integer p
integer q
integer g
integer y
integer x
@type data: L{bytes}
@param data: The key data.
@return: A new key.
@rtype: L{twisted.conch.ssh.keys.Key}
@raises BadKeyError: if the key type (the first string) is unknown'

@classmethod
def _fromString_AGENTV3(cls, data):

    (keyType, data) = common.getNS(data)
    if (keyType == 'ssh-dss'):
        (p, data) = common.getMP(data)
        (q, data) = common.getMP(data)
        (g, data) = common.getMP(data)
        (y, data) = common.getMP(data)
        (x, data) = common.getMP(data)
        return cls._fromDSAComponents(y=y, g=g, p=p, q=q, x=x)
    elif (keyType == 'ssh-rsa'):
        (e, data) = common.getMP(data)
        (d, data) = common.getMP(data)
        (n, data) = common.getMP(data)
        (u, data) = common.getMP(data)
        (p, data) = common.getMP(data)
        (q, data) = common.getMP(data)
        return cls._fromRSAComponents(n=n, e=e, d=d, p=p, q=q, u=u)
    else:
        raise BadKeyError(('unknown    key    type    %s' % (keyType,)))
