By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,146 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,146 IT Pros & Developers. It's quick & easy.

Open and Decrypt Secret Key

P: n/a
I'm trying to write a program in C# using .Nets crypto library. I have my
private key and know my password, but how do I load it into my program to use
for encryption and decryption? Everything I had found so far, has had the
user generate one through .Net, but I have to be able to load my own.

Thank you,
Susan
Apr 4 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
I have done something like this to enc' strings and our xml files.. Can you
be a little more specific Susan of what you are trying to do?.. maybe like a
pseudo code.. I can try to help

VJ

"Susan" <Su***@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
I'm trying to write a program in C# using .Nets crypto library. I have my
private key and know my password, but how do I load it into my program to
use
for encryption and decryption? Everything I had found so far, has had the
user generate one through .Net, but I have to be able to load my own.

Thank you,
Susan

Apr 5 '06 #2

P: n/a
string symmetricKeyString = @"base64encodedString";

byte[] symmetricKey = Convert.FromBase64String(symmetricKeyString);

SymmetricAlgorithm symmetricAlgorithm = new RijndaelManaged(); <- or
whatever

symmetricAlgorithm.Key = symmetricKey;

etc...

HTH

"Susan" <Su***@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
I'm trying to write a program in C# using .Nets crypto library. I have my
private key and know my password, but how do I load it into my program to
use
for encryption and decryption? Everything I had found so far, has had the
user generate one through .Net, but I have to be able to load my own.

Thank you,
Susan

Apr 6 '06 #3

P: n/a
How do you decode the secret key (session key in this case) with your private
key?
For instance User1 and User2 are in a conversation and each comes up with
half of the secret key. I need to use the private key to decrypt the secret
key in order to set the AES/Rijndeal key for encrypting and decrypting the
message. I know to Base64Decode the private key, but how do I decrypt it to
find out the secret key for the message passing?

Sorry for such silly questions. I'm really new to this stuff and trying to
learn. :)

Thank you,
Apr 7 '06 #4

P: n/a
Have you downloaded the .Net SDK? It has documentation that has examples on
secret key encryption.

"Susan" wrote:
How do you decode the secret key (session key in this case) with your private
key?
For instance User1 and User2 are in a conversation and each comes up with
half of the secret key. I need to use the private key to decrypt the secret
key in order to set the AES/Rijndeal key for encrypting and decrypting the
message. I know to Base64Decode the private key, but how do I decrypt it to
find out the secret key for the message passing?

Sorry for such silly questions. I'm really new to this stuff and trying to
learn. :)

Thank you,

Apr 27 '06 #5

P: n/a
Hi Susan. What are you doing exactly? I have some samples, but need to
know more about what you are trying to do on both sides to help better.

--
William Stacey [MVP]

"Susan" <Su***@discussions.microsoft.com> wrote in message
news:A3**********************************@microsof t.com...
| How do you decode the secret key (session key in this case) with your
private
| key?
| For instance User1 and User2 are in a conversation and each comes up with
| half of the secret key. I need to use the private key to decrypt the
secret
| key in order to set the AES/Rijndeal key for encrypting and decrypting the
| message. I know to Base64Decode the private key, but how do I decrypt it
to
| find out the secret key for the message passing?
|
| Sorry for such silly questions. I'm really new to this stuff and trying to
| learn. :)
|
| Thank you,
Apr 28 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.