Skip to content

PIV operations over Android NFC fail with 0x6982 when touch policy is not "never" #360

Description

@episource

Device: Google Pixel 9 Pro, Android 17
Token: YubiKey 5 NFC, firmware 5.1.2
YubiKit: AndroidDemo built from main, revision eb953d4

Attempts to use a YubiKey PIV private key over Android NFC fail with status word 0x6982 (SECURITY_CONDITION_NOT_SATISFIED) when the key's touch policy is set to anything other than never.

The issue is reproducible with YubiKit's AndroidDemo application using its Sign feature. I initially encountered the same behavior while implementing direct APDU communication myself. In both cases, the operation succeeds when the touch policy is set to never.

It is unclear from the documentation how PIV user presence / touch confirmation is expected to work over NFC. Yubico's documentation appears to provide conflicting information:

When performing the PIV operation over NFC, the YubiKey returns 0x6982 immediately rather than waiting for user presence.

Is this expected behavior for PIV over NFC, a limitation of firmware 5.1.2, or an issue with the Android/NFC transport? Alternatively, is a different APDU sequence required when using a PIV key with a touch policy over NFC?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions