C# 클래스 Tpm2Lib.AuthSession

AuthSession encapsulates HMAC, policy, encryption/decryption, and audit sessions, i.e. all session types that are represented by a TPM handle created by means of TPM2_StartAuthSession command.
상속: SessionBase
파일 보기 프로젝트 열기: Microsoft/TSS.MSR 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Attrs SessionAttr
AuthHash TpmAlgId
BindObject TpmHandle
NonceCaller byte[]
NonceTpm byte[]
Salt byte[]
SessionKey byte[]
SessionType TpmSe
Symmetric SymDef

공개 메소드들

메소드 설명
AuthSession ( ParametrizedHandle ph ) : System
AuthSession ( TpmHandle h ) : System

Constructs an object encapsulating a session opened in TPM. The Tpm2 object that was used to create the session tracks other information associated with it and uses it to compute session key and command/response HMAC.

NewNonceCaller ( ) : void
RunPolicy ( Tpm2 tpm, PolicyTree policyTree, string branchToEvaluate = null, bool allowErrors = false ) : TpmRc

Run a path on the policy tree. The path is identified by the leaf identifier string. A session is created and returned. If allowErrors is true then errors returned do not cause an exception (but are returned in the response code).

SetNonceTpm ( byte nonceTpm ) : void

보호된 메소드들

메소드 설명
AuthSession ( ) : System

비공개 메소드들

메소드 설명
AuthSession ( TpmSe sessionType, TpmHandle tpmKey, TpmHandle bindObject, byte nonceCaller, byte nonceTpm, SymDef symmetric, TpmAlgId authHash ) : System

Constructs a temporary object to hold parameters of a session. Intended only for internal use by the Tpm2 class.

CalcSessionKey ( ) : void

Calculate the session-key from the nonces and salt/bound values (if present)

CanEncrypt ( ) : bool

Checks whether the given session can be used for parameter encryption.

GetAuthHmac ( byte parmHash, Direction direction, byte nonceDec = null, byte nonceEnc = null ) : byte[]

Calculate and return the auth-hmac (or plaintext auth if it is a policy session with PlaintextAuth set) based on the current session parms.

Init ( AuthSession Params ) : void

Sets parameters associated with the session.

Initialized ( ) : bool

Returns true if the parameters associated with the session context in TPM have been set in this object.

ParmEncrypt ( byte parm, Direction inOrOut ) : byte[]

메소드 상세

AuthSession() 보호된 메소드

protected AuthSession ( ) : System
리턴 System

AuthSession() 공개 메소드

public AuthSession ( ParametrizedHandle ph ) : System
ph ParametrizedHandle
리턴 System

AuthSession() 공개 메소드

Constructs an object encapsulating a session opened in TPM. The Tpm2 object that was used to create the session tracks other information associated with it and uses it to compute session key and command/response HMAC.
public AuthSession ( TpmHandle h ) : System
h TpmHandle
리턴 System

NewNonceCaller() 공개 메소드

public NewNonceCaller ( ) : void
리턴 void

RunPolicy() 공개 메소드

Run a path on the policy tree. The path is identified by the leaf identifier string. A session is created and returned. If allowErrors is true then errors returned do not cause an exception (but are returned in the response code).
public RunPolicy ( Tpm2 tpm, PolicyTree policyTree, string branchToEvaluate = null, bool allowErrors = false ) : TpmRc
tpm Tpm2
policyTree PolicyTree
branchToEvaluate string
allowErrors bool
리턴 TpmRc

SetNonceTpm() 공개 메소드

public SetNonceTpm ( byte nonceTpm ) : void
nonceTpm byte
리턴 void

프로퍼티 상세

Attrs 공개적으로 프로퍼티

public SessionAttr Attrs
리턴 SessionAttr

AuthHash 공개적으로 프로퍼티

Hash algorithm used by this session.
public TpmAlgId AuthHash
리턴 TpmAlgId

BindObject 공개적으로 프로퍼티

public TpmHandle,Tpm2Lib BindObject
리턴 TpmHandle

NonceCaller 공개적으로 프로퍼티

public byte[] NonceCaller
리턴 byte[]

NonceTpm 공개적으로 프로퍼티

public byte[] NonceTpm
리턴 byte[]

Salt 공개적으로 프로퍼티

public byte[] Salt
리턴 byte[]

SessionKey 공개적으로 프로퍼티

public byte[] SessionKey
리턴 byte[]

SessionType 공개적으로 프로퍼티

public TpmSe SessionType
리턴 TpmSe

Symmetric 공개적으로 프로퍼티

Symmetric cipher to be used for encrypting and decrypting sessions.
public SymDef,Tpm2Lib Symmetric
리턴 SymDef