public QuoteSigner(TPMSession tpmSession, ClientKeyHandle keyHandle, TPMPCRSelection pcrSelection) { _tpmSession = tpmSession; _keyHandle = keyHandle; _pcrSelection = pcrSelection; }
/// <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> /// 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"); } }
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 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)); } }
/// <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); }