广告
返回顶部
首页 > 资讯 > 数据库 >撒点盐Salt
  • 176
分享到

撒点盐Salt

2024-04-02 19:04:59 176人浏览 独家记忆
摘要

Salt is a way to strengthen the security of encrypted data. It is a random string added to the data bef

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'
);
您可能感兴趣的文档:

--结束END--

本文标题: 撒点盐Salt

本文链接: https://www.lsjlt.com/news/47810.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • 撒点盐Salt
    Salt is a way to strengthen the security of encrypted data. It is a random string added to the data bef...
    99+
    2022-10-18
  • 基于vue+openlayer实现地图聚合和撒点效果
    目录前言:实现效果:1、聚合效果:2、撒点效果:具体实现步骤:1、项目中引入openlayer2、配置(按需引入)3、实现地图展示4、撒点功能5、聚合效果前言: openlayer是...
    99+
    2022-11-12
  • python使用opencv对图像添加噪声(高斯/椒盐/泊松/斑点)
    目录1、高斯噪声2、椒盐噪声3、泊松噪声4、speckle噪声导读: 这篇文章主要介绍如何利用opencv来对图像添加各类噪声,原图: 1、高斯噪声 高斯噪声就是给图片添加一个服从...
    99+
    2022-11-10
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作