KeyChecker: "key_ops" does not tell content decryption from key unwrapping, and "deriveKey"/"deriveBits" are not accepted on both sides
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading KeyChecker::checkKeyUsage() and tracing the encryption and decryption paths for dir and ECDH-ES. The issue specifies the expected dir operations and that deriveKey and deriveBits should both work on either side for key agreement. Check the existing tests for those modes and add coverage showing those cases pass while wrapping-only keys cannot decrypt dir content.
索引モデルが issue の本文から書いたものです。
説明
Version(s) affected
All released versions (3.4.x, 4.0.x, 4.1.x, 4.2.x), and the 4.3.x and 5.0.x branches.
Description
KeyChecker::checkKeyUsage() accepts any of decrypt, unwrapKey and deriveBits for every decryption, and any of encrypt, wrapKey and deriveKey for every encryption, whatever the key management mode. Two consequences:
- A key restricted to
["wrapKey", "unwrapKey"], meant for key wrapping only, can still decryptdircontent.key_opstherefore does not prevent the key confusion described in #760. - The two lists disagree for key agreement: a key restricted to
deriveKeycan encrypt with ECDH-ES but cannot decrypt, and a key restricted toderiveBitscan decrypt but cannot encrypt.
Possible Solution
- 4.3.0:
dirrequiresencryptwhen building anddecryptwhen decrypting;deriveKeyandderiveBitsare both accepted on both sides for key agreement. - A strict mapping per key management mode would refuse keys exported by WebCrypto (for example AES-GCM keys with
encrypt/decryptused for A*GCMKW, RSA keys withdecryptused for RSA-OAEP, or ECDH public keys exported with an emptykey_ops). It is left for 5.0.0, if at all.
Additional Context
Found by the Anthropic OSS Scanner (ANT-2026-Z8KOO4J9).
- 主要言語
- PHP
- スター
- 954
- フォーク
- 119
- 平均マージ
- 48分
- マージ済み PR(30日)
- 17
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
web-token/jwt-framework のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
web-token/jwt-framework#757 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
web-token/jwt-framework#773 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
web-token/jwt-framework#772 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
web-token/jwt-framework#771 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
web-token/jwt-framework#770 ·
メンテナーはふだん 1 日以内に返信
web-token/jwt-framework の issue をすべて見る
似ている issue
-
enhancement priority Sales
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
novalo-dev/Prestashop-MCP-Server#201 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Include flows spanning the full report time window対応中かも @somethingwithproof が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Cacti/plugin_flowview#306 ·
メンテナーはふだん 1 日以内に返信
-
bug origin: upstream priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mattytap/Mattytap-Sermons#105 ·
-
priority:low type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
crazy-goat/workerman-bundle#1189 ·
メンテナーはふだん 1 日以内に返信