尝试安装加密小程序时显示SW 0x6f50 [英] SW 0x6f50 when trying to install crypto applet

查看:99
本文介绍了尝试安装加密小程序时显示SW 0x6f50的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装使用安全性类(CipherRandomDataMessageDigest)的小程序,但是在尝试安装它时总是出现6F50错误.程序包已正确加载,但是无法实例化applet.我正在分配所有对象 卡支持构造函数和算法(至少根据数据表支持).如果我注释掉所有安全类引用,则该applet会正确加载和安装.我试过分配byte[]Object,它可以工作,所以这不是与空间有关的问题(64K卡上没有其他任何东西).我正在使用SIM Alliance Loader v2加载小程序. 常规"(非加密和STK)小程序可以正常工作.

I am trying to install an applet which uses security classes (Cipher, RandomData and MessageDigest), but always get an 6F50 error when trying to install it. The package is loaded correctly but the applet cannot be instantiated. I am allocating all objects in the constructor and the algorithms are supported by the card (at least according to the datasheet). If I comment out all security classes references, the applet loads and installs properly. I've tried allocating byte[] and Object's and it works, so this is not a space related problem (64K card with nothing else on it). I am using the SIM Alliance Loader v2 to load the applet. 'Regular' (non-crypto and STK) applets work fine.

该卡支持Java Card 2.1.1和Global Platform 2.1.1的子集.规范在这里: http://shop.shadytel.com/sim_datasheet.pdf

The card supports Java Card 2.1.1 and a subset of Global Platform 2.1.1. Specs are here: http://shop.shadytel.com/sim_datasheet.pdf

关于可能是什么问题的任何想法?

Any ideas as to what the problem might be?

推荐答案

由于卡返回了通常不应返回的专有状态字,很难说出问题出在哪里. 6Fxx错误代码用于ISO/IEC 7816-4标准中的未知错误.因此,值50是智能卡实现的专有属性.联系供应商.

It's hard to tell what the problem is as the card returns a proprietary status word that it normally should not return. The 6Fxx error codes are used for unknown errors in the ISO/IEC 7816-4 standards. The value 50 is therefore proprietary to the smart card implementation. Contact the vendor.

数据表向我们展示了一个非常受限的Java Card平台,它仅显示了对以下加密算法的支持:

The datasheet shows us a very limited Java Card platform, it only shows support for the following cryptographic algorithms:

  • DES和TDEA(三重DES)
  • 安全和伪随机
  • SHA-1

因此,如果您超出这些规格,则应使用表示错误的状态字.通常,您通常会期望6A80,这表明命令数据中存在错误.实例化applet时出错,表明该代码已被接受,但是实例化或初始化其中一种密码算法失败.

So if you go outside of these specifications you should expect a status word denoting an error. Normally you would expect 6A80 though, indicating something is wrong within the command data. The fact that you get an error while instantiating the applet shows that the code is accepted, but that instantiating or initializing one of the cryptographic algorithms fails.

如果您有一个良好的调试环境(与Java Card开发一样好),那么您应该能够逐步完成Java Card static install方法和applet构造函数.

If you have a good debugging environment (as good as a must for Java Card development), then you should be able to step through the Java Card static install method and applet constructor.

这篇关于尝试安装加密小程序时显示SW 0x6f50的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆