superdarkbit / nano-bip32-ed25519 Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://superdarkbit.github.io/nano-bip32-ed25519/
License: MIT License
Home Page: https://superdarkbit.github.io/nano-bip32-ed25519/
License: MIT License
Using the python implementation I try to sign a message from a derived key but when verifying it returns false.
Using the following code;
from bip32_ed25519 import *
# get HD node using secret
secret = str.encode("8f434346648f6b96df89dda901c5176b")
node = derive_chain(secret, "44'/165'" )
# generate private key
chKeys, chA, chC = private_child_key(node, 0)
print("chKeys=", chKeys[0].hex(), " ", chKeys[1].hex() )
print("chA=", chA.hex() )
print("chC=", chC.hex() )
# sign
msg = str.encode("hello")
sig = special_signing(chKeys[0], chKeys[1], chA, msg )
print("sig=", sig.hex() )
# verify
res = verify(chA, msg, sig)
print("res=", res)
This outputs the following;
chKeys= 385cc8536edbb90d4e70368ecff4f280187658fa6a07a4334827a95f9543264d fe2d23dd11b1bda3541707262787567f1c0edda1a2d545043530d9ebd974cf00
chA= 37962ee48657afac972e3ebd71c0d4e41206d0c6dd6cbf92aef73d866b118a85
chC= 4d38e9608c63fd4db543619050ff67a883d08d54cc3938741a744c23b85d8305
sig= 4cd4d179f7fbcdc8e62755f15f665ac4eca74f2db55967b74fbb60880ae55c6fe9e1eeae1a0d0dba5b741da05052472055e252f7bacb17467810da340cdb100f
res= False
The expected output would be res= True
at the end.
Would you clarify if this implementation is working?
Hi, There is a condition "If Ai is the identity point (0, 1), discard the child." and your code implements the condition here.
https://github.com/superdarkbit/nano-bip32-ed25519/blob/master/src/js/bip32_ed25519.js#L215-L219
But I think It checks (1, 0) not (0, 1)
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.