Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ed25519 generateKeyPairSync: use publicKey.x instead of privateKey.x
Although [RFC7518 6.3.2](https://datatracker.ietf.org/doc/html/rfc7518#section-6.3.2) specifies that private key JWKs must include all the fields present in the public key, this is not the case for the implementation of `node:crypto.generateKeyPairSync` in the deno runtime. While Node returns the (same) `x` property in both, the `privateKey` and the `publicKey`, Deno only returns the `x` property in `publicKey` (i.e. [no x here](https://github.com/denoland/deno/blob/88490d092751288f736855b2418a4da606a31ce7/ext/node/ops/crypto/keys.rs#L1475)). This change should not affect any Node users, but would enable the use of libp2p on Deno.
- Loading branch information