-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to create pin file on cryptoflex virtual smart card #158
Comments
The cryptoflex implementation is very specific to an outdated smart card application and likely not very useful for you. What are you trying to do? |
Good Afternoon Mr. frank |
I want some tutorial on how to create EFs or DFs on iso7816 smart card the command the CLA byte, INS byte, P1, P2 , LC, LE and the data field. What are the required parameters in data field required for virtual smart card? I have tried alot of tutorials and all of them give the status SW1 SW2: 6A 80. So could you please provide me a tutorial with the commands and their explanation in order to proceed further. |
My question was about why you want to emulate a smart card. For example, there are some Java Card Applets, that can be emulated as well, which support most standard use cases (authentication, encryption, signature) without the need of programming anything... For example, the IsoApplet tries to be close to ISO 7816-4... |
I also tried opensc smart card simulation which uses vpcd as virtual interface and compile jcardsim jcardsim_SNAPSHOT_3.0.4.jar using java applet like openpgp but also it gives me an error javac file not found and I am not a Java developer I am a C, C++ developer so It is very difficult for me to solve this task using Java. Please help me in any one of those two technologies either Vicc or jcardsim |
use java instead of javac |
Good afternoon Mr. Frank I have installed Win7 and installed BixVReader and used jcardsim and opensc smart card simulation. It worked successfully and perfectly. |
Please Mr. Frank could you help me with a tutorial on how to create , delete files and tags on isoapplet or iso7816 card. |
1 similar comment
Please Mr. Frank could you help me with a tutorial on how to create , delete files and tags on isoapplet or iso7816 card. |
please read the documentation https://github.com/philipWendland/IsoApplet/wiki |
I have opened a terminal on ubuntu 16.04 and running the following commands
omarazooz@ubuntu:
/Desktop$ sudo service pcscd start/Desktop$ vicc -t cryptoflex -vvvvvv[sudo] password for omarazooz:
omarazooz@ubuntu:
10.11.2019 04:23:39 [INFO] Connected to virtual PCD at localhost:35963
10.11.2019 04:23:39 [INFO] Power Up
10.11.2019 04:23:39 [INFO] Power Down
10.11.2019 04:25:07 [INFO] Power Up
Then I have opened another terminal and used cryptoflex-tool supported by opensc to create pin for the created virtual card
omarazooz@ubuntu:~/Desktop$ cryptoflex-tool -P 1
Using reader with a card: Virtual PCD 00 00
Using card driver: Schlumberger Multiflex/Cryptoflex
The other terminal where vicc is open gives10.11.2019 04:25:08 [INFO] Response APDU (2 bytes):
0000: 61 12 ..
10.11.2019 04:25:08 [DEBUG] file (fid=0) not found in:
{CryptoflexMF at 0x7f1fd09b8350}:
_named_dfs
_filedescriptor 0x38
_secondSFT length 1:
0000: 01 .
extra_fci_data length 0:
_fid 0x3f00
_content
{TransparentStructureEF at 0x7f1fd09b8290}:
_filedescriptor 0x1
extra_fci_data length 0:
_lifecycle 0x5
_data length 0:
_firstSFT length 1:
0000: FF .
10.11.2019 04:25:08 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
10.11.2019 04:25:08 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..
When I enter the pin on the cryptoflex-tool
omarazooz@ubuntu:~/Desktop$ cryptoflex-tool -P 1
Using reader with a card: Virtual PCD 00 00
Using card driver: Schlumberger Multiflex/Cryptoflex
Please enter CHV1: 1234
Please enter PUK for CHV1: 12345
It produces the following
Unable to select created PIN file: Unknown data received from card
while on other terminal on which vicc is running gives
10.11.2019 04:25:08 [INFO] Response APDU (2 bytes):
0000: 61 12 ..
10.11.2019 04:25:08 [DEBUG] file (fid=0) not found in:
{CryptoflexMF at 0x7f1fd09b8350}:
_named_dfs
_filedescriptor 0x38
_secondSFT length 1:
0000: 01 .
extra_fci_data length 0:
_fid 0x3f00
_content
{TransparentStructureEF at 0x7f1fd09b8290}:
_filedescriptor 0x1
extra_fci_data length 0:
_lifecycle 0x5
_data length 0:
_firstSFT length 1:
0000: FF .
10.11.2019 04:25:08 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
10.11.2019 04:25:08 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..
10.11.2019 04:29:07 [INFO] Created {TransparentStructureEF at 0x7f1fd09b8610}:
_filedescriptor 0x1
extra_fci_data length 0:
_fid 0x0
_lifecycle 0x5
_data length 23:
0000: 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 ................
0010: 30 30 30 30 30 30 30 .......
_datacoding 0x0
10.11.2019 04:29:07 [INFO] Response APDU (2 bytes):
0000: 90 00 ..
10.11.2019 04:29:07 [INFO] Response APDU (2 bytes):
0000: 61 14 ..
Traceback (most recent call last):
File "/usr/local/bin/vicc", line 161, in
vicc.run()
File "/usr/local/lib/python2.7/dist-packages/virtualsmartcard/VirtualSmartcard.py", line 579, in run
answer = self.os.execute(msg)
File "/usr/local/lib/python2.7/dist-packages/virtualsmartcard/cards/cryptoflex.py", line 53, in execute
c.data)
File "/usr/local/lib/python2.7/dist-packages/virtualsmartcard/cards/cryptoflex.py", line 261, in selectFile
size = inttostring(min(0xffff, len(file.getenc('data'))), 2)
AttributeError: 'TransparentStructureEF' object has no attribute 'getenc'
The text was updated successfully, but these errors were encountered: