You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure whether it is possible to modify the implementation and maybe there are good reasons for this behavior. But there should be something like a warning for the from method in the documentation, like this:
The resulting VerifyingKey is unprefixed, which is uncommon. In most cases you’ll want to use VerifyingKey::new instead.
I created a pair of RSA keys using Openssl .
private.key.pem.txt
public.key.pem.txt
Now I have the following code:
This works for the
lib
Key, but not for theopenssl
key. And there are supposed to be equal!However, if i change
to
each verification passes.
It took me hours to debug this. The problem is the definition of the
from
method.(from: https://docs.rs/rsa/0.9.2/src/rsa/pkcs1v15/verifying_key.rs.html#167-169)
I'm not sure whether it is possible to modify the implementation and maybe there are good reasons for this behavior. But there should be something like a warning for the
from
method in the documentation, like this:as it is done with
VerifyingKey::new_unprefixed
.This issue is closely related to #238
The
Cargo.toml
for the example code isCargo.toml.txt
The text was updated successfully, but these errors were encountered: