# MlDsa44 Errors

## `MlDsa44.InvalidContextSizeError`

Thrown when a context string exceeds the 255-byte FIPS 204 limit.

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

## `MlDsa44.InvalidInputError`

Thrown when mldsa-native rejects an input or fails to produce a signature.

### Examples

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

try {
  const engine = await MlDsa44.engine()
  engine.getPublicKey(new Uint8Array(32))
} catch (error) {
  if (error instanceof MlDsa44.InvalidInputError)
    console.error(error.message)
}
```

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

## `MlDsa44.InvalidPrfSizeError`

Thrown when a WebAuthn PRF output is not 32 bytes.

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

## `MlDsa44.MemoryError`

Thrown when a WASM module cannot grow its memory to the required size.

**Source:** [src/wasm/internal/instantiate.ts](https://github.com/wevm/ox/blob/main/src/wasm/internal/instantiate.ts#L143)
