> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# MlDsa44.createKeyPair

:::info
`MlDsa44.createKeyPair` is a re-export of ox's [`MlDsa44.createKeyPair`](https://oxlib.sh/api/MlDsa44/createKeyPair). Refer to the ox documentation for the full reference.
:::

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

```ts
import { MlDsa44 } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { MlDsa44 } from 'viem/utils'

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

## Definition

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

## 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>`
