You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in public test net when TransactionBuilder finalize in Signature.js,when nonce = 1,it will occur Error
nonce = 0;
e = _bigi2.default.fromBuffer(buf_sha256);
while (true) {
ecsignature = (0, _ecdsa.sign)(secp256k1, buf_sha256, private_key.d, nonce++); //here
der = ecsignature.toDER();
lenR = der[3];
lenS = der[5 + lenR];
if (lenR === 32 && lenS === 32) {
i = (0, _ecdsa.calcPubKeyRecoveryParam)(secp256k1, e, ecsignature, private_key.toPublicKey().Q);
i += 4; // compressed
i += 27; // compact // 24 or 27 :( forcing odd-y 2nd key candidate)
break;
}
if (nonce % 10 === 0 && process.env.ENVIRONMENT === 'DEV') {
console.log("WARN: " + nonce + " attempts to find canonical signature");
}
}
in ecdsa.js will always occur error
function deterministicGenerateK(curve, hash, d, checkSig, nonce) {
(0, _enforce_types2.default)('Buffer', hash);
(0, _enforce_types2.default)(_bigi2.default, d);
if (nonce) {
hash = (0, _hash.sha256)(Buffer.concat([hash, Buffer.from(nonce)])); **//here**
}
// sanity check
_assert2.default.equal(hash.length, 32, 'Hash must be 256 bit');
var x = d.toBuffer(32);
var k = Buffer.alloc(32);
var v = Buffer.alloc(32);
The text was updated successfully, but these errors were encountered:
some account will occur,some account not, ex: public-account-1 will
but i create an account:
name: in-oawwoaww6
private key: 5KQ4GsMP4N6NwtaHqBYvmAq5PwUQPsJB299xk5e6n5j36v6kreo
public key: DCT7UDjcPUGToUNUmUFG4svw3KxSHvDUeYMrbZUF5HcqwyVvBSk3J
will not occur
in public test net when TransactionBuilder finalize in Signature.js,when nonce = 1,it will occur Error
nonce = 0;
e = _bigi2.default.fromBuffer(buf_sha256);
while (true) {
ecsignature = (0, _ecdsa.sign)(secp256k1, buf_sha256, private_key.d, nonce++); //here
der = ecsignature.toDER();
lenR = der[3];
lenS = der[5 + lenR];
if (lenR === 32 && lenS === 32) {
i = (0, _ecdsa.calcPubKeyRecoveryParam)(secp256k1, e, ecsignature, private_key.toPublicKey().Q);
i += 4; // compressed
i += 27; // compact // 24 or 27 :( forcing odd-y 2nd key candidate)
break;
}
if (nonce % 10 === 0 && process.env.ENVIRONMENT === 'DEV') {
console.log("WARN: " + nonce + " attempts to find canonical signature");
}
}
in ecdsa.js will always occur error
function deterministicGenerateK(curve, hash, d, checkSig, nonce) {
The text was updated successfully, but these errors were encountered: