javacard

About Get Response command in javacard

两盒软妹~` 提交于 2019-12-11 02:37:20
问题 I'm confused about Get Response command. I thought I know it but actually I don't. I wanna know the mechanism in which the card returns 1000-bytes data in case 4. I guess the command is as follows. Please let me know the correct one if it is wrong. (Card) <== [CLA] [INS] [P1] [P2] [Lc] [Data] [Le] // response data size is 1000 bytes (Card) ==> 6100 (Card) <== 00 C0 00 00 00 (Card) ==> [Data(256)] 6100 (Card) <== 00 C0 00 00 00 (Card) ==> [Data(256)] 6100 (Card) <== 00 C0 00 00 00 (Card) ==>

what is secure box in smart card and what is role?

若如初见. 提交于 2019-12-11 02:34:55
问题 What is secure box in smart card? And any smart card have secure box? What is secure box access control policy? And how do I check the TOE shall explicitly deny access of subjects to objects based on the following additional rules: For S.SBNative Code it shall not be possible to perform OP.SB_ACCESS to O.NON_SB_CONTENT OP.SB_ACCESS : Any read, write or execution access to a memory area S.SBNative : Is the native code library residing in the Secure Box O.NON_SB_CONTENT : Any code and data

Generate random number bounded between two numbers in Java Card

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 02:17:30
问题 How to generate random number bounded between two number in Java Card? For example number should be generated between 0 and 50. 回答1: Note that I have only tested the distribution of the random numbers using SecureRandom within Java SE. I'm reasonably sure that this code is correct though. The code uses the "simple reject" method defined by NIST. So without further ado, the code. package nl.owlstead.jcsecurerandom; import javacard.framework.JCSystem; import javacard.framework.Util; import

How to add JavaCard packages to JavaCard applet?

大城市里の小女人 提交于 2019-12-11 00:47:41
问题 I am trying to build a simple Hello world JavaCard applet.I am using NetBeans IDE. I am following this tutorial. Here is my code: package classicapplet1; import javacard.framework.*; import java.rmi.Remote; import javacard.framework.service.Dispatcher; import javacard.framework.service.RMIService; import javacard.framework.service.Service; public class JavaCardApplet extends Applet { HelloWorld hello; Dispatcher disp; Service svc; public static void install(byte[] bArray, short bOffset, byte

Can a JavaCard emulate a MIFARE Ultralight or NTAG NFC tag?

我与影子孤独终老i 提交于 2019-12-10 19:28:24
问题 I would like to write a Java Card applet that responds to an NFC reader as if it was a regular MIFARE Ultralight or NTAG NFC tag. I am aware the MIFARE protocol is proprietary and may be a little more difficult but surely I should be able to achieve emulation of the NTAG protocol. If I match the NTAG specification and respond to the correct APDUs then I can surely emulate an NTAG? Update to original question I think I asked my original question incorrectly. I'm not looking to emulate a

ECDSA Signature in Javacard

只谈情不闲聊 提交于 2019-12-10 17:53:11
问题 I'm implementing the signing code using ECDSA in Javacard. My code outputs 0x0003(NO_SUCH_ALGORITHM) in exception part which means this card does not support the algorithm. I don't understand that because my vendor told me that it supports ECC. I concluded I don't know how to sign with ECDSA and I want to know that. Here is my full source code package MyECDSA; import javacard.framework.*; import javacard.security.*; import javacardx.crypto.*; public class MyECDSA extends Applet{ private byte[

Restricted elliptic curves in Java Card

给你一囗甜甜゛ 提交于 2019-12-10 13:58:45
问题 I am trying to implement cryptographic algorithms on elliptic curve in Java Card. First, I implemented it on 256bits elliptic curve (the NIST one) and it worked well. Now I want to test it on a 512bits curve (and not 521 like the NIST one). My card support this size and I found a database of elliptic curves (well defined for cryptography) of this size. But I am encountering a strange problem... When I try to initialize my key: ECPublicKey pubKey = (ECPublicKey) KeyBuilder.buildKey( KeyBuilder

Java Card applets, secure data transmission and Secure Channel

馋奶兔 提交于 2019-12-10 08:11:44
问题 I want to write my applet in a way that its APDU commands and status words wasn't be clear in the transmission channel between my card and my reader. I mean I don't want to send APDU commands and responses to be plain text for third parties. I think I have two option : After selecting my applet on the card, for all the other commands, do an encryption function on the data section of APDU commands and decrypt them on the card and after that analyze them. Note that I can't encrypt whole the

Javacard beginner - questions

你说的曾经没有我的故事 提交于 2019-12-10 00:12:31
问题 first of all i want to let you know that i am new regarding javacards. I am in the research phase of writing a javacard applet and i have some questions which suprisingly are not so easy to answer through google-search. I want to create an android application which triggers a javacard application via NFC. So far i established a connection to the card with IsoDep. Lets say i have a cap-file. How do I put/install it on an actual javacard? (Do i need a card reader/writer with PC/SC? Which ones

Some questions about SELECT APDU command in Javacards

痴心易碎 提交于 2019-12-09 20:49:21
问题 The quoted below passage is a part of an article that named How to write a Java Card applet: A developer's guide and written by Zhiqun Chen. I saw it here Once an applet is selected, the JCRE forwards all subsequent APDU commands (including the SELECT command) to the applet's process() method. In the process() method, the applet interprets each APDU command and performs the task specified by the command. For each command APDU, the applet responds to the CAD by sending back a response APDU,

工具导航Map