public QuoteSigner(TPMSession tpmSession, ClientKeyHandle keyHandle, TPMPCRSelection pcrSelection) { _tpmSession = tpmSession; _keyHandle = keyHandle; _pcrSelection = pcrSelection; }
/// <summary> /// Cosntructs a new BindBlockCipher with the specified arguments, the seal auth is requested from the user /// on first use /// </summary> /// <param name="keyHandle"></param> /// <param name="session"></param> public BindBlockCipher(ClientKeyHandle keyHandle, TPMSession session) { _keyHandle = keyHandle; _session = session; _keyInfo = _keyHandle.KeyInfo; if(_keyInfo.KeyUsage != TPMKeyUsage.TPM_KEY_BIND) throw new ArgumentException(string.Format("The key '{0}' is not a binding key!", keyHandle.FriendlyName)); }
public TPMRSASHA1Signer(TPMSession session, ClientKeyHandle keyHandle) { _session = session; _keyHandle = keyHandle; if(_keyHandle.KeyInfo.AlgorithmParams.AlgorithmId != TPMAlgorithmId.TPM_ALG_RSA || _keyHandle.KeyInfo.AlgorithmParams.SigScheme != TPMSigScheme.TPM_SS_RSASSAPKCS1v15_SHA1) { throw new ArgumentException("Invalid key handle for TPMRSASHA1Signer"); } }
/// <summary> /// Cosntructs a new SealBlockCipher with the specified arguments, the seal auth is requested from the user /// on first use /// </summary> /// <param name="keyHandle"></param> /// <param name="session"></param> public SealBlockCipher(ClientKeyHandle keyHandle, TPMSession session, TPMPCRSelection pcrSelection) { _keyHandle = keyHandle; _session = session; _myId = session.GetFreeId(); _pcrSelection = pcrSelection; _keyInfo = _keyHandle.KeyInfo; }
/// <summary> /// Constructs a new SealBlockCipher with the specified arguments and caches the specified seal auth value /// </summary> /// <param name="keyHandle"></param> /// <param name="session"></param> /// <param name="sealAuth"></param> public SealBlockCipher(ClientKeyHandle keyHandle, TPMSession session, TPMPCRSelection pcrSelection, ProtectedPasswordStorage sealAuth) : this(keyHandle, session, pcrSelection) { _session.SetValue("secret_seal_" + _keyHandle.FriendlyName + "_" + _myId.ToString(), sealAuth); }
/// <summary> /// Selects the specified tpm device. /// On success a TPMSession object is returned /// </summary> /// <param name="tpmIdentifier"></param> /// <returns></returns> public TPMSession SelectTPMDevice(string tpmIdentifier) { SelectTPMRequest request = new SelectTPMRequest (_ctx); request.TPMIdentifier = tpmIdentifier; SelectTPMResponse response = request.TypedExecute (); response.AssertTPMSuccess (); TPMSession session = new TPMSession (_ctx, response.TPMSessionIdentifier, this); session.SetRequestSecretCallback(_requestSecret); _activeSessions.Add (session.SessionIdentifier, session); return session; }
/// <summary> /// Removes the specified TPMSession from the active sessions /// </summary> /// <param name="tpmSession"></param> public void RemoveTPMSession(TPMSession tpmSession) { if (_activeSessions.ContainsKey (tpmSession.SessionIdentifier)) { _activeSessions.Remove (tpmSession.SessionIdentifier); tpmSession.Dispose (); } }
public TPMCapabilityClient(TPMSession tpmSession) { _tpmSession = tpmSession; }
public TPMIntegrityClient(TPMSession tpmSession) { _tpmSession = tpmSession; }
public TPMEndorsementKeyHandlingClient(TPMSession tpmSession) { _tpmSession = tpmSession; }
public ClientKeyHandle(string friendlyName, string identifier, TPMSession tpmSession) { _friendlyName = friendlyName; _keyIdentifier = identifier; _tpmSession = tpmSession; }
public TPMKeyClient(TPMSession tpmSession) { _tpmSession = tpmSession; }
public RNG(TPMSession tpmSession) { _tpmSession = tpmSession; }
public CounterClient(TPMSession tpmSession) { _tpmSession = tpmSession; }
public CounterContext(TPMSession tpmSession, uint counterId) { _tpmSession = tpmSession; _counterId = counterId; }
public TPMAdministrationClient(TPMSession tpmSession) { _tpmSession = tpmSession; }