撒點鹽Salt
Salt is a way to strengthen the security of encrypted data. It is a random string added to the data before it is encrypted, causing repetition of text in the clear to appear different when encrypted. Salt thus removes one method attackers use to steal data, namely, matching patterns of encrypted text.
To add or remove salt from encrypted columns, you again use the ALTER TABLE MODIFY command with either the SALT or NO SALT parameter specified with the ENCRYPT clause. Example 3-3 and Example 3-4 illustrate such commands.
Example 3-3 Adding Salt to an Encrypted Column
ALTER TABLE employee MODIFY (first_name ENCRYPT SALT);
Example 3-4 Removing Salt from an Encrypted Column
ALTER TABLE employee MODIFY (first_name ENCRYPT NO SALT);
To remove salt from an encrypted column before indexing it, use the syntax shown in Example 3-4. This command also re-encrypts the data.
Creating a Table with an Encrypted Column Using a Non-Default Algorithm and No Salt
By default, transparent data encryption adds salt to cleartext before encrypting it. This makes it harder for attackers to steal the data through a brute force attack.
However, if you plan to index the encrypted column, you must use NO SALT. Example 3-6 shows how to specify the NO SALT parameter with the SQL ENCRYPT clause (empID NUMBER ENCRYPT NO SALT). It also shows the syntax for specifying a different encryption algorithm (salary NUMBER(6) ENCRYPT USING '3DES168'). Note that the string which specifies the algorithm must be enclosed in single quotation marks.
Example 3-6 Creating a New Table with an Encrypted Column Using 3DES168 and NO SALT
CREATE TABLE employee (
first_name VARCHAR2(128),
last_name VARCHAR2(128),
empID NUMBER ENCRYPT NO SALT,
salary NUMBER(6) ENCRYPT USING '3DES168'
);
To add or remove salt from encrypted columns, you again use the ALTER TABLE MODIFY command with either the SALT or NO SALT parameter specified with the ENCRYPT clause. Example 3-3 and Example 3-4 illustrate such commands.
Example 3-3 Adding Salt to an Encrypted Column
ALTER TABLE employee MODIFY (first_name ENCRYPT SALT);
Example 3-4 Removing Salt from an Encrypted Column
ALTER TABLE employee MODIFY (first_name ENCRYPT NO SALT);
To remove salt from an encrypted column before indexing it, use the syntax shown in Example 3-4. This command also re-encrypts the data.
Creating a Table with an Encrypted Column Using a Non-Default Algorithm and No Salt
By default, transparent data encryption adds salt to cleartext before encrypting it. This makes it harder for attackers to steal the data through a brute force attack.
However, if you plan to index the encrypted column, you must use NO SALT. Example 3-6 shows how to specify the NO SALT parameter with the SQL ENCRYPT clause (empID NUMBER ENCRYPT NO SALT). It also shows the syntax for specifying a different encryption algorithm (salary NUMBER(6) ENCRYPT USING '3DES168'). Note that the string which specifies the algorithm must be enclosed in single quotation marks.
Example 3-6 Creating a New Table with an Encrypted Column Using 3DES168 and NO SALT
CREATE TABLE employee (
first_name VARCHAR2(128),
last_name VARCHAR2(128),
empID NUMBER ENCRYPT NO SALT,
salary NUMBER(6) ENCRYPT USING '3DES168'
);
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26870952/viewspace-2152946/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Salt Pillar
- 鹽城開票-鹽城開票
- 在密碼學中,“加鹽”(Salting)是指在儲存使用者密碼的雜湊值之前,向原始密碼新增一個隨機生成的字串(稱為“鹽”Salt)的過程。密碼學隨機字串
- 撒旦發撒的發撒的
- 朱玉可團隊新作:看一眼就能模仿,大模型讓機器人輕鬆學會撒鹽大模型機器人
- 如何鹽加密加密
- 撒旦撒
- salt-master命令詳解AST
- salt-minion離線安裝
- Salt Highstate資料結構定義資料結構
- 完結撒花!
- 《The Pathless》評測:在無拘無束的世界裡撒點野
- 關於鹽城哪裡可以開餐飲發票-鹽城百度派
- 隨筆集 #1 鹽與胡椒
- 凱撒加密演算法加密演算法
- 鹽 城 哪 裡 有 開 發 票
- .NetCore 登入(密碼鹽+隨機數)NetCore密碼隨機
- 關於鹽城哪裡可以開具住宿費發票-開票服務大廳-鹽城本地寶
- Python使用AES進行鹽值加密和解密Python加密解密
- java實現MD5加鹽加密方法Java加密
- 新東方“撒網式”轉型
- 愷撒密碼Java/Python實現密碼JavaPython
- 一罐鹽:《Clocker》的聲音設計(一)
- 加鹽hash儲存密碼的正確方式密碼
- 短連結演算法實現–加鹽hash演算法
- php password_hash password_verify 加密驗證不需要saltPHP加密
- xqore佛撒奇3.0系統開發
- [MySQL光速入門]032 完結撒花!!!MySql
- Shiro加鹽驗證/儲存使用者資訊
- 資料科學,會如何向我們撒謊?資料科學
- 將 Laravel 使用者密碼加密方式修改為 md5+salt 方式Laravel密碼加密
- 自來水廠飲用除硝酸鹽樹脂提標
- 凱撒密碼加解密過程與破解原理密碼解密
- 動中禪? 跳舞,or 修行or撒潑.我的選擇
- python_hashlib,md5,getpass, 密碼加密,隱藏,加鹽Python密碼加密
- 手寫Spring Config,最終一戰,來瞅瞅撒!Spring
- shiro入門學習--使用MD5和salt進行加密|練氣後期加密
- PostgreSQL使用者密碼如何透過md5加密儲存,是否加了saltSQL密碼加密