I'm currently developing Javacard and generate the cap file using Ant script(the file name be like demo.cap), and now I want to construct the GP(GlobalPlatform) command to run the LOAD process on a samrt card. But it's encapsulated into cap format. Is there any way I can convert the cap file to its corresponding btye stream so I can truncate it and construct the data field of GP LOAD command, just like the figure link shown below? Load File Structure
How to convert the Javacard cap file to its corresponding byte stream?
259 Views Asked by rockeln At
2
There are 2 best solutions below
1
vlp
On
As @Maarten kindly says -- have a look at GlobalPlatformPro, where LOAD commands are built and its related project CAPFile, where data stream for load is constructed.
Good luck with your project!
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in SMARTCARD
- Authentication with SmartCard sending a SOAPUI request
- How can I read these P1 and P2 parameters in smartcard reference data?
- Sign a pdf document using signature from USB token in python
- Is it possible Java Card supports NIO,like event-driven, reactor
- How to encode or write information into MIFARE DESFIRe ev2 that would act as id card with microtransaction functionality
- Issue with Secure Messaging in Android HCE App - Invalid Class (SW 6E00) during AID Selection
- Secure Channel Protocol 01 and 03 in Win32API DLL
- Change key of Desfire Card application
- STORE DATA APDU for PPSE info
- How to properly parametrize a SECP256K1 curve using the SE051 IoT SDK?
- C# http request mtls external private key
- Can't install .cap file on NXP P71D321
- nfcpy reading public information from contactless credit card with APDU commands
- How To Modify PKCS11 Object Value Attribute
- Yubikey 5: is it similar enough to smart cards for testing authentication?
Related Questions in JAVACARD
- How to return a slice in Java
- Is it possible Java Card supports NIO,like event-driven, reactor
- How do I read EF.PLMNsel?
- Can't install .cap file on NXP P71D321
- How can I upload a SIM applet through OTA
- How to communicate programmatically with the JCOP simulator, how to programmatically send APDUs to a JCOP simulator?
- Problem Loading Signed CAP file directly to Supplementary Security Domain
- an error occurred while building a Java Card project in Eclipse javax/xml/bind/JAXBException
- Bitcoin Transaction signing using Javacard
- Gemalto SmartCard Get status issue
- How to use APDU I/O API in Eclipse
- InitialiseSecureChannel error during profile package installation on an eUICC
- Why euicc manager get NO_SUCH_ELEMENT aka errcode 3?
- Java Card Eclipse Plug-in: APDU I/O API is hanging on powerUp()
- What are the correct steps to have a supplementary security domain with DAP verification?
Related Questions in GLOBALPLATFORM
- Can't install .cap file on NXP P71D321
- Problem Loading Signed CAP file directly to Supplementary Security Domain
- Gemalto SmartCard Get status issue
- InitialiseSecureChannel error during profile package installation on an eUICC
- What are the correct steps to have a supplementary security domain with DAP verification?
- How to Generate Session Keys SCP-03
- android.se.omapi.SEService: My app doesn't connect with the OnConnectedListener
- Why the exception is 0x6982 and not 0x6985?
- What does the SCARD_W_UNRESPONSIVE_CARD error on GlobalPlatform Pro indicate about the state of the card?
- Does GIDS applet support Secure Channel Protocol?
- JavaCard applet works on simulator but not on card
- Restrict client application for a specific trusted application within TEE
- ConfigureISDPRequest error during profile package installation into an ISD-P on an eUICC
- What is the use case of DAP Verification/Mandated DAP Verification in Global Platform card specification?
- why SET STATUS APDU command returns 6985?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There is no such thing as a "hex format" - at least not in the way that you are using the term. A hex or hexadecimal format would be indicating a way to show hex on the screen, such as
a1, orA1, or0xA1(etc.).What you see is the human representation of bytes using hexadecimals. So if you see
E2then this is a byte with valueE2, or1110 0010in binary, or 242 in decimals (assuming that it represents a positive number).I strongly recommend understanding the difference between binary (bit / byte) values and their representation / encoding techniques before diving deeper into Java Card. Lookup a few tutorials and check the tags encoding (binary to text) and character-encoding (text to binary) on Stack Overflow.
All the conversion to/from those particular command and response APDU's will be performed by a GP library or application, such as GlobalPlatformPro (Open Source in Java) or GP Shell (Open Source in C). Those libraries will just pick up the file and create the (usually encrypted) APDU's around them.
I have no affiliation with either project
When sending they may show the transmitted bytes as hexadecimals on your screen - if that kind of logging is enabled. The APDU's themselves are transmitted as binary - as opposed to text.