CN1588328A - 数据加密/解密方法及其装置 - Google Patents

数据加密/解密方法及其装置 Download PDF

Info

Publication number
CN1588328A
CN1588328A CN200410055979.9A CN200410055979A CN1588328A CN 1588328 A CN1588328 A CN 1588328A CN 200410055979 A CN200410055979 A CN 200410055979A CN 1588328 A CN1588328 A CN 1588328A
Authority
CN
China
Prior art keywords
mentioned
data
memory storage
enciphered
special code
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.)
Granted
Application number
CN200410055979.9A
Other languages
English (en)
Other versions
CN1279458C (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.)
Knowledge risk asset 4 Ltd.
Original Assignee
Via Technologies Inc
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 Via Technologies Inc filed Critical Via Technologies Inc
Priority to CN200410055979.9A priority Critical patent/CN1279458C/zh
Publication of CN1588328A publication Critical patent/CN1588328A/zh
Priority to US11/167,853 priority patent/US7882355B2/en
Application granted granted Critical
Publication of CN1279458C publication Critical patent/CN1279458C/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1408Protection against unauthorised use of memory or access to memory by using cryptography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)

Abstract

一种数据加密/解密方法,适用于一存储装置;当欲写入数据于存储装置时,先加密存储装置内的特定码与欲写入数据,再将加密后的数据写入存储装置中,用以降低储存于存储装置内的数据被窃取的机率。

Description

数据加密/解密方法及其装置
技术领域
本发明涉及一种数据加密/解密方法,特别是涉及一种存储装置的数据加密/解密方法。
背景技术
外围设备附加卡上的控制芯片,一般而言,在主系统上均有与之相关的驱动程序或应用程序来和操作系统搭配运作,以便使外围设备附加卡能发挥最佳的功能。除此之外,目前的芯片设计上已朝向多功能化和系统化的整合趋势发展,为求应用上能尽量满足不同客户的不同需求,许多外围设备附加卡上的控制芯片皆提供读写非易失性存储器的接口。
藉此,前述的驱动程序或应用程序便可指示控制芯片通过这个接口读写储存在非易失性存储器中的必要或刻制的特定数据,如此一来,外围设备附加卡的制造商便可以自行定义和规划来达到产品区隔的目的。
然而,通过前述的非易失性存储器接口读写数据时,传统的作法并未经过适当的安全加密机制以防止数据被窃取。一旦被取得非易失性存储器里的数据,辛勤研发的外围设备附加卡和搭配的驱动程序或应用程序等软、硬件智能结晶将很容易遭非法抄袭与大量复制。
发明内容
有鉴于此,本发明的主要目的是防止储存在非易失性存储器的机密数据和程序遭到窃取及抄袭。
本发明的另一目的是防止外围设备附加卡和搭配的程序等软、硬件遭到非法大量复制。
为实现上述目的,本发明提出一种数据加密/解密方法,适用于一存储装置。首先从存储装置中,取得一特定码。然后,在写入周期时,加密特定码与第一数据,用以得到加密数据。接着,根据存取地址,将加密数据写入存储装置中。因此,存储装置具有特定数据及加密数据。
本发明还提出一种数据加密/解密装置,至少包括一存储装置以及一处理装置。存储装置具有一特定码。处理装置耦接存储装置,在写入周期时,加密特定码与第一数据,以得到加密数据,并根据存取地址,将加密数据写入存储装置,使得存储装置具有特定码及加密数据。
为使本发明的上述和其它目的、特征、和优点能更明显易懂,下文特举出较佳实施例,并结合附图详细说明如下。
附图说明
图1示出了储存数据于存储装置的一可能方法流程图。
图2示出了由存储装置读取数据的一可能方法流程图。
图3示出了图1的一可能电路实施例。
图4示出了图2的一可能电路实施例。
附图符号说明
32:存储装置;
34:处理装置;
342:转换单元;
344:运算单元;
346:控制单元;
DI:特定码;
KEY:密钥值;
DE:加密数据;
AD:存取地址。
具体实施方式
本发明的特征在于,当使用者欲储存原始数据至存储装置时,需加密存储装置内的特定码与原始数据后,方能储存加密数据于存储装置中;若使用者欲由存储装置读取数据时,则需解密特定码与存储装置内的加密数据后,方能得到原始数据。
图1示出了储存数据于存储装置的一可能方法流程图。当使用者欲储存一原始数据于存储装置时,首先,取出存储装置内的一特定码(步骤110)。当存储装置在出厂前,制造厂商会在存储装置内储存一特定码,该特定码可用以代表此存储装置的序号或是出厂日期等相关数据。不同厂商所制造的存储装置,具有不同的特定码;并且由于不同的存储装置具有不同的序号,因此,同一批生产的存储装置亦具有不同的特定码。特定码的位(bit)长度可为任意长度,例如32bits、64bits、128bits、或是256bits。
然后,为了提高保密的程度,故将存储装置内的特定码转换成一密钥值(步骤120)。举例而言,假设,特定码为256bits时,可藉由一转换程序,将特定码转换为32bits的密钥值。当密钥值的位数与特定码的位数相差愈大时,表示其保密的程度愈高。
接着,加密原始数据、密钥值、以及存取地址(步骤130)。本发明可运用任何加密运算以加密原始数据、密钥值、以及存取地址,用以产生一加密数据。当不同的存储装置具有不同的特定码时,其所转换的密钥值亦会不同。因此,不同的存储装置若欲在相同的存取地址储存相同的原始数据时,在经过加密运算后,会产生不同的加密数据予不同的存储装置,如此,可大幅提高保密程度。
由于本发明亦将存取地址与原始数据进行加密,因此,不同的存取地址若具有相同的原始数据,在经过加密后,会产生不同的加密数据。例如,在地址0000H~0005H的原始数据均为00时,经过加密后,地址0000H~0005H的加密数据均不相同,可能为00、01、02、03、04、05,藉此可提保密程度。换言之,亦可仅将密钥值与原始数据作加密,如此,相同的原始数据经加密后,会产生相同的加密数据。
最后,依据存取地址,将加密数据储存于存储装置中(步骤140)。此时,存储装置不但具有最初的特定码,亦具有加密数据。由于存储装置所储存的数据已经过加密,因此,可大大提高数据的安全性。
图2示出了由存储装置读取数据的一可能方法流程图。首先,根据存取地址,由存储装置中取出加密数据(步骤210)。由于储存于存储装置的加密数据均被加密过,因此,需将加密数据解密后,方能得到原始数据。
接着,解密所取出的加密数据、密钥值、以及存取地址(步骤220)。此步骤需配合图1的步骤130。由于上述加密流程是加密原始数据与密钥值及存取地址,因此,在解密流程中,需解密密钥值、存取地址、及加密数据,方能读取到原始数据。
加密所使用的密钥值,在解密时亦需使用相同的密钥值。并且,解密时所使用的解密运算,需配合加密时所使用的加密运算,两者具有互补关系。若加密运算中,未考虑存取地址此变量时,则解密运算亦不需考虑存取地址。
当存储装置中的加密数据被解密后,便可得到原始数据(步骤230)。
图3示出了图1的一可能电路实施例。如图所示,处理装置34加密将欲储存的原始数据后,再储存于存储装置32,用以确保原始数据的安全性,其中,存储装置32为快闪只读存储器(Flash ROM)、或是其它只读存储器。处理装置34包括转换单元342、运算单元344、以及控制单元346。
转换单元342用以将存储装置32内的特定码DI转换成密钥值KEY。假设转换单元342将特定码DI的位长度由256bits,转换成位长度为32bits的密钥值KEY。当特定码DI的位长度与密钥值KEY的位长度差异愈大时,则表示保密程度愈高。亦可省略转换单元342。
控制单元346输出原始数据DS及存取地址AD予运算单元344。由于,此时是欲储存数据于存储装置32中,因此,运算单元344执行加密运算,本发明并不限制加密运算的方法。运算单元344将密钥值KEY与原始数据DS及存取地址AD作加密运算后,便可产生加密数据DE,并根据存取地址AD,将加密数据DE储存于存储装置32。如此,存储装置32不但具有特定码DI,亦具有加密数据DE
另外,为了更提高保密程度,故运算单元344所执行的加密运算,考虑了存取地址这个变量。在进行加密运算时,亦可省略存取地址这个变量。假设运算单元344在执行加密运算时,考虑了存取地址的状况下,当不同的存取地址具有相同的原始数据时,在经过加密运算后,会产生不同的加密数据。
图4示出了图2的一可能电路实施例。图4的电路架构与图3相同,但由于图4是读取存储装置32中的加密数据,因此,图4的运算单元344用以执行解密运算。
首先,转换单元342将存储装置32内的特定码DI转换成密钥值KEY。然后,运算单元344根据控制单元346所输出的存取地址AD,读取存储装置32内的加密数据DE。由于在图3的加密运算中,考虑存取地址AD,因此,运算单元344将密钥值KEY、存取地址AD、以及加密数据DE作解密运算,用以得到原始数据DS。控制单元346再依据原始数据DS作相关的处理。
由上述可知,本发明具有以下优点:
一、由于储存于存储装置的数据均被加密过,因此,大幅降低存储装置内的数据被窃取及抄袭的机率。
二、不同的存储装置内的特定码并不一定相同,因此利用该特定码所产生的密钥值亦不相同。当不同的存储装置欲储存相同的原始数据时,不同的密钥值在与相同的原始数据作加密运算后,将使得不同的存储装置储存不同的加密数据。
三、由于本发明的加密运算考虑了存取地址,因此,当不同的存取地址具有相同的原始数据时,通过本发明可产生不同的加密数据,提高保密程度,使得数据不易遭到非法大量复制。
虽然本发明已以较佳实施例披露如上,然其并非用以限定本发明,本领域的技术人员在不脱离本发明的精神和范围的前提下,可作若干的更动与润饰,因此本发明的保护范围以本发明的权利要求为准。

Claims (10)

1.一种数据加密/解密装置,至少包括:
一存储装置,具有一特定码;以及
一处理装置,耦接上述存储装置,在一写入周期时,加密上述特定码与一第一数据,以得到一加密数据,并根据一存取地址,将上述加密数据储存于上述存储装置,使得上述存储装置具有上述特定码及上述加密数据。
2.如权利要求1所述的数据加密/解密系统,其中,上述处理装置将上述特定码转换成一密钥值,再与上述第一数据进行加密。
3.如权利要求2所述的数据加密/解密装置,其中,上述第一数据为欲储存于上述存储装置的一原始数据。
4.如权利要求3所述的数据加密/解密装置,当上述处理装置在一读取周期时,根据上述存取地址,由上述存储装置中,读取上述加密数据,再解密上述加密数据、以及上述密钥值,用以得到上述原始数据。
5.如权利要求2所述的数据加密/解密装置,其中,上述第一数据包括上述存取地址以及欲储存于上述存储装置的一原始数据。
6.如权利要求5所述的数据加密/解密装置,当上述处理装置在一读取周期时,根据上述存取地址,由上述存储装置中,读取上述加密数据,再解密上述加密数据、上述存取地址、以及上述密钥值,用以得到上述原始数据。
7.如权利要求3所述的数据加密/解密装置,其中,上述处理装置包括:
一转换单元,用以将上述特定码转换成上述密钥值;
一控制单元,在上述写入周期时,输出上述第一数据;以及
一运算单元,加密上述密钥值与上述第一数据。
8.如权利要求1所述的数据加密/解密装置,其中,上述特定码是由上述存储装置的制造厂商所设定。
9.如权利要求1所述的数据加密/解密装置,其中,不同的上述存储装置具有不同的上述特定码。
10.如权利要求1所述的数据加密/解密装置,其中,上述存储装置为一只读存储器。
CN200410055979.9A 2004-08-03 2004-08-03 数据加密/解密方法及其装置 Active CN1279458C (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN200410055979.9A CN1279458C (zh) 2004-08-03 2004-08-03 数据加密/解密方法及其装置
US11/167,853 US7882355B2 (en) 2004-08-03 2005-06-27 Encryption/decryption methods and devices utilizing the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200410055979.9A CN1279458C (zh) 2004-08-03 2004-08-03 数据加密/解密方法及其装置

Publications (2)

Publication Number Publication Date
CN1588328A true CN1588328A (zh) 2005-03-02
CN1279458C CN1279458C (zh) 2006-10-11

Family

ID=34603205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200410055979.9A Active CN1279458C (zh) 2004-08-03 2004-08-03 数据加密/解密方法及其装置

Country Status (2)

Country Link
US (1) US7882355B2 (zh)
CN (1) CN1279458C (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231620B (zh) * 2007-01-26 2010-08-18 盛群半导体股份有限公司 非易失性存储器的安全保密架构及方法
US7882355B2 (en) 2004-08-03 2011-02-01 Tian Holdings, Llc Encryption/decryption methods and devices utilizing the same
CN101303722B (zh) * 2008-03-19 2011-07-20 威盛电子股份有限公司 一种保护外设输入信息安全的装置和方法
CN105245949A (zh) * 2014-07-01 2016-01-13 三星电子株式会社 图像处理设备及其控制方法
CN105631362A (zh) * 2014-10-29 2016-06-01 奇方科技有限公司 微控制器加密的方法
CN110659226A (zh) * 2018-06-28 2020-01-07 晨星半导体股份有限公司 用以存取数据的方法以及相关电路

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8108692B1 (en) * 2006-06-27 2012-01-31 Siliconsystems, Inc. Solid-state storage subsystem security solution
US8452935B2 (en) * 2007-01-19 2013-05-28 Holtek Semiconductor Inc. Read-only memory device with securing function and accessing method thereof
TW200832424A (en) * 2007-01-19 2008-08-01 Holtek Semiconductor Inc Security structure and method for non-volatile memory
US8356184B1 (en) 2009-06-25 2013-01-15 Western Digital Technologies, Inc. Data storage device comprising a secure processor for maintaining plaintext access to an LBA table
US9305142B1 (en) 2011-12-19 2016-04-05 Western Digital Technologies, Inc. Buffer memory protection unit
US10192062B2 (en) * 2014-06-20 2019-01-29 Cypress Semiconductor Corporation Encryption for XIP and MMIO external memories
US10169618B2 (en) 2014-06-20 2019-01-01 Cypress Semiconductor Corporation Encryption method for execute-in-place memories
US10691838B2 (en) 2014-06-20 2020-06-23 Cypress Semiconductor Corporation Encryption for XIP and MMIO external memories
US10235304B2 (en) 2016-10-01 2019-03-19 Intel Corporation Multi-crypto-color-group VM/enclave memory integrity method and apparatus

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5369641A (en) * 1991-11-12 1994-11-29 Storage Technology Corporation Method and apparatus for detecting and correcting errors in data on magnetic tape media
JPH08305558A (ja) * 1995-04-27 1996-11-22 Casio Comput Co Ltd 暗号化プログラム演算装置
US5857021A (en) 1995-11-07 1999-01-05 Fujitsu Ltd. Security system for protecting information stored in portable storage media
US7089419B2 (en) * 2002-04-18 2006-08-08 International Business Machines Corporation Control function with multiple security states for facilitating secure operation of an integrated system
CN1279458C (zh) 2004-08-03 2006-10-11 威盛电子股份有限公司 数据加密/解密方法及其装置

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7882355B2 (en) 2004-08-03 2011-02-01 Tian Holdings, Llc Encryption/decryption methods and devices utilizing the same
CN101231620B (zh) * 2007-01-26 2010-08-18 盛群半导体股份有限公司 非易失性存储器的安全保密架构及方法
CN101303722B (zh) * 2008-03-19 2011-07-20 威盛电子股份有限公司 一种保护外设输入信息安全的装置和方法
CN105245949A (zh) * 2014-07-01 2016-01-13 三星电子株式会社 图像处理设备及其控制方法
CN105245949B (zh) * 2014-07-01 2019-02-15 三星电子株式会社 图像处理设备及其控制方法
US10395051B2 (en) 2014-07-01 2019-08-27 Samsung Electronics Co., Ltd. Image processing apparatus and control method thereof
CN105631362A (zh) * 2014-10-29 2016-06-01 奇方科技有限公司 微控制器加密的方法
CN110659226A (zh) * 2018-06-28 2020-01-07 晨星半导体股份有限公司 用以存取数据的方法以及相关电路

Also Published As

Publication number Publication date
US20060031687A1 (en) 2006-02-09
US7882355B2 (en) 2011-02-01
CN1279458C (zh) 2006-10-11

Similar Documents

Publication Publication Date Title
CN1279458C (zh) 数据加密/解密方法及其装置
CN101673251B (zh) 具有特许存储器的设备及其应用
KR101577886B1 (ko) 무결성 검사 및 리플레이 공격들에 대한 보호를 이용하는 메모리 암호화를 위한 방법 및 장치
US7657754B2 (en) Methods and apparatus for the secure handling of data in a microcontroller
CN1205520C (zh) 拷贝保护系统与方法
US4319079A (en) Crypto microprocessor using block cipher
US4278837A (en) Crypto microprocessor for executing enciphered programs
CN1267801C (zh) 用于保护记录的数字数据的方法及装置
US6182217B1 (en) Electronic data-processing device and system
US20150381358A1 (en) Systems and methods for protecting symmetric encryption keys
US8045712B2 (en) Stream ciphering of the content of a memory external to a processor
US20080107275A1 (en) Method and system for encryption of information stored in an external nonvolatile memory
CN102117387A (zh) 安全密钥访问设备及方法
US8539250B2 (en) Secure, two-stage storage system
US7512239B2 (en) Protection key for hardware and information management system
JP2008527532A (ja) 非セキュリティ領域にセキュリティ領域を割り当てる方法及び携帯用保存装置
US20080212770A1 (en) Key Information Generating Method and Device, Key Information Updating Method, Tempering Detecting Method and Device, and Data Structure of Key Information
US8745407B2 (en) Virtual machine or hardware processor for IC-card portable electronic devices
CN1696864A (zh) 防止固件剽窃的方法
CN1714330A (zh) 具有非易失存储器模块的电路装置以及对非易失存储器模块中的数据进行加密/解密的方法
FR2976147A1 (fr) Schema d'entrelacement de donnees pour une memoire externe d'un microcontroleur securise
US7333613B2 (en) Cyphering of the content of a memory external to a processor
US20060008084A1 (en) Ciphering by blocks of the content of a memory external to a processor
CN103154967A (zh) 修改元素的长度以形成加密密钥
US7707431B2 (en) Device of applying protection bit codes to encrypt a program for protection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: YUTIAN STOCK CO., LTD.

Free format text: FORMER OWNER: WEISHENG ELECTRONICS CO., LTD.

Effective date: 20080201

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20080201

Address after: Delaware

Patentee after: VIA Tech Inc.

Address before: Taipei County of Taiwan Province

Patentee before: Weisheng Electronic Co., Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210621

Address after: Delaware, USA

Patentee after: Knowledge risk asset 4 Ltd.

Address before: Delaware, USA

Patentee before: Tian Holdings, LLC