mifare读卡器能操作cpu卡吗
我们公司之前用的卡都是普通的ic卡,用mifare读卡器和驱动来初始化加密成自己的卡
现在用cpu卡,想也加密成自己密码的卡,因为之前这块是别人在做的,所以没什么经验
应该是兼容m1的cpu卡,因为用一个程序可以读出16个扇区数据,而且控制字和m1规则一样,而且可以算出是用keyb验证
但我用omnikey mifare one 读卡器提供的函数验证扇区控制块keyb密钥无法验证通过,
rc=SCardCLMifareStdAuthent(FCard, i*4+3 , 97, 1, 1,KeyB,6)
一直返回0x81300005,对应的错误是“The requested functionality is not supported at this time / under this OS / in this situation etc.”难道是不支持?
查找网上资料,改用winapi,而且是通过loadkey后读卡器来验证密码
ucByteSend[0] = 0xff;
ucByteSend[1] = 0x88;
ucByteSend[2] = 0x00;
ucByteSend[3] = 0x01;
ucByteSend[4] = 0x61;
ucByteSend[5] = 0x01;
rc = SCardTransmit(FCard, ref pioSendPci, ucByteSend, 6, null, ucByteReceive, ref dwRecvLength);
ucByteReceive 一直返回0x6986,对应错误“Volatile memory is not available”
再查资料,发现新标准里说上面这种验证方式已经被取消了
This command is obsolete and should not be used any more !
那用新的格式
ucByteSend[0] = 0xff;
ucByteSend[1] = 0x86;
ucByteSend[2] = 0x00;
ucByteSend[3] = 0x00;
ucByteSend[4] = 0x01;
ucByteSend[5] = 0x00;
ucByteSend[6] = 0x01;
ucByteSend[7] = 0x61;
ucByteSend[8] = 0x01;
rc = SCardTransmit(FCard, ref pioSendPci, ucByteSend, 9, null, ucByteReceive, ref dwRecvLength);
依旧同样的错误
而上述2中方法对于一般的mi卡片都没问题,
网上看了不少关于mi和cpu的,好像cpu有外部验证,内部验证之类的,还随机数什么的,难道cpu卡真的这么难弄吗?
我只要能修改扇区密码和控制字就可以了,既然我这cpu卡兼容m1,那别人的程序和一块电路板就能读到卡片的16个扇区和每个扇区的控制块,为什么我就读不到呢