tpm2_protocol/message/
dictionary_attack.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2// Copyright (c) 2025 Opinsys Oy
3
4//! 25.2 `TPM2_DictionaryAttackLockReset`
5//! 25.3 `TPM2_DictionaryAttackParameters`
6
7use crate::{data::TpmCc, tpm_struct};
8use core::fmt::Debug;
9
10tpm_struct! {
11    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
12    kind: Command,
13    name: TpmDictionaryAttackLockResetCommand,
14    cc: TpmCc::DictionaryAttackLockReset,
15    no_sessions: false,
16    with_sessions: true,
17    handles: {
18        pub lock_handle: crate::data::TpmiRhHierarchy,
19    },
20    parameters: {}
21}
22
23tpm_struct! {
24    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
25    kind: Response,
26    name: TpmDictionaryAttackLockResetResponse,
27    cc: TpmCc::DictionaryAttackLockReset,
28    no_sessions: false,
29    with_sessions: true,
30    handles: {},
31    parameters: {}
32}
33
34tpm_struct! {
35    #[derive(Debug, PartialEq, Eq, Clone, Copy)]
36    kind: Command,
37    name: TpmDictionaryAttackParametersCommand,
38    cc: TpmCc::DictionaryAttackParameters,
39    no_sessions: false,
40    with_sessions: true,
41    handles: {
42        pub lock_handle: crate::data::TpmiRhHierarchy,
43    },
44    parameters: {
45        pub new_max_tries: u32,
46        pub new_recovery_time: u32,
47        pub lockout_recovery: u32,
48    }
49}
50
51tpm_struct! {
52    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
53    kind: Response,
54    name: TpmDictionaryAttackParametersResponse,
55    cc: TpmCc::DictionaryAttackParameters,
56    no_sessions: false,
57    with_sessions: true,
58    handles: {},
59    parameters: {}
60}