File: MEMO

package info (click to toggle)
libjson-webtoken-perl 0.10-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 208 kB
  • sloc: perl: 336; makefile: 2
file content (114 lines) | stat: -rw-r--r-- 6,620 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
1. JWE Header
2. JWE Encrypted Key
3. JWE Ciphertext
4. JWE Integrity Value

3.  Cryptographic Algorithms for JWS
3.1.  "alg" (Algorithm) Header Parameter Values for JWS

   +--------------+--------------------------------+-------------------+
   | alg          | Digital Signature or MAC       | Implementation    |
   | Parameter    | Algorithm                      | Requirements      |
   | Value        |                                |                   |
   +--------------+--------------------------------+-------------------+
   | HS256        | HMAC using SHA-256 hash        | REQUIRED          | Digest::SHA (hmac_sha256)
   |              | algorithm                      |                   |
   | HS384        | HMAC using SHA-384 hash        | OPTIONAL          | Digest::SHA (hmac_sha384)
   |              | algorithm                      |                   |
   | HS512        | HMAC using SHA-512 hash        | OPTIONAL          | Digest::SHA (hmac_sha512)
   |              | algorithm                      |                   |
   | RS256        | RSASSA using SHA-256 hash      | RECOMMENDED       | Crypt::OpenSSL::RSA (use_sha256_hash)
   |              | algorithm                      |                   |
   | RS384        | RSASSA using SHA-384 hash      | OPTIONAL          | Crypt::OpenSSL::RSA (use_sha384_hash)
   |              | algorithm                      |                   |
   | RS512        | RSASSA using SHA-512 hash      | OPTIONAL          | Crypt::OpenSSL::RSA (use_sha512_hash)
   |              | algorithm                      |                   |
   | ES256        | ECDSA using P-256 curve and    | RECOMMENDED+      | Crypt::OpenSSL::EC
   |              | SHA-256 hash algorithm         |                   |
   | ES384        | ECDSA using P-384 curve and    | OPTIONAL          | Crypt::OpenSSL::EC
   |              | SHA-384 hash algorithm         |                   |
   | ES512        | ECDSA using P-521 curve and    | OPTIONAL          | Crypt::OpenSSL::EC
   |              | SHA-512 hash algorithm         |                   |
   | none         | No digital signature or MAC    | REQUIRED          |
   |              | value included                 |                   |
   +--------------+--------------------------------+-------------------+

4.  Cryptographic Algorithms for JWE
4.1.  "alg" (Algorithm) Header Parameter Values for JWE

   +-----------+--------------------------------------+----------------+
   | alg       | Key Encryption or Agreement          | Implementation |
   | Parameter | Algorithm                            | Requirements   |
   | Value     |                                      |                |
   +-----------+--------------------------------------+----------------+
   | RSA1_5    | RSAES-PKCS1-V1_5 [RFC3447]           | REQUIRED       | Crypt::OpenSSL::RSA (use_pkcs1_padding)
   | RSA-OAEP  | RSAES using Optimal Asymmetric       | OPTIONAL       | Crypt::RSA::ES::OAEP ?
   |           | Encryption Padding (OAEP) [RFC3447], |                |
   |           | with the default parameters          |                |
   |           | specified by RFC 3447 in Section     |                |
   |           | A.2.1                                |                |
   | ECDH-ES   | Elliptic Curve Diffie-Hellman        | RECOMMENDED+   | ?
   |           | Ephemeral Static [RFC6090], and      |                |
   |           | using the Concat KDF, as defined in  |                |
   |           | Section 5.8.1 of [NIST.800-56A],     |                |
   |           | where the Digest Method is SHA-256   |                |
   |           | and all OtherInfo parameters are the |                |
   |           | empty bit string                     |                |
   | A128KW    | Advanced Encryption Standard (AES)   | RECOMMENDED    | ?
   |           | Key Wrap Algorithm [RFC3394] using   |                |
   |           | 128 bit keys                         |                |
   | A256KW    | AES Key Wrap Algorithm using 256 bit | RECOMMENDED    | ?
   |           | keys                                 |                |
   +-----------+--------------------------------------+----------------+

4.2.  "enc" (Encryption Method) Header Parameter Values for JWE

   +-----------+--------------------------------------+----------------+
   | enc       | Block Encryption Algorithm           | Implementation |
   | Parameter |                                      | Requirements   |
   | Value     |                                      |                |
   +-----------+--------------------------------------+----------------+
   | A128CBC   | Advanced Encryption Standard (AES)   | REQUIRED       | Crypt::OpenSSL::AES with Crypt::CBC
   |           | in Cipher Block Chaining (CBC) mode  |                |
   |           | with PKCS #5 padding [AES]           |                |
   |           | [NIST.800-38A] using 128 bit keys    |                |
   | A256CBC   | AES in CBC mode with PKCS #5 padding | REQUIRED       | Crypt::OpenSSL::AES with Crypt::CBC
   |           | using 256 bit keys                   |                |
   | A128GCM   | AES in Galois/Counter Mode (GCM)     | RECOMMENDED    | Crypt::GCM
   |           | [AES] [NIST.800-38D] using 128 bit   |                |
   |           | keys                                 |                |
   | A256GCM   | AES GCM using 256 bit keys           | RECOMMENDED    | Crypt::GCM
   +-----------+--------------------------------------+----------------+

5.  Cryptographic Algorithms for JWK
5.1.  "alg" (Algorithm Family) Parameter Values for JWK

   +-----------------+-------------------------+-----------------------+
   | alg Parameter   | Algorithm Family        | Implementation        |
   | Value           |                         | Requirements          |
   +-----------------+-------------------------+-----------------------+
   | EC              | Elliptic Curve [DSS]    | RECOMMENDED+          |
   |                 | key family              |                       |
   | RSA             | RSA [RFC3447] key       | REQUIRED              |
   |                 | family                  |                       |
   +-----------------+-------------------------+-----------------------+

5.2.  JWK Parameters for Elliptic Curve Keys
5.2.1.  "crv" (Curve) Parameter

   o  "P-256"

   o  "P-384"

   o  "P-521"

5.2.2.  "x" (X Coordinate) Parameter

5.2.3.  "y" (Y Coordinate) Parameter

5.3.  JWK Parameters for RSA Keys

5.3.1.  "mod" (Modulus) Parameter

5.3.2.  "exp" (Exponent) Parameter