This repository was archived by the owner on Apr 20, 2025. It is now read-only.

Description
The result of the warning check bellow would always result in the error showing, because we are comparing a map object, and a list.
You are compering the results, with the expected ones, but the compared elements do not share the common type
rs, ds, ts are a map object, while the Private key properties are garanteed to be of type list[int]
|
n, e, d, p, q = map(int, priv[1:6]) |
|
exp1, exp2, coef = map(int, priv[6:9]) |
|
rs = map(int, priv[9::3]) |
|
ds = map(int, priv[10::3]) |
|
ts = map(int, priv[11::3]) |
|
|
|
key = cls(n, e, d, p, q, list(rs)) |
|
|
|
if (key.exp1, key.exp2, key.coef, key.rs, key.ds, key.ts) != (exp1, exp2, coef, rs, ds, ts): |
|
warnings.warn( |
|
"You have provided a malformed keyfile. Either the exponents " |
|
"or the coefficient are incorrect. Using the correct values " |
|
"instead.", |
|
UserWarning, |
|
) |