Open guidovranken opened 3 years ago
var sjcl = require('sjcl'); var bn0 = new sjcl.bn('c794'); var bn1 = new sjcl.bn('33'); var bn2 = new sjcl.bn('b'); console.log(bn0.powermod(bn1, bn2).toString());
prints:
0x1a5bd6f3654947df9b7939b126da9f94047e49aa7cbcc2707d02eac675ad742625826d8670c61fdc198291ad991bc0be5803e0b0e
which is evidently incorrect (result is larger than modulo).
prints:
which is evidently incorrect (result is larger than modulo).