public void ReadFromTpmBlob(TPMBlob blob) { _pcrSelection = TPMPCRSelectionCore.CreateFromTPMBlob(blob); byte[] digestAtRelease = new byte[20]; byte[] digestAtCreation = new byte[20]; blob.Read(digestAtRelease, 0, 20); blob.Read(digestAtCreation, 0, 20); }
public void ReadFromTpmBlob(TPMBlob blob) { _versionStruct = CapabilityDataCore.TPMVersionCore.CreateFromTPMBlob(blob); _sealInfo = new byte[blob.ReadUInt32()]; blob.Read(_sealInfo, 0, _sealInfo.Length); _encData = new byte[blob.ReadUInt32()]; blob.Read(_encData, 0, _encData.Length); }
public void ReadFromTpmBlob(TPMBlob blob) { _authHandle = blob.ReadUInt32(); _nonceEven = new byte[20]; blob.Read(_nonceEven, 0, _nonceEven.Length); if (_authType == AuthHandle.AuthType.OSAP) { _nonceEvenOSAP = new byte[20]; blob.Read(_nonceEvenOSAP, 0, _nonceEvenOSAP.Length); } }
public void ReadFromTpmBlob(TPMBlob blob) { _algorithmId = (TPMAlgorithmId)blob.ReadUInt32(); _encScheme = (TPMEncScheme)blob.ReadUInt16(); _sigScheme = (TPMSigScheme)blob.ReadUInt16(); UInt32 paramsSize = blob.ReadUInt32(); byte[] paramsData = new byte[paramsSize]; blob.Read(paramsData, 0, paramsData.Length); using (TPMBlob paramSrc = new TPMBlob(paramsData)) { if (_algorithmId == TPMAlgorithmId.TPM_ALG_RSA) { _params = TPMRSAKeyParamsCore.CreateFromTPMBlob(paramSrc); } else if (_algorithmId == TPMAlgorithmId.TPM_ALG_AES128 || _algorithmId == TPMAlgorithmId.TPM_ALG_AES192 || _algorithmId == TPMAlgorithmId.TPM_ALG_AES256) { //TODO throw new NotImplementedException("Symmetric key params not implemented"); } } }
public void ReadFromTpmBlob(TPMBlob blob) { uint size = blob.ReadUInt16(); byte[] selectionBits = new byte[size]; blob.Read(selectionBits, 0, (int)size); _pcrSelection = new BitMap(selectionBits); }
public void ReadFromTpmBlob(TPMBlob blob) { _keyLength = blob.ReadUInt32(); _numPrimes = blob.ReadUInt32(); uint expoSize = blob.ReadUInt32(); _exponent = new byte[expoSize]; blob.Read(_exponent, 0, (int)expoSize); }
public void ReadFromTpmBlob(TPMBlob blob) { /*uint responseSize = */ blob.ReadUInt32(); this._tag = blob.ReadUInt16(); this._version = new TPMVersionCore(blob); this._specLevel = blob.ReadUInt16(); this._errataRev = blob.ReadByte(); this._tpmVendorId = new byte[4]; blob.Read(_tpmVendorId, 0, _tpmVendorId.Length); ushort vendorSize = blob.ReadUInt16(); _vendorSpecific = blob.ReadBytes(vendorSize); }