From 7d5a29a9fd9faf34dc9a4cd37572d3201a6020ef Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 10 Oct 2014 16:13:57 -0700 Subject: [PATCH] Cleaning up comments --- .../Cng/CbcAuthenticatedEncryptor.cs | 4 ++-- .../Cng/GcmAuthenticatedEncryptor.cs | 4 ++-- .../Managed/ManagedAuthenticatedEncryptor.cs | 4 ++-- .../SP800_108/ManagedSP800_108_CTR_HMACSHA512.cs | 2 +- .../SP800_108/Win7SP800_108_CTR_HMACSHA512Provider.cs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Microsoft.AspNet.Security.DataProtection/Cng/CbcAuthenticatedEncryptor.cs b/src/Microsoft.AspNet.Security.DataProtection/Cng/CbcAuthenticatedEncryptor.cs index cc65448056..819facee9f 100644 --- a/src/Microsoft.AspNet.Security.DataProtection/Cng/CbcAuthenticatedEncryptor.cs +++ b/src/Microsoft.AspNet.Security.DataProtection/Cng/CbcAuthenticatedEncryptor.cs @@ -212,7 +212,7 @@ namespace Microsoft.AspNet.Security.DataProtection.Cng } finally { - // Buffer contains sensitive key material; nuke. + // Buffer contains sensitive key material; delete. UnsafeBufferUtil.SecureZeroMemory(pbTempSubkeys, cbTempSubkeys); } } @@ -397,7 +397,7 @@ namespace Microsoft.AspNet.Security.DataProtection.Cng } finally { - // Buffer contains sensitive material; nuke it. + // Buffer contains sensitive material; delete it. UnsafeBufferUtil.SecureZeroMemory(pbTempSubkeys, cbTempSubkeys); } } diff --git a/src/Microsoft.AspNet.Security.DataProtection/Cng/GcmAuthenticatedEncryptor.cs b/src/Microsoft.AspNet.Security.DataProtection/Cng/GcmAuthenticatedEncryptor.cs index 9e404851cd..e5e67cd31b 100644 --- a/src/Microsoft.AspNet.Security.DataProtection/Cng/GcmAuthenticatedEncryptor.cs +++ b/src/Microsoft.AspNet.Security.DataProtection/Cng/GcmAuthenticatedEncryptor.cs @@ -187,7 +187,7 @@ namespace Microsoft.AspNet.Security.DataProtection.Cng } finally { - // The buffer contains key material, so nuke it. + // The buffer contains key material, so delete it. UnsafeBufferUtil.SecureZeroMemory(pbSymmetricDecryptionSubkey, _symmetricAlgorithmSubkeyLengthInBytes); } } @@ -280,7 +280,7 @@ namespace Microsoft.AspNet.Security.DataProtection.Cng } finally { - // The buffer contains key material, so nuke it. + // The buffer contains key material, so delete it. UnsafeBufferUtil.SecureZeroMemory(pbSymmetricEncryptionSubkey, _symmetricAlgorithmSubkeyLengthInBytes); } } diff --git a/src/Microsoft.AspNet.Security.DataProtection/Managed/ManagedAuthenticatedEncryptor.cs b/src/Microsoft.AspNet.Security.DataProtection/Managed/ManagedAuthenticatedEncryptor.cs index 09f431dbdc..eedc30c5c5 100644 --- a/src/Microsoft.AspNet.Security.DataProtection/Managed/ManagedAuthenticatedEncryptor.cs +++ b/src/Microsoft.AspNet.Security.DataProtection/Managed/ManagedAuthenticatedEncryptor.cs @@ -270,7 +270,7 @@ namespace Microsoft.AspNet.Security.DataProtection.Managed } finally { - // nuke since these contain secret material + // delete since these contain secret material Array.Clear(decryptedKdk, 0, decryptedKdk.Length); Array.Clear(decryptionSubkey, 0, decryptionSubkey.Length); Array.Clear(validationSubkey, 0, validationSubkey.Length); @@ -382,7 +382,7 @@ namespace Microsoft.AspNet.Security.DataProtection.Managed } finally { - // nuke since these contain secret material + // delete since these contain secret material Array.Clear(decryptedKdk, 0, decryptedKdk.Length); Array.Clear(encryptionSubkey, 0, encryptionSubkey.Length); Array.Clear(validationSubkey, 0, validationSubkey.Length); diff --git a/src/Microsoft.AspNet.Security.DataProtection/SP800_108/ManagedSP800_108_CTR_HMACSHA512.cs b/src/Microsoft.AspNet.Security.DataProtection/SP800_108/ManagedSP800_108_CTR_HMACSHA512.cs index 54c2891ad7..38dbe359e1 100644 --- a/src/Microsoft.AspNet.Security.DataProtection/SP800_108/ManagedSP800_108_CTR_HMACSHA512.cs +++ b/src/Microsoft.AspNet.Security.DataProtection/SP800_108/ManagedSP800_108_CTR_HMACSHA512.cs @@ -45,7 +45,7 @@ namespace Microsoft.AspNet.Security.DataProtection.SP800_108 CryptoUtil.Assert(prfOutputSizeInBytes == prfOutput.Length, "prfOutputSizeInBytes == prfOutput.Length"); int numBytesToCopyThisIteration = Math.Min(prfOutputSizeInBytes, outputCount); Buffer.BlockCopy(prfOutput, 0, output.Array, outputOffset, numBytesToCopyThisIteration); - Array.Clear(prfOutput, 0, prfOutput.Length); // contains key material, so nuke it + Array.Clear(prfOutput, 0, prfOutput.Length); // contains key material, so delete it // adjust offsets outputOffset += numBytesToCopyThisIteration; diff --git a/src/Microsoft.AspNet.Security.DataProtection/SP800_108/Win7SP800_108_CTR_HMACSHA512Provider.cs b/src/Microsoft.AspNet.Security.DataProtection/SP800_108/Win7SP800_108_CTR_HMACSHA512Provider.cs index 29157aeefc..a163834603 100644 --- a/src/Microsoft.AspNet.Security.DataProtection/SP800_108/Win7SP800_108_CTR_HMACSHA512Provider.cs +++ b/src/Microsoft.AspNet.Security.DataProtection/SP800_108/Win7SP800_108_CTR_HMACSHA512Provider.cs @@ -53,7 +53,7 @@ namespace Microsoft.AspNet.Security.DataProtection.SP800_108 BitHelpers.WriteTo(pbTempInputCounter, i); // Step 4b: Hash. Win7 doesn't allow reusing hash algorithm objects after the final hash - // has been computed, so we'll just keep calling DuplicateHash on the original virgin + // has been computed, so we'll just keep calling DuplicateHash on the original // hash handle. This offers a slight performance increase over allocating a new hash // handle for each iteration. We don't need to mess with any of this on Win8 since on // that platform we use BCryptKeyDerivation directly, which offers superior performance.