RSA1_5: pass the expected CEK size as a parameter instead of the hardcoded CEK_LENGTHS table
メンテナーはふだん 1 日以内に返信
@Spomky がすでに取り組んでいます。
2026年8月28日 から。
評価
この issue はまだ評価されていません。
説明
Context
The RSA1_5 implicit-rejection fix (GHSA-5739-39v2-5754) needs the expected CEK length to build a constant-time random fallback. It currently relies on a hardcoded lookup table in RSA15:
private const CEK_LENGTHS = [
'A128GCM' => 16, 'A192GCM' => 24, 'A256GCM' => 32,
'A128CBC-HS256' => 32, 'A192CBC-HS384' => 48, 'A256CBC-HS512' => 64,
];
Problem (SOLID)
This violates SRP/DRY/OCP: RSA15 (a key-encryption algorithm) should not know the CEK sizes of the content-encryption algorithms. The single source of truth is already ContentEncryptionAlgorithm::getCEKSize(). A custom/unknown enc is not in the table, so it falls back to the legacy throwing path (no implicit rejection for that case).
This table was kept deliberately on the maintenance branches (3.4.x / 4.x) to avoid a public BC break, since fixing it properly changes the KeyEncryption::decryptKey() / KeyWrapping::unwrapKey() signatures.
Action for the next major (5.0.0)
Inject the expected CEK size through the interface, exactly as already done for KeyAgreement / KeyAgreementWithKeyWrapping in JWEDecrypter::decryptCEK (which already passes $content_encryption_algorithm->getCEKSize()):
- add an expected-size parameter to
KeyEncryption::decryptKey()(andKeyWrapping::unwrapKey()), - have
JWEDecrypterpass$content_encryption_algorithm->getCEKSize(), - forward it through
RSA/RSA15toRSACrypt::decrypt(), - delete the
CEK_LENGTHStable.
This is a public BC break, hence scheduled for 5.0.0.
- 主要言語
- 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 日以内に返信