SQL服务器VS .NET加密 [英] sql server vs .net encryption

查看:110
本文介绍了SQL服务器VS .NET加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要存储少量的数据库字段(〜3)在数据库中的表加密形式。

I have to store a small number of database fields (~3) in encrypted form in database tables.

在一般情况下,是能够更好地加密/使用.NET加密应用程序中的数据进行解密或加密/使用对称密钥加密数据库中的数据进行解密?什么是两种方法的优点/缺点?

In general, is it better to encrypt/decrypt data within an application using .net cryptography or encrypt/decrypt data in a database using symmetric key encryption? What are the pros/cons of the two methods?

下面是我的环境:
应用 - 内网Web应用程序
开发平台 - Visual Studio 2010中,ASP.Net,.NET Framework 3.5的
服务器操作系统 - Windows Server 2008的
数据库 - SQL Server 2008的

Here is my Environment:
Application - intranet web application
Development Platform - Visual studio 2010, ASP.Net, .Net Framework 3.5
Server Operating System - Windows Server 2008
Database - SQL Server 2008

推荐答案

这是一个很大的问题。

我作为在它是让负责存储的数据的一部分,也负责它的任何加密。在这种情况下,让SQL服务器管理加密。

My take on it is to let the part responsible for storage of the data to also be responsible for any encryption of it. In this case, let SQL server manage the encryption.

主要的原因是,我们很少构建独立的应用程序了。这是比较常见的有多个应用程序使用同一个数据库后端。此外,这是比较常见的,以取代用于构建一个应用程序比它更换数据库引擎下方的技术。

The primary reason is that we rarely build stand alone applications anymore. It's more common to have multiple apps utilize the same database backend. Further, it's more common to replace the tech used to build an app than it is to replace the database engine underneath it.

如果你做到这一点在code,然后使用数据存储中的每个应用程序将不得不使用它自己的加密/解密库来获得对数据的访问。如果在SQL Server中完成的,那么应用程序可以是pretty的无知的过程中,而你保持相同的保护水平。

If you do it in code, then every app that uses the data store would have to use it's own encryption/decryption library to get access to the data. If done in sql server, then the apps can be pretty ignorant of the process while you maintain the same level of protection.

随着这个,你应该充分利用连接到加密的SQL服务器,这将处理保持加密,同时它在网络/应用服务器和数据库之间的运动数据的能力。你也应该有SSL浏览器和Web网站之间启用,以确保数据的浏览器之间是从来没有解密 - > Web服务器 - >数据库服务器

Along with this, you should leverage the ability to encrypt connections to the SQL server, which would handle keeping the data encrypted while it's in motion between the web/app server and the database. Also you should have SSL enabled between the browser and your web site to ensure the data is never decrypted between the browser -> web server -> database server.

希望有所帮助。

这篇关于SQL服务器VS .NET加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆