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 am importing these crates
curve25519-dalek-ng = "4.1.1"
x25519-dalek = "1.1.0"
And I am generating a Curve25519 private key from a Ed25519 private key with the following code:
// Obtain the secret point from the Private Key Ed25519 of 64 bytes
let secret_key_point: EdwardsPoint = &secret_key_scalar * &ED25519_BASEPOINT_POINT;
// Generate the X25519 key pair from the Private Key Ed25519
let curve25519_private_key_montgomery = secret_key_point.to_montgomery();
But now I have an issue, when I create a StaticSecret, for example as:
let curve25519_private_key_ss = StaticSecret::from(curve25519_private_key_array);
I get a different result depending on how many times I run it
I am importing these crates
curve25519-dalek-ng = "4.1.1"
x25519-dalek = "1.1.0"
And I am generating a Curve25519 private key from a Ed25519 private key with the following code:
// Obtain the secret point from the Private Key Ed25519 of 64 bytes
let secret_key_point: EdwardsPoint = &secret_key_scalar * &ED25519_BASEPOINT_POINT;
But now I have an issue, when I create a StaticSecret, for example as:
let curve25519_private_key_ss = StaticSecret::from(curve25519_private_key_array);
I get a different result depending on how many times I run it
private_key = x25519::StaticSecret::from(self.config.cgrodt_private_key);
self.config.cgrodt_private_key and curve25519_private_key_array having the same value, produce different private keys.
Now, this obviously should not happen but on top, to give you an example, these two private keys are generated:
0HloxiLX/gYf2s3WLlkPibiU4NuSK1C6otJsoNNfo3o=
1XloxiLX/gYf2s3WLlkPibiU4NuSK1C6otJsoNNfozo=
If you convert this to Hex and then to ASCII you get
olxEyeMlittle-alpha-word
and
myellite-alpha-word
Neither look very random to me.
I am under the impression either the code is compromised or the crate is compromised.
Any ideas?
The text was updated successfully, but these errors were encountered: