---
name: "kcapi_aead_ccm_nonce_to_iv"
section: "3"
platform: "linux"
package: "libkcapi-dev"
version: "1.4.0-1+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/kcapi_aead_ccm_nonce_to_iv"
---

# kcapi\_aead\_ccm\_nonce\_to\_iv(3)

convert CCM nonce into IV

## NAME

kcapi\_aead\_ccm\_nonce\_to\_iv - convert CCM nonce into IV

## SYNOPSIS

**int kcapi\_aead\_ccm\_nonce\_to\_iv(const uint8\_t \*** *nonce***, uint32\_t** *noncelen***, uint8\_t \*\*** *iv***, uint32\_t \*** *ivlen***);**

## ARGUMENTS

*nonce*

\[in\] buffer with nonce

*noncelen*

\[in\] length of nonce

*iv*

\[out\] newly allocated buffer with IV

*ivlen*

\[out\] length of IV

## DESCRIPTION

This service function converts a CCM nonce value into an IV usable by the kernel crypto API.

Caller must free iv.

*return* 0 upon success; \< 0 upon failure

## AUTHOR

**Stephan Mueller** \<smueller@chronox.de\>

Author.

## COPYRIGHT
