Giter Site home page Giter Site logo

canokey-web-console's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

canokey-web-console's Issues

Detect browser

Supported browsers:

Recent Chrome/Chromium, Edge, and Opera

Users that try to use other browsers should be prompted to switch their browsers.

Device error: unexpected RESP code 255

WebConsole Webauthn and OpenPGP Card

Could not load canokey in web console.
Screenshot_20231210_124356
Screenshot_20231210_124441
webauthn and openpgp card works
Screenshot_20231210_124601

$ gpg --card-status 
Reader ...........: Canokeys Canokey [OpenPGP PIV OATH] (123456) 00 00
Application ID ...: D276000124010304F1D0657539600000
Application type .: OpenPGP
Version ..........: 3.4
Manufacturer .....: unknown
Serial number ....: 65753960
Name of cardholder: [未设定]
Language prefs ...: [未设定]
Salutation .......: 
URL of public key : [未设定]
Login data .......: [未设定]
Signature PIN ....: 强制Key attributes ...: rsa2048 rsa2048 rsa2048
Max. PIN lengths .: 64 64 64
PIN retry counter : 3 0 3
Signature counter : 0
Signature key ....: [none]
Encryption key....: [none]
Authentication key: [none]
General key info..: [none]

Info

System Info

Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-13-amd64 (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i5-10400F CPU @ 2.90GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1650/PCIe/SSE2
Manufacturer: ASUS

Environment Info

$ cmake --version
cmake version 3.25.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (15:12.2.rel1-1) 12.2.1 20221205
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ pcscd --version
pcsc-lite version 1.9.9.
Copyright (C) 1999-2002 by David Corcoran <[email protected]>.
Copyright (C) 2001-2022 by Ludovic Rousseau <[email protected]>.
Copyright (C) 2003-2004 by Damien Sauveron <[email protected]>.
Report bugs to <[email protected]>.
Enabled features: Linux x86_64-pc-linux-gnu libsystemd serial usb libudev usbdropdir=/usr/lib/pcsc/drivers ipcdir=/run/pcscd filter configdir=/etc/reader.conf.d
MAX_READERNAME: 128, PCSCLITE_MAX_READERS_CONTEXTS: 16

pcsc_scan Info

0: Canokeys Canokey [OpenPGP PIV OATH] (123456) 00 00
 
Sun Dec 10 12:46:23 2023
 Reader 0: Canokeys Canokey [OpenPGP PIV OATH] (123456) 00 00
  Event number: 4
  Card state: Card inserted, 
  ATR: 3B F7 11 00 00 81 31 FE 65 43 61 6E 6F 6B 65 79 99

ATR: 3B F7 11 00 00 81 31 FE 65 43 61 6E 6F 6B 65 79 99
+ TS = 3B --> Direct Convention
+ T0 = F7, Y(1): 1111, K: 7 (historical bytes)
  TA(1) = 11 --> Fi=372, Di=1, 372 cycles/ETU
    10752 bits/s at 4 MHz, fMax for Fi = 5 MHz => 13440 bits/s
  TB(1) = 00 --> VPP is not electrically connected
  TC(1) = 00 --> Extra guard time: 0
  TD(1) = 81 --> Y(i+1) = 1000, Protocol T = 1 
-----
  TD(2) = 31 --> Y(i+1) = 0011, Protocol T = 1 
-----
  TA(3) = FE --> IFSC: 254
  TB(3) = 65 --> Block Waiting Integer: 6 - Character Waiting Integer: 5
+ Historical bytes: 43 61 6E 6F 6B 65 79
  Category indicator byte: 43 (proprietary format)
+ TCK = 99 (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B F7 11 00 00 81 31 FE 65 43 61 6E 6F 6B 65 79 99
        Canokey (Other)
        http://canokeys.org/

Hardware Info

  • Self-made nrf52840 board
  • LED (LED1)
  • LED rgb (LED2_R, LED2_G, LED2_B)
  • reset button
  • sw1 button
  • usb port
  • swd debug port supported

Like Nordic nrf52840 dongle but have some different.

How to build and flash

Bootloader Adafruit_nRF52_Bootloader Release 0.8.0 use dap link to flash bootloader
Same build and flash method with README.MD

Try to solve

  • Replug the key
  • Reflash the firmware
  • Reflash the bootloader
  • Erase all data and flash
  • Change OS to Windows
    All the listed methods do not work.

The length of openpgp admin pin is unclear

The default openpgp admin pin is 8 bytes, and when i want to change the admin pin, it seems to need 24 bytes.
But actually it requires 48 bytes or the button won't click.

Display hardware variant name

Send 0031010000 to the admin applet to retrieve the name as text. The response would be like 43616E6F6B6579204E4643205553422D41207265762E339000.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.