CN105184175B - 一种Linux操作系统中数据的保护方法 - Google Patents

一种Linux操作系统中数据的保护方法 Download PDF

Info

Publication number
CN105184175B
CN105184175B CN201510483863.3A CN201510483863A CN105184175B CN 105184175 B CN105184175 B CN 105184175B CN 201510483863 A CN201510483863 A CN 201510483863A CN 105184175 B CN105184175 B CN 105184175B
Authority
CN
China
Prior art keywords
hash
algorithm
linux
safety
suse
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.)
Active
Application number
CN201510483863.3A
Other languages
English (en)
Other versions
CN105184175A (zh
Inventor
常玉芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING DONGFANG YIMENG TECHNOLOGY CO.,LTD.
Original Assignee
Shanghai Feixun Data Communication Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510483863.3A priority Critical patent/CN105184175B/zh
Publication of CN105184175A publication Critical patent/CN105184175A/zh
Application granted granted Critical
Publication of CN105184175B publication Critical patent/CN105184175B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Alarm Systems (AREA)

Abstract

本发明提供一种Linux操作系统中数据的保护方法,包括步骤:于系统上电启动后,初始化Linux操作系统的系统时间;获取系统时间;将系统时间作为第一算法的输入,以计算获取hash安全因子;根据hash安全因子构建hash表;在构建hash表时,获取关键码值;以关键码值作为hash算法的输入获取第一hash值;以hash安全因子和第一hash值作为第三算法的输入获取计算结果;以计算结果作为hash算法的输入获取第二hash值。在linux系统中使用hash算法的代码中,将hash安全因子与hash算法所得结果再次按照指定hash算法计算后所得的结果构建hash表,在系统启动过程中就开始对一些相应重要的数据加上安全防护,在系统使用过程中同样会在。

Description

一种Linux操作系统中数据的保护方法
技术领域
本发明涉及计算机安全领域,尤其涉及一种Linux操作系统中数据的保护方法。
背景技术
在linux中几乎一切皆文件,即linux中任何事物都可以用一个文件来表示,或者通过特殊的文件提供。linux中为了能快速通过文件名查找到文件相关的信息,通常使用哈希(hash)算法。
所谓哈希算法即散列函数,是将任意长度的二进制值映射为较短的固定长度的二进制值,这个小的二进制值称为哈希值,映射函数称为散列函数。哈希表也叫散列表,根据关键码值(Key value)而直接进行访问的数据结构,它通过把关键码值映射到表中一个位置来访问记录,以加快查找的速度,这个存放记录的数组叫做哈希表。而常用的hash算法在网络或书本上都有清晰的解析,只要熟悉常用的hash算法,就能很容易的获取或修改系统或用户的重要数据信息,从而导致数据安全受到威胁。
发明内容
鉴于上述问题,本申请记载了一种Linux操作系统中数据的保护方法,包括步骤:
于系统上电启动后,初始化所述Linux操作系统的系统时间;
获取所述系统时间;
将所述系统时间作为第一算法的输入,以计算获取hash安全因子;
根据所述hash安全因子构建hash表。
较佳的,所述第一算法为MD5算法。
较佳的,根据所述hash安全因子构建hash表的步骤包括:
所述Linux操作系统获取关键码值;
将所述关键码值作为hash算法的输入,以获取第一hash值;
保存所述第一hash值。
较佳的,根据所述hash安全因子构建hash表的步骤还包括:
将所述hash安全因子和所述第一hash值作为第三算法的输入,以获取计算结果;
保存所述计算结果。
较佳的,所述第三算法为加和/或减和/或乘和/或除和/或取余。
较佳的,根据所述hash安全因子构建hash表的步骤还包括:
将所述计算结果作为所述hash算法的输入,以获取第二hash值;
根据所述第二hash值构建所述hash表。
较佳的,所述第二hash值为所述关键码值在所述hash表中映射的地址。
上述技术方案具有如下优点或有益效果:通过所述保护linux系统中数据的方法,在linux系统中使用hash算法的代码中,增加一个hash安全因子,将hash安全因子与hash算法所得结果再次按照指定hash算法计算后所得的结果构建hash表,增加hash安全因子后,想要获取或破坏数据就比较困难;在系统启动过程中就开始对一些相应重要的数据加上安全防护,在系统使用过程中同样会在。
附图说明
参考所附附图,以更加充分的描述本发明的实施例。然而,所附附图仅用于说明和阐述,并不构成对本发明范围的限制。
图1为本发明一种Linux操作系统中数据的保护方法的流程示意图;
图2为本发明一种Linux操作系统中数据的保护方法中构建hash表的流程示意图一;
图3为本发明一种Linux操作系统中数据的保护方法中构建hash表的流程示意图二;
图4为本发明一种Linux操作系统中数据的保护方法中构建hash表的流程示意图三。
具体实施方式
下面结合附图和具体实施例对本发明Linux操作系统中数据的保护方法进行详细说明。
如图1所示,一种Linux操作系统中数据的保护方法,包括步骤:
于系统上电启动后,初始化所述Linux操作系统的系统时间;
获取所述系统时间;
根据所述系统时间和所述第一算法计算hash安全因子V1;
根据所述hash安全因子V1构建hash表。
总体来讲,Linux系统启动运行时,首先要对系统时间进行初始化,然后以初始化的时间为依据,并根据第一算法计算出此时的hash安全因子V1,对所述hash安全因子V1进行保存以备构建hash表时使用,最后根据所述hash安全因子V1构建所述hash表。
linux系统中使用hash算法中,增加一个hash安全因子,将hash安全因子与hash算法所得结果再次按照指定算法计算后所得的结果构建hash表。
具体而言,在根据第一算法计算hash安全因子V1的过程中包括步骤:
获取所述系统时间;
将所述系统时间作为所述第一算法的输入,以获取hash安全因子V1,保存所述hash安全因子V1。
在进行所述hash安全因子V1的计算过程中,要将所述系统时间输入所述第一算法,从而获取hash安全因子,同时还需要将所述hash安全因子V1进行保存以备后续的计算。其中,所述第一算法可以为MD5(Message-Digest Algorithm 5,信息-摘要算法5)。MD5为计算机安全领域广泛使用的一种散列函数,用以提供消息的完整性保护。MD5的作用是让大容量信息在用数字签名软件签署私人密钥前被“压缩”成一种保密的格式(就是把一个任意长度的字节串变换成一定长的十六进制数字串)。利用MD5算法,并根据系统时间获取hash安全因子,通过使用所述hash安全因子,使得系统在使用过程中能相对增加一定的安全保障。所述第一算法还可以为其它的加密算法,并不仅限于MD5。
如图2所示,在构建hash表时,包括步骤:所述Linux操作系统获取关键码值A;
将所述关键码值A作为第二算法的输入,以获取第一hash值V2,保存所述第一hash值V2。
在构建hash表时,首先要计算hash值,而hash值的计算需要通过关键码值A和第二算法,其中,所述第二算法可以为hash算法。具体来说,需要以关键码值A作为输入值,通过hash算法计算出第一hash值V2。所述hash算法将任意长度的二进制值(关键码值A)映射为较短的固定长度的二进制值,这个小的二进制值称为第一hash值V2。第一hash值V2是一段数据唯一且极其紧凑的数值表示形式。如果散列一段明文而且哪怕只更改该段落的一个字母,随后的哈希都将产生不同的值。要找到散列为同一个值的两个不同的输入,在计算上是不可能的,所以数据的第一hash值V2可以检验数据的完整性。所述hash算法一般用于快速查找和加密算法。
如图3所示,构建hash表还包括步骤:
将所述hash安全因子V1和所述第一hash值V2作为第三算法的输入,以获取计算结果V3;
保存计算结果V3。
在获取了hash安全因子V1和第一hash值V2后,以这两个数值为输入值输入至所述第三算法,通过所述第三算法获取结果V3。其中,所述第三算法为加和/或减和/或乘和/或除和/或取余,即将V1和V2进行加、减、乘、除、取余等各种计算中的一种或几种,所述第三算法并不仅限于加、减、乘、除、取余这些简单算法。
如图4所示,在构建hash表时,还包括:
将结果V3作为所述第二算法的输入;
获取并保存第二hash值V4;
根据所述第二hash值构建所述hash表。
在获取了结果V3后,将其作为hash算法的输入,获取第二hash值V4。其中,第二hash值V4即为关键码值A在hash表中映射的位置。采用这种hash表的构建方式,不仅限于启动时构建hash表使用,在系统正常运行后,使用hash表或往所述hash表中添加映射时同样需要使用此方法。
本发明描述一种保护linux系统中重要数据的方法,所述的hash安全因子V1是根据算法F1,以时间字符串为输入计算所得到的值(发明中所述算法F1是成熟的算法,比如MD5,但不仅限于此算法);
所述的hash值V3,是以hash安全因子和linux源码中计算所得的hash值V2为输入,执行算法F3所得的结果(发明中所述算法F3是成熟的算法,比如将V1和V2进行加、减、乘、除、取余等各种计算中的一种或几种,但不仅限于此算法);
所述hash值V4,是依据V3为输入,执行linux源码中给定的算法F2计算所得结果。
通过所述保护linux系统中数据的方法,在linux系统中使用hash算法的代码中,增加一个hash安全因子,将hash安全因子与hash算法所得结果再次按照指定hash算法计算后所得的结果构建hash表,增加hash安全因子后,想要获取或破坏数据就比较困难。本发明的优点在于能在系统启动过程中就开始对一些相应重要的数据加上安全防护,在系统使用过程中同样会在。
对于本领域的技术人员而言,阅读上述说明后,各种变化和修正无疑将显而易见。因此,所附的权利要求书应看作是涵盖本发明的真实意图和范围的全部变化和修正。在权利要求书范围内任何和所有等价的范围与内容,都应认为仍属本发明的意图和范围内。

Claims (4)

1.一种Linux操作系统中数据的保护方法,其特征在于,包括步骤:
于系统上电启动后,初始化所述Linux操作系统的系统时间;
获取所述系统时间;
将所述系统时间作为第一算法的输入,以计算获取hash安全因子;
所述Linux操作系统获取关键码值;
将所述关键码值作为hash算法的输入,以获取第一hash值;
保存所述第一hash值;
将所述hash安全因子和所述第一hash值作为第三算法的输入,以获取计算结果;
保存所述计算结果;
将所述计算结果作为所述hash算法的输入,以获取第二hash值;
根据所述第二hash值构建hash表。
2.根据权利要求1所述的Linux操作系统中数据的保护方法,其特征在于,所述第一算法为MD5算法。
3.根据权利要求1所述的Linux操作系统中数据的保护方法,其特征在于,所述第三算法为加和/或减和/或乘和/或除和/或取余。
4.根据权利要求1所述的Linux操作系统中数据的保护方法,其特征在于,所述第二hash值为所述关键码值在所述hash表中映射的地址。
CN201510483863.3A 2015-08-07 2015-08-07 一种Linux操作系统中数据的保护方法 Active CN105184175B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510483863.3A CN105184175B (zh) 2015-08-07 2015-08-07 一种Linux操作系统中数据的保护方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510483863.3A CN105184175B (zh) 2015-08-07 2015-08-07 一种Linux操作系统中数据的保护方法

Publications (2)

Publication Number Publication Date
CN105184175A CN105184175A (zh) 2015-12-23
CN105184175B true CN105184175B (zh) 2018-07-31

Family

ID=54906248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510483863.3A Active CN105184175B (zh) 2015-08-07 2015-08-07 一种Linux操作系统中数据的保护方法

Country Status (1)

Country Link
CN (1) CN105184175B (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102938763A (zh) * 2012-11-09 2013-02-20 北京奇虎科技有限公司 网络应用接入网络运营平台的应用接入系统及方法
CN103491062A (zh) * 2012-06-13 2014-01-01 北京新媒传信科技有限公司 一种生成密码的方法和装置
CN104680389A (zh) * 2015-03-13 2015-06-03 杭州沃朴物联科技有限公司 一种基于时间加密的nfc手机终端防伪系统及方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7213148B2 (en) * 2001-06-13 2007-05-01 Corrent Corporation Apparatus and method for a hash processing system using integrated message digest and secure hash architectures

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103491062A (zh) * 2012-06-13 2014-01-01 北京新媒传信科技有限公司 一种生成密码的方法和装置
CN102938763A (zh) * 2012-11-09 2013-02-20 北京奇虎科技有限公司 网络应用接入网络运营平台的应用接入系统及方法
CN104680389A (zh) * 2015-03-13 2015-06-03 杭州沃朴物联科技有限公司 一种基于时间加密的nfc手机终端防伪系统及方法

Also Published As

Publication number Publication date
CN105184175A (zh) 2015-12-23

Similar Documents

Publication Publication Date Title
TWI724579B (zh) 區塊鏈資料處理方法、裝置、系統、處理設備及儲存媒體
US10841082B2 (en) System and method for blockchain smart contract data privacy
US10586026B2 (en) Simple obfuscation of text data in binary files
CN108664773A (zh) Java源代码的保护方法及装置
US20140143540A1 (en) Method and Apparatus for Splitting and Encrypting Files in Computer Device
EP3384406A1 (en) Combining hashes of data blocks
CN102439897A (zh) 电子仪器、密钥生成程序、记录介质以及密钥生成方法
EP3287891B1 (fr) Protection d'un calcul modulaire
US8819361B2 (en) Retaining verifiability of extracted data from signed archives
CN107122169B (zh) 一种Flash函数加密的方法及装置
CN105989252B (zh) 一种针对函数级别加壳的脱壳方法及系统
RU2698764C2 (ru) Электронное вычислительное устройство для выполнения замаскированных арифметических действий
CN104239753B (zh) 云存储环境下文本文档的篡改检测方法
US11497938B1 (en) System and method for general data protection regulation (GDPR) compliant hashing in blockchain ledgers
US20100115230A1 (en) Hash functions using recurrency and arithmetic
US10496313B2 (en) Identification of content-defined chunk boundaries
CN108256343B (zh) Shader文件的加密方法、装置及解密方法、装置
CN105184175B (zh) 一种Linux操作系统中数据的保护方法
US10505739B2 (en) Prefix fingerprint
WO2018008547A1 (ja) 秘密計算システム、秘密計算装置、秘密計算方法、およびプログラム
WO2023216987A1 (zh) 容器镜像构建方法及装置
CN111475690A (zh) 字符串的匹配方法和装置、数据检测方法、服务器
WO2021218660A1 (zh) 信息统计
TWI682296B (zh) 映像檔打包方法及映像檔打包系統
US11283604B2 (en) Sharing encrypted data with enhanced security by removing unencrypted metadata

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201120

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201600 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201217

Address after: 8319 Yanshan Road, Bengbu City, Anhui Province

Patentee after: Bengbu Lichao Information Technology Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210309

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: 8319 Yanshan Road, Bengbu City, Anhui Province

Patentee before: Bengbu Lichao Information Technology Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221117

Address after: 1808-1, Floor 18, Qingyun Contemporary Building, Building 9, Manting Fangyuan Community, Qingyun Li, Haidian District, Beijing 100089

Patentee after: BEIJING DONGFANG YIMENG TECHNOLOGY CO.,LTD.

Address before: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee before: Huzhou YingLie Intellectual Property Operation Co.,Ltd.