VP: surround the usable encryption key with unusable ones

A wallet that simply selects the first key of the verifier's JWK set (rather than the first key it can actually use) passed the ignores-unusable-encryption-key test, because the unusable keys were appended after the usable key. Place one unusable key before the usable key and one after it, so both first-key and last-key selection fail the test.

The suite's own wallet emulation read the alg from the first key of the set (in VP1FinalEncryptVPResponse and the matching session transcript computation), which would now select an unusable key - i.e. it was itself the naive wallet this test catches. Both now select the first usable encryption key via a shared JWEUtil helper.

Timo@Animo pointed out that some wallets likely just hardcode the first key, so this would now check that those wallets are actually doing proper key selection.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01WjR6PBaSHsuRvoQQitZhpe

Merge request reports

Loading
Loading