「マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
以下の内容で最終確認済み。
https://tools.ietf.org/html/rfc7516
JWE Compact Serialization or JWE JSON Serializationのどちらでも、基本的にすべてbase64urlでエンコードされる。
JWEの基本的なヘッダ(≒JWE Compact Serializationの場合の保護ヘッダ)には、以下のものがある。
{"alg":"RSA-OAEP","enc":"A256GCM"}
{"alg":"RSA1_5","enc":"A128CBC-HS256"}
{"alg":"A128KW","enc":"A128CBC-HS256"}
"enc"の認証付き暗号(AEAD)操作によって決定される。
暗号化アルゴリズムの以下の要素について理解が必要
非対称暗号化アルゴリズムの利用を意図したキー管理モード。
対称キーラッピングアルゴリズムの利用を意図したキー管理モード。
鍵合意アルゴリズムの利用を意図したキー管理モード。
対称キーラッピングアルゴリズムの対称鍵に、
合意アルゴリズムの利用を意図したキー管理モード。
CEK値が当事者間で共有される鍵管理モード。
BASE64URL (UTF-8 (JWE Protected Header)) . BASE64URL(JWE Encrypted Key) . BASE64URL(JWEInitialization Vector) . BASE64URL(JWE Ciphertext) . BASE64URL(JWE Authentication Tag)
"protected", with the value BASE64URL(UTF8(JWE Protected Header)) "unprotected", with the value JWE Shared Unprotected Header "header", with the value JWE Per-Recipient Unprotected Header "encrypted_key", with the value BASE64URL(JWE Encrypted Key) "iv", with the value BASE64URL(JWE Initialization Vector) "ciphertext", with the value BASE64URL(JWE Ciphertext) "tag", with the value BASE64URL(JWE Authentication Tag) "aad", with the value BASE64URL(JWE AAD)
JOSEヘッダは、以下のメンバの和集合。
JWE JSON Serializationの場合に必要な、受信者毎に共通の非保護ヘッダ
JWE JSON Serializationの場合に必要な、受信者毎に個別の非保護ヘッダ
{"alg":"RSA-OAEP","enc":"A256GCM"} など。
※ JWE JSON Serializationを使用している場合は、上記を繰り返す。
https://tools.ietf.org/html/rfc7516#appendix-A.1.1
https://tools.ietf.org/html/rfc7516#appendix-A.2.1
https://tools.ietf.org/html/rfc7516#appendix-A.3.1
ココの署名・暗号化アルゴリズムを使用すると良い。
-
-
Tags: :認証基盤, :クレームベース認証, :暗号化