AES-256 Encryption

Abhishek Rao 1 Reputation point


I Need to know is there a common AES-256 algorithm which support Encryption and decryption from Both C# and SQL server ?

1) Master Key
2) Certificate
3) Symmetric Key
4) EncryptbyKey

Above are already in place in the database for specific columns like password

How do I make the application compatible with Encryption handling data from such columns on the front end.
Eg: Password for a user (in terms of login authentication, change password such operations done through SP calls from the app)

The main question is, can I inherit or derive the symmetric key created in the above method to be used in the app for encrypt/decrypt compatible between the app and db?

I needed to encrypt and decrypt data from both end (SQL and Application)

Can anybody help me with this ?


An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,035 questions
4,388 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Cheong00 3,461 Reputation points

    Most of your questions are answered here. Also check this page for considerations. (Say, you cannot use update statement accross encrypted and unencrypted fields directly)

    And then when you need to use it, simple enforce enforce encryption so the SQL Connection is encrypted, and automatically decrypted on your C# code.

    No code change other than connection string change is required on application side.