CN110851874A - 一种利用矩阵替换实现数据脱敏的方法 - Google Patents
一种利用矩阵替换实现数据脱敏的方法 Download PDFInfo
- Publication number
- CN110851874A CN110851874A CN201911144395.1A CN201911144395A CN110851874A CN 110851874 A CN110851874 A CN 110851874A CN 201911144395 A CN201911144395 A CN 201911144395A CN 110851874 A CN110851874 A CN 110851874A
- Authority
- CN
- China
- Prior art keywords
- matrix
- data
- elements
- desensitization
- plaintext
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
- G06F21/6254—Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Mathematical Physics (AREA)
- Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Medical Informatics (AREA)
- Algebra (AREA)
- Storage Device Security (AREA)
Abstract
本发明公开了一种利用矩阵替换实现数据脱敏的方法,包括以下步骤:获取密钥和明文数据;对明文数据进行编码;将密钥对M取模获得对应M*N矩阵的行数;根据数据获得矩阵的列数;根据确定的列数、行数查找矩阵对应元素,并将该元素替换该数据。其基于密钥、数据确定其与矩阵中元素,利用矩阵元素替换数据,实现数据脱敏,矩阵中元素是人为设置的,不易被破解,进一步提高数据的安全性。
Description
技术领域
本发明涉及数据处理方法领域,更具体的说是涉及一种利用矩阵替换实现数据脱敏的方法。
背景技术
数据脱敏是指对某些敏感信息通过脱敏规则进行数据的变形,实现敏感隐私数据的可靠保护。在涉及客户安全数据或者一些商业性敏感数据的情况下,在不违反系统规则条件下,对真实数据进行改造并提供测试使用,如身份证号、手机号、卡号、客户号等个人信息都需要进行数据脱敏。对数据进行了脱敏后,一些伪装为合法用户诈骗的行为很容易被识别。比如若某黑客窃取了运营商的明文数据库信息,然后伪装成运营商客服对用户进行诈骗,由于黑客拿到的是真实信息,这种诈骗容易得逞。但是,如果运营商的数据是经过脱敏后保存在数据库中,及时黑客窃取了这些信息,在无法实施还原的情况下(如果脱敏算法足够好,有时连黑客都没有能力识别窃取到的数据到底是真实数据还是脱敏后的数据),黑客再去实施诈骗很容易被用户识别出来,比如把客户姓或名搞错、身份证念错等等,从而十分有效地规避了诈骗。
现有的数据脱敏方式很多,譬如:
基于固定替换,即对明文进行固定替换,比如A->C,B->F;
基于随机替换,即对明文进行随机替换,比如对A-Z随机替换为A-Z的任何字母;
基于数字移位,采用了固定移位法,比如将A-Z,变换为0-22,然后增加一个移位因子,比如为5,则A替换为F,B变换为G。
采用该种方法,其均存在容易被破解、安全性不高的缺陷。
发明内容
本发明为了解决上述技术问题提供一种利用矩阵替换实现数据脱敏的方法。
本发明通过下述技术方案实现:
一种利用矩阵替换实现数据脱敏的方法,包括以下步骤:
获取密钥和明文数据;
对明文数据进行编码;
将密钥对M取模获得对应M*N矩阵的行数,其中M为大于1的自然数,N为矩阵对应的列数;
根据明文数据获得矩阵的列数;
根据确定的列数、行数查找矩阵对应元素,并将该元素替换该明文数据。
本方案基于密钥、数据确定其与矩阵中元素,利用矩阵元素替换数据,实现数据脱敏,矩阵中元素是人为设置的,不易被破解,进一步提高数据的安全性。采用该方法,被脱敏的数据保留格式,且数据唯一,保证数据的一致性。
作为优选,所述矩阵中的元素包括数字0-9、大写字母A-Z、小写字母a-z。
本发明与现有技术相比,具有如下的优点和有益效果:
1、本发明基于密钥、数据确定其与矩阵中元素,利用矩阵元素替换数据,实现数据脱敏,矩阵中元素是人为设置的,不易被破解,进一步提高数据的安全性。
附图说明
此处所说明的附图用来提供对本发明实施例的进一步理解,构成本申请的一部分,并不构成对本发明实施例的限定。
图1为矩阵的示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚明白,下面结合实施例和附图,对本发明作进一步的详细说明,本发明的示意性实施方式及其说明仅用于解释本发明,并不作为对本发明的限定。
实施例1
一种利用矩阵替换实现数据脱敏的方法,包括以下步骤:
获取密钥和明文数据;
对明文数据进行编码;
将密钥对M取模获得对应M*N矩阵的行数,其中M为大于1的自然数,N为矩阵对应的列数;
根据明文数据确定矩阵的列数;
根据确定的列数、行数查找矩阵中对应元素,并将该元素替换该明文数据。
列数N可采用多种方式,依次采用数字排序,依次采用数字0-9、大写字母A-Z、小写字母a-z共62列的排序方式均可,对应的,在对明文数据进行编码时,将明文数据编码成数字,或根据ASCII码将明文数据编码成数字0-9、大写字母A-Z、小写字母a-z。
以一具体实施方式对本实施例进行解释:
矩阵中的元素包括但不限于数字0-9、大写字母A-Z、小写字母a-z62中元素。矩阵的行M、N为0-65536,理论上可以是无限,一般是1024。本实施例以图1所示的矩阵为例,其为6*9的矩阵。
若明文数据为5,其编码也为5;用户输入密钥123456,获取该密钥和数据后,123456%6=0;
那么即取矩阵中0行、5列的元素作为5的替换数据,即以7替换5。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Claims (4)
1.一种利用矩阵替换实现数据脱敏的方法,其特征在于,包括以下步骤:
获取密钥和明文数据;
对明文数据进行编码;
将密钥对M取模获得对应M*N矩阵的行数,其中M为大于1的自然数,N为矩阵对应的列数;
根据明文数据确定矩阵的列数;
根据确定的列数、行数查找矩阵中对应元素,并将该元素替换该明文数据。
2.根据权利要求1所述的一种利用矩阵替换实现数据脱敏的方法,其特征在于,所述矩阵中的元素包括数字0-9、大写字母A-Z、小写字母a-z。
3.根据权利要求1所述的一种利用矩阵替换实现数据脱敏的方法,其特征在于,所述M、N为0-65536。
4.根据权利要求1所述的一种利用矩阵替换实现数据脱敏的方法,其特征在于,所述明文数据编码成0-9、A-Z、a-z的数字或字符,所述矩阵的列为依次为0-9、A-Z、a-z供62列。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911144395.1A CN110851874A (zh) | 2019-11-20 | 2019-11-20 | 一种利用矩阵替换实现数据脱敏的方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911144395.1A CN110851874A (zh) | 2019-11-20 | 2019-11-20 | 一种利用矩阵替换实现数据脱敏的方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110851874A true CN110851874A (zh) | 2020-02-28 |
Family
ID=69603249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911144395.1A Pending CN110851874A (zh) | 2019-11-20 | 2019-11-20 | 一种利用矩阵替换实现数据脱敏的方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110851874A (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115422594A (zh) * | 2022-09-20 | 2022-12-02 | 成都比特信安科技有限公司 | 一种利用矩阵替换实现数据脱敏的方法 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8116119B1 (en) * | 2007-09-07 | 2012-02-14 | Xilinx, Inc. | Desensitizing static random access memory (SRAM) to process variations |
CN106203139A (zh) * | 2016-07-13 | 2016-12-07 | 成都知道创宇信息技术有限公司 | 一种数据局部脱敏方法 |
CN109039586A (zh) * | 2018-08-17 | 2018-12-18 | 贵州大学 | 一种可恢复的保留数字类型轻量级脱敏方法 |
CN109684857A (zh) * | 2018-12-21 | 2019-04-26 | 厦门大学 | 一种信息隐藏方法、终端设备及存储介质 |
-
2019
- 2019-11-20 CN CN201911144395.1A patent/CN110851874A/zh active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8116119B1 (en) * | 2007-09-07 | 2012-02-14 | Xilinx, Inc. | Desensitizing static random access memory (SRAM) to process variations |
CN106203139A (zh) * | 2016-07-13 | 2016-12-07 | 成都知道创宇信息技术有限公司 | 一种数据局部脱敏方法 |
CN109039586A (zh) * | 2018-08-17 | 2018-12-18 | 贵州大学 | 一种可恢复的保留数字类型轻量级脱敏方法 |
CN109684857A (zh) * | 2018-12-21 | 2019-04-26 | 厦门大学 | 一种信息隐藏方法、终端设备及存储介质 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115422594A (zh) * | 2022-09-20 | 2022-12-02 | 成都比特信安科技有限公司 | 一种利用矩阵替换实现数据脱敏的方法 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10572648B2 (en) | Fraud resistant passcode entry system | |
US8375428B2 (en) | Password input system using alphanumeric matrices and password input method using the same | |
CA2649015C (en) | Graphical image authentication and security system | |
CN106384143B (zh) | 一种动态电子二维码生成方法及识别方法 | |
US20110004769A1 (en) | Password input system using an alphanumeric matrix and password input method using the same | |
EP3889866A1 (en) | Methods and devices for providing and authenticating two-dimensional code | |
CN1455899A (zh) | 保密信息记录媒介、保护方法、保护存储方法及信息访问报警系统 | |
WO2006086505A2 (en) | Privacy protected cooperation network | |
CN101316166A (zh) | 基于随机字符组的动态口令身份认证方法 | |
US9768959B2 (en) | Computer security system and method to protect against keystroke logging | |
CN104537300A (zh) | 安全密码设置及验证方式 | |
CN101064602A (zh) | 一种密码输入方法及系统 | |
CN103929425A (zh) | 一种身份注册、身份认证的方法、设备和系统 | |
CN103312519A (zh) | 一种动态口令设备及其工作方法 | |
EP2883183B1 (en) | Authentication method and system | |
CN110598383A (zh) | 解除账户权限限制的方法以及装置 | |
CN110851874A (zh) | 一种利用矩阵替换实现数据脱敏的方法 | |
CN105681044A (zh) | 一种把密码或验证码作为顺序号验证码识别系统 | |
CN111949952B (zh) | 验证码请求处理方法及计算机可读存储介质 | |
CN1776721A (zh) | 通用型防伪方法及系统 | |
CN108881235B (zh) | 识别账号的方法及系统 | |
CN109711134B (zh) | 基于网络的用户身份防盗用系统、方法、设备及存储介质 | |
CN112528254A (zh) | 一种密码安全检测方法 | |
Kurita et al. | Privacy protection on transfer system of automated teller machine from brute force attack | |
Khanas et al. | Research on the use of algorithms for matrix transformations for encrypting text information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200228 |