如何将DNSSEC私钥导入BouncyCastle

时间:2016-04-18 21:25:19

标签: c# cryptography bouncycastle private-key dnssec

我已按照此处列出的步骤生成已签名的区域文件:https://www.digitalocean.com/community/tutorials/how-to-setup-dnssec-on-an-authoritative-bind-dns-server--2

在该文件的生成中,它给了我2个以.private和.key作为其文件类型的私有和公共密钥文件,并且私有文件的格式如下:

Private-key-format: v1.3
Algorithm: 7 (NSEC3RSASHA1)
Modulus: (random characters)
PublicExponent: (random characters)
PrivateExponent: (random characters)
Prime1: (random characters)
Prime2: (random characters)
Exponent1: (random characters)
Exponent2: (random characters)
Coefficient: (random characters)
Created: 20160415164633
Publish: 20160415164633
Activate: 20160415164633

我想以某种方式将这些文件放入BouncyCastle包中的AsymmetricCypherKeyPair对象中,以便它可以像这样使用:

privateKey = PrivateKeyInfoFactory.CreatePrivateKeyInfo(importedPair.Private).GetDerEncoded();

有人知道BouncyCastle包中是否支持导入此类公钥/私钥文件?

0 个答案:

没有答案