我实施了boucnycastle以进行FIPS投诉签名生成和验证,在Windows环境上效果很好,但是在Linux环境上,代码粘在Keypair Generation上。以下是我编写的代码:
public static KeyPair generateKeyPair() throws GeneralSecurityException
{
KeyPairGenerator keyPair = KeyPairGenerator.getInstance("RSA", "BCFIPS");
keyPair.initialize(new RSAKeyGenParameterSpec(3072, RSAKeyGenParameterSpec.F4));
return keyPair.generateKeyPair();
}
弹性城堡
首先检查系统上是否正在运行RNGD.Service(硬件RNG熵Gainterer Daemon)。如果您使用的是虚拟机,则它将不会运行并修复其使用以下链接:
http://wiki.networksecuritytoolkit.org/index.php/howto_fix_the_rngd.service
第二次检查您的系统是否使用命令:
cat/proc/sys/kernel/andural/entropy_avail
如果系统的熵不足,则会增加它。您可以使用以下链接:
https://redhatlinux.guru/index.php/2016/04/03/increase-system-entropy-entropy-on-rhel-centos-6-and-7/
还在系统上安装载体以生成人工熵。要安装载体,您可以使用以下链接:
https://www.digitalocean.com/community/tutorials/how-to-to-setup-additional-entrophy-for-for-cloud-cloud-server--server--server-server-server-server-ser-using have have