JWK
暗号カギを表現するためのJSONデータ構造
RFC7517 JSON Web Key (JWK)で定義されている
https://datatracker.ietf.org/doc/html/rfc7518
JSON Web Algorithms (JWA)
パラメータはIANAのJSON Web Key Parametersに登録されている
code:Example JWK.json
{"kty":"EC",
"crv":"P-256",
"x":"f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU",
"y":"x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0",
"kid":"Public key used in JWS spec Appendix A.3 example"
}
ktyパラメータ(必須)
RFC7518 JSON Web Algorithms (JWA)で定義されている文字列が入る
IANAのJSON Web Key Typesに登録されている
ECが推奨されているがRSAとoctにも対応するよう求められている
useパラメータ(必須ではない)
IANAのJSON Web Key Useに登録されている
sigもしくはencの値をとる
key_opsパラメータと同時に指定することは推奨されない
key_opsパラメータ(必須ではない)
useパラメータと同時に指定することは推奨されない
IANAのJSON Web Key Operationsに登録されている
sign (compute digital signature or MAC)
verify (verify digital signature or MAC)
encrypt (encrypt content)
decrypt (decrypt content and validate decryption, if applicable)
wrapKey (encrypt key)
unwrapKey (decrypt key and validate decryption, if applicable)
deriveKey (derive key)
deriveBits (derive bits not to be used as a key)
hr.icon
#JWK
algパラメータ
署名用・非対称鍵
RS256 (JWK): RSASSA-PKCS1-v1_5 using SHA-256
RS384 (JWK): RSASSA-PKCS1-v1_5 using SHA-384
RS512: RSASSA-PKCS1-v1_5 using SHA-512
ES256 (JWK): ECDSA using P-256 and SHA-256
ES384: ECDSA using P-384 and SHA-384
ES512: ECDSA using P-521 and SHA-512
PS256 (JWK): RSASSA-PSS using SHA-256 and MGF1 with SHA-256
PS384: RSASSA-PSS using SHA-384 and MGF1 with SHA-384
PS512: RSASSA-PSS using SHA-512 and MGF1 with SHA-512
EdDSA (JWK): EdDSA (JWK) signature algorithms
ES256K: ECDSA using secp256k1 curve and SHA-256
暗号化用・非対称鍵
RSA1_5: RSAES-PKCS1-v1_5
RSA-OAEP (JWK): RSAES-OAEP using default parameters
RSA-OAEP-256 (JWK): RSAES-OAEP using SHA-256 and MGF1 with SHA-256
RSA-OAEP-384: RSAES-OAEP using SHA-384 and MGF1 with SHA-384
RSA-OAEP-512: RSAES-OAEP using SHA-512 and MGF1 with SHA-512
ECDH-ES: ECDH-ES using Concat KDF
ECDH-ES+A128KW: ECDH-ES using Concat KDF and "A128KW" wrapping
ECDH-ES+A192KW: ECDH-ES using Concat KDF and "A192KW" wrapping
ECDH-ES+A256KW: ECDH-ES using Concat KDF and "A256KW" wrapping
署名用・対称鍵
HS256: HMAC using SHA-256
HS384: HMAC using SHA-384
HS512: HMAC using SHA-512
暗号化用・対称鍵
A128KW: AES Key Wrap using 128-bit key
A192KW: AES Key Wrap using 192-bit key
A256KW: AES Key Wrap using 256-bit key
dir: Direct use of a shared symmetric key
A128GCMKW: Key wrapping with AES GCM using 128-bit key
A192GCMKW: Key wrapping with AES GCM using 192-bit key
A256GCMKW: Key wrapping with AES GCM using 256-bit key
table:IANAに登録されているalgプロパティの値
HS256 HMAC using SHA-256
HS384 HMAC using SHA-384
HS512 HMAC using SHA-512
RS256 RSASSA-PKCS1-v1_5 using SHA-256
RS384 RSASSA-PKCS1-v1_5 using SHA-384
RS512 RSASSA-PKCS1-v1_5 using SHA-512
ES256 ECDSA using P-256 and SHA-256
ES384 ECDSA using P-384 and SHA-384
ES512 ECDSA using P-521 and SHA-512
PS256 RSASSA-PSS using SHA-256 and MGF1 with SHA-256
PS384 RSASSA-PSS using SHA-384 and MGF1 with SHA-384
PS512 RSASSA-PSS using SHA-512 and MGF1 with SHA-512
none No digital signature or MAC performed
RSA1_5 RSAES-PKCS1-v1_5
RSA-OAEP RSAES OAEP using default parameters
RSA-OAEP-256 RSAES OAEP using SHA-256 and MGF1 with SHA-256
A128KW AES Key Wrap using 128-bit key
A192KW AES Key Wrap using 192-bit key
A256KW AES Key Wrap using 256-bit key
dir Direct use of a shared symmetric key
ECDH-ES ECDH-ES using Concat KDF
ECDH-ES+A128KW ECDH-ES using Concat KDF and "A128KW" wrapping
ECDH-ES+A192KW ECDH-ES using Concat KDF and "A192KW" wrapping
ECDH-ES+A256KW ECDH-ES using Concat KDF and "A256KW" wrapping
A128GCMKW Key wrapping with AES GCM using 128-bit key
A192GCMKW Key wrapping with AES GCM using 192-bit key
A256GCMKW Key wrapping with AES GCM using 256-bit key
PBES2-HS256+A128KW PBES2 with HMAC SHA-256 and "A128KW" wrapping
PBES2-HS384+A192KW PBES2 with HMAC SHA-384 and "A192KW" wrapping
PBES2-HS512+A256KW PBES2 with HMAC SHA-512 and "A256KW" wrapping
EdDSA EdDSA signature algorithms
RSA-OAEP-384 RSA-OAEP using SHA-384 and MGF1 with SHA-384
RSA-OAEP-512 RSA-OAEP using SHA-512 and MGF1 with SHA-512
ES256K ECDSA using secp256k1 curve and SHA-256
関連項目
#JOSE
JWK
RFC 7517