# MlDsa44.createKeyPair

Creates a new ML-DSA-44 key pair consisting of a private key and its corresponding public key.

The private key is the 32-byte seed (`ξ`) from FIPS 204 key generation — the canonical interchange form of an ML-DSA private key. The 1,312-byte public key is deterministically expanded from it.

## Imports

:::code-group
```ts [Named]
import { MlDsa44 } from 'ox'
```

```ts [Entrypoint]
import * as MlDsa44 from 'ox/MlDsa44'
```
:::

## Examples

```ts twoslash
import { MlDsa44 } from 'ox'

const { privateKey, publicKey } = MlDsa44.createKeyPair()
```

## Definition

```ts
function createKeyPair<as>(
  options?: createKeyPair.Options<as>,
): createKeyPair.ReturnType<as>
```

**Source:** [src/core/MlDsa44.ts](https://github.com/wevm/ox/blob/main/src/core/MlDsa44.ts#L39)

## Parameters

### options

* **Type:** `createKeyPair.Options<as>`
* **Optional**

The options to generate the key pair.

#### options.as

* **Type:** `"Bytes" | "Hex" | as`
* **Optional**

Format of the returned private and public keys.

## Return Type

The generated key pair containing both private and public keys.

`createKeyPair.ReturnType<as>`
