@@ -221,13 +221,13 @@ impl LocalSig {
221
221
/*
222
222
let hash_in_concat = local_ephemaral_key.y.bytes_compressed_to_big_int()
223
223
+ (local_private_key.y.bytes_compressed_to_big_int() << 264)
224
- + (BigInt::from (message) << 528);
224
+ + (BigInt::from_bytes (message) << 528);
225
225
let e_bn = HSha256::create_hash(&[&hash_in_concat]);
226
226
*/
227
227
let e_bn = HSha256 :: create_hash ( & [
228
228
& local_ephemaral_key. y . bytes_compressed_to_big_int ( ) ,
229
229
& local_private_key. y . bytes_compressed_to_big_int ( ) ,
230
- & BigInt :: from ( message) ,
230
+ & BigInt :: from_bytes ( message) ,
231
231
] ) ;
232
232
233
233
let e: FE = ECScalar :: from ( & e_bn) ;
@@ -322,13 +322,13 @@ impl Signature {
322
322
/*
323
323
let hash_in_concat = v.bytes_compressed_to_big_int()
324
324
+ (Y.bytes_compressed_to_big_int() << 264)
325
- + (BigInt::from (message) << 528);
325
+ + (BigInt::from_bytes (message) << 528);
326
326
let r = HSha256::create_hash(&[&hash_in_concat]);
327
327
*/
328
328
let r = HSha256 :: create_hash ( & [
329
329
& v. bytes_compressed_to_big_int ( ) ,
330
330
& Y . bytes_compressed_to_big_int ( ) ,
331
- & BigInt :: from ( message) ,
331
+ & BigInt :: from_bytes ( message) ,
332
332
] ) ;
333
333
334
334
Signature {
@@ -345,14 +345,14 @@ impl Signature {
345
345
/*
346
346
let hash_in_concat = sg_plus_ey.bytes_compressed_to_big_int()
347
347
+ (pubkey_y.bytes_compressed_to_big_int() << 264)
348
- + (BigInt::from (message) << 528);
348
+ + (BigInt::from_bytes (message) << 528);
349
349
let r = HSha256::create_hash(&[&hash_in_concat]);
350
350
*/
351
351
352
352
let r = HSha256 :: create_hash ( & [
353
353
& sg_plus_ey. bytes_compressed_to_big_int ( ) ,
354
354
& pubkey_y. bytes_compressed_to_big_int ( ) ,
355
- & BigInt :: from ( message) ,
355
+ & BigInt :: from_bytes ( message) ,
356
356
] ) ;
357
357
let r: FE = ECScalar :: from ( & r) ;
358
358
0 commit comments