def _bcrypt_interpret_ec_key_blob(key_type, blob_struct, blob):
magic = native(int, blob_struct.dwMagic)<EOL>key_byte_length = native(int, blob_struct.cbKey)<EOL>curve = {<EOL>BcryptConst.BCRYPT_ECDSA_PRIVATE_P256_MAGIC: '<STR_LIT>',<EOL>BcryptConst.BCRYPT_ECDSA_PRIVATE_P384_MAGIC: '<STR_LIT>',<EOL>BcryptConst.BCRYPT_ECDSA_PRIVATE_P521_MAGIC: '<STR_LIT>',<EOL>BcryptConst.BCRYPT_ECDSA_PUBLIC_P256_MAGIC: '<STR_LIT>',<EOL>BcryptConst.BCRYPT_ECDSA_PUBLIC_P384_MAGIC: '<STR_LIT>',<EOL>BcryptConst.BCRYPT_ECDSA_PUBLIC_P521_MAGIC: '<STR_LIT>',<EOL>}[magic]<EOL>public = b'<STR_LIT>' + blob[<NUM_LIT:0>:key_byte_length * <NUM_LIT:2>]<EOL>if key_type == '<STR_LIT>':<EOL><INDENT>return keys.PublicKeyInfo({<EOL>'<STR_LIT>': keys.PublicKeyAlgorithm({<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': keys.ECDomainParameters(<EOL>name='<STR_LIT>',<EOL>value=curve<EOL>)<EOL>}),<EOL>'<STR_LIT>': public,<EOL>})<EOL><DEDENT>elif key_type == '<STR_LIT>':<EOL><INDENT>private = int_from_bytes(blob[key_byte_length * <NUM_LIT:2>:key_byte_length * <NUM_LIT:3>])<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.ECDomainParameters(<EOL>name='<STR_LIT>',<EOL>value=curve<EOL>)<EOL>}),<EOL>'<STR_LIT>': keys.ECPrivateKey({<EOL>'<STR_LIT:version>': '<STR_LIT>',<EOL>'<STR_LIT>': private,<EOL>'<STR_LIT>': public,<EOL>}),<EOL>})<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(pretty_message(<EOL>'''<STR_LIT>''',<EOL>repr(key_type)<EOL>))<EOL><DEDENT>
Take a CNG BCRYPT_ECCKEY_BLOB and converts it into an ASN.1 structure

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

:param blob_struct:
    An instance of BCRYPT_ECCKEY_BLOB

: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