all groups > dotnet security > july 2005 >
You're in the

dotnet security

group:

Asymetric Key Pairs


Asymetric Key Pairs Chris Kennedy
7/23/2005 12:00:00 AM
dotnet security:
I've seen some code which makes perfect sense, but what namespace is the
encryption class. Furthermore, when I create my key pair how the distribute
the public key.

Dim asym As New Encryption.Asymmetric()
Dim pubkey As New Encryption.Asymmetric.PublicKey()
Dim privkey As New Encryption.Asymmetric.PrivateKey()
asym.GenerateNewKeyset(pubkey, privkey)
Dim secret As String = "ancient chinese"
Dim encryptedData As Encryption.Data
encryptedData = asym.Encrypt(New Encryption.Data(secret), pubkey)
Dim decryptedData As Encryption.Data
Dim asym2 As New Encryption.Asymmetric()
decryptedData = asym2.Decrypt(encryptedData, privkey)

RE: Asymetric Key Pairs Clemens Reijnen
7/25/2005 11:19:02 PM
You can extract the public key from the keypair with sn.exe
namespace: System.Security.Cryptography

[quoted text, click to view]
AddThis Social Bookmark Button