Comments (4)
Also tried after nuke and reflashing:
$ apt-get install -y pyscard pycvc
$ ./pico-hsm-tool.py initialize --pin 648219 --so-pin 3537363231383830
Pico HSM Tool v1.2
Author: Pol Henarejos
Report bugs to https://github.com/polhenarejos/pico-hsm/issues
********************************
* PLEASE READ IT CAREFULLY *
********************************
This tool will erase and reset your device. It will delete all private and secret keys.
Are you sure?
[Press enter to confirm]
Public Point: 04be520925425af40c83275c8365205c74111df1ea24776809e2b61bd8174310ba9797bd380a89465f22c711b07884da3d2da8028e8afd1ba42f1186047e250e3e
Traceback (most recent call last):
File "/home/me/git/pico-hsm/tools/./pico-hsm-tool.py", line 301, in <module>
run()
File "/home/me/git/pico-hsm/tools/./pico-hsm-tool.py", line 298, in run
main(args)
File "/home/me/git/pico-hsm/tools/./pico-hsm-tool.py", line 286, in main
initialize(card, args)
File "/home/me/git/pico-hsm/tools/./pico-hsm-tool.py", line 169, in initialize
j = get_pki_data('cvc', data=data)
File "/home/me/git/pico-hsm/tools/./pico-hsm-tool.py", line 105, in get_pki_data
response = urllib.request.urlopen(req)
File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
With help of pdb
the following url was not found:
(Pdb) p req.full_url
'https://www.henarejos.me/pico-hsm/cvc/'
wget https://www.henarejos.me/pico-hsm/cvc/
--2022-10-08 23:39:41-- https://www.henarejos.me/pico-hsm/cvc/
Resolving www.henarejos.me... 172.67.197.212, 104.21.68.187, 2606:4700:3031::ac43:c5d4, ...
Connecting to www.henarejos.me|172.67.197.212|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-10-08 23:39:42 ERROR 404: Not Found.
from pico-hsm.
These days I made some changes in the backend, which should be finished now, as they work in the v3.0.
However, I can confirm the PIN bug, which returns a CKR_DATA_INVALID (0x20)
error.
Other errors, such generating keypair can be caused by bad initialization due to a missing device certificate, since it was not upload (the URL was down). Could you try with the v3.0?
from pico-hsm.
Retried with your build of v3.0. No need for personal build anymore as it works out of the box on Waveshare RP2040 Zero. Just patched the VID:PID and initialized with the python based pico-hsm-tool. Init and RSA key generation worked. Awesome!
Issue is solved!
I would suggest to give some hints of how to properly setup dependencies for Python. Had to mix debian packages swig, python3-pyscard, install python3-pip and pip install pycvc to get it working.
(typed on mobile)
from pico-hsm.
Also PIN change worked. However at least my device needs to be frequently plugged in again. Maybe due to USB power saving on battery.
from pico-hsm.
Related Issues (20)
- AES Encrypt / Decrypt HOT 13
- Usage on MacOS and Windows with Microsoft CCID driver HOT 8
- ERROR - common.h missing HOT 1
- ECDH derived key is missing one byte compared with openssl-pkeyutl HOT 3
- EC Key Creation HOT 4
- urllib.error.HTTPError: HTTP Error 500: Internal Server Error in "pico-hsm-tool.py" initialize command HOT 5
- mistake in pico-hsm-tool.py HOT 3
- Strange behaviours betwwen Windows 10 & 11 HOT 4
- How to list pkcs11 url of the private key? HOT 1
- security consideration info HOT 4
- Support for YD-RP2040 by VCC-GND Studio ? HOT 2
- USB IDs HOT 1
- waveshare zero build fails. HOT 11
- pico-hsm-tool urllib.error.HTTPError: HTTP Error 500: Internal Server Error HOT 2
- HTTP server error on initialization HOT 1
- pkcs11-tool --write-object may corrupt flash HOT 6
- Press-to-confirm button HOT 2
- Unable to restore PicoHSM Private key (Issue importing DKEK?) HOT 10
- how to avoid the pico-hsm firmware be dumped from its flash and run on other pico boards HOT 12
- USB not recognized HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pico-hsm.