cryptonomic / conseiljs-softsigner Goto Github PK
View Code? Open in Web Editor NEWCryptography services plugin for ConseilJS
License: Apache License 2.0
Cryptography services plugin for ConseilJS
License: Apache License 2.0
Currently, the signText
and checkTextSignature
functions don't hash the message before signing/verifying.
When verifying a signature in a smart contract, it will also hash the message before checking. This is mentioned in the michelson docs, but I haven't verified it in a smart contract myself. This is also in line with most other libraries that do sign/verify (eg. pytezos, haskell tezos package).
In our library we hash it like this:
const hash: Buffer = sodium.crypto_generichash(32, sodium.from_string(message))
const rawSignature: Uint8Array = sodium.crypto_sign_detached(hash, privateKey)
The repo has inconsistent parameter names between secretKey & privateKey.
In src/utils/WrapperWrapper.js, change the publickey() function to use crypto_sign_ed25519_sk_to_pk() instead of crypto_sign_ed25519_sk_to_seed() and then crypto_sign_seed_keypair().
Offer an option to initialize SoftSigner
with an encrypted secret key.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.