Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 21st, 2005, 09:50 AM
Registered User
 
Join Date: Mar 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default better sol to archieve encryption and decryption

Hi All,

      Basically, I would like to encrypt the data/file at the client end and should be able to decrypt it at the server side. So that client/end user should not manipulate the auto generated file from the application(window). I've gone through some of the articles from the net and I have found three options to archieve this.

1) Symmetric
    Adv: Can encrypt and decrypt using key values.
    Disadv: If the end user decode the manage code then it is possible to identify the key values. Then they can also decrypt the file at their end.
2) Asymmetric
    Adv: Can encrypt and decrypt using the public and private certificates.
3) Hash algorithum
    Add and disadv more or less similar to (1).

So i prefer to go with point (2), i.e Asymmetric. If anyone has better solutions to archieve encryption and decryption of the file then please let me know.

Thanks & Regards,
Shiby Chacko
 
Old February 10th, 2009, 09:53 AM
Registered User
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help ! asymmetric encryption ?

I am trying to work out a program that will implement asymmetric encryption using CryptoAPI (C/C++ language) using digital certificates. What I want to do is use the public key from the certificate(currently PFX) to encrypt data, while use the private key to decrypt.

I started by writing a program that uses API's like CryptAcquireContext,CPGetUserkey() etc to encrypt and decrypt. However, while decrypting, I am not getting back the same program that existed before encryption.

Then I am trying out a program to do the same by extracting key information from the certificate. However, I am seeing at forums that some marshalling of public keys needs to be done to use it. Similarly, I am not being able to extract the private key from the certificate (Windows PFX).

Can you please advise me what needs to be done to get this working. Also, if you can share your code, it would be of great help.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Encryption/Decryption Problem param99 SQL Server 2000 4 December 14th, 2006 05:20 AM
Encryption & Decryption jvraman SQL Server 2000 1 June 22nd, 2006 02:48 AM
Encryption and Decryption kvanchi General .NET 1 February 2nd, 2005 02:04 PM
Encryption and Decryption kvanchi General .NET 2 January 24th, 2005 02:52 PM
Encryption/Decryption using IUSR msrnivas General .NET 0 January 12th, 2005 12:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.