Debian Codegraph @

tmp/MEMO

raw
1 1. JWE Header
2 2. JWE Encrypted Key
3 3. JWE Ciphertext
4 4. JWE Integrity Value
5
6 3. Cryptographic Algorithms for JWS
7 3.1. "alg" (Algorithm) Header Parameter Values for JWS
8
9 +--------------+--------------------------------+-------------------+
10 | alg | Digital Signature or MAC | Implementation |
11 | Parameter | Algorithm | Requirements |
12 | Value | | |
13 +--------------+--------------------------------+-------------------+
14 | HS256 | HMAC using SHA-256 hash | REQUIRED | Digest::SHA (hmac_sha256)
15 | | algorithm | |
16 | HS384 | HMAC using SHA-384 hash | OPTIONAL | Digest::SHA (hmac_sha384)
17 | | algorithm | |
18 | HS512 | HMAC using SHA-512 hash | OPTIONAL | Digest::SHA (hmac_sha512)
19 | | algorithm | |
20 | RS256 | RSASSA using SHA-256 hash | RECOMMENDED | Crypt::OpenSSL::RSA (use_sha256_hash)
21 | | algorithm | |
22 | RS384 | RSASSA using SHA-384 hash | OPTIONAL | Crypt::OpenSSL::RSA (use_sha384_hash)
23 | | algorithm | |
24 | RS512 | RSASSA using SHA-512 hash | OPTIONAL | Crypt::OpenSSL::RSA (use_sha512_hash)
25 | | algorithm | |
26 | ES256 | ECDSA using P-256 curve and | RECOMMENDED+ | Crypt::OpenSSL::EC
27 | | SHA-256 hash algorithm | |
28 | ES384 | ECDSA using P-384 curve and | OPTIONAL | Crypt::OpenSSL::EC
29 | | SHA-384 hash algorithm | |
30 | ES512 | ECDSA using P-521 curve and | OPTIONAL | Crypt::OpenSSL::EC
31 | | SHA-512 hash algorithm | |
32 | none | No digital signature or MAC | REQUIRED |
33 | | value included | |
34 +--------------+--------------------------------+-------------------+
35
36 4. Cryptographic Algorithms for JWE
37 4.1. "alg" (Algorithm) Header Parameter Values for JWE
38
39 +-----------+--------------------------------------+----------------+
40 | alg | Key Encryption or Agreement | Implementation |
41 | Parameter | Algorithm | Requirements |
42 | Value | | |
43 +-----------+--------------------------------------+----------------+
44 | RSA1_5 | RSAES-PKCS1-V1_5 [RFC3447] | REQUIRED | Crypt::OpenSSL::RSA (use_pkcs1_padding)
45 | RSA-OAEP | RSAES using Optimal Asymmetric | OPTIONAL | Crypt::RSA::ES::OAEP ?
46 | | Encryption Padding (OAEP) [RFC3447], | |
47 | | with the default parameters | |
48 | | specified by RFC 3447 in Section | |
49 | | A.2.1 | |
50 | ECDH-ES | Elliptic Curve Diffie-Hellman | RECOMMENDED+ | ?
51 | | Ephemeral Static [RFC6090], and | |
52 | | using the Concat KDF, as defined in | |
53 | | Section 5.8.1 of [NIST.800-56A], | |
54 | | where the Digest Method is SHA-256 | |
55 | | and all OtherInfo parameters are the | |
56 | | empty bit string | |
57 | A128KW | Advanced Encryption Standard (AES) | RECOMMENDED | ?
58 | | Key Wrap Algorithm [RFC3394] using | |
59 | | 128 bit keys | |
60 | A256KW | AES Key Wrap Algorithm using 256 bit | RECOMMENDED | ?
61 | | keys | |
62 +-----------+--------------------------------------+----------------+
63
64 4.2. "enc" (Encryption Method) Header Parameter Values for JWE
65
66 +-----------+--------------------------------------+----------------+
67 | enc | Block Encryption Algorithm | Implementation |
68 | Parameter | | Requirements |
69 | Value | | |
70 +-----------+--------------------------------------+----------------+
71 | A128CBC | Advanced Encryption Standard (AES) | REQUIRED | Crypt::OpenSSL::AES with Crypt::CBC
72 | | in Cipher Block Chaining (CBC) mode | |
73 | | with PKCS #5 padding [AES] | |
74 | | [NIST.800-38A] using 128 bit keys | |
75 | A256CBC | AES in CBC mode with PKCS #5 padding | REQUIRED | Crypt::OpenSSL::AES with Crypt::CBC
76 | | using 256 bit keys | |
77 | A128GCM | AES in Galois/Counter Mode (GCM) | RECOMMENDED | Crypt::GCM
78 | | [AES] [NIST.800-38D] using 128 bit | |
79 | | keys | |
80 | A256GCM | AES GCM using 256 bit keys | RECOMMENDED | Crypt::GCM
81 +-----------+--------------------------------------+----------------+
82
83 5. Cryptographic Algorithms for JWK
84 5.1. "alg" (Algorithm Family) Parameter Values for JWK
85
86 +-----------------+-------------------------+-----------------------+
87 | alg Parameter | Algorithm Family | Implementation |
88 | Value | | Requirements |
89 +-----------------+-------------------------+-----------------------+
90 | EC | Elliptic Curve [DSS] | RECOMMENDED+ |
91 | | key family | |
92 | RSA | RSA [RFC3447] key | REQUIRED |
93 | | family | |
94 +-----------------+-------------------------+-----------------------+
95
96 5.2. JWK Parameters for Elliptic Curve Keys
97 5.2.1. "crv" (Curve) Parameter
98
99 o "P-256"
100
101 o "P-384"
102
103 o "P-521"
104
105 5.2.2. "x" (X Coordinate) Parameter
106
107 5.2.3. "y" (Y Coordinate) Parameter
108
109 5.3. JWK Parameters for RSA Keys
110
111 5.3.1. "mod" (Modulus) Parameter
112
113 5.3.2. "exp" (Exponent) Parameter
114