libnvmf\_lookup\_key(9) libnvme API manual libnvmf\_lookup\_key(9)

# [NAME](#NAME)

libnvmf\_lookup\_key - Lookup key serial number

# [SYNOPSIS](#SYNOPSIS)

**int libnvmf\_lookup\_key** **(struct libnvme\_global\_ctx \*ctx ,** **const char \*type ,** **const char \*identity ,** **long \*key );**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

struct libnvme\_global\_ctx object

[type](#type)

Key type

[identity](#identity)

Key description

[key](#key)

Key serial number to return

# [DESCRIPTION](#DESCRIPTION)

Looks up the serial number of the key *identity* with type *type* in the current session keyring.

# [RETURN](#RETURN)

0 on success, negative error code otherwise.

libnvmf\_lookup\_key October 2026

---

Document: libnvmf_lookup_key-libnvme3(2) from nvme-cli 3.2-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
