GithubHelp home page GithubHelp logo

nervosnetwork / ckb-auth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cryptape/ckb-auth

9.0 9.0 12.0 709 KB

A consolidated library featuring numerous blockchains authentication techniques on CKB-VM

License: MIT License

Shell 0.35% C 41.49% Rust 54.35% Makefile 3.52% JavaScript 0.29%

ckb-auth's People

Contributors

contrun avatar joii2020 avatar omahs avatar quake avatar xujiandong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ckb-auth's Issues

Support for Webauthn + Secp256r1

Thank you for your hard work. I have successfully tested the secp256r1 in the auth_libecc library. However, there is a major issue with this library as it only allows messages of 32 bytes.

As per the Webauthn specification, specifically section 6.3.3, the data to be signed must have a minimum length of 69 bytes. Although the ECC signature (DSS) requires the data to be hashed with SHA256, libecc automatically handles this hashing process. If I pass an SHA256 hash to auth_libecc, it will perform two passes of SHA256 hashing, resulting in a verification failure.

6.3.3. The authenticatorGetAssertion Operation

The message length is a part of the ckb-auth interface. The simplest workaround I can think of is to allow users to skip the SHA256 hash in libecc and pass the SHA256 hash directly.

Test Vector

message: 2b8b05e1f0303efb898fe4d6de601198c7a7b864abbe6a21c73b2e787e187c520500000000384894418ce002769e96ff7d6703fce9b5ba98b56aab181349eed402146a3e81
sha256(message): c64b87698d4442f7692ad82aaddcb4b7c345770ada374a09752489c28b118f24
signature: bedea43a55185f12b458ec3ec590986e8c798fe2636424b12855d21e94b187a874eb3704471863d915b6e2cae932ad60ddd2bd1302ebbd116fa1b3396461808d
pubkey: 3538dfd53ad93d2e0a6e7f470295dcd71057d825e1f87229e5afe2a906aa7cfc099fdfa04442dac33548b6988af8af58d2052529088f7b73ef00800f7fbcddb3

The message is a 69-byte binary that needs to be signed. It consists of 37 bytes of authenticator data and a 32-byte client data hash.

Context

I'm trying to make ckb-auth work with the signature created by JoyID, more background can be found in my post: How to Verify JoyID WebAuthn Signature

[Question] Deployment status of CKB-Auth

Hello Cryptape, iCKB here ๐Ÿ‘‹

I'm exploring the possibility on developing on top of CKB-Auth, so I'm wondering:

  • What's CKB-Auth deployment status on testnet and mainnet?
  • If any, please could you document the deployed cells?

I'm asking here since GitHub issues are SEO friendly and very likely in the future there will be other L1 developers wondering the same ๐Ÿ˜‰

Keep up the Great Work,
Phroi

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.