Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News How .NET Handles Standards Compliance that Result in Breaking Changes

How .NET Handles Standards Compliance that Result in Breaking Changes


Two security classes in .NET, HMACSHA512 and HMACSHA384, have a bug. It isn't an earth-shattering bug, but it does produce results that are inconsistent with the standard. The .NET Security team shows how this will be handed so that current applications won't break when the code gets fixed.

The HMACSHA512 and HMACSHA384 classes produces "results which are not consistent with other implementations of HMAC-SHA-512 and HMAC-SHA-384". This will be addressed in a future service pack, at which time all the programs relying on the old behavior will break.

The first step in addressing this is to add a property called "ProduceLegacyHmacValues". This will allow new programs to explicitly use the old behavior.

In order to support pre-existing programs that happen to be using the new version, a configuration value has been created. The key, legacyHMACMode, can be set in the applications configuration file or at the machine.config level.

Since not everyone is going to hear about this fix before it is too late, warning messages will be placed in the event log and when debuggers are attached to programs that use these classes. Once the change has been handled, the warning message can be disabled using the legacyHMACWarning configuration key.

InfoQ Asks, Is Microsoft handling this the right way?


We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.