smartcard | PCSC smartcard reader library for nodejs | Runtime Evironment library
kandi X-RAY | smartcard Summary
kandi X-RAY | smartcard Summary
PCSC smartcard reader library for nodejs
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of smartcard
smartcard Key Features
smartcard Examples and Code Snippets
Community Discussions
Trending Discussions on smartcard
QUESTION
I want to use the GlobalPlatform.dll from kaoh Karsten Ohme in Delphi. So i tried to translate the headers so i can use the GlobalPlatform.dll in Delphi.
The first i translated was Connection.h, i uploaded it on pastebin here.
The second i translated was Security.h i uploaded it on pastebin here.
First i establish a context with the OPGP_establish_context
function, that seems to go alright because the result is a OPGP_ERROR_STATUS_SUCCESS
and the message also states "success".
But then i try to list the readers with the OPGP_list_readers
function, which also returns a success - but when i try to read the returned names i get various access violations (mostly at adress 00000000 and trying to read 00000000
, but there are variations between my tries).
My code is assigned to a button click:
...ANSWER
Answered 2022-Apr-07 at 22:32In the 1st record you translated, OPGP_ERROR_STATUS
, the errorMessage
field is declared in the C code as:
QUESTION
I am currently trying to hack my way into Smart Cards but I am now stuck at reading anything useful from the Card. I am trying to send a SELECT FILE Command (0x6F, 0xB, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0xa4, 0x04, 0x0c, 0x06, 0xd2, 0x76, 0x00, 0x00, 0x01, 0x02
) to my Card (after PC_to_RDR_IccPowerOn, which returns the correct ATR) with the PC_to_RDR_XfrBlock Command.
But my response has the bmICCStatus
Flag set to 0x40
which indicates the "ICC is present and inactive (not activated or shut down by hardware error)" but I am not quite sure what to do with that information. How am I supposed to activate the Card? I thought powering it was all there was to it.
It is very much possible that I am just blind and it is written in the Specification but I was not able to find it and my Google Searches lead me to exactly 1 SO Question, which didn't really corrolate with my problem.
I am using libusb 1.0 and C, but I don't think that this is relevant to the question.
Edit:
I've added an code example, but you have to select your device for yourself, if you want to run it.
...ANSWER
Answered 2022-Apr-02 at 15:13According to the ATR your card is T=1 only https://smartcard-atr.apdu.fr/parse?ATR=3BD396FF81B1FE451F078081052D
I don't know the reader you use. If the reader works in TPDU and not APDU it is more complex than just sending the APDU. You have to implement T=1 in your code.
I guess the missing CCID command is PC_to_RDR_SetParameters to configure the reader with the correct parameters.
I would really suggest to use already existing software. Like my CCID driver https://ccid.apdu.fr/ for Unix.
QUESTION
I am trying to establish a secure channel SCP02
with a smart card using python. My smartcard is connected to the terminal using a serial port and I use pySerial
to send APDUs.
I send commands SELECT ISD
, INITIALIZE UPDATE
correctly, and next I try to do EXTERNAL AUTHENTICATE
as the python code below:
ANSWER
Answered 2022-Jan-10 at 10:45You can use the working Test Vectors from the GlobalPlatform library and test if your executed crypto logic is really working. It could also be that your card is using some key derivation scheme, i.e. the keys you are using cannot be used directly.
QUESTION
I need to load a simple applet to my USIM card. Authentication is OK. I'm using OTA SMS-DELIVER via SmartCard to install CAP file.
Using these:
I couldnt find the right spec explaining "C482XXYY" in Header.cap, how it should be calculated,
this answer below helped me navigate, but for Method.cap loading - it still fails https://community.oracle.com/tech/developers/discussion/1753814/globalpaltform-load-command-data-field
I've written this loader: https://pastebin.com/pSXeDYyS
Every component in CAP file is in separate APDU with LOAD instruction. First 5 is loaded successfully with DATA=00, SW=9000, however on Method it fails. As you can see from my script, I've fixed Descriptor size to 0000 in Directory field. And in Header C482xxyy, where xxyy is calculated properly, which is a sum of all size fields in Directory, e.g.
...ANSWER
Answered 2022-Feb-07 at 01:35You can have a look into the GlobalPlatform project loader. It is LPGL, so directly using it as C code in other non LGPL projects is not possible.
[!!!!] LOAD - Method (FAILED)
80e800057007006d000911188c00048d00012c18197b0002037b00029210240303038b000388007a02318f00053d8c00062e1b8b00077a0120188b000860037a7a02228d00092d1d10076b101a8b000a321fae006b06188c000b7a06118d000c2c1903077b000d037b000d928b000e198b000f3b7a00c0000000
<< 9000 (should be 009000)
I assume that the log is the unwrapped logged before the commands are prepared for SCP80. A response of 9000 in OTA means usually "I received the command, but I don't know what to do with it". Is this 9000 command from the ENVELOPE response on the card? Are you sending the data over an SMPP connection?
Can you try your loading code with a simple HelloWorld Applet without any STK? It could be that your card is not supporting a version you are linking against, e.g. different ETSI releases. Then some method might not be supported and the loading fails.
QUESTION
I started a script that run on a linux satellite receiver and run the 'dvbsnoop' tool. I need help to finish the script because i do not know hot to handle the results from the 'dvbsnoop' tool.
...ANSWER
Answered 2022-Jan-08 at 18:12This might be what you want:
QUESTION
I am relatively new to Javacard and I am in the process of developing my own Javacard Applet which works quite well until now. I am also writing a host program to communicate with my card (via APDUs), this program is written in Java and uses the javax.smartcardio library as well as apdu4j.
My goal now is to use my reader's integrated Pinpad to ask the user for a PIN and then forward the entered PIN to the Smartcard which will verify the PIN. I already wrote the code on the card which will verify the PIN (CLA: 0x80, INS: 0x04, P1: 0x00, P2: 0x00, pin data), but I have no idea how to tell the Reader to probe for a PIN and then forward this information to the Card.
My Card is a J3H145 by NXP (Javacard 3.0.4 / ISO7816 / ISO14443) and my Reader is a ReinerSCT cyberJack RFID standard.
Thank you in advance.
...ANSWER
Answered 2021-Nov-12 at 10:47If anyone is wondering, I found out how to do it.
QUESTION
I got a com-interface in c# which looks like this:
...ANSWER
Answered 2021-Nov-09 at 16:49In C# some limited preprocessor support exists as well. Instead of #ifdef
you have to use #if
though.
So that would be
QUESTION
I'm trying to add 00 for each byte array element that is missing, to explain it better, if lenght
of an array is 20 and the string fills only 9 spaces (reversed), I need the rest 11 spaces to be 00
. An example will explain it better.
This is my code so far:
...ANSWER
Answered 2021-Oct-06 at 20:03The actual tax payer Id seems to be 9 characters: '021131682'. For a total length of 20 bytes you need 11 null bytes first in the ArrTaxPayerId
array. So, with BufferSize=20
, StrTaxPayerId='021131682'
you can set the initial length of ArrTaxPayerId
:
QUESTION
I am developing Web Application for Certifying Authority as a part of which, I need to
- Generate asymmetric key pair - Private Key and Public Key in user's smartcard through browser,
- create Certificate Signing Request (CSR) and send CSR to Certifying Authority server where user's certificate gets generated.
- Then CA Server will send user's certificate to browser which needs to be downloaded to user's SmartCard or USB Token through browser.
How to achieve the same using JavaScript that works in Modern Browsers? Using ActiveX and JavaApplets are not the options.
...ANSWER
Answered 2021-Aug-19 at 07:55Disclosure: I work for CISPL, Co. which develops Signer.Digital Browser Extension
Browser Extension may be used to Enroll Certificate (Generate CSR) and Download Certificate in Windows Certificate Store or Smartcard or USB Token from modern browsers. Browser extension provides JavaScript API which in turn talks to host application running on local machine to do the required operations in smartcard and returns response to JavaScript (or says users web page).
CSR generated using Browser Javascript API genCSR may be posted to CA Server for certificate generation or to your server if you want self signed certificate. Certificate and Trust Certificate chain received back from the server may be passed to ImportCer to import in the certificate store, smartcard or usb token.
API Available for Certifying Authorities in Signer.Digital Browser Extension are:
- Detect connected smartcard: (Autodetect connected Smartcard or USB Token)
SignerDigital.getPCSCReaders(onlyConnected = true)
//List PCSC Readers, set paramater to false if you want to list all available readers
Example:
QUESTION
I have a need to run a PowerShell script as another user (the users will actually be doing the auth) based on detected environment. The script leverages a smartcard for login. The problem I have is when the PowerShell.exe instance launches from the runas, it simply prints my command and doesn't actually run it.
Note: The filepaths have spaces that get escaped with double-`, just not shown here hence the escaped ``' in the actual command. Have also used ```".
Example:
...ANSWER
Answered 2021-Aug-07 at 11:08There's generally no reason to use Start-Process
to run a console application such as runas.exe
- unless you explicitly want the application to run in a new window, asynchronously (by default) - see this answer for more information.
Eliminating Start-Process
simplifies the quoting:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install smartcard
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page