2

I've followed the steps outlined here to generate a signed Zone file: https://www.digitalocean.com/community/tutorials/how-to-setup-dnssec-on-an-authoritative-bind-dns-server--2

In the generation of that file, it gave me 2 private and public key files that end with .private and .key as their file types, and the private file looks formatted like this:

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

I'd like to somehow get these files into the AsymmetricCypherKeyPair object within the BouncyCastle package, so that it can be used like this:

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

Does anyone know if there is support in the BouncyCastle package to import this type of public/private key file?

JBStevens6
  • 143
  • 1
  • 1
  • 5
  • What do the "random characters" look like, could you post an example (e.g. the modulus and the public exponent that make up the public key)? They are probably not *that* random. Note that you probably need to perform some simple parsing yourself to get this kind of key imported into Bouncy. – Maarten Bodewes Apr 18 '16 at 23:36

0 Answers0