Comments (2)
Hi @LorenzoAlluminio
I believe you are using codes from /example
to generate the signature. The message in our example is not encrypted. Therefore, you don't need to sha256()
the message. I changed your code as following and it works.
from ecpy.curves import Curve,Point
from ecpy.keys import ECPublicKey, ECPrivateKey
from ecpy.ecdsa import ECDSA
import ecpy
from hashlib import sha256
x = 47143094896967716337843669989860432144962851204356940818421228324575441222601
y = 23336444423741848139737884993242101588835841992098573257496438799812162311375
r = 27879350651684890904379932074025120345051153878425154998302508662105071749243
s = 25794953212301227856184311444869449493787798218601311881180217027281849030507
cv = Curve.get_curve('secp256k1')
pu_key = ECPublicKey(Point(x, y, cv))
sig = ecpy.ecdsa.encode_sig(r, s, 'RAW', 32)
signer = ECDSA(fmt='RAW')
msg = b'hello tss'
print(signer.verify(msg,sig,pu_key))
Normally, the message would be hashed (e.g transaction hash in cryptocurrency). However, we don't want to limit Alice to only serve cryptocurrency field. If you want to use hashed message, you should change the code here (hash the message before passing it to NewService
).
from alice.
Thanks a lot!!
That clarifies everything :)
from alice.
Related Issues (20)
- Question) Instructions to use the BIP32 child index HOT 2
- If I want to support currencies such as neo and ont, ecdsa-p256. Can Alice be satisfied?Issue brief description HOT 1
- If I want to support currencies such as neo and ont, ecdsa-p256. Can Alice be satisfied? HOT 1
- If I want to support currencies such as neo and ont, ecdsa-p256. Can Alice be satisfied? HOT 4
- signature verification in evm(solidity) HOT 2
- How to sign and verify MPC signatures in a decentralized way?
- Have you studied the threshold signature of currency neo and can it be applied to this alice? HOT 3
- Error: "different hash" in DKG HOT 1
- [CVE-2023-33241] Bitforge Vulnerability HOT 4
- Is GG-18 vulnerability discovered by Fireblock can be applied to Alice? HOT 1
- Can Alice slightly modify and support non-standard ED25519? HOT 6
- Does tss support schnorr signatures? HOT 4
- Should one use v1.0.2 or master? v1.0.2 cannot use refreshed shares HOT 1
- CGGMP21 6 round presignature generation support HOT 3
- Add a new node in example HOT 1
- Error: "Failed to build round2 data " in Reshare HOT 1
- Feature Request for BIP 44 HOT 1
- CGGMP ECDSA DKG Hanging after Decommit
- Surface errors from `messageLoop` HOT 1
- Request for Information on MPCHMAC Circuit Generation
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 alice.