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
use crate*;
use fmt;
use Display;
/// ## Version 3: NIST Modern
///
/// See [the version 3 specification](https://github.com/paseto-standard/paseto-spec/blob/master/docs/01-Protocol-Versions/Version3.md) for details. At a glance:
///
/// * **`v3.local`**: Symmetric Authenticated Encryption:
/// * AES-256-CTR + HMAC-SHA384 (Encrypt-then-MAC)
/// * Key-splitting: HKDF-SHA384
/// * Info for encryption key: `paseto-encryption-key`
/// The encryption key and implicit counter nonce are both returned
/// from HKDF in this version.
/// * Info for authentication key: `paseto-auth-key-for-aead`
/// * 32-byte nonce (no longer prehashed), passed entirely to HKDF
/// (as part of the `info` tag, rather than as a salt).
/// * The HMAC covers the header, nonce, and ciphertext
/// * It also covers the footer, if provided
/// * It also covers the implicit assertions, if provided
/// * **`v3.public`**: Asymmetric Authentication (Public-Key Signatures):
/// * ECDSA over NIST P-384, with SHA-384,
/// using [RFC 6979 deterministic k-values](https://tools.ietf.org/html/rfc6979)
/// (if reasonably practical; otherwise a CSPRNG **MUST** be used).
/// Hedged signatures are allowed too.
/// * The public key is also included in the PAE step, to ensure
/// `v3.public` tokens provide Exclusive Ownership.
;