SQL Server encryption and SQL Injection

Source: Internet
Author: User
Encryption on SQLServer built-in encryption on SQLServer is used to protect various types of sensitive data. In many cases, this encryption is completely transparent to you. When data is stored, it is encrypted and used automatically. In other cases, you can choose whether the data is encrypted. SQLServer can encrypt the following components:

Encryption on SQLServer built-in encryption on SQLServer is used to protect various types of sensitive data. In many cases, this encryption is completely transparent to you. When data is stored, it is encrypted and used automatically. In other cases, you can choose whether the data is encrypted. SQLServer can encrypt the following components:

Encryption on SQL Server

SQL Server has built-in encryption to protect various types of sensitive data. In many cases, this encryption is completely transparent to you. When data is stored, it is encrypted and used automatically. In other cases, you can choose whether the data is encrypted. SQL Server can encrypt the following components:
· Password
· Stored procedures, views, triggers, user-defined functions, default values, and rules.
· Data transmitted between users
Password Encryption
SQL Server automatically encrypts the passwords you assign to login and application roles. Although you can view the system table directly from the master without a password. You cannot make any changes to this situation. In fact, you cannot destroy it at all.
Define Encryption
In some cases, if the object is encrypted, it is prevented from sharing some information to others. For example, a stored process may contain the owner's business information, but this information cannot be seen by others, even if they publish a system table and can see the definition of objects. This is why SQL Server allows you to encrypt when creating an object. To encrypt a stored process, use the following creat procedure statement:
Create procedure procedurename [; number]
[@ Parameter datatype
[VARYING] [= defaultvalue] [OUTPUT]
[,…]
[With recompile | ENCRYPTION | RECOMPILE, ENCRYPTION]

We only care about the optional WITH parameter. You can describe ARECOMPILE or ENCRYPTION in detail, or you can describe them at the same time. The ENCRYPTION keyword protects SQL Server from being exposed in the process. As a result, if ENCRYPTION is activated, the system storage process sp_helptext will be ignored, and the storage process will be stored in the text of the process created by the user. If you do not want ENCRYPTION, you can use alter procedure to ignore the with encryption clause to recreate a process.
To enable encryption. Both users and servers should use TCP/IP NetworkLibraries for connection. Run the appropriate Network Utility and check Force protocol encryption. As shown in the following table, the connection between the user and the server will not be encrypted.

Encryption cannot be completely free. After the connection is confirmed, other constructor will be continued, and the user and server must run code to interpret the encrypted and interpreted packages. Some overhead will be required here and the process will slow down when decoding. If the network package is out of your control, this is a good practice.

What is missing in encryption?
You can notice that there is something in this list that is encrypted: Data in your table. Before you store data, SQL Server does not provide any built-in tools to encrypt your data. If you need to protect data stored on SQL Server, we will give you two suggestions: first, you can use the GRANT and DENY keywords to control the data that you want to read in SQL Server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.