与HMAC功能FIPS验证的应用程序基于SHA512? [英] FIPS validated application with HMAC function based on SHA512?

查看:196
本文介绍了与HMAC功能FIPS验证的应用程序基于SHA512?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立一个有效的FIPS应用和具有FIPS模式打开我的电脑上。我需要希望基于SHA512的HMAC功能。据我所知,HMAC SHA1功能是FIPS验证,但我有一个哈希函数SHA512CryptoServiceProvider这是FIPS验证,我知道,FIPS事实上确实允许SHA512。 ?有没有在C#中,做有效的HMAC SHA512 FIPS类似HMAC功能

I'm building a FIPS validated application and have the FIPS mode turned on on my computer. I need an HMAC function hopefully based on SHA512. I understand that the HMAC SHA1 function is FIPS validated but I have a hash function SHA512CryptoServiceProvider which is FIPS validated and I know that FIPS does in fact allow for SHA512. Is there a similar HMAC function in C# that does FIPS validated HMAC SHA512?

推荐答案

有一个的HMACSHA512类的,但是它使用的SHA512Managed类内部的,这是的未经过FIPS认证

There is a HMACSHA512 Class, but it uses the SHA512Managed Class internally, which is not FIPS certified.

您可以尝试的创建自己的HMACSHA512类的基础上的 SHA512CryptoServiceProvider类

You could try to create your own HMACSHA512 Class based on the SHA512CryptoServiceProvider Class:

public class MyHMACSHA512 : HMAC
{
    public MyHMACSHA512(byte[] key)
    {
        HashName = "System.Security.Cryptography.SHA512CryptoServiceProvider";
        HashSizeValue = 512;
        BlockSizeValue = 128;
        Key = key;
    }
}

这篇关于与HMAC功能FIPS验证的应用程序基于SHA512?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆