Fix swapped curve parameters
This commit is contained in:
parent
9402735559
commit
0208c863aa
1 changed files with 2 additions and 2 deletions
|
@ -76,11 +76,11 @@ impl Cli {
|
|||
let bink = &keys["BINK"][&options.binkid];
|
||||
// We cannot produce a valid key without knowing the private key k. The reason for this is that
|
||||
// we need the result of the function K(x; y) = kG(x; y).
|
||||
let private_key = BigNum::from_dec_str(bink["n"].as_str().unwrap()).unwrap();
|
||||
let private_key = BigNum::from_dec_str(bink["priv"].as_str().unwrap()).unwrap();
|
||||
|
||||
// We can, however, validate any given key using the available public key: {p, a, b, G, K}.
|
||||
// genOrder the order of the generator G, a value we have to reverse -> Schoof's Algorithm.
|
||||
let gen_order = BigNum::from_dec_str(bink["priv"].as_str().unwrap()).unwrap();
|
||||
let gen_order = BigNum::from_dec_str(bink["n"].as_str().unwrap()).unwrap();
|
||||
|
||||
let p = bink["p"].as_str().unwrap();
|
||||
let a = bink["a"].as_str().unwrap();
|
||||
|
|
Loading…
Add table
Reference in a new issue