fix: secret message format
This commit is contained in:
parent
7e38d899af
commit
dd36b9b30f
1 changed files with 2 additions and 0 deletions
|
|
@ -20,6 +20,8 @@ async function hashToCurve(secretMessage) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function step1Bob(secretMessage) {
|
async function step1Bob(secretMessage) {
|
||||||
|
secretMessage = nobleSecp256k1.utils.bytesToHex(secretMessage)
|
||||||
|
secretMessage = new TextEncoder().encode(secretMessage);
|
||||||
const Y = await hashToCurve(secretMessage)
|
const Y = await hashToCurve(secretMessage)
|
||||||
const randomBlindingFactor = bytesToNumber(
|
const randomBlindingFactor = bytesToNumber(
|
||||||
nobleSecp256k1.utils.randomPrivateKey()
|
nobleSecp256k1.utils.randomPrivateKey()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue