# X25519

Ox's X25519 API and its supported Node.js engine primitives.

## Examples

```ts twoslash
// @noErrors
import { Engine } from 'ox'
import { X25519 } from 'ox/node'

await Engine.install({ X25519: X25519.engine() })

X25519.getPublicKey({ privateKey: '0x...' })
```

## Functions

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`X25519.createKeyPair`](/node/crypto/X25519/createKeyPair) | Creates a new X25519 key pair consisting of a private key and its corresponding public key. |
| [`X25519.engine`](/node/crypto/X25519/engine) | Creates a Node.js implementation of the [`X25519`](/api/X25519) engine slot, without installing it. |
| [`X25519.getPublicKey`](/node/crypto/X25519/getPublicKey) | Computes the X25519 public key from a provided private key. |
| [`X25519.getSharedSecret`](/node/crypto/X25519/getSharedSecret) | Computes a shared secret using X25519 elliptic curve Diffie-Hellman between a private key and a public key. |
| [`X25519.randomPrivateKey`](/node/crypto/X25519/randomPrivateKey) | Generates a random X25519 private key. |
