Closed sorgloomer closed 7 years ago
While the following two represent the same number:
console.log( new asmCrypto.BigNumber(asmCrypto.hex_to_bytes("AABBCCDDAABBCCDD")).toString() ); // "aabbccddaabbccdd" console.log( new asmCrypto.BigNumber(asmCrypto.hex_to_bytes("00AABBCCDDAABBCCDD")).toString() ); // "aabbccddaabbccdd"
The comodulus inside the Modulus class behaves differently:
console.log( new asmCrypto.Modulus(asmCrypto.hex_to_bytes("AABBCCDDAABBCCDD")).comodulusRemainder.toString() ); // "5544332255443323" console.log( new asmCrypto.Modulus(asmCrypto.hex_to_bytes("00AABBCCDDAABBCCDD")).comodulusRemainder.toString() ); // "6ad813226ad81321"
It seems to appear only when the significant part of the number is a multiple of 4 bytes long.
While the following two represent the same number:
The comodulus inside the Modulus class behaves differently:
It seems to appear only when the significant part of the number is a multiple of 4 bytes long.