security - How do I encrypt SQL Server data in application level and still be able to query it with LIKE? -


situation:

  • i developing asp.net website organization using microsoft sql server , c# .net. intranet website.
  • the ms sql server database contains sensitive data in columns. there 320,000 rows in 6 tables. data top-secret me because manually prepared , entered in tables. mission tedious, took me 1 year. said, not want ever readable copy of data.
  • i not have permission intranet server. must give published website , database data , schema else host it. protect .net code.
  • the department staff administering database server host website. not trustful, , must not readable copy of data. have complete access , full permission manage sql server.
  • i need query encrypted data like.
  • although stored procedures best me, not mind writing select statements in .net.
  • the readable string @ 100 characters long. encrypt system.security.cryptography.aescryptoserviceprovider , store in database in nvarchar(300). encrypted string stored in database @ 300 characters long. pattern not exceed 100 characters.

what have done (please correct me if wrong):

  • i considered database build-in encryption/decryption functionality. have complete access server able decrypt data.

  • i considered encrypting data in application level, using .net, , creating clr function callable sql server. clr function decrypt data in same select statement. how prevent server administrators using clr function decrypt data?

specific question: can protect data database administrators, , still able query like? if not possible, best practice in case? can prevent database server administrators using clr function?

  1. for each query download strings client, decrypt them , search them.
  2. or, use https://en.wikipedia.org/wiki/homomorphic_encryption unrealistic.
  3. or, generate possible substrings found like. encrypt them , store them. then, can equality match on them. n character string there n*n/2 substrings. encryption breaks down short strings because attacker can deduce duplicate characters , on.

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -