I am testing a solution with your .Net Mail control.
I followed your steps to create a 1024 bit encrypted key however our DNS provider can only accept dns record values of up to 256 characters so I cannot create the txt record.
I have recreated the keys using 64 bit encryption so I can create the dns entry however I can’t read the private key anymore. The line of code that breaks is:
Dim rsa As RSACryptoServiceProvider = New PemReader() _
.ReadPrivateKeyFromFile("C:\Users\Steve\Documents\DKIM.Private.key")
Which errors with "DER data malformed" and "Bad Data" exceptions.