Skip to content

Commit ffe6681

Browse files
committed
Tweak the docs some more.
Signed-off-by: Ionut Mihalcea <[email protected]>
1 parent f40b08b commit ffe6681

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

tss-esapi/src/abstraction/transient/mod.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,7 @@
55
//!
66
//! This module presents an abstraction over the TPM functionality exposed through the core
77
//! `Context` structure. The abstraction works by hiding resource handle management from the
8-
//! client. This is achieved by passing objects back and forth in the form of contexts. Thus, when
9-
//! an object is created, its saved context is returned and the object is flushed from the TPM.
10-
//! Whenever the client needs to use said object, it calls the desired operation with the context
11-
//! as a parameter - the context is loaded in the TPM, the operation performed and the context
12-
//! flushed out again before the result is returned.
13-
//!
14-
//! Object contexts thus act as an opaque handle that can, however, be used by the client to seralize
15-
//! and persist the underlying data.
8+
//! client.
169
use crate::{
1710
attributes::{ObjectAttributesBuilder, SessionAttributesBuilder},
1811
constants::{tss::*, SessionType, Tss2ResponseCodeKind},
@@ -116,10 +109,10 @@ pub struct ObjectWrapper {
116109
/// Structure offering an abstracted programming experience.
117110
///
118111
/// The `TransientKeyContext` makes use of a root key from which the other, client-controlled
119-
/// keyes are derived.
112+
/// keys are derived.
120113
///
121-
/// The main goal of this abstraction is to make public key cryptography more accessible,
122-
/// focusing on asymmetric encryption and signatures in particular.
114+
/// This abstraction makes public key cryptography more accessible, focusing on asymmetric
115+
/// encryption and signatures in particular, by allowing users to offload object and session management.
123116
#[allow(clippy::module_name_repetitions)]
124117
#[derive(Debug)]
125118
pub struct TransientKeyContext {

tss-esapi/src/lib.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,26 @@
3535
//! at varying levels of abstraction.
3636
//! Only platforms based on processors with a word size of at least 16 bits are supported.
3737
//!
38+
//! # Relevant specifications
39+
//! This library is built with insight from Trusted Computing Group specifications. The specs most relevant
40+
//! here are:
41+
//! * the [Trusted Platform Module Library Specification, Family “2.0”, Level 00, Revision 01.59](https://trustedcomputinggroup.org/work-groups/trusted-platform-module/)
42+
//! * the [TCG TSS 2.0 Enhanced System API (ESAPI) Specification, version 1.00, revision 14](https://trustedcomputinggroup.org/resource/tcg-tss-2-0-enhanced-system-api-esapi-specification/)
43+
//!
44+
//! The different parts of the first spec mentioned above (henceforth called the TPM2 spec) can be
45+
//! referenced individually throughout the documentation of this crate, using their part number or name.
46+
//! For example,
47+
//! [Part 1, Architecture](https://trustedcomputinggroup.org/wp-content/uploads/TCG_TPM2_r1p59_Part1_Architecture_pub.pdf)
48+
//! could be referenced as "the Architecture spec" or "part 1 of the TPM2 spec".
49+
//!
50+
//! The second spec mentioned above will henceforth be called the ESAPI or ESys spec.
51+
//!
52+
//! Some parts of the code relate to features or functionality defined in other specifications (such as the
53+
//! [Marshaling/Unmarshaling API v1, rev7 spec](https://trustedcomputinggroup.org/resource/tcg-tss-2-0-marshalingunmarshaling-api-specification/)),
54+
//! and in such cases the specification should be linked and referenced in full.
55+
//!
3856
//! # Code structure
39-
//! Our code structure is mostly derived from
40-
//! [part 2 of the TPM2 TCG spec](https://trustedcomputinggroup.org/wp-content/uploads/TCG_TPM2_r1p59_Part2_Structures_pub.pdf).
57+
//! Our code structure is mostly derived from part 2 of the TPM2 spec.
4158
//! For simplicity, however, we have reduced the depth of the import tree, so most (if not all) types
4259
//! are at most one level away from root.
4360
//!

tss-esapi/src/utils/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@ pub fn create_unrestricted_signing_ecc_public(
275275
/// Container for public key values
276276
#[derive(Debug, Clone, Serialize, Deserialize, Zeroize, PartialEq, Eq)]
277277
pub enum PublicKey {
278-
/// RSA public modulus (see 27.5.3.4 in Architecture spec)
278+
/// RSA public modulus (see 27.5.3.4 in the Architecture spec)
279279
///
280280
/// This is the value extracted from the `unique` part of `TPMT_PUBLIC`.
281281
/// The exponent is not included here as the expectation is that the
282282
/// exponent is always pinned to 65537 (2^16 + 1).
283283
///
284284
/// The modulus is in Big-Endian format.
285285
Rsa(Vec<u8>),
286-
/// Public elliptic curve point (see 27.5.3.5 in Architecture spec)
286+
/// Public elliptic curve point (see 27.5.3.5 in the Architecture spec)
287287
///
288288
/// The x and y coordinates are given uncompressed.
289289
Ecc { x: Vec<u8>, y: Vec<u8> },

0 commit comments

Comments
 (0)