如何开始使用 Javacard?

发布于 2024-12-01 09:22:15 字数 324 浏览 1 评论 0原文

我是智能卡开发的新手。请帮助我了解如何开始。

  1. Javacard 和 JCOP 之间有什么关系?
  2. 如何将 JCOP 版本映射到 GlobalPlatform 卡规范
    • 例如,JCOP 2.4.1 映射到什么规范?
  3. 我什么时候需要针对一种 API 而不是另一种 API 进行编码?
  4. 我在哪里可以找到好的入门教程?

I'm new to smart-card development. Please help me understand how to get started.

  1. What's the relationship between Javacard and JCOP?
  2. How do I map a JCOP version to a GlobalPlatform Card Specification?
    • For example, what specification does JCOP 2.4.1 map to?
  3. When do I need to code against one API versus the other?
  4. Where can I find a good tutorial to get started?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

猫弦 2024-12-08 09:22:15
  1. JCOP是一个最初来自IBM的软件平台,它实现了Javacard API和GlobalPlatform(以前的Open Platform)。现在由恩智浦拥有和管理。
  2. JCOP 2.4.1?可能是 GP 2.1.1。网络搜索特定产品规格。
  3. javacard 和 GP:
    • Javacard 用于使用 Java 编程语言以及有限版本的 JVM 和 java 库为智能卡平台编写应用程序 - javacard 小程序。
    • GlobalPlatform 是用于管理小程序感知智能卡的规范,定义了以下操作:
      • 管理卡生命周期,
      • 卡/主机身份验证,
      • 安装/删除/实例化/选择小程序,以及
      • 管理卡上的安全策略。
    • 使用 GlobalPlatform,您将与 GP 卡交换 APDU 以执行上述操作;使用 javacard,您将编写可以接受和处理特定于您的应用程序的 APDU 的小程序。 GlobalPlatform 不是 javacard 特定的,但 javacard 是智能卡 applet 开发的唯一相关技术。
  4. 有关 javacard 教程,请从 javacard 站点 开始。查看文档部分以了解入门内容。下载开发工具包,您将找到一些 html 操作指南。对于 GlobalPlatform,您需要从最新的 GP 规范开始;这当然不是教程,但我认为您不会发现任何更有用的东西。该规范需要强大的智能卡基础知识。另请参阅使用 Javacard 开始智能卡编程所需的内容
  1. JCOP is a software platform originally from IBM that implements Javacard API and GlobalPlatform (formerly Open Platform). Now owned and managed by NXP.
  2. JCOP 2.4.1? Probably GP 2.1.1. Do a web search for specific product specifications.
  3. javacard and GP:
    • Javacard is used to write applications - javacard applets - for smartcard platforms, using the Java Programming language and a limited version of the JVM and java libraries.
    • GlobalPlatform is a specification for managing applet-aware smartcards, defining operations for things like:
      • managing card lifecycle,
      • card/host authentication,
      • installing/deleting/instantiating/selecting applets, and
      • managing security policies on the card.
    • Using GlobalPlatform you'll exchange APDUs with the GP card for the aforementioned operations; using javacard you'll write applets that can accept and process APDUs that are specific to your application. GlobalPlatform isn't javacard specific, but javacard is the only relevant technology for smartcard applet development.
  4. For javacard tutorials, start with the javacard site. Look through the documentation section for Getting Started stuff. Download the dev kit and you'll find some html howtos. For GlobalPlatform, you'll need to begin with the latest GP spec; it's certainly not a tutorial, but I don't think you'll find anything more useful. The spec will require strong smartcard fundamentals. Also see Required Things to start Smartcard Programming Using Javacard
窗影残 2024-12-08 09:22:15

当开始使用 JavaCard 时,我使用了这个优秀的教程: http://javacard.vetilles.com/tutorial/ (存档)

I used this excellent tutorial when started with JavaCard: http://javacard.vetilles.com/tutorial/ (archive)

撩发小公举 2024-12-08 09:22:15

这可能有用 - 我花了一段时间来获取在真实硬件上工作的旧教程(例如带有 GP 的物理 Java 卡),包括发送 APDU 等。我已经将一些笔记收集成视频格式,因为编写起来工作量太大放下每一件小事。

视频位于:https://www.youtube.com/watch?v= oj2l0X8D4y0&hd=1 基本上包括快速浏览要安装的内容、构建程序、安装到 Java 卡以及通过 Python 与所述程序对话。这是非常非常基本的,但有时这就是您所需要的......

This might be useful - I spent a while getting older tutorials working on real hardware (e.g. physical Java Cards with GP), including sending APDUs etc. I've collected some of my notes into a video format as it was too much work to write down every little thing.

The video is here: https://www.youtube.com/watch?v=oj2l0X8D4y0&hd=1 and includes basically a quick run-through of what to install, building a program, installing to a Java Card, and talking to said program via Python. It's very very basic but sometimes that's what you need...

私藏温柔 2024-12-08 09:22:15

我发现的两个最好的介绍性教程是:

  1. “第 14 讲 - Javacard” https://edux.pjwstk.edu.pl/mat/268/lec/lect14/lecture14.html

以及 JavaWorld 上的这个,

  1. 如何编写Java Card 小程序:开发人员指南

例如代码,有一个标题为 学习 在此 Github 存储库中,

javacard-curated-list of applet


给出一个想法通常涵盖的第一个主题,提到的第二个链接的标题是:

构建小程序

指定小程序的功能

指定 AID

定义小程序的类结构和方法函数

定义小程序及其终端应用程序之间的接口

APDU 入门

  • 定义 APDU 命令

  • Javacard APDU 类

    小程序通过调用 APDU 对象上的方法来处理 APDU 命令。一般来说,它执行以下步骤:

    第 1 步:检索 APDU 缓冲区

    第2步.接收数据

    第3步.返回数据

    第4步.返回状态字

构建小程序代码

实施错误检查

本文作者:Zhiqun Chen谁还写了 智能卡 Java Card 技术一书

The two best introductory tutorials I have found are:

  1. "Lecture 14 - Javacard" https://edux.pjwstk.edu.pl/mat/268/lec/lect14/lecture14.html

and this one at JavaWorld,

  1. How to write a Java Card applet: A developer's guide

For example code there is a section titled Learning in this Github repo,

javacard-curated-list of applets


To give an idea of the first topics that are typically covered, the headings from the second link mentioned are:

Architecting the applet

Specifying the functions of the applet

Specifying AIDs

Defining the class structure and method functions of the applet

Defining the interface between an applet and its terminal application

An APDU primer

  • Defining APDU commands

  • The Javacard APDU Class

    The applet processes an APDU command by invoking methods on the APDU object. In general it performs these steps:

    Step 1. Retrieve the APDU buffer

    Step 2. Receive data

    Step 3. Return data

    Step 4. Return status word

Constructing the applet code

Implementing error checking

This article is by Zhiqun Chen who also wrote the book Java Card Technology for Smart Cards

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文