[go: up one dir, main page]

TWI351864B - Apparatus and method for employing cyrptographic f - Google Patents

Apparatus and method for employing cyrptographic f Download PDF

Info

Publication number
TWI351864B
TWI351864B TW95110349A TW95110349A TWI351864B TW I351864 B TWI351864 B TW I351864B TW 95110349 A TW95110349 A TW 95110349A TW 95110349 A TW95110349 A TW 95110349A TW I351864 B TWI351864 B TW I351864B
Authority
TW
Taiwan
Prior art keywords
block
register
cryptographic
password
microprocessor
Prior art date
Application number
TW95110349A
Other languages
Chinese (zh)
Other versions
TW200635317A (en
Inventor
A Chispin Thomas
Glenn Henry G
Parks Terry
Original Assignee
Via Tech 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
Priority claimed from US11/090,690 external-priority patent/US7925891B2/en
Application filed by Via Tech Inc filed Critical Via Tech Inc
Publication of TW200635317A publication Critical patent/TW200635317A/en
Application granted granted Critical
Publication of TWI351864B publication Critical patent/TWI351864B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands

Landscapes

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

Description

1351864 九、發明說明: 【發明所屬之技術領域】 前述美國專利申請案主張以2005年3月25曰提申之 美國申請案60/571122為優先權。 本案與下列未定美國專利申請案有關,該等美國專利 申請案具有相同受讓人與至少一位相同發明人。。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 。 This is related to the following undetermined U.S. patent applications having the same assignee and at least one of the same inventors.

序號 申請曰期 標題 60/556093 03/25/04 APPARATUS AND METHOD FOR EMPLOYING CYRPTOGRAPHIC FUNCTIONS TO GENERATE A MESSAGE DIGEST 60/571122 05/14/04 APPARATUS AND METHOD FOR EMPLOYING CYRPTOGRAPHIC FUNCTIONS TO GENERATE A MESSAGE DIGEST 60/582422 06/24/04 SECURITY APPLICATION NOTE 10/674057 09/29/03 MICROPROCESSOR APPARATUS AND METHOD FOR PERFORMING BLOCK CIPHER CRYPTOGRAPHIC FUNCTIONS 10/800768 03/15/04 MICROPROCESSOR APPARATUS AND METHOD FOR OPTIMIZING BLOCK CIPHER CRYPTOGRAPHIC FUNCTIONS 6 1351864No. Application Title 60/556093 03/25/04 APPARATUS AND METHOD FOR EMPLOYING CYRPTOGRAPHIC FUNCTIONS TO GENERATE A MESSAGE DIGEST 60/571122 05/14/04 APPARATUS AND METHOD FOR EMPLOYING CYRPTOGRAPHIC FUNCTIONS TO GENERATE A MESSAGE DIGEST 60/582422 06/ 24/04 SECURITY APPLICATION NOTE 10/674057 09/29/03 MICROPROCESSOR APPARATUS AND METHOD FOR PERFORMING BLOCK CIPHER CRYPTOGRAPHIC FUNCTIONS 10/800768 03/15/04 MICROPROCESSOR APPARATUS AND METHOD FOR OPTIMIZING BLOCK CIPHER CRYPTOGRAPHIC FUNCTIONS 6 1351864

10/727973 12/04/03 APPARATUS AND METHOD FOR PERFORMING TRANSPARENT BLOCK CIPHER CRYPTOGRAPHIC FUNCTIONS 10/800938 03/15/04 MICROPROCESSOR APPARATUS AND METHOD FOR EMPLOYING CONFIGURABLE BLOCK CIPHER CRYPTOGRAPHIC ALGORITHMS 10/800983 03/15/04 APPARATUS AND METHOD FOR PROVIDING USER-GENERATED KEY SCHEDULE IN A MICROPROCESSOR CRYPTOGRAPHIC ENGINE 10/826435 04/16/04 MICROPROCESSOR APPARATUS AND METHOD FOR PROVIDING CONFIGURABLE CRYPTOGRAPHIC BLOCK CIPHER ROUND RESULTS 10/82643 04/16/04 MICROPROCESSOR APPARATUS AND METHOD FOR ENABLING CONFIGURABLE DATA BLOCK SIZE IN A CRYPTOGRAPHIC ENGINE 10/826475 04/16/04 ( < MICROPROCESSOR APPARATUS AND METHOD FOR PROVIDING CONFIGURABLE CRYPTOGRAPHIC KEY SIZE 7 135186410/727973 12/04/03 APPARATUS AND METHOD FOR PERFORMING TRANSPARENT BLOCK CIPHER CRYPTOGRAPHIC FUNCTIONS 10/800938 03/15/04 MICROPROCESSOR APPARATUS AND METHOD FOR EMPLOYING CONFIGURABLE BLOCK CIPHER CRYPTOGRAPHIC ALGORITHMS 10/800983 03/15/04 APPARATUS AND METHOD FOR PROVIDING USER-GENERATED KEY SCHEDULE IN A MICROPROCESSOR CRYPTOGRAPHIC ENGINE 10/826435 04/16/04 MICROPROCESSOR APPARATUS AND METHOD FOR PROVIDING CONFIGURABLE CRYPTOGRAPHIC BLOCK CIPHER ROUND RESULTS 10/82643 04/16/04 MICROPROCESSOR APPARATUS AND METHOD FOR ENABLING CONFIGURABLE DATA BLOCK SIZE IN A CRYPTOGRAPHIC ENGINE 10/826475 04/16/04 ( < MICROPROCESSOR APPARATUS AND METHOD FOR PROVIDING CONFIGURABLE CRYPTOGRAPHIC KEY SIZE 7 1351864

10/730167 12/05/03 MICROPROCESSOR APPARATUS AND METHOD FOR PERFORMING BLOCK CIPHER CRYPTOGRAPHIC FUNCTIONS 10/826814 04/16/04 APPARATUS AND METHOD FOR PERFORMING TRANSPARENT CIPHER BLOCK CHAINING MODE CRYPTOGRAPHIC FUNCTIONS 10/826428 04/16/04 APPARATUS AND METHOD FOR PERFORMING TRANSPARENT CIPHER FEEDBACK MODE CRYPTOGRAPHIC FUNCTIONS 10/826745 04/16/04 APPARATUS AND METHOD FOR PERFORMING TRANSPARENT OUTPUT FEEDBACK MODE CRYPTOGRAPIC FUNCTIONS 10/826632 04/16/04 APPARATUS AND METHOD FOR GENERATING A CRYPTOGRAPHIC KEY SCHEDULE IN A MICROPROCESSOR 本案係關於微電子領域,尤其係關於微處理器中用以 產生訊息摘要的設備及方法。 【先前技術】 早期的電腦系統與其他電腦系統係以獨立方式運作, 因其上執行之應用程式的所需輸入資料非位於其中則為應 用程式設計者在執行時提供之。當應用程式被執行時,其 8 !351864 將產生輸出資科,且該 式或被寫至磁帶、光碑胃’i 9面輸出資料形 裝置的槽案形式:或:!系統之其他類型大量储存 系統中下-二;:二!_案可作為同-電腦 先存於 认‘案’或當該輸出資料檔案係 為Γ不二 攜式大量儲存裝置㈣,其甚可作 同相谷之電腦系統中應用程式的輪入俨安/ =T=t,一般已™二:二 訊,使該等η次等貝訊保護措施已被開發以保護敏感資 利用”。一二:訊不叉未經允許之公開’其一般作法為 密=r切該等存於職置之輪出資料加以加 點,具有共_之優 于以共用,資料之共用更具突出的功能。舉 現今的電腦工作站使用者普遍可取得不同工作站 上的,’或可使用網際網路而取得新 /、匕貝訊,或可在幕多電腦之間來回發送及接收電子 即電子郵件),或可與販售商電腦系統相連而提供信 卡或銀彳丁_資訊以向該販㈣訂講產品,或可在餐 廳、機場或其他公眾場合使用無線網路而進行上述任何一 項㈣作。因此’敏感資料之免於未經授權公開的必要性 不吕可喻’使用者在使用電腦期間不得不對其敏感資料進 仃保護之例亦不勝枚舉。由各種新聞標題不難得知,'合前 關於電腦資訊安全之種種骇人聽聞的議題皆浮上檯面^ 9 1351864 垃圾郵件、網路駭客、身份竊取、反向工程、網路愚弄及 信用卡詐騙等與民眾相關之種種手段的出現等。又由於該 等隱私侵犯之動機自無心過錯至網路恐佈預謀皆有之,故 k 相關權責單位已以各項新法律、嚴厲條款及公眾教育等條 款反擊之;然而,該等因應措施皆未在遏阻此一電腦資訊10/730167 12/05/03 MICROPROCESSOR APPARATUS AND METHOD FOR PERFORMING BLOCK CIPHER CRYPTOGRAPHIC FUNCTIONS 10/826814 04/16/04 APPARATUS AND METHOD FOR PERFORMING TRANSPARENT CIPHER BLOCK CHAINING MODE CRYPTOGRAPHIC FUNCTIONS 10/826428 04/16/04 APPARATUS AND METHOD FOR PERFORMING TRANSPARENT CIPHER FEEDBACK MODE CRYPTOGRAPHIC FUNCTIONS 10/826745 04/16/04 APPARATUS AND METHOD FOR PERFORMING TRANSPARENT OUTPUT FEEDBACK MODE CRYPTOGRAPIC FUNCTIONS 10/826632 04/16/04 APPARATUS AND METHOD FOR GENERATING A CRYPTOGRAPHIC KEY SCHEDULE IN A MICROPROCESSOR The field of electronics, in particular, relates to devices and methods for generating message digests in microprocessors. [Prior Art] Early computer systems and other computer systems operate in an independent manner, since the input data required for the application being executed is not located therein and is provided by the application designer at the time of execution. When the application is executed, its 8 !351864 will generate an output file, and the formula is written to the tape, the form of the optical tablet 'i 9-side output data device: or:! In the storage system, the lower-two;:two!_ can be used as the same-computer first in the recognition case or when the output data file is a portable storage device (4), which can be used as the computer of the same phase. In the system, the application's round-in /=T=t, generally TM 2: 2, so that the η times and other protection measures have been developed to protect sensitive resources." One or two: Allowed to disclose 'the general practice is to secretly = r cut the number of rounds of the job in the job, add a point, have a better than the sharing, the sharing of data more prominent functions. Use today's computer workstations It is generally available on different workstations, or you can use the Internet to get new /, mube, or send and receive e-mails between screen computers, or with a vendor computer. The system is connected to provide a letter card or silver _ _ information to the vendor (4) to order products, or to use any wireless network in restaurants, airports or other public places to carry out any of the above (4). Therefore, the need for unauthorized access to sensitive information is not sufficient. There are also many examples of the need to protect sensitive information during the period. It is not difficult to know from various news headlines, 'the horrific issues of computer information security are on the table ^ 9 1351864 Spam, Internet 骇Customer, identity theft, reverse engineering, network fooling and credit card fraud, etc., and other means related to the public, etc., and because of the intrusion of such privacy violations, the network has been premeditated, so k related The units have been countered by various new laws, strict terms and public education; however, none of these measures have been deterring this computer information.

I 危機上達到有效成果,因此該項過去僅為政府、金融機構、 軍事單位及間諜人士所關注之議題如今已成為一般利用家 Φ 用電腦而讀取電子郵件或進行帳戶交易之民眾所不得不加 以警戒之一大問題。電腦網路從業技術人員亦不難理解, 現存大小公司在商業交易上皆需投注相當大部份的資源在 其私有資訊的保護上。 該等提供使用者對資料加以密碼而令該等資料僅得為 特定人士或單位解碼之技術及機制稱為加密技術。在將加 密技術用於保護電腦上或電腦間之資料時,其最常將敏感 資訊(業界成為「未加密文件」(plaintext)或「明碼通信報文」 ® (cleartext))轉換成一不可解讀格式(業界稱為「密文」 (ciphertext)),此一將未加密檔轉換成密文之轉換方式稱作 「加密」、「密碼編譯」或「密碼加用」,而將密文轉換回未 加密檔之反向轉換方式稱作「解密」、「密碼破解」或「密 碼去除」。 在加密技術上,多種加密程式及協定已開發為使用者 所用,以令使用者得在不需大量背景知識及研究的條件下 將其資訊在加密形式下加以傳送’或將其資訊產品在加密 形式下提供予其他不同使用者。除提供該等加密資訊外, 10 1351864 發送一端使用者一般亦提供一接收端使用者以一「密碼金 鑰」,以令接收端使用者對該等加密資訊進行解碼,如此接 收端使用者即得將加密原始資訊回復成可讀資訊或取得對 原始資訊之使用權,該等程式及協定當為熟習該項技術者I achieved effective results in the crisis, so the issue that was only of concern to governments, financial institutions, military units, and spies in the past has now become a problem for people who use their computers to read e-mails or conduct account transactions. Be alert to one of the big problems. It is not difficult for computer network practitioners to understand that existing large and small companies are required to place a considerable portion of their resources on the protection of their private information in commercial transactions. The techniques and mechanisms that provide users with a password to encrypt the data and only have to decode it for a particular person or entity are called encryption techniques. When using encryption technology to protect data on a computer or between computers, it most often converts sensitive information (the industry becomes "plaintext" or "cleartext") into an uninterpretable format. (The industry calls it "ciphertext"). This method of converting unencrypted files into ciphertext is called "encryption", "password compilation" or "password addition", and the ciphertext is converted back to The reverse conversion method of the encrypted file is called "decryption", "password cracking" or "password removal". In terms of encryption technology, a variety of encryption programs and protocols have been developed for users to enable users to transmit their information in encrypted form without the need for extensive background knowledge and research' or to encrypt their information products. Available to other different users in the form. In addition to providing such encrypted information, the 10 1351864 sending end user generally also provides a receiving end user with a "password key" to enable the receiving end user to decode the encrypted information, so that the receiving end user The encrypted original information may be replied to readable information or used to obtain the original information, and the programs and agreements are known to those skilled in the art.

V 所瞭解。 « 對資料進行加密或解碼時,用於該類密碼之演算法(即 RSA演算法等公開密碼金鑰演算法)以二密碼金鑰為之,該 φ 二密碼金鑰即公開金鑰與私用金鑰。在某些公開金鑰演算 法中,發送端使用一接收端公開金鑰而對將傳送予接收端 之資料加以加密。由於使用者之公開及私用金鑰間存有一 數學關係,因此接收端必須以其私用金鑰對傳輸資料加以 解碼,藉以回復該等資料之原始樣貌。雖然該類密碼演算 法廣用於現今密碼使用技術上,然如此之加密及解碼運算 速度過於缓慢,對於少量資料之應用亦然。一種稱作對稱 式金鑰演算法之第二類演算法得提供對等相稱之資料安全 * 層級,其執行速度遠較前一演算法為快。該等演算法之所 以稱作對稱式金鑰演算法乃因其以一單一密碼金鑰同時用 於資訊之加密及解碼上。在公開金鑰方面,目前有三種常 用單一金鑰密碼演算法,即資料加密標準(DES)、三重DES 及進階加密標準(AES)演算法。由於該等演算法具相當之敏 感資料保護能力,其刻正為美國政府機關所用’但熟習該 項技術者皆知該等演算法中一或多者在不久的將來將成為 商業及私人交易所用之標準。在所有該等對稱式金錄演异 法中,未加密檔及密文皆被切割成多個指定大小的區塊, 1351864 以進行加密及解碼工作。舉例而言,AES對128位元大小 之區塊執行密碼運算,並使用128位元、192位元及256 位元大小之密碼金鑰。其他對稱式金鑰演算法尚有Rijndael Cipher等,其亦得對192及256位元之資料區塊加以保護 功能。因此,在進行資料區塊加密動作時,一 1024位元格 式之未加密檔訊息係以八個128位元區塊之樣式進行加 密。 在對未加密檔區塊加密時,所有對稱式金鑰演算法皆 使用相同類型的子運算,且諸多較為常用之對稱式金鑰演 算法中一起始密碼金鑰常拓展成複數個金鑰(即一「金鑰排 程」),該複數個金鑰之每一負責該等子運算之對應加密運 算回合皆對未加密棺區塊執行加密動作。舉例而言,金錄 排程之一第一金錄用以對該未加密檀之區塊執行以子運算 中一第一加密運算回合,且第一回合所得結果作為一第二 回合之輸入,其中該第二回合使用該用金鑰排程中一第二 金鑰而獲致一第二結果。接著,一特定數之後續回合分別 被執行,藉以產生一最後回合結果,即密文本身。在使用 該AES演算法時,每一回合中的子運算在文獻中稱作 SubBytes 或 S-box 、 ShiftRows 、 MixColumns 及 AddRoundKey轉換。密文區塊之解碼得以類似方式完成, 但在每一回合執行之時密文為解碼之輸入,且受執行者為 反子運算動作,該等回合執行完畢後得到的最後結果為未 加密檔區塊。 DES及三重DES演算法使用不同規格的子運算,但 12 1351864 二,算與AES演算法者類似,因 轉換成密文區塊時係以類似方式為:「在將未加 欢對多後續文字區塊加以密碼運曾日士 金鐘演算法皆使用同類型料,該;的對稱式 及輸出趣授(_模式。在執行該等子運算^二=模式Known by V. « When encrypting or decoding data, the algorithm for this type of password (ie public key cryptographic algorithm such as RSA algorithm) is based on a second cryptographic key, which is public key and private. Use the key. In some public key algorithms, the sender encrypts the data to be transmitted to the receiving end using a receiving public key. Since the user's public and private keys have a mathematical relationship, the receiving end must decode the transmitted data with its private key to reply to the original appearance of the data. Although this type of cryptographic algorithm is widely used in today's password usage technology, the encryption and decoding operations are too slow, and the application of a small amount of data is also true. A second type of algorithm called symmetric keying algorithm provides peer-to-peer data security* levels, which are much faster than the previous algorithm. These algorithms are called symmetric keying algorithms because they use a single cryptographic key for both encryption and decoding of information. In terms of public key, there are currently three common single-key cryptographic algorithms, namely Data Encryption Standard (DES), Triple DES, and Advanced Encryption Standard (AES) algorithms. Because these algorithms are quite sensitive to data protection, they are being used by US government agencies. But those skilled in the art know that one or more of these algorithms will become commercial and private exchanges in the near future. The standard used. In all of these symmetric gold recording variants, unencrypted files and ciphertext are cut into blocks of a specified size, 1351864 for encryption and decoding. For example, AES performs cryptographic operations on blocks of 128-bit size and uses 128-bit, 192-bit, and 256-bit cryptographic keys. Other symmetric key algorithms include Rijndael Cipher et al., which also protects the 192 and 256-bit data blocks. Therefore, in the data block encryption operation, a 1024-bit unencrypted file is encrypted in the form of eight 128-bit blocks. When encrypting unencrypted blocks, all symmetric key algorithms use the same type of sub-operations, and a common symmetry key algorithm often starts with a cryptographic key that is expanded into a plurality of keys ( That is, a "key schedule"), each of the plurality of keys is responsible for the encryption operation of the unencrypted block for the corresponding encryption operation of the sub-operations. For example, one of the first records of the golden record schedule is used to perform a first encryption operation round in the sub-operation on the unencrypted Tan block, and the result of the first round is input as a second round, wherein The second round uses the second key in the key schedule to obtain a second result. Next, a subsequent round of a particular number is executed, respectively, to produce a final round result, the cipher body. When using this AES algorithm, the sub-operations in each round are called SubBytes or S-box, ShiftRows, MixColumns, and AddRoundKey transformations in the literature. The decoding of the ciphertext block can be completed in a similar manner, but the ciphertext is the input of the decoding at the time of execution of each round, and the executor is the anti-sub-operation action, and the final result obtained after the execution of the rounds is the unencrypted file. Block. The DES and Triple DES algorithms use sub-operations of different specifications, but 12 1351864 2, which is similar to the AES algorithm, because it is converted into a ciphertext block in a similar way: "There will be no more follow-up texts. The block is password-transported. Both the Japanese and Japanese golden bell algorithms use the same type of material, the symmetry and output fun (_ mode. In the execution of these sub-operations ^ two = mode

者使用一外加起始向量,某些者則使用對二Γ:ί 口在^區塊執行之-第-組加密回合所得的密 、 將=密文輪出當作對一第二區塊未加密檔執行之二第二= 加密回合的—外加輸人。對於各種密碼演算法及現今= 式金墙密碼演算賴使狀子運算,在本發日狀㈣書= 將不加深入討論,因其不屬於本發明之範圍。曰 若欲深入瞭解DES及三重DES演算法之詳細執行標 準’讀者得逕行參閱1999年10月25曰發表之FedeJi Information Processing Standards Publication 46-3(FIPS-46-3);對於AES演算法之詳細說明,讀者可參 閱 2001 年 11 月 26 日發表之 Federal Information ProcessingThe one uses an extra start vector, and some uses a pair of two: ί the secret obtained by the - block-encrypted round executed in the ^ block, the = ciphertext round as un-encrypted for a second block File execution second second = encryption round - plus input. For the various cryptographic algorithms and the current 金 演 演 使 使 使 , , , , , , , , 本 = = = = = = = = = = = = = = = = = = = = = = = = = =曰If you want to know more about the detailed implementation standards of DES and Triple DES algorithms, please refer to FedeJi Information Processing Standards Publication 46-3 (FIPS-46-3) published on October 25, 1999; details of AES algorithm For the reader's instructions, please refer to the Federal Information Processing published on November 26, 2001.

Standards Publication 197 (FIPS-197)的論文内容。該等標準 由國家標準及科技協會(NIST)所公佈及維護,在此將之併 入本案中以應各種用途所需。除上述標準外,各種教學、 白皮書、工具套件及來源文章亦可自NIST之電腦安全資源 中心(CSRS)於網際網路上網址http://csrc.nist.gov/處取得。 除資訊的加密及解密之外,現另有一種用以確認存於 硬碟裝置、磁帶或其他儲存裝置中特定資料串 '檔案或諸 13 1351864 多檔案之内容的資訊安全措施,該種確認方式通稱為訊息 摘要,執行該等功能之應用程式則產生訊息摘要,其產生 被稱作單向雜湊功能、雜湊功能、壓縮應用、收縮功能、 . 指紋、密碼檢對和、訊息完整度檢對和及操作偵檢碼。不 管其名稱為何,該等應用程式一般有多種長度的輸入串, « 該等輸入串稱作訊息或預影像。該等應用程式並將訊息或 預影像轉換成一固定長度、且通常較小的輪出字串,該輸 Φ 出字串稱作雜湊或訊息摘要。現以利用網際網路傳送一檔 案予某人為例,若該檔案包含發送者及接收者必須相當確 認未被損壞之財務、合約、法律或任何其他種類資料時, 則發送者將對該檔案執行以一雜湊處理,且將伴隨該檔案 送出一訊息摘要予該接收者。若該檔案在傳送過程中因各 種原因而改變,則接收者在接收得該檔案時對該檔案執行 , 以相同雜湊處理(即執行與發送者執行之相同雜湊功能) 時,該檔案在被接收得時產生的訊息摘要將與被送出之訊 * 息摘要不同,故可得知檔案内容在被送出時即已改變。當 然,檔案有可能被破壞而致訊息及雜湊皆被改變,此時被 改變的雜湊剛好與被改變的訊息相符,如此的破壞被視為 成功的破壞,這就是安全協定在訊息摘要產生功能外另使 用其他加密及安全認證等資訊保護技術的原因。 在密碼使用領域中,目前已有多種讓使用者得在不需 大量知識或努力的條件下執行雜湊處理的程式及協定被開 發出來,其並讓使用者得在傳送或提供其資訊產品時同時 傳送一對應訊息摘要給不同使用者。熟習該項技術者必能 14 1351864 瞭解該等程式及協定通常為數學演算法形式,其所構成的 應用程式可逐一實施而完成敏感資訊的雜湊處理。 目前已有數種演算法可用於數位雜湊功能的執行,包 ‘ 含安全雜湊演算法(SHA)、N-Hash、Snerfu、Md2、MD4 ' MD5、Ripe-MD、Haval等,亦包含其他演算法。然而,本 案發明人觀察到同領域中已有提供使用對稱金鑰演算法而 進行單向雜湊功能的趨勢,其中該等對稱金鑰演算法包含 鲁 上述之AES演算法等。舉例而言,利用AES密文區塊鏈 (CBC)模式對1024位元元未加密檔構成的128位元區塊加 以加密會產生一 1024位元的密文輸出。當該等區塊用作為 一雜湊演算法時,除上一受處理資料區塊外的區塊全部被 丟棄,故對上述1024位元元根據CBC模式以128位元元 區塊AES加密演算法加以雜湊運算可產生一 128位元之訊 息摘要。熟習該項技術者皆知加密演算法在一訊息摘要藉 由一對稱金錄加密演算法而在一端產生時必須同樣為接收 ® 端所使用,以使該傳輸訊息變為有效。熟習該項技術者亦 瞭解解碼運演算法亦同樣可用於傳輸及接收端上,以產生 一訊息摘要,並使該訊息摘要對於一給定訊息而言為成立 者。又由於訊息摘要係藉由對一訊息加密、並丟棄最後加 密(或解碼)區塊的方式以一對稱金鑰演算法產生以形成一 有意義的雜湊處理,用以執行雜湊功能的區塊密文模式必 須為對一資料區塊加以一前一計算出之中間雜湊處理結果 往前送之各模式中的一者,其中該結果係送至對下一資料 區塊所加之雜湊功能中。因此,一訊息(即「輸入文字」) 15 1351864 被依據選擇用以進行該雜湊功能之對稱金鑰演算法分作多 特定大小的區塊。舉例而言,AES雜湊處理可分別執行於 128位元' 192位元或256位元大小的訊息區塊上。在對每 . 一訊息區塊加以雜湊功能後,一中間雜湊值便產生,且該 中間雜湊值被依對下一訊息區塊加以雜湊功能執行所用之 區塊密文模式往前送。 熟習該項技術者皆能瞭解多種應用程式可在得執行密 φ 碼運算(加密及解碼)的電腦系統上被執行,事實上某些作 業系統(如Microsoft Windows XP及Linux等)即以密碼相關 原始形式及密碼相關應用程式介面等提供直接的加密及解 碼服務。然而,本案發明人已觀察得知目前的電腦密碼相 關技術在某些層面上仍顯不足,下文將結合第1圖說明此 不足。 第1圖為一說明現今電腦密碼應用技術方塊圖100。 該方塊圖中顯示一第一電腦工作站1〇1及一區域網路105 ® 相接,一第二電腦工作站102、一網路檔案儲存裝置106、 一第一路由器107或與網際網路等廣域網路(WAN)llO相 接之其他形式介面及一符合IEEE標準802.11者等之無線 網路路由器108亦與區域網路105相接。一膝上型電腦104 經由一無線網路109與該無線網路路由器108以介面相 接,一第二路由器111則在廣域網路110與一第三電腦工 作站相接之介面。 如前文中所略為提及者,現今使用者在工作期間面臨 之電腦資訊安全性問題較過去嚴重許多倍。舉例而言,在 16 1351864 現今多任務作業系統控制下,第一電腦工作站ιοί之使用 者可同時執行多項工作,且每一項工作皆需加以加密處 理。第一電腦工作站ιοί之使用者需執行一加密' 解碼或 , 雜湊應用程式112(不論該應用程式係整合於作業系統中或 為該作業系統所喚起執行皆然),以將其第一電腦工作站 101上之檔案儲存至網路檔案儲存裝置106中。在執行檔 案儲存的同時,使用者可將一具有或不具有一訊息摘要的 φ 加密訊息傳送予一在第二電腦工作站102之第二使用者, 該第二電腦工作站102上同樣需要執行該加密、解碼或雜 湊應用程式112,其中加密訊息之提供可為即時(如一同步 訊息)或非即時者(即電子郵件)形式。此外,使用者可在遠 端電腦103透過廣域網路110而使用或提供其金融資料(如 信用卡號及金融交易等)或其他形式敏感資料。遠端電腦 103亦可代表一家中辦公用或其他遠端電腦1〇3,第一電腦 工作站101使用者可在其離開辦公室藉使用第一電腦工作 站 101而使用區域網路 105 上的共用貢源 101,102,106,107,108,109。上述動作之任一者的執行皆須喚 起對應的加密、解碼或雜湊應用程式Π2。再者,無線網 路109現皆例行設於咖啡店、機場、學校及其它公共場所, 因此使用者不僅需對其與其他使用者間的往來訊息加以加 密及解碼,事實上所有經過無線網路109而傳送至無線網 路路由器108的通訊資料皆需加以加密/解碼/雜湊處理。 因此,熟習該項技術者皆能瞭解在某一工作站101-104 所為之任何一項與密碼相關的動作皆需喚起加密、解碼或 17 1351864 雜湊應用程式112,故電腦101-104在不久的未來可能得以 同時執行數百項密碼運算。 本案發明人已提及上述藉喚起一加密、解碼或雜湊應 . 用程式112之一或多執行個體而進行之密碼運算的數項限 . 制。舉例而言,經由程式化軟體執行一指定功能相較於經 由專用硬體執行相同功能是過度緩慢的;每當加密、解碼 或雜湊應用程式112需執行時,一正於電腦101-104上執 φ 行之工作必須暫停執行,且密碼運算的參數(即未加密文 件、密文、訊息區塊、中間雜湊值、區塊密文模式及密碼 金鑰等)必須經過作業系統而傳送至加密、解碼或雜湊應用 程式112之執行個體,該項送至加密、解碼或雜凑應用程 式112之執行個體的動作必須被喚起以完成密碼運算。又 由於密碼演算法必然包含對一特定資料區塊所為之諸多子 運算動作回合,因此加密、解碼或雜湊應用程式112的執 行包含許多電腦指令的執行而使整體系統處理速度受到不 B 良影響。熟習該項技術者皆能暸解Microsoft Outlook軟體 在送出一封經加密的小電子郵件訊息所花費的時間是送出 一封不加密電子郵件訊息的五倍。 此外,目前的密瑪相關技術因作業系統之介入而有延 遲,多數應用程式不提供整合式的金鑰產生或加密/解碼/ 雜凑控制項(components),它們使用作業系統或外掛程式的 控制項來完成該等密碼相關工作。再者,作業系統需分心 應付各種中斷及其它目前執行之應用程式的需求。 再者,本案發明人已提及現今電腦系統101-104上密 18 1351864 碼運算之完成非常類似微處理器中使用專用浮點單位前的 浮點數學運算;早期的浮點運算係以軟體完成,故其執行 速度相當缓慢,而經由軟體所為之密碼運算亦是同樣令人 . 無法接受地緩慢。隨著浮點技術的進一步發展,浮點指令 係於浮點共處理器中執行,該等浮點共處理器執行浮點運 算的速度遠快於以軟體方式執行者,但如此卻也增加系統 的成本。同樣地,現今的加密共處理器以插卡或外部裝置 φ 之形式出現;當以外部裝置形式出現時,加密共處理器係 經由平行淳或其他介面匯流排(如USB)以介面與一主處理 器相接。當然,該等共處理器確能使密碼運算遠快於純軟 體執行者,但密碼用共處理器增加了系統設置之成本,並 需要額外的電源並降低了系統的整體可靠度。另外,密碼 用共處理器的執行不能防止窺探,因資料通道不與主微處 理器處於同一晶 之故。 因此,本案發明人瞭解到現今微處理器需有專用密碼 * 相關硬體的存在,以使一需加以密碼運算之應用程式可令 微處理器經由一單一及極微密碼相關指令執行密碼運算。 本案發明人同時瞭解到該種能力的提供必須要使作業系統 介入及管理的需求下降至一定程度為原則。此外,密碼相 關指令亦以在應用程式中具有優先被使用權為更佳,且專 用密碼相關硬體以與現今微處理器之常用架構相容為更 佳。此外,密碼相關硬體及相關密碼相關指令之出現需能 與前後代作業系統及應用程式相容。再者,一種能執行防 止未經授權之窺探之密碼運算的設備及方法亦有其被提出 19 J)1864 的必要,其必須得支援多種密碼相關演算法並為之程式 化、得支援其上執行之密碼相關演算法的確認及測試工 作知接党使用者提供之金繪及自我產生之金錄的使用、 得支援多種資料區塊大小及多種位元大小的密碼金鑰、得 提供ecb、cbc'cfb及0FB等可程式化區塊加密及解 碼模式、並得使利用上述可程式化區塊密文模式之區塊密 文加密功能可有效在多資料區塊上執行。 【發明内容】 本發明之提出係用以解決習知技術中上述問題與缺 點,其提出-種在-微處理器中執行密碼運算的優異技術。The content of the paper by Standards Publication 197 (FIPS-197). These standards are published and maintained by the National Institute of Standards and Technology (NIST) and are hereby incorporated into this case for various purposes. In addition to the above criteria, a variety of teaching, white papers, toolkits, and source articles are available from the NIST Computer Security Resource Center (CSRS) on the Internet at http://csrc.nist.gov/. In addition to the encryption and decryption of information, there is another information security measure for confirming the contents of a specific data string 'file or 13 13351864 files stored in a hard disk device, tape or other storage device. Known as a message digest, an application that performs these functions generates a message digest that is called a one-way hash function, a hash function, a compression application, a shrink function, a fingerprint, a password check, and a message integrity check. And operation detection code. Regardless of their name, these applications typically have input strings of various lengths, « These input strings are called messages or pre-images. The applications convert the message or pre-image into a fixed-length, and usually smaller, round-out string, which is called a hash or message digest. For example, if the file contains the financial, contract, legal or any other kind of information that the sender and the recipient must confirm is not damaged, the sender will perform the file on the Internet. A hash is processed and a message digest is sent to the recipient along with the file. If the file is changed for various reasons during the transfer, the recipient performs the file upon receiving the file, and the file is received when the same hash processing (ie, performing the same hash function as the sender performs) The summary of the message generated at the time will be different from the summary of the message sent, so that the content of the file has been changed when it was sent. Of course, the file may be destroyed and the message and hashes are changed. The changed hash is just like the changed message. Such damage is regarded as the destruction of success. This is the security agreement outside the message summary function. Another reason to use other information protection technologies such as encryption and security authentication. In the field of password usage, there are a variety of programs and protocols that allow users to perform hash processing without extensive knowledge or effort, and allow users to simultaneously transmit or provide their information products. Send a corresponding message digest to different users. Those skilled in the art will be able to understand that the programs and protocols are usually in the form of mathematical algorithms, and the applications formed by them can be implemented one by one to complete the hash processing of sensitive information. Several algorithms have been implemented for the implementation of digital hash functions, including ‘Hardware Matching Algorithm (SHA), N-Hash, Snerfu, Md2, MD4 'MD5, Ripe-MD, Haval, etc., and other algorithms. However, the inventors of the present invention have observed a tendency to provide a one-way hash function using a symmetric key algorithm in the same field, wherein the symmetric key algorithm includes the AES algorithm described above. For example, encrypting a 128-bit block of 1024-bit unencrypted files using the AES ciphertext blockchain (CBC) mode yields a 1024-bit ciphertext output. When the blocks are used as a hash algorithm, all blocks except the last processed data block are discarded, so the above 1024-bit element is encrypted by 128-bit block AES according to CBC mode. A hash operation produces a 128-bit message digest. It is well known to those skilled in the art that a cryptographic algorithm must also be used by the receiving client when a message digest is generated at one end by a symmetric cipher encryption algorithm to make the transmitted message valid. Those skilled in the art also understand that the decoding algorithm can also be used on both the transmitting and receiving sides to generate a message digest and to make the message digest a founder for a given message. And because the message digest is generated by a symmetric key algorithm by encrypting a message and discarding the last encrypted (or decoded) block to form a meaningful hash process, the block ciphertext for performing the hash function. The pattern must be one of the modes forwarded to the data block for a previously calculated intermediate hash result, wherein the result is sent to the hash function added to the next data block. Therefore, a message (i.e., "input text") 15 1351864 is divided into a plurality of blocks of a specific size depending on the symmetric key algorithm selected to perform the hash function. For example, AES hash processing can be performed on a 128-bit '192-bit or 256-bit size message block, respectively. After the hash function is applied to each of the message blocks, an intermediate hash value is generated, and the intermediate hash value is forwarded in the block ciphertext mode for performing the hash function execution on the next message block. Those skilled in the art will be able to understand that a variety of applications can be executed on computer systems that perform dense φ code operations (encryption and decoding). In fact, some operating systems (such as Microsoft Windows XP and Linux) are password-related. Direct encryption and decoding services are provided in the original form and password-related application interface. However, the inventor of the present invention has observed that the current computer password related technology is still insufficient at some levels, and the shortcomings will be described below in conjunction with FIG. Figure 1 is a block diagram 100 illustrating the current application of computer passwords. The block diagram shows a first computer workstation 101 and a regional network 105®, a second computer workstation 102, a network file storage device 106, a first router 107 or a wide area network such as the Internet. The other forms of the interface (WAN) connected to each other and a wireless network router 108 complying with the IEEE standard 802.11 are also connected to the area network 105. A laptop 104 interfaces with the wireless network router 108 via a wireless network 109, and a second router 111 interfaces with the third computer workstation at the wide area network 110. As mentioned in the previous section, the problem of computer information security faced by users today is much more serious than in the past. For example, under the control of the current multitasking operating system of 16 1351864, the user of the first computer workstation ιοί can perform multiple tasks at the same time, and each job needs to be encrypted. The user of the first computer workstation ιοί needs to perform an encryption 'decoding or hashing application 112 (whether the application is integrated into the operating system or evoked by the operating system) to bring its first computer workstation The files on 101 are stored in network file storage 106. While performing the file storage, the user can transmit a φ encrypted message with or without a message digest to a second user at the second computer workstation 102, which also needs to perform the encryption on the second computer workstation 102. , decoding or hashing application 112, wherein the provision of the encrypted message can be in the form of an instant (such as a synchronous message) or a non-instant (ie, email). In addition, the user can use or provide financial information (such as credit card numbers and financial transactions) or other forms of sensitive information through the wide area network 110 at the remote computer 103. The remote computer 103 can also represent a central office or other remote computer 101. The first computer workstation 101 user can use the first computer workstation 101 in the office to use the shared source on the regional network 105. 101, 102, 106, 107, 108, 109. Execution of either of the above actions must invoke the corresponding encryption, decoding or hash application Π2. Furthermore, the wireless network 109 is now routinely located in coffee shops, airports, schools and other public places, so users not only need to encrypt and decode the incoming and outgoing messages with other users, in fact all through the wireless network. The communication data transmitted to the wireless network router 108 by the path 109 needs to be encrypted/decoded/hybridized. Therefore, those skilled in the art can understand that any password-related actions on a workstation 101-104 need to evoke encryption, decoding or 17 1351864 hash application 112, so the computer 101-104 will be in the near future. It is possible to perform hundreds of cryptographic operations simultaneously. The inventors of the present invention have referred to the above-mentioned number of restrictions on the cryptographic operations performed by one or more instances of the encryption, decoding or hashing application 112. For example, performing a specified function via a stylized software is excessively slow compared to performing the same function via a dedicated hardware; whenever the encryption, decoding, or hash application 112 needs to be executed, it is executed on the computer 101-104. The work of φ line must be suspended, and the parameters of the cryptographic operation (ie unencrypted file, ciphertext, message block, intermediate hash value, block ciphertext mode and cryptographic key) must be transmitted to the encryption system through the operating system. The individual performing the decoding or hashing application 112, the action of the individual sent to the encryption, decoding or hash application 112 must be invoked to complete the cryptographic operation. Since the cryptographic algorithm necessarily includes a plurality of sub-operational rounds for a particular data block, the execution of the encryption, decoding, or hashing application 112 includes the execution of a number of computer instructions that adversely affect the overall system processing speed. Those skilled in the art can understand that Microsoft Outlook software spends five times as long as sending an encrypted small email message to send an unencrypted email message. In addition, current MM-related technologies are delayed due to the involvement of operating systems. Most applications do not provide integrated key generation or encryption/decoding/heap control components, which are controlled by operating systems or plug-ins. To complete the password-related work. Furthermore, the operating system needs to be distracted to cope with the various interrupts and other currently executing applications. Furthermore, the inventor of the present invention has mentioned that the completion of the 18 1351864 code operation on the current computer system 101-104 is very similar to the floating point math operation before using the dedicated floating point unit in the microprocessor; the early floating point operation is software. Completion, so its execution speed is quite slow, and the cryptographic operation via software is equally impressive. Unacceptably slow. With the further development of floating-point technology, floating-point instructions are executed in floating-point coprocessors, which perform floating-point operations much faster than software-executables, but this also increases the system. the cost of. Similarly, today's cryptographic coprocessors come in the form of a card or external device φ; when presented as an external device, the cryptographic coprocessor is interfaced with a master via parallel 淳 or other interface bus (eg USB) The processors are connected. Of course, these coprocessors can make cryptographic operations much faster than pure software executors, but cryptographic coprocessors increase the cost of system setup and require additional power and reduce overall system reliability. In addition, the implementation of the coprocessor with the password does not prevent snooping because the data channel is not in the same crystal as the main microprocessor. Therefore, the inventor of the present invention has learned that today's microprocessors need to have a dedicated password* associated hardware so that an application requiring cryptographic operations can cause the microprocessor to perform cryptographic operations via a single and very small password related instruction. The inventor of the case also learned that the provision of such capabilities must be based on the principle that the requirements for the intervention and management of the operating system are reduced to a certain extent. In addition, password-related instructions are preferred for priority use in applications, and proprietary password-related hardware is preferred to be compatible with the common architecture of today's microprocessors. In addition, the presence of password-related hardware and related password-related instructions needs to be compatible with previous generation operating systems and applications. Furthermore, an apparatus and method capable of performing cryptographic operations for preventing unauthorized snooping are also necessary to provide 19 J) 1864, which must support and be programmed to support a plurality of cryptographic related algorithms. Confirmation and testing of the executed password-related algorithms. The use of the gold-painted and self-generated gold records provided by the party users, the support of multiple data block sizes and password keys of various bit sizes, and the provision of ecb, Programmable block encryption and decoding modes such as cbc'cfb and 0FB, and block ciphertext encryption using the above-described programmable block ciphertext mode can be effectively executed on multiple data blocks. SUMMARY OF THE INVENTION The present invention has been made to solve the above problems and disadvantages in the prior art, and proposes an excellent technique for performing cryptographic operations in a microprocessor.

在貝細例中,所提出者為一種在一微處理器中執行 密碼運算之設備,該設備包含—職邏輯電路及執行邏輯 電路,該轉換邏輯電路自—來源處接收—密碼相關指令, 其中該密瑪相關指令根據該等加密運算之—者指定一訊息 摘要的產生。該轉換邏輯亦將密碼相㈣令賴成一序列 的微指令’用以根據加密運算之—者指定完成該訊息 摘要產生所需之次運算。雜行邏輯電路在操作上耦接至 該轉換邏輯電路’該執行邏輯電路接收該微指令序列,並 執行該等次運算以產生該訊息摘要。 在一裝置中執行密碼運算 接收一密碼相關指令及藉 —訊息摘要,其中該被接 運异之一指定該訊息摘要 本發明之又一實施例為一種 之方法,該方法包含下列步驟: 執行該等密碼運算之一者而產生 收之密碼相關指令根據該等密石馬 的產生。 20 1351864 【實施方式】 以下說明係針對本發明之一特定應用及其需求而為, 用以使熟習該項技術者得製造及使用本發明,但熟習該項 技術者得輕易對所述較佳實施例加以各種變化,且所述基 本原理可應用至其他實施例上。因此,本發明之範圍不僅 限於該等已述特定實施例,其範圍當視為不違本文中所提 原理及新穎特徵之最大範圍。 在前述對於密碼運算、用於現今電腦系統以對資料加 密及解碼之技術、及對應貧料區塊所產生的訊息摘要的習 知部份討論後,以下將配合第2圖對該等技術及其限制續 做討論。接著,本發明之說明將配合第3圖至第14圖之圖 式說明而進行。本發明提出一種用以在一現今電腦系統中 執行密碼運算之設備及方法,其比一般常用機制具有更優 異性能,並能滿足上述限制作業系動之介入、極微性、前 後代架構相容性、演算及模式之可程式化性、防止駭客侵 入及可測式性之目的。 現請參閱第2圖,該圖所示為一說明在一現今電腦系 統中如前述般執行密碼運算技術之方塊圖200,該方塊圖 包含一微處理器201,用以擷取指令及處理與一應用程式 相關之資料,其中該等指令及資料係位元於一稱作應用程 式記憶體203之一系統記憶體區域中,而應用程式記憶體 203中資料的程式控制及動作一般係由系統記憶體之一保 護區域中的作業系統軟體202管理。如上所述,若一執行 應用程式(如一電子郵件程式或一檔案儲存程式)需有密碼 21 1351864 運算之進行,則該執行應用程式必須藉微處理器201執行 相當數量之指令方能完成該密碼運算,其中該等指令可為 執行應用程式本身中的副程式,如可為與執行應用程式相 . 連接之外掛應用程式,或可為作業系統軟體202提供之服 . 務;不管該等指令之形式究為何,熟習該項技術者皆能瞭 解指令皆存於指定或分配之記憶體區域中。為達說明之 效,該等記憶體區域顯示於應用程式記憶體203中,且包 φ 含一密碼金鑰產生應用程式204,其中該密碼金鑰產生應 用程式204 —般產生或接收一密碼金鑰,並將該金鑰拓展 成一金鑰排程205,以為密碼回合運算所用。 在一多區塊加密運算進行時,一區塊加密應用程式206 需先被喚起,以執行未加密文件210區塊、金鑰排程205、 指定模式等加密運算細節之密碼參數209及金錄排程位置 等之使用權的指令。若為規格中模式所需’加密應用程式 206亦會使用一起始向量208。在執行其中的指令後,加密 ® 應用程式206產生對應的密文區塊(在雜湊中稱作「訊息摘 要」211),而一區塊解碼應用程式207亦同樣被喚起以執 行訊息摘要運算(如前所略提),即執行取得訊息、金输排 程205、進一步指定該區塊解碼運算之特定者之密碼參數 209等所需之指令,用以產生對應的訊息摘要211。若為規 格中模式所需,區塊解碼應用程式207亦會使用一起始向 量 208。 需加強調的是,在產生密碼金鑰及對文字區塊加以加 密及解碼時,所需執行的指令數目相當多;上述FIPS規格 22 1351864 中包含諸多可形成數量相當之需加估計指令的虛擬碼範 例,故熟習該項技術者皆瞭解一項簡單的區塊加密運算需 數百個指令方能完成,且該等指令之每一者皆須由微處理 . 器201加以執行方能完成所要求的密碼運算。再者,對於 . 現有執行應用程式之主要目的(如檔案管理、即時訊息功 能、電子郵件功能、遠端檔案取得及信用卡交易等)而言, ,執行指令以完成密碼運算一般被視為不必要的功能,因此 φ 現有執行應用程式的使用者感到現有執行應用程式的執行 效率不足。若所用之應用程式為獨立或外掛加密/解碼應用 程式206,207,則該等應用程式206,207的喚起及管理亦需 考慮到作業系統軟體202的其他要求,如支援中斷、異常 及類似使問題惡化之事件等。甚者,對於每一同時於一電 腦系統中進行之密碼運算而言,應用程式204,206,207之獨 立執行個體必須在應用程式記憶體203中配以其空間,且 可預見需同時為一微處理器201執行之密碼運算數將持續 B 隨時間增加,如前文已描述者。 本案發明人已提到目前電腦系統之密碼技術所存有的 問題與限制,並亦瞭解到提出在一微處理器中執行包含訊 息摘要之產生的密碼運算設備及方法的必要性,其中該訊 息摘要的產生使用微處理器中對稱金鑰演算法、但不會有 程式延遲的問題。 請參閱第3圖,圖中所示為一本發明用以執行密碼運 算與微處理器設備相關的方塊圖300,該方塊圖中顯示一 微處理器301經由一記憶體匯流排319耦合至一系統記憶 23 1351864 體321,其包含用以自一指令暫存器接收指令之轉換邏輯 303,該轉換邏輯303包含邏輯、電路、裝置微碼(即微指 令或原始指令)、或邏輯、電路、裝置或微碼之組合,或其 . 他用以將指令轉換成相關微指令序列之等效控制項。該等 . 用以在轉換邏輯303中執行轉換工作的控制項可為其他電 路、微碼等用以在微處理器301中執行其他功能者所共 用。就本發明之範圍而言,微碼一詞代表複數個微指令’ φ 而微指令(亦稱作原始指令)之層級係屬於為一單元執行之In the case of a fine example, the present invention is a device for performing a cryptographic operation in a microprocessor, the device comprising a logic circuit and an execution logic circuit, the conversion logic circuit receiving a password-related instruction from the source, wherein The MU-related instructions specify the generation of a message digest based on the cryptographic operations. The conversion logic also causes the cryptographic phase (4) to cause a sequence of microinstructions ‘for cryptographic operations to specify the completion of the message digest to produce the required sub-operations. A hash logic circuit is operatively coupled to the conversion logic circuit. The execution logic circuit receives the sequence of microinstructions and performs the equalization operations to generate the message digest. Performing a cryptographic operation in a device to receive a password-related instruction and a message-summary, wherein the received message specifies a message summary. A further embodiment of the present invention is a method, the method comprising the steps of: The password-related instructions generated by one of the cryptographic operations are generated according to the pebbles. 20 1351864 [Embodiment] The following description is directed to one of the specific applications of the present invention and its needs, so that those skilled in the art can make and use the present invention, but those skilled in the art can easily Various changes are made to the embodiments, and the basic principles can be applied to other embodiments. Therefore, the scope of the invention is not to be construed as being limited In the foregoing discussion of cryptographic operations, techniques for encrypting and decoding data in today's computer systems, and summaries of messages generated by corresponding poor blocks, the following will be incorporated in Figure 2 with Its restrictions continue to be discussed. Next, the description of the present invention will be made in conjunction with the description of Figs. 3 to 14 . The present invention provides an apparatus and method for performing cryptographic operations in a computer system today, which has superior performance over conventional mechanisms and can meet the above-mentioned limitations of operational enthusiasm, minimality, and front-end architecture compatibility. The exemplification of calculus and patterns, the prevention of hacking and the measurability of hackers. Referring now to Figure 2, there is shown a block diagram 200 illustrating the implementation of cryptographic techniques in a computer system as described above. The block diagram includes a microprocessor 201 for capturing instructions and processing An application-related data, wherein the instructions and data elements are in a system memory area called application memory 203, and the program control and actions of the data in the application memory 203 are generally performed by the system. The operating system software 202 in one of the protected areas of the memory is managed. As described above, if an execution application (such as an e-mail program or a file storage program) requires the operation of the password 21 1351864, the execution application must execute a considerable number of instructions by the microprocessor 201 to complete the password. An operation, wherein the instructions may be a subprogram in the execution of the application itself, such as an application that can be connected to the execution application, or an application that can be provided to the operating system software 202; regardless of the instructions What is the form, those who are familiar with the technology can understand that the instructions are stored in the specified or allocated memory area. For the purpose of illustration, the memory areas are displayed in the application memory 203, and the package φ includes a cryptographic key generation application 204, wherein the cryptographic key generation application 204 generates or receives a cryptographic key. The key is extended to a key schedule 205 for use in the password round operation. When a multi-block encryption operation is performed, a block encryption application 206 needs to be invoked first to execute the unencrypted file 210 block, the key schedule 205, the specified mode, and the like, and the encryption parameter details 209 and the golden record. The instruction to use the right to schedule the location. A start vector 208 is also used if the 'encrypted application 206' is required for the mode in the specification. After executing the instructions therein, the encryption® application 206 generates a corresponding ciphertext block (referred to as "message digest" 211 in the hash), and a block decoding application 207 is also invoked to perform the message digest operation ( As previously mentioned, the instructions required to obtain the message, the gold order 205, the password parameter 209 that further specifies the particular block decoding operation, etc., are used to generate the corresponding message digest 211. The block decoding application 207 also uses a starting vector 208 if required for the mode in the specification. It should be emphasized that the number of instructions that need to be executed is quite large when generating a cryptographic key and encrypting and decoding a text block; the above FIPS specification 22 1351864 contains a number of virtual numbers that can form an equivalent number of estimated instructions. Code examples, so those skilled in the art understand that a simple block cryptographic operation requires hundreds of instructions to complete, and each of these instructions must be executed by the microprocessor 201. The required cryptographic operations. Furthermore, for the main purpose of existing application execution (such as file management, instant messaging function, email function, remote file acquisition and credit card transaction, etc.), it is generally considered unnecessary to execute instructions to complete the password operation. The function, so the user of the existing execution application feels that the execution of the existing execution application is not efficient. If the application used is an independent or external encryption/decryption application 206, 207, the arousal and management of the applications 206, 207 also takes into account other requirements of the operating system software 202, such as support for interrupts, exceptions, and the like that cause problems to worsen. Wait. Moreover, for each cryptographic operation performed simultaneously in a computer system, the independent executing entities of the applications 204, 206, 207 must have their space in the application memory 203, and it is foreseen that it is simultaneously a microprocessor 201. The cryptographic operands that are executed will continue to increase over time B as previously described. The inventor of the present invention has mentioned the problems and limitations of the current cryptographic technology of the computer system, and also understands the necessity of implementing a cryptographic operation device and method including the generation of a message digest in a microprocessor, wherein the message digest The use of symmetric key algorithm in the microprocessor, but there is no program delay. Referring to FIG. 3, there is shown a block diagram 300 of the present invention for performing cryptographic operations associated with a microprocessor device. The block diagram shows a microprocessor 301 coupled to a memory bus 319 via a memory bus 319. System memory 23 1351864 body 321 comprising conversion logic 303 for receiving instructions from an instruction register, the conversion logic 303 comprising logic, circuitry, device microcode (ie, microinstructions or original instructions), or logic, circuitry, A combination of devices or microcodes, or it is used to convert instructions into equivalent controls of a sequence of related microinstructions. The control items used to perform the conversion operation in the conversion logic 303 may be shared by other circuits, microcodes, etc. for performing other functions in the microprocessor 301. For the purposes of the present invention, the term microcode refers to a plurality of microinstructions 'φ and the hierarchy of microinstructions (also referred to as original instructions) belongs to a unit.

V 層級。舉例而言,微指令直接為一精簡指令集(RISC)微處 理器所執行。以一如X86相容之微處理器等複雜指令集電 腦(CISC)微處理器而言,x86指令被轉換成相關的微指令, 且相關的微指令直接為一 CISI微處理器中一單元或多單元 執行。另外,轉換邏輯303耦合至一微指令列304,該微 指令列304具有複數個微指令表目305,306,並被自微指令 列304提供至包含一暫存器檔案307之暫存器級邏輯電 * 路,其中該暫存器檔案307具有複數個暫存器308-313,而 該等暫存器308-313的内容係於一指定密碼運算執行之前 建立完成。暫存器308-312指向系統記憶體321中的對應 位置323-327,該等位置323-327包含執行該指定密碼運算 所需之資料。暫存器級被耦合至裝載邏輯電路314,裝載 邏輯電路314則以介面與一資料快取記憶體315相接’以 取得執行指定密碼運算所需之資料。該資料快取記憶體315 經由記憶體匯流排319與系統記憶體321相耦合,執行邏 輯328耦合至裝載邏輯電路314,並執行前級送來之微指 24 1351864 令指定的運算,其包含邏輯、電路、裝置或微碼(即微指令 或原始指令),或為邏輯、電路、裝置或微碼的組合,或其 他用以執行指令所指定之運算的等效控制項,其中該等用 . 以執行邏輯328中運算的控制項可為其他電路及微碼等用 . 以在微處理器301中執行其他該密碼使用單元316自裝載 邏輯電路314接收執行指定密碼運算所需之資料,微指令 使該密碼使用單元316對複數個輸入文字區塊(「訊息文 _ 字」326)執行指定的密碼運算,以產生對應之訊息摘要 327。密碼使用單元316包含邏輯、電路、裝置或微碼(即 微指令或原始指令),或為邏輯、電路、裝置或微碼的組合, 或其他用以執行密碼運算之等效控制項,其中該等用以在 密碼使用單元316中執行密碼運算之控制項可為其他電路 及微碼等用以在微處理器301中執行其他功能者所共用。 在一實施例中,密碼使用單元316與整數單元及浮點單元 等執行邏輯328中其他執行單元(圖中未示)平行操作。本 B 發明範圍所對應之「單元」實施例包含邏輯、電路、裝置 或微碼(即微指令或原始指令)的組合,或其他用以執行既 定功能或動作之等效控制項,其中該等用以在一特定單元 中執行其他功能或動作之控制項可為其他電路及微碼等用 以在微處理器301中執行其他功能者所共用。舉例而言, 一實施例中的一整數單元包含邏輯、電路、裝置或微碼(即 微指令或原始指令)的組合,或其他用以執行整數指令之等 效控制項。一浮點單元包含邏輯、電路、裝置或微碼(即微 指令或原始指令)的組合,或其他用以執行浮點指令之等效 25 1351864 控制項,其中該等用以在該整數單元中執行整數指令之控 制項可為其他電路及微碼等用以在該浮點單元中執行浮點 指令者所共用。 . 在一與χ86架構相容的實施例中,密碼使用單元316 與一 χ86整數單元、一 χ86浮點單元、一 χ86 ΜΜΧ®單元 及一 Χ86串流延伸集SSE®單元平行運作。以本發明之範 圍而言,如果為了在χ86微處理器中執行而設計的應用程 φ 式中的大多數能夠被實施例執行,實施例即為與x86架構 相容,而一應用程式得以正確執行係指其可獲致所欲結 果。在其他的x86相容實施例中,密碼使用單元係與前述 x86執行單元組成之子集合平行運作,其中密碼使用單元 316耦合至儲存邏輯電路317,並提供對應之訊息摘要 327。此外儲存邏輯電路317亦耦合至資料快取記憶體 315,該資料快取記憶體315將訊息摘要327轉送至系統記 憶體321以儲存之。儲存邏輯電路317耦合至寫回邏輯電 ® 路318。當指定密碼雜湊運算完成時,該寫回邏輯電路318 在指定密碼運算完成時更新暫存器檔案307中的暫存器 308-313。在一實施例中,微指令與一時脈訊號同步流過上 述邏輯級302,303,304,307,314,316-318之每一者,因此運 算動作可同時以大致類似於一組合線上執行之動作的方式 執行。 在系統記憶體321中,需執行指定密碼運算之應用程 式可令微處理器301經由一單一密碼指令322執行該運 算,在本案中該單一密碼指令322並稱作一 XCRYPT指 26 1351864 令。在一 CISC實施例中,密碼指令322包含一指定一密碼 運算之微指令,在RSIC實施例中則包含一指定一密碼運算 之微指令。在一實施例中,該密碼指令322使用在一現存 . 指令集架構中一閒置或不用之指令運算碼。在一 x86相容 之實施例中,密碼指令322為一 4位元元組指令,其包含 t 一 x86 REP前碼(即0xF3),接著為未使用之2位元組x86 運算碼(如〇x〇FA7),再接著為一用以說明在一指定密碼運 φ 算期間所用之區塊密碼模式之位元元組。在一實施例中’ 本發明之密瑪指令322之執行層級可為應用程式所使用之 系統優先層級,並因此可被程式化成一指令構成的程式 流,其中該程式流直接為一應用程式送至微處理器301, 或經由作業系統320之控制而送至微處理器301。由於使 微處理器301執行指定密碼運算之密碼指令322僅需為一 者,因此該運算之完成可完全為該作業系統320所知。 在實際運作中,作業系統320喚起一應用程式以在微 ® 處理器301中執行,且在該應用程式執行之時指令流中一 密碼指令322由系統記憶體321送至擷取邏輯電路302, 此一動作亦被視作應用程式執行期間指令流的一部份。然 於密碼指令322執行之前,程式流中指令使微處理器301 對暫存器308-312内容起始化,以使暫存器308-312内容 指向系統記憶體321中包含一密碼控制字組323、一起始 密碼金鑰排程324、一起始向量325(若為所需時)、運作所 需訊息文字326及訊息摘要327之位置323-327。在執行密 碼指令322之前需起始化暫存器308-312,因密碼指令322 27 1351864 ίΓί係參考,存器3G8'312及—包含—區塊計數313功 數之信t暫存⑽為’其中該外加區塊計數313暫存器計 ’·、’待加雜湊之訊息文字326區域中的資料區塊數。 人、,換邏輯303自操取邏輯電路3〇2取得XCR仰了指 執m2之^換成對應微指令序列’以使微處理器301 ^ 丁遠“密碼運算。在該對應難令序財_第一㈣ =:指令3〇5-3°6使密码使用單元训載入裝載邏輯; :二4所送出之資料’並開始執行指定數目之密碼回合 料區塊,並提供對應輸出資料區塊至 统计雕321 ,以故由賁料侠取記賴315儲存於系 •,苑3己隐豉321之訊息摘要32? F七 列中在該對應微指令序 組魏個微指令(未顯示)令微處理器則中其 絲灯早难顯示)執行其他完成指定密 動 作,如對包含_果及計純之物_存==) 之㈣輸入及輸出指標仙312暫存器之更新/在一訊、=) 文子326區塊之加密/解石馬後對起始向量指 ς =為所=及未受處理之中斷的處理#。在_實_ = 力曰口子5 G8.3U料義於特定執行之微處理所用之指令隹 架構(ISA)中的架構式暫存器。 7市 在一實施例中,密碼使用單元316 能雜續訊息文字326區塊進行管線式處理/夂數、.及以 300 m之η丁密碼運算與微處理器設備相關的方塊圖 jOO用以巩明本發明所需之控制 所用之多種邏輯電路在方塊圖中則被省 28 1351864 清楚。然而,熟習該項技術者皆能瞭解現今微處理器301 包含諸多級邏輯電路控制項,端視其特定應用而定’且其 中一些級及邏輯控制項在本案中已整合在一起,以使說明 . 較為簡潔。舉例而言,裝載邏輯電路314可整合以一位址 產生級,接著可有一快取記憶體介面級,並接著可有一快V level. For example, microinstructions are executed directly by a reduced instruction set (RISC) microprocessor. In the case of a Complex Instruction Set Computer (CISC) microprocessor such as an X86 compatible microprocessor, the x86 instructions are converted into associated microinstructions, and the associated microinstructions are directly a unit of a CISI microprocessor or Multi-unit execution. In addition, conversion logic 303 is coupled to a microinstruction column 304 having a plurality of microinstruction entries 305, 306 and provided from microinstruction column 304 to a register level logic containing a scratchpad file 307. * Path, wherein the scratchpad file 307 has a plurality of registers 308-313, and the contents of the registers 308-313 are established prior to execution of a specified cryptographic operation. The registers 308-312 point to corresponding locations 323-327 in the system memory 321, which contain the data needed to perform the specified cryptographic operations. The register stage is coupled to the load logic circuit 314, and the load logic circuit 314 is interfaced with a data cache 315 to obtain the data needed to perform the specified cryptographic operation. The data cache memory 315 is coupled to the system memory 321 via the memory bus 319, the execution logic 328 is coupled to the load logic circuit 314, and the micro-finger 24 1351864 sent by the previous stage is executed to specify the operation, which includes logic. , circuit, device or microcode (ie, microinstruction or original instruction), or a combination of logic, circuitry, device or microcode, or other equivalent control used to perform the operations specified by the instruction, where such use. The control items in the execution logic 328 can be used for other circuits, microcodes, etc. to execute other passwords in the microprocessor 301. The cryptographic use unit 316 receives the data required to perform the specified cryptographic operations from the load logic circuit 314. The password using unit 316 performs a specified cryptographic operation on a plurality of input text blocks ("message_word" 326) to generate a corresponding message digest 327. The password usage unit 316 includes logic, circuitry, devices, or microcode (ie, microinstructions or original instructions), or a combination of logic, circuitry, devices, or microcode, or other equivalent control for performing cryptographic operations, where Controls used to perform cryptographic operations in the cryptographic usage unit 316 may be shared by other circuitry, microcode, etc. for performing other functions in the microprocessor 301. In one embodiment, the cryptographic usage unit 316 operates in parallel with other execution units (not shown) in the execution logic 328, such as integer units and floating point units. The "unit" embodiment corresponding to the scope of the present invention encompasses a combination of logic, circuitry, devices or microcode (i.e., microinstructions or original instructions), or other equivalent control means for performing a specified function or action. Controls for performing other functions or actions in a particular unit may be shared by other circuits and microcodes for performing other functions in microprocessor 301. For example, an integer unit in an embodiment comprises a combination of logic, circuitry, means or microcode (i.e., microinstructions or original instructions), or other equivalent control means for performing integer instructions. A floating point unit comprises a combination of logic, circuitry, means or microcode (ie, microinstructions or original instructions), or other equivalent 25 1351864 control for performing a floating point instruction, wherein the elements are used in the integer unit The control item that executes the integer instruction can be shared by other circuits, microcodes, and the like for executing floating point instructions in the floating point unit. In an embodiment compatible with the χ86 architecture, the cryptographic usage unit 316 operates in parallel with a χ86 integer unit, a χ86 floating point unit, a χ86 ΜΜΧ® unit, and a Χ86 stream extended set SSE® unit. In the scope of the present invention, if most of the application φ patterns designed for execution in the χ86 microprocessor can be performed by the embodiment, the embodiment is compatible with the x86 architecture, and an application is correctly Execution means that it can achieve the desired result. In other x86 compatible embodiments, the cryptographic usage unit operates in parallel with a subset of the aforementioned x86 execution units, wherein cryptographic usage unit 316 is coupled to storage logic 317 and provides a corresponding message digest 327. In addition, the storage logic circuit 317 is also coupled to the data cache 315, which forwards the message summary 327 to the system memory 321 for storage. The storage logic circuit 317 is coupled to the write back logic circuit 318. When the specified password hash operation is complete, the write back logic 318 updates the registers 308-313 in the scratchpad file 307 when the specified cryptographic operation is complete. In one embodiment, the microinstruction flows through each of the logic levels 302, 303, 304, 307, 314, 316-318 in synchronization with a clock signal, such that the operations can be performed simultaneously in a manner substantially similar to the actions performed on a combination line. In system memory 321, an application that performs a specified cryptographic operation can cause microprocessor 301 to perform the operation via a single cryptographic instruction 322, which in the present case is referred to as an XCRYPT finger 26 1351864. In a CISC embodiment, the cryptographic instructions 322 include a microinstruction that specifies a cryptographic operation, and in the RSIC embodiment, a microinstruction that specifies a cryptographic operation. In one embodiment, the cryptographic instructions 322 use an instruction opcode that is idle or unused in an existing instruction set architecture. In an x86-compatible embodiment, the cryptographic instruction 322 is a 4-bit tuple instruction that includes a t-x86 REP preamble (ie, 0xF3) followed by an unused 2-bit x86 opcode (eg, 〇 x〇FA7), followed by a byte to illustrate the block cipher mode used during the specified password operation. In one embodiment, the execution level of the ML instruction 322 of the present invention can be a system priority level used by the application, and thus can be programmed into a program stream of instructions, wherein the program stream is sent directly to an application. The microprocessor 301 is sent to the microprocessor 301 via control of the operating system 320. Since the cryptographic instructions 322 that cause the microprocessor 301 to perform the specified cryptographic operations need only be one, the completion of the operations can be fully known to the operating system 320. In actual operation, the operating system 320 evokes an application to execute in the Micro® processor 301, and a password command 322 in the instruction stream is sent from the system memory 321 to the capture logic circuit 302 when the application is executed. This action is also considered part of the instruction flow during application execution. However, prior to execution of the cryptographic instructions 322, the instructions in the program stream cause the microprocessor 301 to initialize the contents of the registers 308-312 such that the contents of the registers 308-312 point to the system memory 321 containing a cryptographic control block. 323. A start password key schedule 324, a start vector 325 (if desired), a message text 326 for operation, and a location 323-327 of message digest 327. Before the execution of the password command 322, the scratchpads 308-312 need to be initialized, because the password command 322 27 1351864 ίΓί is a reference, the register 3G8'312 and the data containing the block count 313 are temporarily stored (10) as ' The additional block count 313 registers the number of data blocks in the area of the message text 326 to be hashed. Person, change logic 303 from the operation logic circuit 3〇2 to obtain the XCR, the finger m2 is replaced by the corresponding micro-instruction sequence 'to make the microprocessor 301 ^ Ding Yuan "cryptographic operation. In the corresponding difficult order _ first (four) =: command 3 〇 5-3 ° 6 to make the password use unit training load loading logic; : 2 4 sent data 'and start to execute a specified number of passwords back to the block, and provide the corresponding output data area Block to the statistical 321, so that the 侠 侠 取 315 315 stored in the Department •, Yuan 3 has concealed 321 message summary 32? F seven columns in the corresponding micro-instruction group Wei micro-instruction (not shown ), in the microprocessor, the silk lamp is difficult to display.) Perform other completions of the specified secret action, such as the update of the input and output indicators of the 312 register containing the _ fruit and the pure object _ save ==) In a message, =) Wenzi 326 block encryption / solution to the start vector refers to the = = and the processing of the unprocessed interrupt #. In the _ real _ = force 曰 mouth 5 G8.3U material An architectural register in the instruction architecture (ISA) used for the specific execution of the microprocessor. 7 In an embodiment, the password usage unit 316 The block diagram jOO which can be used for the control of the present invention is used for the pipeline processing/number of blocks, and the block diagram related to the microprocessor device with 300 m of n-butyl cryptography. In the block diagram, it is clear to the province 28 1351864. However, those skilled in the art can understand that today's microprocessor 301 contains many levels of logic circuit control, depending on its specific application, and some of the stages and logic control items are This case has been integrated to make the description more concise. For example, the loading logic circuit 314 can be integrated with an address generation level, and then there can be a cache memory interface level, and then a fast

V 取記憶體線對位級。然必須特別說明的是,對複數個訊息 文字326區塊所為之密碼運算完整動作需經由一單一密碼 φ 指令322為之,且該單一密碼指令322之動作為作業系統 320所知,其執行並係經由一專用密碼使用單元316完成, 其中該專用密碼使用單元316之運作與微處理器301中其 他執行單元平行且一致進行。此外’本案發明人提出不同 的密碼使用單元316實施例,其與過去提出之微處理器中 專用浮點單元類似,其與相關之密碼指令322的運作與作 業系統320及應用程式之動作完全相容,以下將有更詳細 之介紹。 ® 現請參閱第4圖,圖中所示為一用以說明本發明之一 極微密碼指令400實施例的方塊圖。該極微密碼指令400 包含一選擇性前碼欄位401,之後為一重覆前碼攔位402, 之後為一運算碼攔位403,再之後為一區塊密文模式欄位 404。在一實施例中,攔位401-404之内容與x86指令集架 構相容。在其他不同實施例中,欄位401-404之内容與其 他指令集架構相容。 在運作時,選擇性前碼欄位401用於諸多指令集架構 中,以啟動或關閉一主微處理器之某些特定處理能力,如 29 1351864 進行16位元或32位元之運算或處理,或處理或使用特定 之記憶體區塊等。該重覆前碼攔位402指出極微密碼指令 400所指定之密碼運算需對複數個輸入資料(即未加密之文 _ 件或密文)區塊而為。重覆前碼攔位402令一相容微處理器 將其中複數個架構式暫存器之内容作為系統記憶體中位置V takes the memory line alignment level. It should be particularly noted that the complete operation of the cryptographic operations for the plurality of message texts 326 blocks is via a single cipher φ command 322, and the action of the single cryptographic command 322 is known to the operating system 320. This is done via a dedicated password usage unit 316, wherein the operation of the dedicated password usage unit 316 is performed in parallel and consistent with other execution units in the microprocessor 301. In addition, the inventor of the present invention proposes a different embodiment of the cryptographic use unit 316, which is similar to the dedicated floating point unit of the microprocessor proposed in the past, and the operation of the associated cryptographic command 322 is completely related to the operation of the operating system 320 and the application. Rong, the following will be more detailed introduction. ® Referring now to Figure 4, there is shown a block diagram illustrating an embodiment of an extremely pico-coded instruction 400 of the present invention. The Mini-Cryptographic Instruction 400 includes a Selective Preamble Field 401 followed by a Repetitive Preamble Block 402 followed by an Opcode Block 403 followed by a Block Ciphertext Mode Field 404. In one embodiment, the contents of the blocks 401-404 are compatible with the x86 instruction set architecture. In other various embodiments, the contents of fields 401-404 are compatible with other instruction set architectures. In operation, the selective pre-code field 401 is used in many instruction set architectures to enable or disable certain processing capabilities of a main microprocessor, such as 29 1351864 for 16-bit or 32-bit operations or processing. , or process or use a specific memory block, etc. The repeat pre-code block 402 indicates that the cryptographic operation specified by the cryptographic command 400 requires a plurality of input data (i.e., unencrypted ciphertext or ciphertext) blocks. Repeating the pre-code block 402 to enable a compatible microprocessor to use the contents of the plurality of architectural registers as locations in the system memory

W 的指標,其中該系統記憶體位置包含完成既定密碼運算所 需之密碼資料及參數。如上所述,該重覆前碼攔位402之 φ 值在一 x86相容之實施例中為0xF3 ;且根據x86架構協定 而言,密碼指令之形式非常類似REP.MOVS等x86重覆串 指令。舉例而言,當以本發明之x68相同微處理器實施例 為之時,重覆前碼實際上係參考一存於架構式暫存器ECX 中的區塊計數變數、一存於暫存器ESI中的來源位址指標 (指向該密碼運算對應之輸入資料)及一存於暫存器EDI中 的目的位元址指標(指向記憶體中的輸出資料區域)。在一 x86相容實施例中,本發明更將傳統的重覆串指令概念拓 * 展成再參考一存於暫存器EDX中的控制字組指標、一存於 暫存器EBX中的密碼金鑰指標及一存於暫存器EAX中指 向一起始向量之指標(若為指定密文核式所需)。 運算碼攔位403指定微處理完成進一步為一記憶體中 一控制字組所指定之密碼運算,其中對該控制字組的參考 係經由該控制字組指標而為。本發明中,較佳的運算碼值 為一現存指令集架構中閒置或未使用之運算碼值之一,以 維持一與作業系統及應用軟體相容之微處理器的相容性。 舉例而言,前述之一與X 8 6相容之運算碼搁位4 0 3實施例 30 1351864 使用值OxOFA7以進行既定密碼運算的執行,區塊密文模式 攔位元404指定在既定密碼運算期間使用特定區塊密文模 式,以下將配合第5圖說明之。 • 第5圖為第4圖之極微密碼指令所用之區塊密文模式 欄位元值範例表格500,其中值0xC8指定以電子碼書(ECB) 0 模式完成密碼運算,值0XD0指定以密文區塊鏈(CBC)模式 完成密碼運算,值OxEO指定以密文迴授(CFB)模式完成密 φ 碼運算,而值0χΕ8指定以輸出迴授(OFB)模式完成密碼運 算。另外,區塊密文模式攔位404元之所有其他值皆受保 留,該等模式之描述可見於前述FIPS檔之内容。 現請參閱第6圖,其為一說明本發明中一 x86相容微 處理器600中密碼使用單元617的方塊圖。其中,微處理 器600包含擷取邏輯電路601,該擷取邏輯電路601自記 憶體(未顯示)擷取指令以為執行,其並耦合至轉換邏輯 602。轉換邏輯602包含邏輯、電路、裝置或微碼(即微指 * 令或自然指令),或為邏輯、電路、裝置或微碼之組合,或 為其他用以將指令轉換成相關微指令序列的等效控制項。 該等用以在轉換邏輯602中執行轉換之控制項可為其他電 路及微碼等所共用,以在微處理器600中執行其他功能。 轉換邏輯602包含訊息摘要邏輯電路640,該訊息摘要邏 輯電路640耦合至一轉譯器603及一微碼唯讀記憶體(ROM) 604。中斷邏輯電路626經由匯流排628耦合至該轉換邏輯 602電路。複數個軟體及硬體中斷訊號627為中斷邏輯電 路626處理,中斷邏輯電路626可指出目前對轉換邏輯602 31 1351864 電路之尚未受處理的中斷。轉換邏輯602電路耦合至微處 理器600之後級,包含一暫存器級605、位址級606、負載 級607、執行級608、儲存級618及寫回級619。該等後級 , 之每一者皆包含用以完成指令執行相關之特定功能的邏輯 電路,其中該等指令係指以第3圖中微處理器内類似零組 件標號配合說明之擷取邏輯電路601所提供者。第6圖中 所示x86相容實施範例顯示執行級608中的執行邏輯電路 φ 632,其包含平行執行單元610,612,614,616,617 ; —整數單 元610自微指令列609接收執行用整數微指令;一浮點單 元612自微指令列611接收執行用浮點微指令;一多媒體 延伸指令集單元614自微指令列613接收執行用MMX微 指令;一串流延伸集(SSE)單元616自微指令列615接收執 行用SSE微指令。在所示x86實施範例中,密碼使用單元 617經由一負載匯流排620、一拖延訊號621及儲存匯流排 622耦合至SSE單元616,並共用SSE單元的微指令列 B 615。另一不同實施例中,密碼使用單元617以與單元 610,612及614相似之獨立平行方式運作,整數單元610耦 合至一 x86旗標(EFLAGS)暫存器624,其中該旗標暫 存器624包含一 X位元625,用以指出密碼運算是否正執 行中。在一實施例中,該X位元625為一 x86旗標暫存器 624之位元30。此外,整數單元610藉使用一機器指定暫 存器633而推估一 E位元629之狀態,其中該E位元629 之狀態指出微處理器600中是否存在該密碼使用單元 617。此外,整數單元610亦得使用一特徵控制暫存器630 32 1351864 中的一 D位元631,以啟動或關閉密碼使用單元617。至於 第3圖中的微處理器實施例301,第6圖中微處理器600 已顯示教示本發明所需要之主要控制項,該等控制項並說 . 明於一 x86相容實施例之敘述内容中,該微處理器中的其 ^ 他控制項則已整合顯示或省略未示,用以使圖面說明較為 簡潔。熟習該項技術者皆知完成該介面需有其他控制項之 存在,如一資料快取記憶體、匯流排介面單元及時脈產生 φ 與分配邏輯等。 在如上述方式擷取一 XCRYPT指令後,轉換邏輯602 產生令微處理器600後續級605-608,618,619執行指定密碼 運算之相關微指令,其中一第一組複數個相關微指令直接 被送至密碼使用單元617,並令密碼使用單元617載入負 載匯流排62 0上的貧料’或將一輸入貧料區塊載入’並開 始執行指定數目的密碼回合,以產生一輸出資料區塊,或 將一產生之輸出資料區塊提供至儲存匯流排622上,以為 * 儲存邏輯電路儲存於記憶體中。該等微指令中的一第二組 複數個相關微指令被送至其他執行單元610,612,614,616, 以執行完成該E位元629之測試等指定密碼運算所需之次 運算,以致能該D位元631、設定該X位元625以指出一 密碼運算正在執行當中、更新暫存器級605令暫存器(如計 數暫存器、輸入文字指標暫存器、輸出文字指標暫存器)、 及處理中斷邏輯電路626所指之中斷等。該等相關微指令 被加排序,以利用間插整數單元微指令於密碼使用單元微 指令序列中的方式使既定密碼運鼻有最佳效能’其中間插 33 1351864 整數單元微指令的作法以使整數運算可與密碼單元運算並 行為之為原則。該等相關微指令中含有微指令,用以使軟 體及硬體中斷訊號627得以存在,並能自軟體及硬體中斷 _ 訊號627中回復。由於所有指向密碼參數及資料之指標皆 設於x86架構暫存器中,故該等指標的狀態會在中斷被處 理之時被儲存,且該等狀態會在中斷結束後被回復。因此, 當一中斷發生之時,程式控制權轉交給一對應中斷服務副 φ 程式。在程式控制權轉移之時,X位元625被清除以指出 金鑰資料及控制字組資料不再有效;當中斷結束時,程式 控制權再轉回至XCRYPT指令手上,以判定金鑰資料及控 制字組資料是否有效者;若是,則運算在中斷發生之時重 覆對特定輸入資料區塊進行。若X位元625之狀態指出金 鑰資料及控制字組資料不再有效,則金鑰資料及控制字組 在中斷發生之時再次自記憶體與正被處理之特定輸入資料 區塊被載入。總之,本發明之XCRYPT指令的執行必定包 ® 含對位元的初始測試,以判定密碼使用單元617中金鑰資 料及控制字組資料的有效性。若金鑰資料及控制自組資料 無效,則金錄資料及控制字組資料自記憶體中載入,且輸 入指標暫存器内容所指之輸入資料區塊被載入,且該輸入 資料區塊被執行以該指定之密碼運算。另一方面,該輸入 資料區塊被載入,且該指定密碼運算的執行係於不先下載 金鑰資料及控制字組資料的條件下進行。 若新金鑰資料或新控制字組存在時,則X位元625需 在一新CRYPT指令執行之前被清除,且後續XCRYPT指 34 1351864 令可在使用相同金鑰資料及控制制组資料的條件下執行。 在此例中,在起始金鑰資料及控制字組資料被載入之後不 需清除X位元625。舉例而言,為使記憶體匯流排速度得 到最佳化,則使用者可中斷如5〇〇個輸入資料區塊的加密/ 解碼成為5個XCRYPT指令,其中每一 XCRYp丁指令 100個輸入資料區塊。 汛心摘要逛輯電路640用以增強訊息摘要產生運作之 性能’其能確保相關微指令經過排序而使訊息區塊序列的 區塊密碼運算序列的指標暫存器及中間雜凑結果得在軟體 及硬體中斷訊號627受處理之前受更新。訊息摘要邏輯電 路_並令微指令插置於相關微指令流中,以使輪入 f塊的指標能在記憶體中—第—訊息資料區塊的密碼運笞 :即:碼或:)完_ •’寺為疋值’以使母—後續中間雜湊結果複寫於先前產 2的雜凑結果上。此外’訊息摘要邏輯電路640令微#人 = = 以修正區塊計數器為指出密二 #已對目枝I、-貝料區塊動作完成。舉例而 =者皆能瞭解在輸出授迴_)模式下使用加密= ::摘要利用一與一第—訊息文字區塊併: 生相同大小的一第一中間雜凑區塊,且 ^始向里產 一前向密文運算以產生—第-密文輪出區以 密文輸出區塊係再利用對第—密文輪:中该弟一 湊區塊加以互斥或的方式產生。接著,二‘,罘一中間雜 被作為一起始向量往前送,且等 弟一密文輸出區塊 、"· 子—苐二訊息區塊加 35 1351864 密。使用OFB模式解碼的訊息摘要運算與使用OFB加密 方式所為之訊息摘要運算極其相似,但其中間雜湊區塊係 以對訊息區塊及密文輸出區塊加以互斥或的方式產生,其 _ 中起始向量及後續起始向量與其等效向量需加前向密文運 算,以產生密文輸出區塊。 * 在一實施例中,訊息摘要邏輯電路640根據既定區塊 密文模式進行一指定之訊息摘要產生運算,並提供微指令 φ 序列以更新架構暫存器之指標,以確保一第一訊息區塊後 之區塊有正確的區塊資料得被前送以產生下一中間雜湊 值。 現請參閱第7圖,圖中說明一用以令第6圖圖中微處 理器進行密碼子運算之微指令700範例中的攔位。該圖 中,微指令700包含一微運算碼701欄位、一資料暫存器 702攔位及一暫存器703攔位。微運算碼701欄位指定一 待受執行之子運算,並指定微處理器600之一或多級中邏 ® 輯電路以執行該子運算,其中微運算碼701攔位中的值指 定微指令為本發明之密碼使用單元執行。在一實施例中, 該微運算碼701攔位有二值,其中第一值(XL0AD)指定資 料將從一架構性暫存器内容所指定之記憶體位址中取得, 其中該架構性暫存器為資料暫存器702攔位之内容所指 者,而該資料接著被載入密碼使用單元中一暫存器,該暫 存器則為暫存器703欄位内容所指定者,且上述所取得之 資料(如密瑪金鐘資料、控制字組、訊息資料及起始向量等) 被送至密碼使用單元。微運算碼701欄位之第二值(XSTOR) 36 ^51864 指定密碼使用單元所產生之資料當被儲存於一由一架構性 暫存斋内容所指之記憶位址中,其中該架構性暫存器由該 資料暫存益702攔位之内容所標定。在一多級密碼使用單 元η %例中,暫存器7〇3欄位之内容指定複數個輸出資料 區塊之一者儲存於記憶體中,該輸出資料區塊為資料欄位 中密碼使用單元所提供,用以為儲存邏輯電路所動作。以 下針對本發明之密碼使用單元所執行之XL〇A]D及xst〇r 嘁指令進行更詳細的說明,其中說明之進行將配合第8圖 及第9圖而為。 5月茶閱第8圖,其中 _ - · —^ m 1iL 兀值的表格800用以説明第7圖中之XL0AD微指令的暫 存器703欄位。如前所述,一微指令序列在一 xcRYpT指 ▽轉換後產生,該微指令序列包含一第一組複數個微指令 及第一組衩數個微指令,其中第一組複數個微指令為密 f使用早兀所執行’而第二组複數健齡則為微處理哭 =碼使料元㈣平行魏單觸執行,並^ 盗更新、暫日寸暫存器、架構性暫存器、機器指定暫存哭 =狀態位元❹m及設定等子動作進行1 —組複數個才: 二提供錢㈣、密碼參數及訊息資料至密碼使用單元而 :之產生金_程(或載人已自記憶體取得之金賴程), =對訊息資料載入並加密(或解碼),並儲存訊息摘要資 2 ,外,一 XL0AD微指令被送至密碼使用單元以載入 2字組㈣、載人—㈣金输或金㈣程、載入起始向 里貝料、载入訊息資料及載入輪入文字資料,並令密碼使 1351864 用單元開始進行一指定密碼運算。此時,一 XLO AD微指 令之暫存器703攔位值ObOlO令密碼使用單元載入一控制 字組至其内部控制字組暫存器中。當該微指令在該管線中 進行時,經由使用一暫存器級中的架構性控制字組指標暫 存器内容可得控制字組儲存之記憶體位址。記憶邏輯電路 * 將該位元址轉換成一記憶體存取之實際位址;裝載邏輯電 路自快取記憶體取得控制字組,並將控制字組置入資料攔 φ 位中,且該控制字組接著被送至密碼使用單元。同樣地, 暫存器欄位值OblOO令密碼使用單元載入資料攔位元中輸 入文字資料,接著開始指定的密碼運算。該輸入資料之存 取係經由一存於一架構性暫存器中之一指標為之,此與控 制字組者相當。值〇bl〇l令資料欄位中輸入資料載入内部 暫存器IN-1中,該等資料可為輸入文字資料(在管線作業 時)或起始向量;值〇bl 10及Oblll則令密碼使用單元分別 載入一密碼金鑰或使用者產生之金鑰排程中一金鑰的低效 * 及高效位元。在本發明中,使用者之定義為執行一特定功 能或動作者,其可體現應用程式 '作業系統、機器或人等。 因此,一使用者產生之金鑰排程實施例係以一應用程式產 生,令一不同實施例中則為一人所產生。 若密碼運算執行所根據者為使用者產生之金鑰排程 時,多數個對應該使用者產生之金鑰排程中金鑰數之多數 個XLOAD微指令被送至密碼使用單元,以令該單元載入 金鐘排程中的的每一回合金鐘。 XLOAD微指令中暫存器703攔位的所有其他值皆被 38 1351864 保留。請參閱第9圖,圖中為XST〇R微指令的暫存器綱位 疋值的表格900顯示第7圖所示格式之XSTOR微指令的暫 2 7(^欄位〜XST〇R微指令被送至密碼使用單元以令 產生(經加始或解碼)之輸出文字區塊至儲存邏 • 輯电路中以储存於記憶體中資料暫存器7〇2攔位所指定 之位置。因此,本發明之轉換邏輯電路先發出一對一特定 輸入文字區塊動作之XSTOR微指令,接著再發出一對其對 •應輸出文字區塊動作之XLOAD微指令。暫存器7〇3襴位 之值OblOO令密码使用單元提供與其内部輸出_〇暫存器相 關之輸出文字區塊至儲存邏輯電路中以進行儲存,〇υτ一〇 之内谷與送至ΓΝ-0之輸入文字區塊相關。同樣地,暫存器 攔位值0Μ01所參考之内部輸出·i暫存器的内容與送至 IN-1之輸入文字資料相關。因此,複數個輸入文字區塊在 金鑰及控制字組資料載入後可為密碼使用單元加以管線管 理,藉由以 XLOAD.IN-卜 XLOAD.IN-0(XLOAD.IN-0 令密 ® 碼使用單元同樣開始密瑪運算的執行)、XST0R.0UT-1、 XSTOROUT-O、XLOAD.IN-;!、XL〇AD.IN-0(開始進行後續 二輸入文字區塊之運算或動作)等之順序發出密碼微指令 之方式即可達成之。 現5青蒼閒弟1 〇圖’該圖說明本發明中一用以指定密碼 運具之岔媽參數的控制字組格式範例。控制字元1 〇〇〇由一 使用者程式化至記憶體中,且其指標在密碼運算執行之前 被送至一相容微處理器中一架構性暫存器。因此,一對應 一經提供之XCRYPT指令之微指令序列中的一 xl〇AD微 39 。曰7被11出’以令微處理3讀取含該指標之架構性暫存 器,以將該指標轉換成-實際記憶體位址’藉以自記憶體 (快取記憶體)取得控制字元咖,並將該控制字元圆載 至在碼使用單元之内部控制字組暫存器中。控制字元1000 • 包含—代表保留之保留(RSVD)攔位麵、—金錄大小 (KSIZE)如立1002、一加密/解石馬(£/聊位1〇〇3、一中 間結果(IRSLT)欄位1004、一金錄生成欄位 Φ 1005、一次异法(ALG)攔位1006、-訊息摘要(MD) 欄位1007及一回合計數(RCNT)攔位_。 保留攔位10 01之所有值皆受保留。金鑰大小欄位10 0 2 之内谷扣疋加岔及解碼執行時所用之密碼金鐘的大小。在 1施例中’金输大小欄位聰指定區塊大小為128位 =、192位兀或256位元。加密/解碼欄位1〇〇3指定密碼運 τ九將為一加雄運弃或解碼運算。金鑰生成欄位1〇〇5指出 鲁使用者產生之金論排程是否存於記憶體中,或一單一密碼 讀疋否存於讀體中。若一單—密石馬金输確實存在,那 麼微指令及密碼金绩被發送至密碼使用單元,以令該單元 將該金絲演算法攔位讓内容所指定之錢密瑪演算 法拓展成-金賴程。在—實施例中,演算法攔位i〇〇6指 疋使用W权DES演算法、三^卿演算法或細演算 法。其餘不同實施例中,採用之演算法為邮―c批打 及Twofish Cipher决异法等。訊息摘要攔位⑽7之内容決 疋當產生-訊息摘要或當進行一般加密或解碼運算。 回合計數齡觸之㈣指线狀料法在對每 40 1351864 一輸入文字區塊運算時所用之密碼回合數;雖然上述演算 法所用標準對於每一輸入文字區塊係使用指定固定演算回 合數,但程式設計者得利用回合計數攔位1008來改變該等 標準所指定之回合數。在一實施例中,程式設計者對於每 一區塊得設定0至15等不同回合。最後,中間結果欄位 1004之内容指定一輸入文字區塊是否當依訊息摘要攔位 1007指定之密碼演算法標準加以回合計數攔位1008中指 定的回合數,或是否對該依回合計數攔位1008中指定的回 合數執行加密/解碼,其中該所執行之最後一回合代表一中 間結果而非一最終結果。熟習該項技術者皆瞭解諸多密碼 演算法在每一回合中執行相同的子運算,不過最後一回合 所為者則不同。因此,對中間結果攔位1004加以程式化以 提供中間結果而非最終結果的作法有其優點,因其得令程 式設計者確認所為演算法之中間步驟。舉例而言,確認演 算法性能之藉漸進中間結果得利用對一文字區塊加以一加 密回合、接著對該相同文字區塊執行以二回合、並接著執 行三回合等方式而達成。此外,可程式化回合及中間結果 之達成令使用者得確認密碼相關性能,並能解決及驗究各 種不同金鑰結構及回合數的使用性。 現請參閱第Π圖,其為說明本發明之密碼使用單元範 例的方塊圖。圖中,密碼使用單元1100包含一微運算碼 1103暫存器,其經由一微指令匯流排1114接收密碼微指令 (即XLOAD及XSTOR微指令),並具有一控制字組1104 暫存器、一輸入-0暫存器1105、輸入-1暫存器1106、一金 41 1351864 =11G7及—金鑰·1暫存器11G8。依照微運算碼 一暫存器中一 xloam指令之内容所指定者,資料婉 由一,入匯流排mi送至暫存器讓]108。此外,、密ς • 使用早元1100亦包含區塊密文邏輯電路1101,該區塊: ♦邏輯電路1⑻輕合至暫存S 1103-1108之每—者,並=輕 合至密碼金鑰隨機存取記憶體(RAM)1102。此外,區塊贫 文避輯電路1101還提供一拖延訊號1113,並亦提供」士 • 果至,出-〇暫存器11〇9及-輸出」暫存器ln心“ 暫存益1109-1110將其内部所存内容經由—儲存匯流排 1112达至-相容微處理器之後級中。在—實施例中,微指 令瑪1103暫存器之大小為32位元,暫存器11〇4_山〇之 ^小則為128位元。密碼微指令得與指定予控制字組暫存 器1104之資料選擇性依序提供至微指令碼u的暫存器、 輸入暫,U05.H06中其4金錄暫存器11G7]⑽;其 -°在第8圖及第9圖所示實施例中’―控制字组經由一 XLOAD微指令被载至控制字組u〇4暫存器中,接著密碼 金鑰或金鑰排程經由後續XL〇AD微指令被 入之密瑪金錄為128位元,則一 XL〇AD微指令用以指定 金錄-01暫存器1107。若被載入之密碼金鑰大於US位元, 則一 XLOAD微指令指定金鑰_〇暫存器u〇7,且一 xl〇ad 微指令指定金鐘_1暫存器圓。純載人者為―使用者產 生之金鑰排程,則後續XL〇AD微指令指定金鑰_〇暫存器 1107。被載入之金錄排程中金餘的每一者依順序置放於金 繪隨機存取記憶體⑽中,以供其相對金錄回合執行之時 42 1351864 所用。之後,輸入文字資料(若不需使用起始向量)被載至 IN-1暫存器1106。若使用起始向量,則其被經由一 XLOAD 微指令載至輸入-1暫存器1106。一送至輸入-〇暫存器1105 之微指令令密碼使用單元將輸入文字資料載至輸入-〇暫存 器1105,並開始利用輸入-1中或二輸入暫存器1105-1106 中(當輸入資料正處管線處理之時)起始向量對輸入-0暫存 器1105中輸入文字資料執行以密碼回合,其中該密碼回合 φ 之執行係依控制字組1104暫存器中内容所提供之參數為 之。當一接收及一指定輸入-〇暫存器11 的XLOAD微指 令時,區塊密文邏輯電路開始執行控制字組内容指定之密 碼運算。當一單一密碼金鑰需加以拓展時,區塊密文邏輯 電路產生金鑰排程中的每一金鑰,並將之儲存於金鑰隨機 存取記憶體1102。在一不同實施例中,區塊密文邏輯電路 在接收得指定輸入-〇暫存器1105之LOAD微指令之前產 生金鑰排程中每一金鑰。不論區塊密文邏輯電路H01是否 • 產生一金鑰排程或金鑰排程是否自記憶體中載出,第一回 合所用金鑰在區塊密文邏輯電路1101皆被加以快取處 理,以使第一區塊密碼回合可在不需使用金鑰隨機存取記 憶體1102的條件下進行。區塊密文邏輯電路1101在一經 起動後即持續對一或多輸入文字區塊執行指定密碼運算, 直至該運算完成止。接著,自金鑰隨機存取記憶體1102中 擷取所用密碼演算法所需之回合金鑰。密碼使用單元1100 對被指定之輸入文字區塊加以一既定區塊密碼運算,後續 輸入文字區塊經由相對之後續XLOAD及XSTOR微指令的 43 1351864 執行而被加加密或解 ^ 指定之輸出資料(即輪§ —划撤微指令被執行時,若 _尚未完全產生=〇暫存器1109或輪出-1暫存器 1113。-旦輸出資料 塊密文邏輯電路發*拖延訊號 1109-1110中,則該斬二羞生並被置入—對應輪出暫存器 匯流排1112。 ^ UG9]11G之内容被傳送至錯存 現請參閱第12圖,龙去^The indicator of W, where the system memory location contains the password data and parameters required to complete the predetermined cryptographic operation. As described above, the φ value of the repeated preamble block 402 is 0xF3 in an x86 compatible embodiment; and according to the x86 architecture protocol, the form of the cryptographic instruction is very similar to the x86 repetitive string instruction such as REP.MOVS. . For example, when the same microprocessor embodiment of x68 of the present invention is used, the repeated preamble actually refers to a block count variable stored in the architectural register ECX, and is stored in the temporary register. The source address indicator in ESI (pointing to the input data corresponding to the cryptographic operation) and a destination bit address indicator (pointing to the output data area in the memory) stored in the temporary register EDI. In an x86-compatible embodiment, the present invention further extends the conventional re-sequence instruction concept to refer to a control block indicator stored in the temporary register EDX, and a password stored in the temporary register EBX. The key indicator and an indicator in the scratchpad EAX that points to a starting vector (if required for the specified ciphertext kernel). The opcode intercept 403 specifies that the micro-processing completes the cryptographic operation specified for a control block in a memory, wherein the reference to the control block is via the control block metric. In the present invention, the preferred opcode value is one of the unused or unused opcode values in an existing instruction set architecture to maintain compatibility with a microprocessor compatible with the operating system and application software. For example, one of the aforementioned opcodes compatible with X 8 6 is used. Embodiment 30 1351864 uses the value OxOFA7 to perform the execution of the predetermined cryptographic operation, and the block ciphertext mode block 404 is specified in the predetermined cryptographic operation. The specific block ciphertext mode is used during the period, which will be explained below in conjunction with Figure 5. • Figure 5 is a block ciphertext mode field value example table 500 used in the Mini-Password instruction of Figure 4, where the value 0xC8 specifies the cryptographic operation in the electronic codebook (ECB) 0 mode, and the value 0XD0 specifies the ciphertext. The blockchain (CBC) mode performs the cryptographic operation, the value OxEO specifies the ciphertext feedback (CFB) mode to complete the cryptographic operation, and the value 0 χΕ8 specifies the octave operation in the output feedback (OFB) mode. In addition, all other values of the block ciphertext mode block 404 are retained, and the description of these modes can be found in the contents of the aforementioned FIPS file. Referring now to Figure 6, a block diagram of a cryptographic usage unit 617 in an x86 compatible microprocessor 600 in accordance with the present invention is illustrated. The microprocessor 600 includes a capture logic circuit 601 that retrieves instructions from a memory (not shown) for execution and is coupled to the conversion logic 602. Conversion logic 602 includes logic, circuitry, devices, or microcode (ie, micro-finger* or natural instructions), or a combination of logic, circuitry, devices, or microcode, or other means for converting instructions into related microinstructions. Equivalent control. The control items used to perform the conversion in the conversion logic 602 can be shared by other circuits and microcodes to perform other functions in the microprocessor 600. The conversion logic 602 includes message digest logic 640 coupled to a translator 603 and a microcode read only memory (ROM) 604. Interrupt logic circuit 626 is coupled to the conversion logic 602 circuit via bus 628. A plurality of software and hardware interrupt signals 627 are processed by interrupt logic circuit 626, which may indicate an interrupt that has not been processed by the conversion logic 602 31 1351864 circuit. The conversion logic 602 circuit is coupled to the subsequent stages of the microprocessor 600 and includes a register stage 605, an address stage 606, a load stage 607, an execution stage 608, a storage stage 618, and a write back stage 619. Each of the subsequent stages includes logic circuitry for performing the specific functions associated with the execution of the instructions, wherein the instructions are referenced to the logic of the similar component numbers in the microprocessor of FIG. 601 providers. The x86 compatible implementation shown in Figure 6 shows execution logic φ 632 in execution stage 608, which includes parallel execution units 610, 612, 614, 616, 617; - integer unit 610 receives integer micro instructions from microinstruction column 609; a floating point unit 612 receives execution floating point microinstructions from microinstruction column 611; a multimedia extended instruction set unit 614 receives execution MMX microinstructions from microinstruction column 613; a stream extended set (SSE) unit 616 receives execution from microinstruction column 615 Use the SSE microinstruction. In the illustrated x86 implementation, the cryptographic usage unit 617 is coupled to the SSE unit 616 via a load bus 620, a stall signal 621, and a storage bus 622, and shares the microinstruction column B 615 of the SSE unit. In another different embodiment, the cryptographic usage unit 617 operates in a separate parallel manner similar to the units 610, 612 and 614, the integer unit 610 being coupled to an x86 flag (EFLAGS) register 624, wherein the flag register 624 includes An X bit 625 is used to indicate whether the cryptographic operation is in progress. In one embodiment, the X bit 625 is a bit 30 of an x86 flag register 624. In addition, integer unit 610 estimates the state of an E bit 629 by using a machine designation register 633, wherein the status of the E bit 629 indicates whether the password usage unit 617 is present in the microprocessor 600. In addition, integer unit 610 also uses a D bit 631 in a feature control register 630 32 1351864 to enable or disable password usage unit 617. As for the microprocessor embodiment 301 in FIG. 3, the microprocessor 600 in FIG. 6 has been shown to teach the main control items required by the present invention, and the control items are also described in an x86 compatible embodiment. In the content, the other control items in the microprocessor are integrated or omitted, so that the description of the drawing is relatively simple. Those skilled in the art are aware that there are other control items required to complete the interface, such as a data cache memory, a bus interface unit, and a φ and distribution logic. After the XCRYPT instruction is retrieved as described above, the conversion logic 602 generates associated microinstructions for the subsequent stages 605-608, 618, 619 of the microprocessor 600 to perform the specified cryptographic operations, wherein a first plurality of related microinstructions are sent directly to the password. Unit 617, and causes the password usage unit 617 to load the poor stuff on the load bus 62 0 or load an input lean block and start executing a specified number of password rounds to generate an output data block, or A generated output data block is provided to the storage bus 622 so that the * storage logic is stored in the memory. A second plurality of related microinstructions in the microinstructions are sent to the other execution units 610, 612, 614, 616 to perform a sub-operation required to complete the specified cryptographic operation such as the test of the E-bit 629, so that the D-bit 631 is enabled. Setting the X bit 625 to indicate that a cryptographic operation is being executed, updating the register level 605 to the temporary register (such as the count register, the input text indicator register, the output text indicator register), and processing The interrupt circuit 626 refers to an interrupt or the like. The associated microinstructions are ordered to utilize the interleaved integer unit microinstructions in the cryptographically used unit microinstruction sequence to optimize the performance of the given ciphers by interleaving 33 1351864 integer unit microinstructions to enable Integer operations can be operated with cryptographic units and behave as a principle. The associated microinstructions contain microinstructions for the presence of the software and hardware interrupt signal 627 and can be recovered from the software and hardware interrupt _ signal 627. Since all indicators pointing to password parameters and data are located in the x86 architecture register, the status of these indicators is stored when the interrupt is processed, and the status is replied after the interrupt is completed. Therefore, when an interrupt occurs, program control is transferred to a corresponding interrupt service sub-program. At the time of program control transfer, the X bit 625 is cleared to indicate that the key data and the control block data are no longer valid; when the interrupt ends, the program control is transferred back to the XCRYPT command to determine the key data. And if the control block data is valid; if so, the operation is repeated for the specific input data block when the interrupt occurs. If the state of the X bit 625 indicates that the key data and the control block data are no longer valid, the key data and the control block are loaded again from the memory and the specific input data block being processed at the time of the interruption. . In summary, the execution of the XCRYPT instruction of the present invention must include an initial test of the bit bit to determine the validity of the key information and control block data in the password usage unit 617. If the key data and the control self-organization data are invalid, the gold record data and the control block data are loaded from the memory, and the input data block indicated by the input index register content is loaded, and the input data area is loaded. The block is executed with the specified cryptographic operation. On the other hand, the input data block is loaded, and the execution of the specified cryptographic operation is performed without first downloading the key data and controlling the block data. If the new key data or the new control block exists, the X bit 625 needs to be cleared before the execution of a new CRYPT instruction, and the subsequent XCRYPT refers to the condition that the 341351864 can use the same key data and control the group data. Execute. In this example, the X bit 625 need not be cleared after the start key data and control block data are loaded. For example, in order to optimize the memory bus speed, the user can interrupt the encryption/decoding of 5 input data blocks into 5 XCRYPT instructions, wherein each XCRYp instruction has 100 input data. Block. The summary summary browsing circuit 640 is used to enhance the performance of the message digest generating operation. 'It can ensure that the relevant micro-instructions are sorted so that the index register and the intermediate hash result of the block cipher operation sequence of the message block sequence are in the software. And the hardware interrupt signal 627 is updated before being processed. The message summary logic circuit _ and insert the micro-instruction into the relevant micro-instruction stream, so that the index of the round-in f-block can be in the memory - the password operation of the - message data block: ie: code or :) _ • 'Temple is depreciated' to reproduce the parent-subsequent intermediate hash result on the hash result of the previous production 2. In addition, the message summary logic circuit 640 causes the micro# person == to correct the block counter to indicate that the secret two # has been completed for the target I, - bedding block. For example, you can understand that in the output grant_) mode, use encryption = :: digest to use one and one - message text blocks and: generate a first intermediate hash block of the same size, and start The production of a forward ciphertext operation produces a -first ciphertext round-out area in which the ciphertext output block system is reused for the first ciphertext round: the brother-in-law block is mutually exclusive. Then, the second ‘, 罘一中杂 is sent forward as a starting vector, and waits for a ciphertext output block, "·sub-苐2 message block plus 35 1351864 密. The message digest operation decoded by the OFB mode is very similar to the message digest operation by using the OFB encryption method, but the middle hash block is generated by mutually exclusive or overlapping the message block and the ciphertext output block. The start vector and its subsequent start vector and its equivalent vector need to be forward ciphertext operation to generate a ciphertext output block. * In one embodiment, the message digest logic circuit 640 performs a specified message digest generation operation according to the predetermined block ciphertext mode, and provides a sequence of microinstructions φ to update the index of the architecture register to ensure a first message area. The block after the block has the correct block data to be forwarded to produce the next intermediate hash value. Referring now to Figure 7, a block diagram of an example of a microinstruction 700 for codoning a microprocessor in Figure 6 is illustrated. In the figure, the microinstruction 700 includes a micro-opcode 701 field, a data register 702, and a register 703. The microcode 701 field specifies a sub-operation to be executed, and specifies one or more stages of the microprocessor 600 to perform the sub-operation, wherein the value in the micro-code 701 intercept specifies the micro-instruction as The password is used by the unit of the present invention. In an embodiment, the micro-opcode 701 is blocked by a binary value, wherein the first value (XL0AD) specifies that the data is obtained from a memory address specified by an architectural register content, wherein the architectural temporary storage The device is the one referred to by the content of the data register 702, and the data is then loaded into a register in the password using unit, and the register is specified by the contents of the register 703, and the above The information obtained (such as the Mimma clock, control blocks, message data, and start vector) is sent to the password usage unit. The second value of the micro-code 701 field (XSTOR) 36 ^51864 The data generated by the specified password-using unit is stored in a memory address indicated by an architectural temporary storage content, wherein the architectural temporary The memory is calibrated by the content of the data temporary storage benefit 702. In the case of a multi-level password using unit η%, the contents of the register 7〇3 field specify one of the plurality of output data blocks to be stored in the memory, and the output data block is used for the password in the data field. Provided by the unit for action on the storage logic. The XL〇A]D and xst〇r 嘁 instructions executed by the cryptographic unit of the present invention will be described in more detail below, and the description will be made in conjunction with Figs. 8 and 9. The May tea is read in Fig. 8, wherein a table 800 of _ - · -^ m 1iL thresholds is used to describe the register 703 field of the XL0AD microinstruction in Fig. 7. As described above, a microinstruction sequence is generated after a xcRYpT index conversion, the microinstruction sequence including a first plurality of microinstructions and a first group of microinstructions, wherein the first plurality of microinstructions are The secret of the second use of the early implementation of the 'the second group of healthy age is the micro-processing cry = code to make the material element (four) parallel Wei one-touch execution, and ^ pirate update, temporary register, architectural register, The machine specifies the temporary crying = status bit ❹ m and setting the sub-actions to perform 1 - group plurals: 2 to provide money (4), password parameters and message data to the password use unit: the production of gold _ Cheng (or the person has been The memory obtained by the memory), = loading and encrypting (or decoding) the message data, and storing the message digest 2, in addition, an XL0AD micro-instruction is sent to the password usage unit to load the 2-word group (4) Person—(4) Gold or Gold (4), load the starting ribs, load the message data, and load the wheeled text, and have the password cause the 1351864 to start a specified cryptographic operation with the unit. At this time, an XLO AD micro-instruction register 703 intercepts the value ObOlO to cause the cryptographic unit to load a control block into its internal control block register. When the microinstruction is made in the pipeline, the memory address of the control word store is available via the use of the architectural control block indicator register contents in a register stage. The memory logic circuit* converts the bit address into a physical address of the memory access; the loading logic circuit obtains the control block from the cache memory, and places the control block into the data block φ bit, and the control word The group is then sent to the password usage unit. Similarly, the register field value OblOO causes the password usage unit to load the data block into the text data, and then begins the specified cryptographic operation. The entry of the input data is via an indicator stored in an architectural register, which is equivalent to the control block. The value 〇bl〇l causes the input data in the data field to be loaded into the internal register IN-1, which can be the input text data (during pipeline operation) or the starting vector; the values 〇bl 10 and Obllll The password usage unit loads a cryptographic key or an inefficient* and efficient bit of a key in the user-generated key schedule. In the present invention, a user is defined as performing a specific function or actor, which can embody an application 'operating system, machine or person, and the like. Thus, a user-generated key scheduling embodiment is generated by an application, which is produced by one person in a different embodiment. If the cryptographic operation is performed by a user-generated key schedule, a plurality of XLOAD micro-instructions corresponding to the number of keys in the key schedule generated by the user are sent to the password-using unit, so that the unit carries Every alloy clock in the Golden Bell schedule. All other values latched by the scratchpad 703 in the XLOAD microinstruction are reserved by 38 1351864. Please refer to FIG. 9 , which is a table 900 of the register header value of the XST 〇 R micro-instruction. The temporary S7 of the XSTOR micro-instruction in the format shown in FIG. 7 (^ field - XST 〇 R micro-instruction) It is sent to the password use unit to cause the output text block (added or decoded) to be stored in the storage logic circuit for storage in the location specified by the data register 7〇2 in the memory. Therefore, The conversion logic circuit of the present invention first issues a one-to-one XSTOR micro-instruction for a specific input text block operation, and then issues an XLOAD micro-instruction for which the corresponding text block action should be output. The scratchpad 7〇3襕The value OblOO causes the password usage unit to provide an output text block associated with its internal output_〇 register to the storage logic for storage, and the valley of the 〇υτ is associated with the input text block sent to ΓΝ-0. Similarly, the contents of the internal output ·i register referenced by the scratchpad block value 0Μ01 are related to the input text data sent to IN-1. Therefore, multiple input text blocks are in the key and control block data. After loading, you can add a line pipe to the password unit. By XLOAD.IN-b XLOAD.IN-0 (XLOAD.IN-0 makes the use of the unit also start the execution of the escrow operation), XST0R.0UT-1, XSTOROUT-O, XLOAD.IN- ;!, XL〇AD.IN-0 (starting the operation or action of the subsequent two input text blocks), etc., can be achieved by issuing a password micro-instruction. Now 5 Qing Cang Xia 1 〇 图' An example of a control block format for specifying a mom's parameter of a password carrier is described in the present invention. Control character 1 is programmed into a memory by a user, and its index is sent before the cryptographic operation is performed. An architectural register in a compatible microprocessor. Therefore, an x1 〇 AD micro 39 in the microinstruction sequence corresponding to the supplied XCRYPT instruction. 曰 7 is 11 out 'to read the micro processing 3 An architectural scratchpad containing the indicator to convert the indicator into an actual memory address to obtain a control character from the memory (cache memory) and to load the control character into the code The internal control block of the unit is in the scratchpad. Control character 1000 • Included—represents the reservation reserved (RSVD) Blocking surface, KSIZE, such as standing 1002, an encryption / solution stone (£ / chat 1 〇〇 3, an intermediate result (IRSLT) field 1004, a gold record generation field Φ 1005 , an alienation (ALG) block 1006, a message digest (MD) field 1007, and a round count (RCNT) block _. All values of the reserved block 10 01 are reserved. Key size field 10 In the case of 0, the size of the cipher clock is used to increase the size of the cipher clock. In the example, the size of the block is 128 bits = 192 bits or 256 bits. Encryption/decoding field 1〇〇3 specifies the password to be operated. τ9 will be used for abandoning or decoding operations. The key generation field 1〇〇5 indicates whether the gold theory schedule generated by the Lu user is stored in the memory, or whether a single password is read in the reading body. If a single-Mitsubishi gold input does exist, then the micro-instruction and password gold scores are sent to the password usage unit, so that the unit can block the gold silk algorithm to make the content-specified Qianmima algorithm into - Jin Lai Cheng. In the embodiment, the algorithm blocker i〇〇6 refers to the use of the W-right DES algorithm, the three-wise algorithm or the fine-calculation algorithm. In the other different embodiments, the algorithm used is the post-c batch and the Twofish Cipher variant. The content of the message digest block (10) 7 is determined to be generated - a message digest or when a general encryption or decoding operation is performed. The round count age (4) refers to the number of password rounds used by the linear method to calculate the input text block for every 40 1351864; although the standard used in the above algorithm uses the specified fixed calculus number for each input text block. However, the programmer has to use the round count block 1008 to change the number of rounds specified by the criteria. In one embodiment, the programmer sets a different round of 0 to 15 for each block. Finally, the content of the intermediate result field 1004 specifies whether an input text block is counted according to the cryptographic algorithm standard specified by the message summary block 1007, or the number of rounds specified in the round count block 1008, or whether the round is counted. Encryption/decoding is performed on the number of rounds specified in block 1008, where the last round executed represents an intermediate result rather than a final result. Those skilled in the art are aware that many cryptographic algorithms perform the same sub-operations in each round, but the last round is different. Therefore, it is advantageous to program the intermediate result block 1004 to provide intermediate results rather than the final result, as it allows the programmer to confirm the intermediate steps of the algorithm. For example, the gradual intermediate result of confirming the performance of the algorithm can be achieved by performing an encryption round on a text block, then performing two rounds on the same text block, and then performing three rounds. In addition, the achievement of programmable rounds and intermediate results allows users to confirm password-related performance and to resolve and examine the usefulness of various key structures and rounds. Referring now to the drawings, which are block diagrams illustrating an example of a cryptographic use unit of the present invention. In the figure, the password using unit 1100 includes a micro-opcode 1103 register, which receives a cryptographic micro-instruction (ie, XLOAD and XSTOR micro-instructions) via a micro-instruction bus 1114, and has a control block 1104 register, a Input-0 register 1105, input-1 register 1106, one gold 41 1351864 = 11G7 and - key 1 register 11G8. According to the micro-opcode, the content specified by the content of a xloam instruction in the scratchpad, the data is sent to the scratchpad by one, and the stream is sent to the scratchpad. In addition, the key ς 1100 also includes a block ciphertext logic circuit 1101, the block: ♦ Logic circuit 1 (8) lightly coupled to each of the temporary S 1103-1108, and = lightly coupled to the cryptographic key Random access memory (RAM) 1102. In addition, the block escaping circuit 1101 also provides a delay signal 1113, and also provides "Shen guo zhi, 〇 - 〇 register 11 〇 9 and - output" register ln heart " temporary storage benefit 1109- The 1110 stores its internal contents through the storage bus 1111 to the subsequent stage of the compatible microprocessor. In the embodiment, the size of the microinstruction 1103 register is 32 bits, and the register 11〇4 _ Hawthorn's ^ is 128 bits. The password micro-instruction and the data assigned to the control block register 1104 are selectively and sequentially supplied to the register of the micro-instruction code u, input temporarily, U05.H06 Its 4 gold register register 11G7] (10); its - in the embodiment shown in Figures 8 and 9 '- control word group is loaded into the control block u〇4 register via an XLOAD microinstruction Then, the cryptographic key or key schedule is recorded as 128 bits by the subsequent XL〇AD microinstruction, and then a XL〇AD microinstruction is used to specify the golden record-01 register 1107. The loaded password key is greater than the US bit, then an XLOAD microinstruction specifies the key _〇 register u〇7, and an xl〇ad microinstruction specifies the Admiralty_1 register register circle. For the user-generated key schedule, the subsequent XL〇AD micro-instruction specifies the key _〇 register 1107. Each of the gold balances in the loaded gold record schedule is placed in the gold draw randomly. The access memory (10) is used for the execution of the relative gold record round 42 1351864. After that, the input text data (if no start vector is needed) is carried to the IN-1 register 1106. If the start is used The vector is then loaded via an XLOAD microinstruction to the input-1 register 1106. A microinstruction sent to the input-〇 register 1105 causes the password usage unit to load the input literal into the input-〇 register 1105. And start using the input-1 or two input registers 1105-1106 (when the input data is being processed by the pipeline) the start vector performs a password round on the input text in the input-0 register 1105, wherein The execution of the password round φ is based on the parameters provided by the contents of the control block 1104 register. When a XLOAD micro-instruction is received and specified, the block ciphertext logic begins. Execute the cryptographic operations specified by the control block contents. When a single cryptographic key needs to be expanded, the block ciphertext logic circuit generates each key in the key schedule and stores it in the key random access memory 1102. In a different embodiment, the block The ciphertext logic circuit generates each key in the key schedule before receiving the LOAD microinstruction specifying the input-〇 register 1105. Whether or not the block ciphertext logic circuit H01 generates a key schedule or key Whether the schedule is carried out from the memory, the key used in the first round is cached in the block ciphertext logic circuit 1101, so that the first block password round can be used without using the key random access memory. The condition of the body 1102 is carried out. The block ciphertext logic circuit 1101 continues to perform a specified cryptographic operation on one or more input text blocks upon activation until the operation is completed. Next, the back alloy key required for the cryptographic algorithm used is retrieved from the key random access memory 1102. The password using unit 1100 performs a predetermined block cryptographic operation on the designated input text block, and the subsequent input text block is encrypted or undefined by the execution of the 43 X351864 relative to the subsequent XLOAD and XSTOR microinstructions ( That is, when the §-draw micro-instruction is executed, if _ has not been completely generated = 〇 register 1109 or turn-out -1 register 1113. - The output block ciphertext logic circuit sends * delay signal 1109-1110 , then the second shame is placed and placed - corresponding to the wheeled register bus 1112. ^ UG9] 11G content is transferred to the wrong memory, please refer to Figure 12, the dragon goes to ^

,、為一说明本發明用以依進階加密 才示率(AES)執仃岔碼運算 山 π之&塊岔文避軻電路實施範 方塊圖。區塊密文邏輯曾牧1〇ΛΛ —人 、科电路1200包含一回合引擎122〇, 該回合引擎1220經由m泣排1〇Ί1 ’ 、工田進抓排1211-1214及匯流排 1216-1218耦合至一回合引擎控制器121〇 ,該回合引擎控 制器1210使用一微指令ι201暫存器、控制字組12〇2暫存 器、金鑰-〇暫存器1203及金鑰-1暫存器12〇4而存取金輸 資料、微指令及所進行之密碼運算的參數。輸入暫存哭 1205-1206之内容被送至回合引擎1220,且回合引擎122〇 提供對應輸出文字至輸出暫存器1207-1208。輸出暫存器 1207-1208亦經由匯流排1216-1217耦合至回合引擎控制器 1210,以令回合引擎控制器1210得使用每一後續密碼回合 之結果,其中該等結果經由下回合輸入匯流排1218而送至 一下一密碼回合。金錄Ram(未顯示)中的密碼金鑰可經由 至金鑰匯流排1215而被存取’·加密/解密匯流排1211令回 合引擎使用子運算而執行加密(如S-Box)或解碼(如反向 S-Box);回合計數匯流排丨212之内容令回合引擎1220執 行一第一 AES回合、一中間AES回合或一最後AES回合。 44 1351864 金鑰生成匯流排1214被發出以令回合引擎1220根據金鑰 匯流排1213所提供之金鑰產生一金鑰排程,且金鑰匯流排 1213亦在每一回合金錄被執行時提供對應回合金鐘至回合 引擎1220中。 回合引擎1220包含第一金鑰x〇R邏輯電路1221 ’該 第一金鑰XOR邏輯電路1221耦合至一 REG-0暫存器 1222°REG-0暫存器1222耦合至S-box邏輯電路1223,該 S-box邏輯電路1223耦合至移列(Shift Row)邏輯電路 1224,該移列邏輯電路1224耦合至一 REG-1暫存器1225, REG-1暫存器1225則搞合至混合列(Mix Column)邏輯電路 1226 ’混合列邏輯電路ms則耦合至一 REG-2暫存器 1227。第一金鑰x〇r邏輯電路1221、S-box邏輯電路1223、 移列邏輯電路1224及混合列邏輯電路1226被設定以對輸 入文字資料執行類似名稱之子運算,其中該等當執行之子 運算已指定於上述AES FIPS標準中。此外,混合列邏輯電 路1226亦另被設定以在所需之中間回合期間透過金鑰匯 流排1213所提供之回合金鑰對輸入資料執行aes XOR功 能。第一金鑰XOR邏輯電路122l、S-box邏輯電路1223、 移列邏輯電路1224及混合列邏輯電路1226亦被設定以在 解碼期間經由加密/解密匯流排1211之狀態而啟動執行其 對應反AES子運算。熟習該項技術者皆能瞭解中間回合資 料之依據特定區塊加密模式而送回至回合引擎m〇係為 控制子組1202暫存器所指定。起始向量資料(若需要)經由 下回合輸入匯流排1218而送至回合引擎1220。 45 1351864 在第12圖所示實施例中,回合引擎被分作第一級及第 二級,其中第一級位於REG-0暫存器1222及REG-1暫存 器1225間,第二級則位於REG-1暫存器1225及REG-2 暫存器1227之間。中間回合資料在該二級之間受管線管 理,且該管線管理係與一時脈訊號同步為之。當對一輸入 資料區塊之一密碼運算動作完成時,相關輸出資料被置入 一對應輸出暫存器1207-1208中。當一 XSTOR微指令被執 行時,一指定輸出暫存器1207-1208即被送至一儲存匯流 排上。 現請參閱第13圖,圖中所示為一說明本發明之一用以 在中斷發生時保存密碼參數狀態之方法S1300的流程圖。 該流程起始於步驟S1302,此時一指令流為一微處理器執 行,其中該指令流不需包含本案中所述XCRYPT指令。接 著,該流程往步驟S1304移動。 在步驟S1304時,一中斷事件(如可遮罩中斷、非可遮 罩中斷、頁錯誤、工作切換等)是否正發生中斷將受判斷, 此時該指令流中需有一改變而形成一指令流(「中斷處理 者」)以處理該中斷事件。若中斷確實正進行中,該流程往 步驟S1306前進;若否,則該流程在步驟S1304上反覆受 判斷直至一中斷事件發生,其中在反覆判斷期間指令執行 之動作持續進行。 在步驟S1306時,由於在將程式控制權傳送至一對應 中斷處理者之前已有一中斷事件發生,故本發明之中斷邏 輯電路對一旗標暫存器中的X位元加以清除,如此得確保 46 1351864 若於中斷處理者處返回時一區塊密碼運算正進行時、一或 多中斷事件之發生將被指出且控制字組資料及金鑰資料必 須在持續進行區塊密碼運算之前再被載入,其中該密碼運 算所針對之輸入資料區塊為輸入指標暫存器内容所指者。 接著,流程行進至步驟S1308。 在步驟S1308時,包含與本發明之區塊密碼運算性能 相關之指標及計數器架構性暫存器被存至記憶體中。熟習 該項技術者皆能瞭解現今資料計算裝置中架構性暫存器之 儲存典型上係於傳送控制至中斷處理者之前進行,因此本 發明提出本資料架構態樣以令中斷事件發生整個過程中具 有執行透明度。在該等暫存器被儲存後,流程前進至步驟 S1310 。 在步驟S1310時,程式流被送至中斷處理者處。接著, 流程前進至步驟S1312。 該方法在步驟S1312處結束。熟習該項技術者皆能瞭 解第13圖之方法在於中斷處理者處返回時在方塊1302處 再度開始。 現請參閱第14圖,圖中所示為一用以說明本發明之利 用一對稱金鑰演算法而於一或多中斷事件發生之時對複數 個訊息區塊產生一訊息摘要之方法S1400的流程圖。雖然 熟習該項技術者皆知在利用其他區塊密文模式(如CBC、 CTR及CFB等)之一者產生訊息摘要時仍會一些可忽略的 改變,但該方法之步驟係依據輸出授迴區塊密文模式表 示,以使說明較簡便。 47 1351864 流程開始於步驟S1402,此時一本發明之XCRYPT指 令使一訊息摘要的產生開始執行。XCRYPT指令之執行可 為一第一執行,或可因中斷事件造成執行中斷而變為一第 一執行之後的執行,其中該中斷事件對執行的中斷使得程 式控制權在一中斷處理者已執行之後傳送回至XCRYPT指 令。接著,流程行進至步驟S1404。 在步驟S1404時,一本發明之輸入指標暫存器内容所 指之一記憶體資料區塊被自記憶體中載出,且根據一指定 密碼運算而為之訊息摘要產生亦開始。該被使用之既定輸 入指標暫存器被決定,且特定密瑪運算(如加密或解碼)依 據該輸入指標暫存器而被決定,且區塊密文模式(如CBC、 CTR、CFB或OFB)亦藉由該輸入指標暫存器而被決定。舉 例而言,若OFB模式被用於加密運算以產生訊息摘要,則 輸入指標暫存器及一起始指標暫存器皆被用以載入資料, 故輸入指標暫存器指向一下一將被加密之訊息區塊,其結 果為一中間雜湊值。若一訊息摘要的產生係利用OFB模式 解碼運算而為,則輸入指標暫存器指向相同的下一訊息區 塊,且此時係以解碼演算法而非加密方式而為。不管方式 為何(即OFB加密或OFB解碼),起始向量暫存器皆指向記 憶體中一起始向量位置,且其内容對於一第一訊息區塊為 一起始向量,對於後續訊息區塊則為對應一前一訊息區塊 之輸出密文區塊(即中間雜湊值),其中該前一訊息區塊係 被用作為等效於一目前訊息區塊之一起始向量。 在步驟S1406處,一旗標暫存器中X位元是否為設定 48 1351864 狀態被加判斷。若X位元被設定,則控制字組及以被載進 本發明之密碼使用單元的金鑰排程之值成立;若X位元被 清除,則控制字組及以被載進本發明之密碼使用單元的金 鑰排程之值不成立。如上述配合第13圖所略為提及者,X 位元在一中斷事件發生之時被清除。此外,當需要載入一 新控制字組或金鑰排程或該二者時,指令須被執行以在 XCRYPT指令發出之前清除,如上所述。在一於X86 EFLAGS暫存器内使用位元30之X86相容實施例中,該X 位元的清除可藉於一 PQPFD指令後執行一 PUSHFD指令 的方式為之。不過,熟習該項技術者皆知X位元的清除在 其他不同實施例中必須依賴其他指令為之。若X位元元被 設定,則流程行進至步驟S1412 ;若X位元元被清除,則 流程行進至步驟S1408。 在步驟S1408時,由於一被清除之X位元已指出一中 斷事件已發生或一新控制字組及(或)金鑰資料將被載入, 因此一控制字组被自記憶體中載出。在一實施例中,控制 字組之載入使密碼使用單元的指定密碼運算動作停止,如 上述配合步驟S1404所載述者。在本實施範例中步驟S1404 中一密碼運算的開始得使多個區塊密碼運算得到最佳化, 其方式為假設一目前之控制字組及金錄貧料為將被使用 者。因此,目前輸入資料區塊被載入,且密碼運算在核對 步驟S1406中X位元狀態之前即已開始。接著,流程行進 至步驟S1410。 在步驟S1410處,金鑰資料(即一加密金鑰或一完整金 49 1351864 鑰排程)被自記憶體中載入。此外,步驟S] 404中配合說明 之輸入訊息區塊及起始向量(或起始向量之等效者)被再度 載入,且密碼運算依據最新載入之控制字組及金鑰排程開 始進行。接著,流程行進至步驟S1412。 在步驟S1412處,在步驟S1404或步驟S1410處被載 入之輸入訊息區塊被儲存至一内部暫存器TEMP。接著, 流程行進至步驟S1414。 在步驟S1414處,一對應該載入之訊息區塊的中間雜 湊值被產生。接著,流程進行至步驟S1416。 在步驟S1416處,一起始向量之等效者IVEQ藉由對 中間雜湊值及TEMP之内容加以互斥或的方式產生。接 著,流程行進至步驟S1418。 在步驟S1418處,起始向量之等效者IVEQ被寫至起 始向量指標暫存器IVPTR内容所指之記憶位置,以使對下 一輸入訊息區塊之指定OFB模式密碼運算使用正確的起始 向量等效者。接著,流程行進至步驟S1420。 步驟S1412,S1414,S1416及S1418中所述之步驟得確 保一 XCRYPT指令得在任何時候使用將被中斷之OFB模式 區塊密碼方式的條件下執行。 在步驟S1420處,所產生的中間雜湊值被儲存至記憶 體中。接著,流程行進至步驟S1422。 在步驟S1422處,輸入區塊指標暫存器之内容被加修 改以指向下一輸入訊息區塊。由於此一流程S1400之作用 在於產生一訊息摘要,故輪出指標暫存器之内容不改變, 50 1351864 以使所產生的每一後續中間雜湊值皆覆寫於先前產生之值 上,並最後使訊息摘要本身在指定密碼運算執行之後形成 於上一訊息區塊上。此外,區塊計數暫存器内容被加修正 以指出目前輸入訊息區塊上的密碼運算已完成。在第14圖 所示實施例中,區塊計數暫存器值遞減,但熟習該項技術 者皆知其他實施例中可對區塊計數暫存器内容加以處理及 測試,以令輸入訊息區塊同樣可受管線式處理。接著,流 程行進至步驟S1424。 在步驟S1424處,輸入訊息區塊是否仍被加運算被加 判斷,本實施例係以瞭解區塊計數器判斷是否為零的方式 判斷之,不過此僅為說明用,仍有其他實施例之存在。若 已無區塊受運算處理,則流程行進至步驟S1428。若有一 區塊仍受運算處理,則流程行進至步驟S1426。 在步驟S1426處,下一輸入訊息資料區塊與起始向量 之等效者一同被載入,且該起始向量之等效者為輸入指標 暫存器及起始向量暫存器所指。接著,流程行進至步驟 S1412 。 在.步驟S1428處,該方法結束。 熟習該項技術者皆知步驟S1416,S1418,S1420,S1422 及S1424對應之步驟的行進順序可不同於上述者,其甚至 可平行而為。 本發明之目的、特徵及優點已詳述於上,但其他實施 例亦屬本發明包含之範圍。舉例而言,本發明之與x86架 構相容之實施例已詳盡描述於上,但僅係因x86架構為一 53 1351864 般所廣泛瞭解而以之為例說明,故對其之討論可用以教示 本發明之其他部份。亦即,本發明之範圍擴及PowerPC、 MIPS等其他指令集架構,並亦適用於其他全新的指令集架 構。 甚者,本發明之密碼運算亦可於一計算系統中微處理 器本身以外的控制件中進行,如得於計算系統中一不同於 微處理器所在積體電路上的一密碼使用單元上進行,該等 實施例得依序整合於一圍繞一微處理之晶片組(如北橋及 南橋)中,或可構成一專用以執行密碼運算之處理器,此時 密碼指令由一主微處理器被送至該處理器中。本發明亦可 用於嵌入式控制器、工業控制器、訊號處理器、陣列處理 器及各種得用以處理資料之類似裝置中。此外,本發明亦 包含一僅具有上述中該等用以執行密碼運算所必須之控制 件的實施例。以上述方式體現之裝置確實得將執行密碼運 算的低成本及低功率代用方式單由一通訊系統中一加密/ 解碼處理器等實施之。為便於說明,本案發明人將上述該 等不同處理控制項統稱作處理器。 此外,雖然上述中本發明係以128位元區塊作為代表 說明,其他各種不同區塊大小亦得使用之,僅需改變攜載 輸入資料、輪出資料、金鑰及控制字組之暫存器的大小即 可達成之。 再者,雖然DES、三重DES及AES之特徵已在本案 中詳述,但本案發明人當特別說明本發明實際上亦包含一 般所較不常用之區塊密碼使用演算法,如MARS密文、 52 1351864In order to explain the implementation of the present invention, it is based on the advanced encryption rate (AES) implementation code calculation circuit of the π & block 轲 轲 轲 。 。 circuit. Block ciphertext logic Zengmu 1〇ΛΛ - Human, Section Circuit 1200 includes a round engine 122〇, the round engine 1220 through the m weep row 1〇Ί1 ', the field hits the row 1211-1214 and the bus bar 1216-1218 Coupled to a round engine controller 121, the round engine controller 1210 uses a microinstruction ι 201 register, a control block 12 〇 2 register, a key 〇 register 1203, and a key -1 temporary storage The device 12〇4 accesses the gold data, the microinstruction, and the parameters of the cryptographic operations performed. The contents of the input temporary cry 1205-1206 are sent to the round engine 1220, and the round engine 122 provides the corresponding output text to the output registers 1207-1208. The output registers 1207-1208 are also coupled to the round engine controller 1210 via the bus bars 1216-1217 to cause the round engine controller 1210 to use the results of each subsequent password round, wherein the results are entered via the lower round input bus 1218 And send it to a password round. The cryptographic key in the golden record Ram (not shown) can be accessed via the key to the bus 1215. The encryption/decryption bus 1211 causes the round engine to perform encryption (such as S-Box) or decoding using sub-operations ( For example, the reverse S-Box); the content of the round count bus bar 212 causes the round engine 1220 to perform a first AES round, an intermediate AES round, or a final AES round. 44 1351864 The key generation bus 1214 is issued to cause the round engine 1220 to generate a key schedule based on the key provided by the key bus 1213, and the key bus 1213 is also provided each time the alloy record is executed. Corresponding back to the alloy clock to the turn engine 1220. The round engine 1220 includes a first key x〇R logic circuit 1221. The first key XOR logic circuit 1221 is coupled to a REG-0 register 1222. The REG-0 register 1222 is coupled to the S-box logic 1223. The S-box logic circuit 1223 is coupled to a Shift Row logic circuit 1224, which is coupled to a REG-1 register 1225, and the REG-1 register 1225 is coupled to the hybrid column. (Mix Column) logic circuit 1226 'mixed column logic circuit ms is coupled to a REG-2 register 1227. The first key x〇r logic circuit 1221, the S-box logic circuit 1223, the shift logic circuit 1224, and the mixed column logic circuit 1226 are configured to perform a sub-operation of a similar name on the input text data, wherein the sub-operations of the execution are Designated in the above AES FIPS standard. In addition, the hybrid column logic circuit 1226 is additionally configured to perform an aes XOR function on the input data via the return alloy key provided by the key bus 1213 during the desired intermediate round. The first key XOR logic circuit 1221, the S-box logic circuit 1223, the shift logic circuit 1224, and the mixed column logic circuit 1226 are also set to initiate execution of their corresponding inverse AES via the state of the encryption/decryption bus 1211 during decoding. Sub-operation. Those skilled in the art will be able to understand that the intermediate back-to-back joint venture material is returned to the round engine m according to the specific block encryption mode, which is specified by the control sub-group 1202 register. The starting vector data (if needed) is sent to the round engine 1220 via the next round input bus 1218. 45 1351864 In the embodiment shown in Fig. 12, the round engine is divided into a first stage and a second stage, wherein the first stage is located between the REG-0 register 1222 and the REG-1 register 1225, the second stage It is then located between the REG-1 register 1225 and the REG-2 register 1227. The intermediate round data is managed by the pipeline between the two levels, and the pipeline management system is synchronized with a clock signal. When a cryptographic operation on one of the input data blocks is completed, the associated output data is placed in a corresponding output register 1207-1208. When an XSTOR microinstruction is executed, a designated output register 1207-1208 is sent to a storage bus. Referring now to Figure 13, there is shown a flow diagram of a method S1300 for illustrating the preservation of the state of a cryptographic parameter when an interrupt occurs. The process begins in step S1302, where an instruction stream is executed by a microprocessor, wherein the instruction stream does not need to include the XCRYPT instruction described in this case. Then, the flow moves to step S1304. At step S1304, an interrupt event (such as a maskable interrupt, a non-maskable interrupt, a page fault, a work switch, etc.) is judged whether an interrupt is occurring, and a change is required in the instruction stream to form an instruction stream. ("Interrupt handler") to handle the interrupt event. If the interrupt is indeed in progress, the flow proceeds to step S1306; if not, the flow is repeatedly judged in step S1304 until an interrupt event occurs, wherein the action of the command execution continues during the repeated judgment. At step S1306, since an interrupt event has occurred before the program control is transferred to a corresponding interrupt handler, the interrupt logic circuit of the present invention clears the X bit in a flag register, thus ensuring 46 1351864 If a block cipher operation is in progress when the interrupt handler returns, the occurrence of one or more interrupt events will be indicated and the control block data and key data must be loaded before the block cipher operation is continued. The input data block for which the cryptographic operation is directed is the one indicated by the content of the input indicator register. Next, the flow proceeds to step S1308. At step S1308, the indicator and counter architectural register containing the block cipher performance of the present invention are stored in the memory. Those skilled in the art will be able to understand that the storage of architectural registers in today's data computing devices is typically performed prior to the transfer control to the interrupt handler. Therefore, the present invention proposes this data architecture to allow the interrupt event to occur throughout the process. Has execution transparency. After the registers are stored, the flow advances to step S1310. At step S1310, the program stream is sent to the interrupt handler. Then, the flow advances to step S1312. The method ends at step S1312. Those skilled in the art will be able to understand that the method of Figure 13 begins again at block 1302 when the interrupt handler returns. Referring now to Figure 14, there is shown a method S1400 for illustrating a method for generating a message digest for a plurality of message blocks at the time of occurrence of one or more interrupt events using a symmetric key algorithm of the present invention. flow chart. Although those skilled in the art are aware that there are still some negligible changes in the use of one of the other block ciphertext modes (such as CBC, CTR, CFB, etc.), the steps of the method are based on the output. The block ciphertext mode is indicated to make the description easier. 47 1351864 The flow begins in step S1402, at which time an XCRYPT instruction of the present invention causes the generation of a message digest to begin execution. The execution of the XCRYPT instruction may be a first execution, or may be performed after a first execution due to an interrupt event caused by an interrupt event, wherein the interrupt event is executed after the interrupt is executed by an interrupt handler Transfer back to the XCRYPT command. Next, the flow proceeds to step S1404. In step S1404, a memory data block indicated by the input index register content of the present invention is loaded from the memory, and the message digest generation is also started according to a specified cryptographic operation. The used input index register is used, and a specific mbma operation (such as encryption or decoding) is determined according to the input index register, and the block cipher mode (such as CBC, CTR, CFB or OFB) ) is also determined by the input indicator register. For example, if the OFB mode is used for the encryption operation to generate the message digest, the input indicator register and a start indicator register are used to load the data, so the input indicator register points to be encrypted. The message block, the result is an intermediate hash value. If a message digest is generated using the OFB mode decoding operation, the input indicator register points to the same next message block, and this is done by decoding algorithm instead of encryption. Regardless of the mode (ie, OFB encryption or OFB decoding), the start vector register points to a starting vector position in the memory, and its content is a starting vector for a first message block, and for a subsequent message block. Corresponding to the output ciphertext block of the previous message block (ie, the intermediate hash value), wherein the previous message block is used as a start vector equivalent to a current message block. At step S1406, whether the X bit in a flag register is set to 48 1351864 is judged. If the X bit is set, the control word group and the value of the key schedule loaded into the password use unit of the present invention are established; if the X bit is cleared, the control word group and the control word group are loaded into the present invention. The value of the key schedule for the password usage unit does not hold. As mentioned above in conjunction with Figure 13, the X bit is cleared at the time an interrupt event occurs. In addition, when a new control block or key schedule or both needs to be loaded, the instructions must be executed to clear before the XCRYPT instruction is issued, as described above. In an X86-compatible embodiment using bit 30 in the X86 EFLAGS register, the clearing of the X bit can be performed by a PQPFD instruction followed by a PUSHFD instruction. However, those skilled in the art are aware that the elimination of X bits must rely on other instructions in other different embodiments. If the X bit is set, the flow proceeds to step S1412; if the X bit is cleared, the flow proceeds to step S1408. At step S1408, a control word is loaded from the memory since a cleared X bit has indicated that an interrupt event has occurred or a new control block and/or key data will be loaded. . In one embodiment, the loading of the control block causes the specified cryptographic operation of the cryptographic use unit to cease, as described above in conjunction with step S1404. In the present embodiment, the start of a cryptographic operation in step S1404 optimizes the plurality of block cryptographic operations by assuming that a current control block and a poorly recorded material are to be used. Therefore, the input data block is currently loaded, and the cryptographic operation has started before the X bit state in the check step S1406. Then, the flow proceeds to step S1410. At step S1410, the key material (i.e., an encryption key or a complete gold 49 1351864 key schedule) is loaded from the memory. In addition, the input message block and the start vector (or the equivalent of the start vector) in step S] 404 are reloaded, and the cryptographic operation starts according to the newly loaded control block and key schedule. get on. Next, the flow proceeds to step S1412. At step S1412, the input message block loaded at step S1404 or step S1410 is stored to an internal register TEMP. Then, the flow proceeds to step S1414. At step S1414, an intermediate hash value of a pair of message blocks to be loaded is generated. Next, the flow proceeds to step S1416. At step S1416, the equivalent of the start vector IVEQ is generated by mutually exclusive or mutating the contents of the intermediate hash value and TEMP. Then, the flow proceeds to step S1418. At step S1418, the equivalent vector IVEQ of the start vector is written to the memory location indicated by the content of the start vector index register IVPTR, so that the specified OFB mode cryptographic operation for the next input message block is used correctly. The starting vector equivalent. Next, the flow proceeds to step S1420. The steps described in steps S1412, S1414, S1416 and S1418 ensure that an XCRYPT instruction is executed at any time using the OFB mode block cipher mode to be interrupted. At step S1420, the generated intermediate hash value is stored in the memory. Next, the flow proceeds to step S1422. At step S1422, the contents of the input block indicator register are modified to point to the next input message block. Since the function of this process S1400 is to generate a message digest, the content of the round-out indicator register is not changed, 50 1351864, so that each subsequent intermediate hash value generated is overwritten on the previously generated value, and finally The message digest itself is formed on the previous message block after the specified cryptographic operation is performed. In addition, the block count register contents are modified to indicate that the cryptographic operation on the current input message block has been completed. In the embodiment shown in FIG. 14, the block count register value is decremented, but those skilled in the art are aware that other embodiments can process and test the block count register contents to make the input message area. Blocks can also be processed in a pipeline. Then, the flow proceeds to step S1424. At step S1424, whether the input message block is still added by the addition operation is determined. This embodiment determines whether the block counter determines whether the block counter is zero, but this is for illustrative purposes only, and there are still other embodiments. . If no block has been subjected to arithmetic processing, the flow proceeds to step S1428. If a block is still subjected to arithmetic processing, the flow proceeds to step S1426. At step S1426, the next input message data block is loaded with the equivalent of the start vector, and the equivalent of the start vector is indicated by the input index register and the start vector register. Then, the flow proceeds to step S1412. At step S1428, the method ends. It is well known to those skilled in the art that the steps of the steps corresponding to steps S1416, S1418, S1420, S1422 and S1424 may differ from the above, which may even be parallel. The objects, features, and advantages of the invention are set forth in the Detailed Description. For example, the embodiments of the present invention that are compatible with the x86 architecture have been described in detail above, but are merely exemplified by the fact that the x86 architecture is widely known as a 53 1351864, so that discussion thereof can be used to teach Other parts of the invention. That is, the scope of the present invention extends to other instruction set architectures such as PowerPC and MIPS, and is also applicable to other new instruction set architectures. Moreover, the cryptographic operation of the present invention can also be performed in a control component other than the microprocessor itself in a computing system, such as in a computing system that is different from a cryptographic use unit on the integrated circuit in which the microprocessor is located. The embodiments may be sequentially integrated into a micro-processed chipset (such as a north bridge and a south bridge), or may constitute a dedicated processor for performing cryptographic operations, in which case the password command is controlled by a main microprocessor. Sent to the processor. The invention can also be used in embedded controllers, industrial controllers, signal processors, array processors, and various similar devices for processing data. Moreover, the present invention also encompasses an embodiment having only the controls necessary to perform cryptographic operations as described above. The device embodied in the above manner does have to implement a low-cost and low-power substitute for performing a password operation by an encryption/decoding processor or the like in a communication system. For convenience of explanation, the inventors of the present invention collectively refer to the above different processing control items as processors. In addition, although the above invention is represented by a 128-bit block, other various block sizes are also used, and only the temporary storage of the input data, the rounded data, the key, and the control block need to be changed. The size of the device can be achieved. Furthermore, although the features of DES, Triple DES, and AES have been described in detail in this case, the inventor of the present invention specifically states that the present invention actually includes a generally less commonly used block cipher use algorithm, such as MARS ciphertext, 52 1351864

Rijndael 密文 ' Twofish 密文及 Blowfish 密文、Serpent 密 文及RC6密文。在詳閱過上述說明後,本發明之專用區塊 密碼使用設備及微處理器中的支援方法必足為一般所瞭 解,其中訊息摘要產生運算可經由對一單一指令之執行而 被喚起動作。 最後,本發明已經詳述單一密碼使用單元可支援複數 個區塊密碼演算法,但本發明之範圍實亦包含多密碼使用 單元的使用,該等單元在操作上與相容微處理器中其他執 行單元平行耦合,且皆設定以執行一既指定之區塊密碼演 算法。舉例而言,一第一單元設定以執行AES演算法,一 第二單元設定以執行DES演算法等。 本發明已針對特定實施例詳述如上,熟習該項技術者 得在不違本發明之精神及範圍的條件下對本發明加以改變 或更動,該等改變或更動仍不脫離本發明之範圍,本發明 之精神及範圍將定義如下述之申請專利範圍中。 在詳閱過下述之說明及所附圖式後,本發明之上述及 其它目的、特徵及優點將更易於瞭解。 【圖式簡單說明】 第1圖為一說明現今密碼相關應用之方塊圖; 第2圖為一說明執行密碼運算之技術的方塊圖; 第3圖為一代表本發明用以執行密碼運算之微處理器設備 的方塊圖, 第4圖為本發明之極微密碼指令實施例的方塊圖; 53 1351864 第:&gt; 圖為說明第4圖中極微密碼指令中區塊密文模式攔位 元值範例的表格; 第6圖為本發明之一與χ86相同之微處理器内一密碼使用 . 單元的方塊圖; • 第圖為使第ό圖之微處理器内進行密碼相關子運算之 微指令範例中的欄位元圖; 弟8圖為具第7圖之格式的一 XLOAD微指令之暫存器攔 • 位元值的表格; 弟9圖為具第7圖之格式之一 XSTOR微指令的暫存器攔位 元值的表格; 第圖為本發明用以指定一密碼使用運算之密碼相關參 — 數的控制字元格式範例中的攔位元圖; 弟u圖為說明本發明中一密碼使用單元範例細節的方 圖; ,第2圖為一說明本發明之一執行進階加密標準(八烈)之密 韻算之區塊密碼邏輯電路實施例的方塊圖;* $為:說明本發明用以在一中斷事件期間保存密碼 々 相關麥數狀態之方法的流程圖;及 第4圖為-祝明本發明在一或多中斷事件存在的條件下 利用一對稱金錄演算法產生複數個訊息區塊之一 訊息摘要之方法的流程圖。 【主要元件符號說明】 1〇0現今電腦密碼應用技術方塊圖 54 第一電腦工作站 第二電腦工作站 遠端電腦 膝上型電腦 區域網路 網路檔案儲存裝置 第一路由器 無線網路路由器 無線網路 廣域網路 第二路由器 加密、解碼或雜湊應用程式 執行密碼運算技術之方塊圖 微處理器 作業系統軟體 應用程式記憶體 密碼金输產生應用程式 金錄排程 加密應用程式 解碼應用程式 起始向量 密碼參數 未加密文件 訊息摘要 1351864 300 執行密碼運算與微處理器設備相關的方塊圖 301 微處理器 302 擷取邏輯電路 303 轉換邏輯 304 微指令列 305 儲存 306 載入 307 暫存器檔案 308 控制指標 309 金錄指標 310 密鑰生成 311 輸入指標 312 輸出指標 313 區塊計數 314 裝載邏輯電路 315 資料快取記憶體 316 密碼使用單元 317 儲存邏輯電路 318 寫回邏輯電路 319 記憶體匯流排 320 作業系統 321 系統記憶體 322 密碼指令 323 密碼控制字組 56 1351864Rijndael ciphertext 'Twofish ciphertext and Blowfish ciphertext, Serpent ciphertext and RC6 ciphertext. After reading the above description, the dedicated block cipher device and the support method in the microprocessor of the present invention are generally understood, and the message digest generating operation can be invoked by performing a single instruction. Finally, the present invention has been described in detail that a single cryptographic usage unit can support a plurality of block cipher algorithms, but the scope of the present invention also encompasses the use of multiple cryptographic usage units that are operationally compatible with other microprocessors. The execution units are coupled in parallel and are each configured to perform a specified block cipher algorithm. For example, a first unit is set to perform an AES algorithm, a second unit is set to perform a DES algorithm, and the like. The present invention has been described in detail above with reference to the specific embodiments of the present invention, which may be modified or modified without departing from the spirit and scope of the invention. The spirit and scope of the invention will be defined in the scope of the claims below. The above and other objects, features and advantages of the present invention will become more <RTIgt; BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a conventional password-related application; FIG. 2 is a block diagram showing a technique for performing a cryptographic operation; and FIG. 3 is a diagram showing a micro-operation for performing a cryptographic operation of the present invention. Block diagram of a processor device, FIG. 4 is a block diagram of an embodiment of a very small cipher command of the present invention; 53 1351864: &gt; Figure 1 is an example of a block ciphertext mode block value in a very small cipher command in FIG. Figure 6 is a block diagram of a unit used in a microprocessor in the same microprocessor as the χ86. The figure is a microinstruction example for the cryptographic correlation sub-operation in the microprocessor of the second figure. The field map in the middle; the 8th picture is a table of the scratchpad bits of the XLOAD microinstruction in the format of Figure 7; the picture of the 9th is the XSTOR microinstruction in the format of the 7th figure. a table of the register block value of the register; the figure is a block diagram of the control character format example used to specify a password-related parameter of a password use operation; A block diagram of the password usage unit example details Figure 2 is a block diagram showing an embodiment of a block cipher logic circuit for performing an advanced cryptographic standard (eight singularity) of the present invention; * $ is: illustrating the present invention for use during an interruption event A flowchart of a method for storing a password/related worm state; and FIG. 4 is a summary of a message of a plurality of message blocks using a symmetric gold recording algorithm in the presence of one or more interruption events. A flow chart of the method. [Main component symbol description] 1〇0 computer password application technology block diagram 54 first computer workstation second computer workstation remote computer laptop computer network network file storage device first router wireless network router wireless network WAN second router encryption, decoding or hash application block diagram of cryptographic operation technology microprocessor operating system software application memory password gold output generation application gold record scheduling encryption application decoding application start vector password parameter Unencrypted File Message Summary 1351864 300 Block Diagram for Performing Cryptographic Operations Related to Microprocessor Devices 301 Microprocessor 302 Capture Logic Circuitry 303 Conversion Logic 304 Microinstruction Columns 305 Storage 306 Loading 307 Register File 308 Control Indicators 309 Gold Record indicator 310 Key generation 311 Input indicator 312 Output indicator 313 Block count 314 Load logic circuit 315 Data cache memory 316 Password use unit 317 Storage logic circuit 318 Write back logic circuit 319 Memory bus 320 Operating system 321 System memory body 322 password command 323 password control block 56 1351864

324 起始密碼金鑰排程 325 起始向量 326 訊息文字 327 訊息摘要 328 執行邏輯 400 極微密碼指令 401 選擇性前碼欄位 402 重覆前碼欄位 403 運算竭棚位 404 區塊密文模式欄位 500 區塊密文模式欄位元值範例表格 600 微處理器 601 榻取邏輯電路 602 轉換邏輯 603 轉譯器 604 微碼唯讀記憶體 605 暫存器級 606 位址級 607 負載級 608 執行級 609 微指令列 610 整數單元 611 微指令列 612 浮點單元 57 微指令列 多媒體延伸指令集單元 微指令列 串流延伸集單元 密碼使用單元 儲存級 寫回級 負載匯流排 拖延訊號 儲存匯流排 旗標暫存器 X位元 中斷邏輯電路 軟體及硬體中斷訊號 匯流排 E位元 特徵控制暫存器 D位元 執行邏輯電路 機器指定暫存器· 訊息摘要邏輯電路 微指令 微運算碼 資料暫存器 1351864 703 暫存器 800 XLOAD微指令之暫存器欄位元值的表格 900 XSTOR微指令的暫存器欄位元值的表格 1000 控制字元 1001 保留攔位 1002 金鑰大小攔位 1003 加密/解碼攔位 1004 中間結果欄位 1005 金鑰生成攔位 1006 演算法攔位 10 0 7 訊息摘要搁位 1008 回合計數攔位 1100 密碼使用單元 1101 區塊密文邏輯電路 1102 金鑰隨機存取記憶體 1103 微運算碼 1104 控制字組 1105 輸入-0暫存器 1106 輸入-1暫存器 1107 金鑰-0暫存器 1108 金錄-1暫存器 1109 輸出-0暫存器 1110 輸出-1暫存器 載入匯流排 59 1111 1351864324 Start Password Key Schedule 325 Start Vector 326 Message Text 327 Message Summary 328 Execution Logic 400 Very Password Command 401 Selective Pre-Code Field 402 Repeat Pre-Code Field 403 Compute Slot 404 Block Ciphertext Mode Field 500 Block Ciphertext Mode Field Value Example Table 600 Microprocessor 601 Desk Logic 602 Conversion Logic 604 Translator 604 Microcode Read Only Memory 605 Register Level 606 Address Level 607 Load Level 608 Execution Level 609 Micro-instruction column 610 Integer unit 611 Micro-instruction column 612 Floating-point unit 57 Micro-instruction column Multimedia extension instruction set unit Micro-instruction column Stream extension set unit password Usage unit Storage level Write back level load bus stall delay signal storage bus header flag Standard register X bit interrupt logic circuit software and hardware interrupt signal bus E bit feature control register D bit execution logic circuit machine specified register · message summary logic circuit micro instruction micro code data temporary storage 1351864 703 register 800 XLOAD micro-instruction register field bit value table 900 XSTOR micro-instruction Table of the storage field bit value 1000 Control character 1001 Reserved block 1002 Key size block 1003 Encryption/decoding block 1004 Intermediate result field 1005 Key generation block 1006 Algorithm block 10 0 7 Message summary Bit 1008 Round Count Block 1100 Password Usage Unit 1101 Block Ciphertext Logic 1102 Key Random Access Memory 1103 Micro Code 1104 Control Block 1105 Input-0 Register 1106 Input -1 Register 1107 Gold Key-0 register 1108 Gold record-1 register 1109 Output-0 register 1110 Output-1 register load bus 59 1111 1351864

1112 儲存匯流排 1113 拖延訊號 1114 微指令匯流排 1200 區塊密文邏輯電路 1201 微指令 1202 控制字組 1203 金錄-0暫存器 1204 金錄-1暫存器 1205 輸入-0暫存器 1206 輸入-1暫存器 1207 輸出-0暫存器 1208 輸出-1暫存器 1210 回合引擎控制器 1211 加密/解密匯流排 1212 回合計數匯流排 1213 金鑰匯流排 1214 金鑰生成匯流排 1215 至金鑰匯流排 1216 匯流排 1217 匯流排 1218 下回合輸入匯流排 1220 回合引擎 1221 第一金鑰XOR邏輯電路 1222 REG-0暫存器 60 1351864 1223 S-box邏輯電路 1224 移列邏輯電路 1225 REG-1暫存器 1226 混合列邏輯電路 1227 REG-2暫存器 S1300 中斷發生時保存密碼參數狀態之方法 S1400對複數個訊息區塊產生一訊息摘要之方法1112 Storage Bus 1113 Delay Signal 1114 Micro Command Bus 1200 Block Ciphertext Logic Circuit 1201 Micro Command 1202 Control Word Group 1203 Gold Recorder-0 Register 1204 Gold Recorder-1 Register 1205 Input-0 Register 1206 Input-1 register 1207 output-0 register 1208 output-1 register 1210 round engine controller 1211 encryption/decryption bus 1212 round count bus 1213 key bus 1214 key generation bus 1215 to Key Bus 1216 Bus 1217 Bus 1218 Next Round Input Bus 1220 Round Engine 1221 First Key XOR Logic 1222 REG-0 Register 60 1351864 1223 S-box Logic 1224 Shift Logic 1225 REG- 1 register 1226 mixed column logic circuit 1227 REG-2 register S1300 method for saving password parameter state when interrupt occurs S1400 method for generating a message digest for a plurality of message blocks

6161

Claims (1)

案號 095Π0349 99 年 5 月 25 曰 修正本 十、申請專利範圍: 卜種^理器t的設備,用以達成密碼運算,1包含. 輯電路,用以自—來源處接收一密:馬指令, 要= :運算之-者指定-訊息摘 成一浐定1以T據省等进碼運算’轉換該密碼指令 2 雜息摘麵需之切算的《令序列; • 用,行邏輯電路,在操作上_至該轉換邏輯電路, 微指令序列,並用以執行該等次運算以產生 2:=::第一:—^ 以二加;運算’該加密運算包含對複數個訊息區塊加 口^生對應之複數個令間雜凑值,其中該等中間 雜凑值之一最後者之值即為該訊息摘要。 3.如二!專利範圍第1項所述之微處理器中的設備,其中 该4密碼運算之一者包含: 解馬運#胃解碼運算包含對複數個訊息區塊加 乂碼’以產生對應複數個中間雜湊值,其中該等中間 雜湊值之一最後者即為該訊息摘要。 4==專利_第1項所述之微處理器中的設備,其中 =密馬運算之者之進行係依據進階加密標準演算法 而為。 •如申3月專利辄圍第1項所述之微處理器中的設備,其中 62 :密碼指令指定待用以達成該等密 密文模式。 咬异之一的一區塊 6.如申請專㈣5項所叙微處理 該區塊密文模式至少包含下列模式之二其中 文區塊鏈、密文授迴模式、輸出授迴模式精純式、密 請專利範圍第1項所述之微處理器中的設備 -亥密碼指令之指定係根據X86指令格式而Case No. 095Π0349 May 25, 1999 曰 Amendment of this tenth, the scope of application for patents: The equipment of the type of device t, used to achieve the cryptographic operation, 1 contains the circuit, used to receive a secret from the source: the horse command , = = : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ In operation _ to the conversion logic circuit, a sequence of microinstructions, and to perform the equalization operations to generate 2:=:: first: -^ to two plus; operation 'the cryptographic operation includes adding a plurality of message blocks A plurality of inter-order hash values corresponding to the mouth, wherein the last value of one of the intermediate hash values is the message digest. 3. The device of the microprocessor of claim 1, wherein the one of the four cryptographic operations comprises: solving the Ma Yun# stomach decoding operation comprises adding a weight to the plurality of message blocks to generate Corresponding to a plurality of intermediate hash values, wherein the last one of the intermediate hash values is the message digest. 4 == Patent _ The device in the microprocessor of item 1, wherein the implementation of the cipher is based on the advanced cryptographic standard algorithm. • A device in a microprocessor as described in claim 1 of the patent application, wherein 62: the password command specifies that the ciphertext mode is to be used. One block of one bite 6. As described in the application (4), the ciphertext mode of the block contains at least the following modes: its Chinese blockchain, ciphertext grant mode, and output grant mode. The equipment in the microprocessor described in item 1 of the patent scope is specified in accordance with the X86 instruction format. 8·如1料利範圍第1項所述之微處理器中的設備 該推碼指令參相微處理ϋ巾複數個暫存哭。 範圍第8項所述之微處理器二設備 =數個暫存器包含—暫存器,其中該暫存器之内容包 :指向—第-記憶位址之第—指標,該第—記憶位 址才日疋一用以存取複數個訊息區塊之記憶體中一第一位8. The device in the microprocessor as described in item 1 of the material profit range. The push code command refers to the micro-processing wipes. The microprocessor 2 device of the scope item 8 includes a plurality of scratchpads including a register, wherein the content package of the register: the first indicator of the first-memory address, the first memory bit The first place in the memory used to access a plurality of message blocks 其中 其中 置,該等密碼運算之-係針對該複數個訊息區塊而進 仃’以產生該訊息摘要。 10.如申—請專利範圍第8項所述之微處理器中的設備,其中 Ζ複數個暫存器包含-暫存器,其中該暫存器之内容包 3 · m記憶位址之第—指標,該第一記憶位 址心疋該記憶體中的-第—位置,以儲存對應之複數個 中^雜湊值,該對應之複數财_凑值仙該等密碼 運算之一對複數個訊息區塊之動作而產生。 η.如申請專利範圍第8項所述之微處理器中的設備,其中 63 1351864 =複數個暫存ϋ包含—暫存器,其中該暫存器之内容指 出複數個訊息區塊甲的區塊數。 12·如申明專利範圍第8項所述之微處理器中的設備,其令 f複數個暫存器包含—暫存器,其中該暫存器之内容包 含: :指向-第—記憶位址之第—指標,該第一記憶位 曰疋心It體中用以存取密碼金”料之—第一位址, 以利用該密碼麵資料完成該等密碼運算之一者。 利知圍第8項所述之微處理器中的設備,其中 ;複數個暫存器包含—暫存器,其中該暫存器之内容包 财第—記憶位址之第—指標,該第—記憶位 起始向量之記憶體中一第一位置,以 】錢始向量完成該等密碼運算之-者。 利範圍第8項所述之微處理器中的設備,其中 固暫存器包含一暫存器’其中該暫存器之内容包 向第δ己憶位址之第一指標,該一 存取一控制字組之記憶體中-第-位置:以 組完成該等密碼運算之-者,其中該控制 專密運算之一的密碼參數。 .驟種在-處_中執行密料算之方法,其包含下列步 接收密石馬指令,其中該密碼指令根據該密碼運算之 64 丄丄504 一者指定一訊息摘要的產生;及 執行該等密碼運算產生訊息摘要。 ^申/月專㈣圍第15項所述之在—處理器中執行密石馬 驟异之方法’其中該接收密碼指令的步驟包含下列步Wherein, the cryptographic operations are performed for the plurality of message blocks to generate the message digest. 10. The device of the microprocessor of claim 8, wherein the plurality of registers comprise a register, wherein the contents of the register are 3 · m memory address - an indicator, the first memory address is in the heart of the memory - the first position to store a corresponding plurality of median hash values, the corresponding plurality of money - a value of one of the cryptographic operations Generated by the action of the message block. η. The device in the microprocessor of claim 8, wherein 63 1351864 = a plurality of temporary storage ports - a temporary storage device, wherein the contents of the temporary storage device indicate a plurality of information block A The number of blocks. 12. The device of the microprocessor of claim 8, wherein the plurality of registers comprise a register, wherein the contents of the register comprise:: a pointing-first memory address The first indicator is a first address located in the body of the It is used to access the first address of the password, to complete one of the cryptographic operations using the cryptographic data. The device in the microprocessor of the eighth aspect, wherein: the plurality of registers comprise a register, wherein the contents of the register are the first indicator of the memory-memory address, and the first memory bit A first position in the memory of the start vector, wherein the cryptographic operation is performed by the money start vector. The device in the microprocessor of the eighth aspect, wherein the solid register comprises a temporary register 'where the contents of the register are directed to the first indicator of the δ 忆 位 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , The cryptographic parameter that controls one of the secret operations. The method of performing the secret calculation in the _ _ The following steps are included to receive a pebbly horse command, wherein the cryptographic command specifies a message digest according to the 64 丄丄 504 of the cryptographic operation; and performs a cryptographic operation to generate a message digest. ^申/月专(四)围15 The method of executing a secret stone in a processor, wherein the step of receiving a password command comprises the following steps ,定-加密運算為該等密碼運算之―,其中該加密 :异包含對複數個訊息區塊加以加密,以產生對應之複 要個中間雜凑值,且該巾_凑值之最後者為該訊息摘 如申,專利刪15項所述之在一處理器中執行密竭 驟鼻之方去,其中戎接收密碼指令的步驟包含下列步The definite-encryption operation is the operation of the cryptographic operations, wherein the encryption comprises: encrypting the plurality of message blocks to generate a corresponding complex intermediate hash value, and the last of the towel values is The message is as claimed in the patent, and the method described in the fifteenth patent is performed in a processor, wherein the step of receiving the password command includes the following steps. 指定解碼運算為歸碼運算之―,其巾該解碼運算 ^對複數個訊息區塊的解碼,用以產生對應之複數個 ,雜湊值’且最後的該中間雜凑值為該訊息摘要。 請專利範圍帛15項所述之在—處理器中執行密碼 鼻之H其中該產生訊息摘要的步驟包含下列步 根據進階加密標準演算法完成該密碼運算。 以如申_贿15項所述之在—處理器中執行密碼 算之方去’其中该接收密碼指令的步驟包含下列步 算之 在該密碼指令中指定-待被心完成該等密碼運 —的區塊密文模式,以產生該訊息摘要。 65 1351864 20如!^專利&amp;園帛15項所述之在—處理器中執行密碼 ,异之方法’其中該區塊密文模式至少包含下列模式之 :授模式、密文區塊鍵模式、密文授迴模式:輪 利觸15項所述之在一處理器中執行密碼 驟异之方法’其中該接收密碼指令的步驟包含下列步 根據該Χ86指令格式指定該密碼指令。 66The decoding operation is designated as a categorization operation, and the decoding operation decodes the plurality of message blocks to generate a corresponding plurality of hash values and the last intermediate hash value is the message digest. The process of generating a message digest in the processor described in claim 15 includes the following steps: The cryptographic operation is performed according to the advanced encryption standard algorithm. The method of performing the password calculation in the processor as described in the claim 15 includes the following steps: the step of receiving the password instruction is specified in the password instruction - the password is to be completed by the heart - Block ciphertext mode to generate a summary of the message. 65 1351864 20 such as! ^ Patent &amp; 帛 帛 帛 帛 — — 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 处理器 其中 其中 其中 其中 其中 其中 其中 其中 其中 其中 其中 其中 其中 其中 其中 其中Mode: A method of performing a password dilemma in a processor as described in item 15 wherein the step of receiving a password instruction comprises the step of specifying the password instruction in accordance with the instruction format of the file. 66
TW95110349A 2005-03-25 2006-03-24 Apparatus and method for employing cyrptographic f TWI351864B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US11/090,690 US7925891B2 (en) 2003-04-18 2005-03-25 Apparatus and method for employing cryptographic functions to generate a message digest

Publications (2)

Publication Number Publication Date
TW200635317A TW200635317A (en) 2006-10-01
TWI351864B true TWI351864B (en) 2011-11-01

Family

ID=37015532

Family Applications (1)

Application Number Title Priority Date Filing Date
TW95110349A TWI351864B (en) 2005-03-25 2006-03-24 Apparatus and method for employing cyrptographic f

Country Status (2)

Country Link
CN (1) CN1838140A (en)
TW (1) TWI351864B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI514835B (en) * 2012-09-30 2015-12-21 Apple Inc Secure escrow service
TWI713855B (en) * 2017-07-10 2020-12-21 大陸商騰訊科技(深圳)有限公司 Certificate management method and system
TWI727226B (en) * 2018-07-27 2021-05-11 開曼群島商創新先進技術有限公司 Multi-level storage method and device for blockchain data
TWI750223B (en) * 2016-09-12 2021-12-21 大陸商上海唯鏈信息科技有限公司 Blockchain encrypted radio frequency chip storage design method
TWI802145B (en) * 2021-12-13 2023-05-11 財團法人國家實驗研究院 Validity management system for digital file and method for operating the same

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI397300B (en) * 2009-09-25 2013-05-21 Univ Shu Te Digital information encryption method
EP3324355B1 (en) * 2015-07-13 2020-08-26 Nippon Telegraph and Telephone Corporation Contract agreement method, agreement verification method, contract agreement system, agreement verification device, contract agreement device, contract agreement program and agreement verification program
KR101772554B1 (en) * 2016-02-02 2017-08-30 주식회사 코인플러그 Method and server for providing notary service with respect to file and verifying the recorded file by using the notary service
KR101735708B1 (en) * 2016-02-02 2017-05-15 주식회사 코인플러그 Method and server for providing notary service with respect to file and verifying the recorded file by using the notary service
AU2017223136B2 (en) * 2016-02-23 2022-06-02 nChain Holdings Limited Registry and automated management method for blockchain-enforced smart contracts
BR112018071743A2 (en) * 2016-04-29 2019-02-19 Nchain Holdings Ltd computer-implemented control method and system and control system incorporating a boolean calculation or operation
CN106941487B (en) * 2017-02-24 2021-01-05 创新先进技术有限公司 Data sending method and device
CN113095822A (en) 2018-06-27 2021-07-09 创新先进技术有限公司 Intelligent contract calling method and device based on block chain and electronic equipment
CN109003078B (en) 2018-06-27 2021-08-24 创新先进技术有限公司 Intelligent contract calling method and device based on block chain and electronic equipment
CN110297885B (en) * 2019-05-27 2021-08-17 中国科学院深圳先进技术研究院 Method, device, device and storage medium for generating real-time event summary

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI514835B (en) * 2012-09-30 2015-12-21 Apple Inc Secure escrow service
TWI750223B (en) * 2016-09-12 2021-12-21 大陸商上海唯鏈信息科技有限公司 Blockchain encrypted radio frequency chip storage design method
TWI713855B (en) * 2017-07-10 2020-12-21 大陸商騰訊科技(深圳)有限公司 Certificate management method and system
TWI727226B (en) * 2018-07-27 2021-05-11 開曼群島商創新先進技術有限公司 Multi-level storage method and device for blockchain data
TWI802145B (en) * 2021-12-13 2023-05-11 財團法人國家實驗研究院 Validity management system for digital file and method for operating the same

Also Published As

Publication number Publication date
CN1838140A (en) 2006-09-27
TW200635317A (en) 2006-10-01

Similar Documents

Publication Publication Date Title
TWI351864B (en) Apparatus and method for employing cyrptographic f
US7925891B2 (en) Apparatus and method for employing cryptographic functions to generate a message digest
US7321910B2 (en) Microprocessor apparatus and method for performing block cipher cryptographic functions
EP1586971B1 (en) Microprocessor apparatus and method for providing configurable cryptographic key size
US7532722B2 (en) Apparatus and method for performing transparent block cipher cryptographic functions
US7844053B2 (en) Microprocessor apparatus and method for performing block cipher cryptographic functions
US8060755B2 (en) Apparatus and method for providing user-generated key schedule in a microprocessor cryptographic engine
US7392400B2 (en) Microprocessor apparatus and method for optimizing block cipher cryptographic functions
US7502943B2 (en) Microprocessor apparatus and method for providing configurable cryptographic block cipher round results
US7529368B2 (en) Apparatus and method for performing transparent output feedback mode cryptographic functions
US20040208072A1 (en) Microprocessor apparatus and method for providing configurable cryptographic key size
US7900055B2 (en) Microprocessor apparatus and method for employing configurable block cipher cryptographic algorithms
US7542566B2 (en) Apparatus and method for performing transparent cipher block chaining mode cryptographic functions
US7519833B2 (en) Microprocessor apparatus and method for enabling configurable data block size in a cryptographic engine
US7529367B2 (en) Apparatus and method for performing transparent cipher feedback mode cryptographic functions
TWI274280B (en) Microprocessor apparatus and method for employing configurable block cipher cryptographic algorithms
TWI247241B (en) Microprocessor apparatus and method for performing block cipher cryptographic functions
TW200536335A (en) Apparatus and method for performing transparent cipher feedback mode cryptographic functions
CN100539495C (en) Microprocessor apparatus and method for setting cipher key size
TW200531494A (en) Microprocessor apparatus and method for optimizing block cipher cryptographic functions
CN1658548B (en) Microprocessor and method for allocating data blocks of a cryptographic engine
CN1684408B (en) Microprocessor apparatus and method for providing configurable encryption block encryption