簡體   English   中英

有彈性的城堡不能在Linux機器上工作

[英]Bouncy Castle not working on linux machine

我實現了boucnyCastle來生成和驗證Fips投訴簽名,這在Windows環境下工作正常,但在Linux環境下,代碼卡在了密鑰對生成上。 以下是我編寫的代碼:

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熵收集器守護程序)是否在系統上運行。 如果您使用的是虛擬機,則它將無法運行,要修復它,請使用以下鏈接:

http://wiki.networksecuritytoolkit.org/index.php/HowTo_Fix_The_rngd.service

其次,使用以下命令檢查系統是否具有足夠的熵:

貓/ proc / sys /內核/隨機/ entropy_avail

如果系統的熵沒有足夠的熵,則增加它。 您可以使用以下鏈接:

https://redhatlinux.guru/index.php/2016/04/03/increase-system-entropy-on-rhel-centos-6-and-7/

還要在系統上安裝Haveged以生成人工熵。 要安裝Haveged,您可以使用以下鏈接:

https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM