def _bcrypt_interpret_dsa_key_blob(key_type, version, blob_struct, blob):
key_byte_length = native(int, blob_struct.cbKey)<EOL>if version == <NUM_LIT:1>:<EOL><INDENT>q = int_from_bytes(native(byte_cls, blob_struct.q))<EOL>g_offset = key_byte_length<EOL>public_offset = g_offset + key_byte_length<EOL>private_offset = public_offset + key_byte_length<EOL>p = int_from_bytes(blob[<NUM_LIT:0>:g_offset])<EOL>g = int_from_bytes(blob[g_offset:public_offset])<EOL><DEDENT>elif version == <NUM_LIT:2>:<EOL><INDENT>seed_byte_length = native(int, blob_struct.cbSeedLength)<EOL>group_byte_length = native(int, blob_struct.cbGroupSize)<EOL>q_offset = seed_byte_length<EOL>p_offset = q_offset + group_byte_length<EOL>g_offset = p_offset + key_byte_length<EOL>public_offset = g_offset + key_byte_length<EOL>private_offset = public_offset + key_byte_length<EOL>q = int_from_bytes(blob[q_offset:p_offset])<EOL>p = int_from_bytes(blob[p_offset:g_offset])<EOL>g = int_from_bytes(blob[g_offset:public_offset])<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>' % repr(version))<EOL><DEDENT>if key_type == '<STR_LIT>':<EOL><INDENT>public = int_from_bytes(blob[public_offset:private_offset])<EOL>return keys.PublicKeyInfo({<EOL>'<STR_LIT>': keys.PublicKeyAlgorithm({<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': keys.DSAParams({<EOL>'<STR_LIT:p>': p,<EOL>'<STR_LIT:q>': q,<EOL>'<STR_LIT:g>': g,<EOL>})<EOL>}),<EOL>'<STR_LIT>': core.Integer(public),<EOL>})<EOL><DEDENT>elif key_type == '<STR_LIT>':<EOL><INDENT>private = int_from_bytes(blob[private_offset:private_offset + key_byte_length])<EOL>return keys.PrivateKeyInfo({<EOL>'<STR_LIT:version>': <NUM_LIT:0>,<EOL>'<STR_LIT>': keys.PrivateKeyAlgorithm({<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': keys.DSAParams({<EOL>'<STR_LIT:p>': p,<EOL>'<STR_LIT:q>': q,<EOL>'<STR_LIT:g>': g,<EOL>})<EOL>}),<EOL>'<STR_LIT>': core.Integer(private),<EOL>})<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(pretty_message(<EOL>'''<STR_LIT>''',<EOL>repr(key_type)<EOL>))<EOL><DEDENT>
Take a CNG BCRYPT_DSA_KEY_BLOB or BCRYPT_DSA_KEY_BLOB_V2 and converts it
into an ASN.1 structure

:param key_type:
    A unicode string of "private" or "public"

:param version:
    An integer - 1 or 2, indicating the blob is BCRYPT_DSA_KEY_BLOB or
    BCRYPT_DSA_KEY_BLOB_V2

:param blob_struct:
    An instance of BCRYPT_DSA_KEY_BLOB or BCRYPT_DSA_KEY_BLOB_V2

:param blob:
    A byte string of the binary data contained after the struct

:return:
    An asn1crypto.keys.PrivateKeyInfo or asn1crypto.keys.PublicKeyInfo
    object, based on the key_type param