JP3728098B2 - Semiconductor device, logic rewrite prevention method, logic rewrite method, code processing method, and storage medium - Google Patents

Semiconductor device, logic rewrite prevention method, logic rewrite method, code processing method, and storage medium Download PDF

Info

Publication number
JP3728098B2
JP3728098B2 JP12189398A JP12189398A JP3728098B2 JP 3728098 B2 JP3728098 B2 JP 3728098B2 JP 12189398 A JP12189398 A JP 12189398A JP 12189398 A JP12189398 A JP 12189398A JP 3728098 B2 JP3728098 B2 JP 3728098B2
Authority
JP
Japan
Prior art keywords
logic
information
code
integrated circuit
command signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP12189398A
Other languages
Japanese (ja)
Other versions
JPH11232176A (en
Inventor
克樹 挾間
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Steel Corp
Original Assignee
Nippon Steel Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Steel Corp filed Critical Nippon Steel Corp
Priority to JP12189398A priority Critical patent/JP3728098B2/en
Priority to US09/168,116 priority patent/US6260172B1/en
Publication of JPH11232176A publication Critical patent/JPH11232176A/en
Application granted granted Critical
Publication of JP3728098B2 publication Critical patent/JP3728098B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、論理を電気的に変更可能な論理集積回路や機密保持機能を備えた半導体装置、該論理集積回路の論理の破壊を防ぐための論理書き換え防止方法、論理書き換え方法、符号処理方法、及びそのソフトウェアを記憶した記憶媒体に関するものである。
【0002】
【従来の技術】
近年では、論理集積回路の開発期間の短縮や、消費者への出荷後の更新等を目的として、論理を変更可能(書換可能)な論理集積回路の需要が高まってきている。この書換可能な論理集積回路は、その論理を自在に書換可能なものであり、これにより、全く異なる論理機能を有する回路をも実現できるものである。このような論理集積回路は、携帯電話等の通信機器、コンピュータのアドオンボード、ビデオゲーム装置やカラオケ機器等に幅広く用いられている。
【0003】
一方、近年では特に、コンピュータの書換可能な記憶装置、例えば、ハードディスク装置やフロッピーディスク装置、或いはBIOS記憶用フラッシュメモリ等を不正に書き換えるプログラムが拡がっており、問題となっている。
このようなプログラムは、ウィルスプログラムとも呼ばれており、通信媒体や、フロッピーディスク等の入替可能な記憶媒体等を介して、他のコンピュータに次々と感染して拡散するようになされている。そして、ウィルスプログラムによっては、コンピュータの記憶内容を破壊することで、動作を不能にしたりするものもあり、コンピュータの使用者に多大な損害を与えている。
そこで、コンピュータの書換可能な記憶装置に対しては、ワクチンプログラム等、ウィルスプログラムの感染を予防したり治癒させる手段が開発され、広く用いられるようになっている。
例えば、特開平8−179942号公報には、ウィルスプログラムの存在を検出するようになされたコンピュータシステムが開示されている。また、特開平8−22390号公報には、ウィルスプログラムによりコンピュータ内のデータソフトウェアが書き換えられたかを検出するシステムが開示されている。
【0004】
また、従来より、機密保持機能を有する半導体装置が提案されている。
例えば、特開平4−232588号公報に開示されている装置は、特に、ICカードを使用する際のセキュリティ保持に関するもので、基本ソフトウエア等が格納されるROM、暗号化ソフト及び暗号化キーを記憶するEEPROM、製造者の識別番号等が記憶されるRAM、暗号化動作を制御するCPUを備えている。
また、特開平4−11420号公報には、暗号化対象のIDデータを記憶する不揮発性メモリと、IDデータを暗号化する暗号化回路、制御回路等を備えたワンチップマイクロコンピュータが開示されている。また、特開昭63−293637号公報には、暗号化されたプログラム及びデータを格納する不揮発性メモリ(ROM)、暗号化及び復号化のためのキーを記憶する揮発性メモリ(RAM)、この暗号化キーを用いて暗号化されたデータを記憶する書換え可能なメモリ(EEPROM)を備えたマイクロコンピュータが開示されている。
このような半導体装置では、EEPROMは、電荷蓄積の有無によって情報を保持しているので、構造解析によって記憶しているプログラムを解読することは不可能である。このため、機密データを暗号化・復号化するための論理を解読することはできない。したがって、マスクROM内の暗号化された機密データを復号化することは極めて困難であり、解読されることは殆どない。
【0005】
【発明が解決しようとする課題】
ところで、前述したような書換可能な論理集積回路は、その需要の高まりと、より安全性が求められる用途に用いられるようになったことから、コンピュータの記憶装置と同様に、ウィルスプログラムに対する対抗(免疫)機能、すなわちウィルスプログラムによる論理の破壊に対する論理防衛機能を有する必要が生じるようになった。
しかしながら、書換可能な論理集積回路でのウィルスプログラムに対する対抗方法(論理防衛方法)が存在しなかった。
すなわち、特開平8−179942号公報や特開平8−22390号公報等に開示されているような従来のウィルスプログラムに対する対抗方法は、CPUで用いられるコンピュータシステム全体の動作制御を行うためのデータを対象としており、書換可能な論理集積回路の論理がウィルスプログラムにより書き換えられることを防ぐことはできなかった。
したがって、従来の書換可能な論理集積回路は、ウィルスプログラムにより論理が不正に書き換えられてしまう、というウィルスによる論理の破壊の問題を避けることができなかった。
【0006】
一方、前述したような機密保持機能を有する半導体装置において、この装置が具備するEEPROMは、1ビットの情報を記憶するのに必要な面積が大きいので、高集積化が困難であるという問題があった。また、この装置では、機密データを暗号化・復号化するためにCPUにプログラムを処理させなくてはならないため、データの出力に時間がかかる上に、データを出力している間はCPUが他の処理を行うことができない問題があった。さらには、この装置でも、ウィルスプログラムに感染する可能性が充分あり、ウィルスプログラムの感染により、装置の記憶内容が破壊され、動作不能となる問題があった。
したがって、従来の機密保持機能を有する不揮発性半導体装置では、高集積化が難しく、安価に提供することができない問題があった。また、記憶データを高速に出力できない上に、データを出力している間は演算装置が他の処理を行うことができないという問題もあった。さらには、ウィルスによる記憶内容の破壊の問題もあり、正確な動作を常に保証することができなかった。
【0007】
そこで、本発明は、上記の欠点を除去するために成されたもので、書換可能な論理集積回路の論理の破壊を確実に防ぐことを可能とすることを第1の目的とする。
また、論理の破壊を確実に防ぐ機能を書換可能な論理集積回路に具備させるための論理防衛の方法を提供することを第2の目的とする。
また、論理の破壊を確実に防ぐ機能を書換可能な論理集積回路に具備させるためのソフトウェアを記憶した記憶媒体を提供することを第3の目的とする。
また、記憶内容の機密保持機能を備えた半導体装置の高速動作を可能にするとともに、安価に製造できるようにし、さらには正確なその動作を常に保証することを可能とすることを第4の目的とする。
また、記憶内容の機密保持機能、及び正確な動作を常に保証するための機能を半導体装置に具備させるための暗号化及び復号化の方法を提供することを第5の目的とする。
また、記憶内容の機密保持機能、及び正確な動作を常に保証するための機能を半導体装置に具備させるためのソフトウエアを記憶した記憶媒体を提供することを第6の目的とする。
また、端末機との間で非接触でデータの送受信を行うことができる機密保持機能、及び正確な動作を常に保証するための機能を備えた半導体装置を提供することを第7の目的とする。
【0008】
【課題を解決するための手段】
第1の発明は、外部からの命令信号により論理が書き換え可能な論理集積回路と、前記論理集積回路の現在の第1の論理状態に係わる第1の情報と、前記命令信号に含まれる前記論理集積回路の第2の論理状態に係わる第2の情報とを比較し、前記第1、第2の情報が一致しないときは前記論理集積回路の論理の前記第1の論理状態から第2の論理状態への書き換えを禁止する手段とを備え、前記第1の情報及び前記第2の情報は、前記論理集積回路に含まれる複数論理素子に関する情報であり、前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理集積回路が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報として記憶する記憶手段をさらに備えたことを特徴とする半導体装置である。
第1の発明の一態様では、前記論理集積回路は、3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備え、前記半導体装置はさらに、前記第1、第2の情報が一致したときに、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号が与えられ、前記第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報のうち、桁が同じビット情報同士が一組として前記複数の多値メモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手段と、前記並べ替えられたビット情報が与えられて、これらの情報に対応した複数の電圧を発生する手段と、アドレス情報を受けて、前記電圧を前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して前記論理を書き換える手段とを備える。
第2の発明は、外部からの命令信号により論理が書き換え可能な論理集積回路と、前記命令信号に応じて、前記論理集積回路の現在の第1の論理状態に係わる第1の情報を検出し、前記現在より前の前記論理集積回路の第2の論理状態に係わる第2の情報と比較し、前記第1、第2の情報が一致しないときは前記論理集積回路の論理が前記第2の論理状態から前記第1の論理状態へ書き換えられたと判定する判定手段とを備え、前記第1の情報及び前記第2の情報は、前記論理集積回路に含まれる複数論理素子に関する情報であり、前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理集積回路が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報として記憶する記憶手段をさらに備えたことを特徴とする半導体装置である。
第2の発明の一態様では、前記判定手段は、前記論理集積回路の論理が書き換えられたと判定した場合に判定信号を出力する。
第2の発明の一態様では、前記判定手段は、定期的に前記判定動作を行う。
第3の発明は、外部からの命令信号により論理が書き換え可能な論理集積回路と、前記命令信号と少なくとも1つの基準信号とを比較し、前記命令信号と前記基準信号が同じ信号である場合に前記論理集積回路の論理の書き換えを禁止する禁止手段とを備え、前記論理集積回路は3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備え、前記命令信号が前記基準信号とは異なる場合に、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号が与えられ、前記第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット情報同士が一組として前記複数の多値メモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手段と、前記並べ替えられたビット情報が与えられて、これらの情報に対応した複数の電圧を発生する手段と、アドレス情報を受けて、前記電圧を前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して前記論理を書き換える手段とを備えたことを特徴とする半導体装置である。
第3の発明の一態様では、前記基準信号として複数種類の信号を予め記憶する記憶手段をさらに備え、前記禁止手段は、前記命令信号と前記複数種類の信号とを比較する。
第3の発明の一態様では、前記論理集積回路は、各々が所定の演算機能を有する複数の演算手段と、前記命令信号に従って前記複数の演算手段の相互配線を変更して前記論理を書き換える配線手段とを備える。
第3の発明の一態様では、前記論理集積回路は、FPGA(Field Programmable Gate Array )を含む。
第3の発明の一態様では、前記多値メモリセルは、制御ゲートと浮遊ゲートとを有する。
第3の発明の一態様では、前記多値メモリセルは、MNOS、マスクROM、EEPROM、EPROM、PROM、FRAM、及びフラッシュ不揮発性メモリの少なくともいずれか一つである。
第3の発明の一態様では、前記命令信号に応じて前記論理集積回路の論理を書き換える書き換え手段をさらに備える。
第3の発明の一態様では、前記論理集積回路の論理を読み出す読み出し手段をさらに備える。
第3の発明の一態様では、前記ビット情報並替え手段は、前記一つの符号の誤り訂正能力に応じて、前記複数の多値メモリセルの一つに記憶する同一符号におけるビットの数を制御する。
第3の発明の一態様では、前記ビット情報並替え手段は、前記複数の多値メモリセルの一つが記憶するビット数がmであるときに、m個のビット情報を前記1個の多値メモリセルに記憶させるように、符号長nの符号m個をm×n配列の各行として並べ替える。
第4の発明は、外部からの命令信号により論理が書き換え可能な論理集積回路の現在の第1の論理状態に係わる第1の情報と、前記命令信号に含まれる前記論理集積回路の第2の論理状態に係わる第2の情報とを比較し、前記第1、第2の情報が一致しないときは前記論理集積回路の論理の前記第1の論理状態から前記第2の論理状態への書き換えを禁止するステップを含み、前記第1の情報及び前記第2の情報は、前記論理集積回路に含まれる複数論理素子に関する情報であり、前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理集積回路が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報とすることを特徴とする論理書き換え防止方法である。
第5の発明は、機密保持機能を有する半導体装置であって、少なくとも一時的に符号処理プログラムを保持し、前記符号処理プログラムに対応した命令信号を出力する制御手段と、前記命令信号が与えられて前記プログラムに従って論理を変更して、少なくともデータ及び前記データに関わるアドレスの何れか一方に符号処理を施す論理が可変な論理手段と、前記データを記憶する第1の記憶手段と、前記論理手段の現在の第1の論理状態に係わる第1の情報と、前記命令信号に含まれる前記論理手段の第2の論理状態に係わる第2の情報とを比較し、前記第1、第2の情報が一致しないときは前記論理手段の論理の前記第1の論理状態から前記第2の論理状態への書き換えを禁止する手段とを備え、前記第1の情報及び前記第2の情報は、前記論理手段に含まれる複数論理素子に関する情報であり、前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理手段が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報として記憶する記憶手段をさらに備えたことを特徴とする半導体装置である。
第6の発明は、機密保持機能を有する半導体装置であって、少なくとも一時的に符号処理プログラムを保持し、前記符号処理プログラムに対応した命令信号を出力する制御手段と、前記命令信号が与えられて前記プログラムに従って論理を変更して、少なくともデータ及び前記データに関わるアドレスの何れか一方に符号処理を施す論理が可変な論理手段と、前記データを記憶する第1の記憶手段と、前記命令信号と少なくとも一つの基準信号とを比較し、前記命令信号と前記基準信号が同じ信号である場合に前記論理手段の論理の書き換えを禁止する禁止手段とを備え、前記論理手段は3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備え、前記命令信号が前記基準信号とは異なる場合に、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号が与えられ、前記第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット情報同士が一組として前記複数の多値メモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手段と、前記並べ替えられたビット情報が与えられて、これらの情報に対応した複数の電圧を発生する手段と、アドレス情報を受けて、前記電圧を前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して前記論理を書き換える手段とを備えたことを特徴とする半導体装置である。
第6の発明の一態様では、前記基準信号として複数種類の信号を予め記憶する第2の記憶手段をさらに備え、前記禁止手段は、前記命令信号と前記複数種類の信号とを比較する。
第6の発明の一態様では、前記論理手段は、各々が所定の演算機能を有する複数の演算手段と、前記命令信号に従って前記複数の演算手段の相互配線を変更して前記論理を書き換える配線手段とを備える。
第6の発明の一態様では、前記論理手段は、FPGA(Field Programmable Gate Array )を含む。
第6の発明の一態様では、前記多値メモリセルは、制御ゲートと浮遊ゲートとを有する。
第6の発明の一態様では、前記命令信号に応じて前記論理手段の論理を書き換える書き換え手段をさらに備える。
第6の発明の一態様では、前記論理手段の論理を読み出す読み出し手段をさらに備える。
第6の発明の一態様では、前記論理手段は、少なくとも暗号化及び復号化処理の何れか一方を含む前記符号処理を行う。
第6の発明の一態様では、前記論理手段は、前記データが前記第1の記憶手段に記憶される前に少なくとも前記データ及び前記アドレスの何れか一方を暗号化する前記符号処理を行う。
第6の発明の一態様では、前記論理手段は、前記データが前記第1の記憶手段から出力される際に少なくとも前記データ及び前記データに関わるアドレスの何れか一方を暗号化する前記符号処理を行う。
第6の発明の一態様では、前記論理手段は、前記データが前記第1の記憶手段から出力される際に少なくとも前記データ及び前記データに関わるアドレスの何れか一方を復号化する前記符号処理を行う。
第6の発明の一態様では、前記第1の記憶手段は、少なくともマスクROM及び電気的に書き換え可能な不揮発性記憶装置の何れか一方を含む。
第6の発明の一態様では、前記半導体装置は、端末機との間で非接触で前記データの送受信を行うアンテナ手段と、前記アンテナ手段の受信出力から電源電圧を発生し、且つ前記端末機から送られた信号を復調すると共に、前記端末機に送信する前記データを重畳した高周波電流を生成して前記アンテナ手段に出力する高周波処理手段とを備える。
第7の発明は、機密保持機能を有し、論理が変更可能な論理回路と、前記論理回路を制御する制御装置とを備えた半導体装置の符号処理方法であって、前記制御装置に符号処理プログラムを供給する供給ステップと、前記制御装置から前記プログラムに対応した命令信号を出力させる出力ステップと、前記命令信号を前記論理回路に与えて前記プログラムに従って前記論理回路の論理を変更する論理変更ステップと、前記変更した論理によって少なくともデータ及び前記データに関わるアドレスの何れか一方に符号処理を施す符号処理ステップと、前記データを記憶装置に記憶するステップとを含み、前記論理変更ステップは、前記論理回路の現在の第1の論理状態に係わる第1の情報と、前記命令信号に含まれる前記論理回路の第2の論理状態に係わる第2の情報とを比較し、前記第1、第2の情報が一致しないときは前記論理回路の論理の前記第1の論理状態から前記第2の論理状態への書き換えを禁止するステップを含み、前記第1の情報及び前記第2の情報は、前記論理集積回路に含まれる複数論理素子に関する情報であり、前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理集積回路が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報とすることを特徴とする符号処理方法である。
第8の発明は、論理が変更可能であって、暗号化プログラム及び復号化プログラムの何れか一方が与えられ、前記プログラムに対応した命令信号により前記論理が変更され、前記変更された論理により信号を処理する論理手段を備えた機密保持機能を有する半導体装置であって、前記論理手段は、前記命令信号により論理が書き換え可能な論理集積回路と、前記命令信号と少なくとも一つの基準信号とを比較し、前記命令信号と前記基準信号が同じ信号である場合に前記論理集積回路の論理の書き換えを禁止する禁止手段とを備え、前記論理集積回路は3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備え、前記命令信号が前記基準信号とは異なる場合に、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号が与えられ、前記第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット情報同士が一組として前記複数の多値メモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手段と、前記並べ替えられたビット情報が与えられて、これらの情報に対応した複数の電圧を発生する手段と、アドレス情報を受けて、前記電圧を前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して前記論理を書き換える手段とを備えたことを特徴とする半導体装置である。
第9の発明は、外部からの命令信号により論理が書き換え可能で、3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備えた論理集積回路の論理集積回路における前記命令信号と少なくとも一つの基準信号とを比較し、前記命令信号が前記基準信号と同じ信号である場合に、前記論理集積回路の論理の書き換えを禁止し、前記命令信号が前記基準信号とは異なる信号である場合に、第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット情報同士が一組として前記複数の多値メメモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替え、前記並べ替えられたビット情報に対応する複数の電圧を発生し、アドレス情報を受けて、前記電圧を、前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して、前記論理の書き換えを行うステップを含むことを特徴とする論理書き換え方法である。
第10の発明は、外部からの命令信号により論理が書き換え可能で、3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備えた論理集積回路の論理書き換えを防止するプログラムを記憶したコンピュータ読み取り可能な記憶媒体であって、前記プログラムは、コンピュータに、前記論理集積回路における前記命令信号と少なくとも一つの基準信号とを比較する手順と、前記命令信号が前記基準信号と同じ信号である場合に、前記論理集積回路の論理の書き換えを禁止する手順と、前記命令信号が前記基準信号とは異なる場合に、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号を入力する手順と、前記第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット情報同士が一組として前記複数の多値メメモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手順と、前記並べ替えられたビット情報に対応する複数の電圧を発生する手順と、アドレス情報を受けて、前記電圧を、前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して、前記論理書き換えを行う手順とを実行させるものである。
【0112】
【発明の実施の形態】
以下、本発明の実施の形態について図面を用いて説明する。
【0113】
(1)第1の実施の形態
本発明に係る半導体装置は、例えば、図1に示すような論理集積回路100により実施される。
【0114】
すなわち、論理集積回路100は、論理防衛機能を有し、EEPROM型の書換可能な論理集積回路であり、配線行列(PIA:Programable Interconnect Array)101と、PIA101に接続された複数のマクロセル1021 〜102n と、複数のマクロセル1021 〜102n に対応して接続された複数のI/O回路1041 〜104n と、PIA101の書換制御回路103とを具備している。
【0115】
まず、マクロセル1021 〜102n は各々、カウンタ機能、AND機能、ラッチ機能等、演算ロジックの標準的なライブラリからなり、PIA101により、高速且つ一定の遅延で相互に接続可能なようになされている。
【0116】
PIA101は、グローバルなバスからなり、このPIA101によるマクロセル1021 〜102n の接続は、書換制御回路103により制御される。
【0117】
具体的には、PIA101は、例えば、図2に示すように、m本の信号線0〜mからなるバスライン201と、バスライン201に接続された入力部200xin 及び出力部200xoutとを具備している。
入力部200xin 及び出力部200xoutは、複数のマクロセル1021 〜102n のうち、任意のマクロセル102x に対応するものであり、他のマクロセルについても、出力部200xout及び入力部200xin と同様の構成をした出力部及び入力部が各々対応して設けられている。
尚、この図2では、説明の簡単のために、マクロセル102x に対応した入力部200xin 及び出力部200xoutを図示した。他のマクロセルに対応した入力部及び出力部についても、マクロセル102x に対応した入力部200xin 及び出力部200xoutと同様であるため、その詳細は省略するものとする。
【0118】
入力部200xin は、信号線0〜mに対応して接続されたEEPROMメモリセル202x0〜202xmと、信号線0〜mに対応して接続されると共にEEPROMメモリセル202x0〜202xmに対応して接続されたAND回路203x0〜203xmと、AND回路203x0〜203xmに接続されたOR回路204x とを具備しており、OR回路204x は、マクロセル102x に対して出力するようになされている。
出力部200xoutは、EEPROMメモリセル205x0,205x1,・・・と、マクロセル102x 及びEEPROMメモリセル205x0,205x1,・・・に対応して接続されたAND回路203x0,203x1,・・・と、AND回路203x0,203x1,・・・に接続されたOR回路207x とを具備しており、OR回路204x は、信号線0に対して出力するようになされている。
【0119】
さらに、図3に示すように、各メモリセル202は、マルチプレクサ401、選択回路402に接続され、マルチプレクサ401には書込み回路403、センス回路404が接続されている。さらに、これらの回路401、402、403、404は、書換制御回路103に含まれる制御回路301に接続されている。尚、図2では、メモリセル202xo、202x1、・・・、202xmと上記各回路との接続関係のみを示しているが、図2のメモリセル205xo、205x1、・・・も当然上記各回路と接続されている。
【0120】
このようなPIA101では、特に、EEPROMメモリセル202x0〜202xmは、その記憶状態によって、2入力のAND回路203x0〜203xmの一方の入力をコントロールしており、これにより、マクロセル102x と他のマクロセルの接続が制御される。
具体的には、例えば、EEPROMメモリセル202x0のしきい値が”L”のとき、AND回路203x0には”L”が入力されるため、バス線のデータがマクロセル102x に出力されない。一方、”H”であれば出力される。
このようにしてEEPROMメモリセル2020 〜202m に設定されている値を書き換えることで、マクロセル102x と他のマクロセルの接続を制御できる。
【0121】
したがって、マクロセル1021 〜102n の相互の接続は、PIA101の各マクロセルに対応したEEPROMメモリセル(以下、これを総称して「複数のEEPROMメモリセル202」と言う)の記憶状態によって制御される。すなわち、複数のEEPROMメモリセル202の記憶状態を書き換えることで、マクロセル1021 〜102n の相互の接続を変更することが可能となる。この結果、全く異なる論理(論理機能)を有する論理集積回路100を得ることも可能となる。
【0122】
このような複数のEEPROMメモリセル202の記憶状態の書換え(以下、「PIA101の書換え」とも言う)は、書換制御回路103によって行われる。
【0123】
書換制御回路103には、例えば、図示していない外部回路からの命令信号が入力用の信号線105を介して与えられている。
書換制御回路103は、その命令信号が書換命令信号であった場合に、その書換命令信号に従ってPIA101を書き換える。
【0124】
ここで、例えば、書換制御回路103に与えられる外部からの書換命令信号が、論理集積回路100の論理の破壊を目的とした書換命令信号(ウィルス)である場合が考えられる。
そこで、書換制御回路103は、以下のような構成により、書換命令信号(ウィルス)から論理集積回路100の論理が破壊されることを防ぐ機能(論理防衛機能)を実現している。
【0125】
例えば、図4に示すように、書換制御回路103は、信号線105からの命令信号が供給される制御回路301と、制御回路301の制御プログラムが格納されるプログラム用メモリ302と、PIA101の記憶状態が記憶されるメモリ304と、所定のタイマ値が設定されるタイマ303とを具備している。
そして、プログラム用メモリ302には、例えば、図5、6に示すようなフローチャートに従った制御プログラムが予め設定されており、これらの制御プログラムのいずれかが制御回路301により読み出され実行されることで、書換制御回路103は、以下のように動作する。
尚、、第1の実施の形態では、図5に示すフローチャートに従った制御プログラムが制御回路301により読み出され実行されるものとして説明する。
【0126】
先ず、制御回路301は、PIA101の現在の記憶状態、例えば、複数のEEPROMメモリセル202のうち、例えば、”H”の値をマルチプレクサ401、センス回路404を介して検出し”H”の値が設定されているEEPROMメモリセルの数(ゲート数)を第1の暗号鍵(第1の情報)として、EEPROM等からなるメモリ304に記憶する(ステップS400)。
【0127】
次に、制御回路301は、信号線105を介して外部から書換命令信号が入力されたか否かを判別し(ステップS410)、該書換命令信号が入力された場合には、次のステップS420に進み、入力されていない場合には、ステップS410に戻り命令信号判別動作を繰り返す。
【0128】
ステップS420では、制御回路301は、入力された書換命令信号を受け取る。
そして、制御回路301は、ステップS420で受け取った書換命令信号に含まれる、使用者又は第三者が書き換え時に設定した第2の暗号鍵(第2の情報)であるEEPROMメモリセルの数(ゲート数)とメモリ304に記憶されている第1の暗号鍵である”H”の値が設定されているEEPROMメモリセルの数(ゲート数)とを比較する(ステップS430)。
【0129】
ステップS430の判別の結果、第1の暗号鍵と第2の暗号鍵が異なる場合、制御回路301は、ステップS420で受け取った書換命令信号を無効として書き換えを禁止し(ステップS450)、ステップS410に戻る。
【0130】
一方、ステップS430の判別の結果、第1の暗号鍵と第2の暗号鍵とが一致した場合、制御回路301は、ステップS420で受け取った書換命令信号を有効として書換命令信号に従って、選択回路402を介して書き換えるべきメモリセルを特定し、書込み回路403によりEEPROMメモリセル202を書き換え(ステップS440)、ステップS410に戻る。
【0131】
上述のように、本実施の形態では、PIA101において、現在”H”の値が設定されているEEPROMメモリセルの数を第1の暗号鍵として、使用者又は第三者が書き換え時に設定し書換命令に含まれる第2の暗号鍵であるEEPROMメモリセルの数(ゲート数)と比較して、第1の暗号鍵の示す数と書換命令による第2の暗号鍵の示す数とに相違がないか否かを検査して、その検査結果が「相違有り」の場合には、論理集積回路100の論理の書き換えを禁止するように構成した。
このように構成することで、PIA101を書き換えるためには、すなわち論理集積回路100の論理を変えるためには、現在”H”の値が設定されているEEPROMメモリセルの数を正確に知らないと書き換えが禁止される。そして、その現在の数は、書き換え可能な論理集積回路100の現在の論理を正確に知っている者にしか知りえないため、論理集積回路100の論理を変えられる可能性はない。
【0132】
(2)第2の実施の形態
本実施例の形態において上述した第1の実施の形態と異なる点は、第1の実施の形態では上述のように暗号鍵による検査結果が「相違無い」場合は論理集積回路100の論理の書き換えを許可し、「相違有り」の場合には書き換えを禁止して使用者による書き換えを可能にし、一方第三者による例えば不正な書き換えを防止するようにしたのに対し、第2の実施の形態では使用者が当分の間、書き換えを行わないような場合において、書き換えられた後に、暗号鍵による検査を行い、検査結果が「相違有り」の場合には論理集積回路100を使用することに対して警告を発するように構成した。
本実施例の形態においては、図4のプログラム用メモリ302に予め設定された図6に示すフローチャートに従った制御プログラムが制御回路301により読み出され実行されることで、書換制御回路103は、以下のように動作する。
【0133】
先ず、制御回路301は、所定のタイマ値をタイマ303に設定する(ステップS401)。
【0134】
次に、制御回路301は、PIA101の記憶状態、例えば、複数のEEPROMメモリセル202のうち、例えば、”H”の値をマルチプレクサ401、センス回路404を介して検出し、”H”の値が設定されているEEPROMメモリセルの数(ゲート数)を暗号鍵として(第2の情報)、EEPROM等からなるメモリ304に記憶する(ステップS402)。
【0135】
次に、制御回路301は、信号線105を介して外部から書換命令信号が入力されたか否かを判別し(ステップS403)、該書換命令信号が入力された場合には、次のステップS404に進み、入力されていない場合には、後述のステップS406に進む。
【0136】
ステップS404では、制御回路301は、入力された書換命令信号を受け取る。
そして、制御回路301は、ステップS404で受け取った書換命令信号に従って、選択回路402を介して書き換えるべきメモリセルを特定し、書込み回路403によりEEPROMメモリセル202を書き換え(ステップS405)、次のステップS406に進む。
【0137】
ステップS406では、制御回路301は、タイマ303がタイムアップしたか否かを判別し、タイムアップでない場合には上述したステップS403に戻り、それ以降のステップ処理を繰り返し実行する。
【0138】
ステップS406の判別の結果、タイマ303がタイムアップした場合、制御回路301は、ステップS402でメモリ304に記憶した暗号鍵であるPIA101の記憶状態と、現在のPIA101の記憶状態、すなわち”H”の値が設定されているEEPROMメモリセルの現在の数(第1の情報)とを比較する(ステップS407)。
【0139】
ステップS407の判別の結果、メモリ304のPIA101の記憶状態と、現在のPIA101の記憶状態とが異なる場合、制御回路301は、論理集積回路100の論理が「不正に」書換えられたと認識し、その認識を示す警告(判定)信号を外部出力して、本処理を終了する。この警告信号により、使用者は、この書換可能な論理集積回路100の論理が「不正に」書き換えられたことを認識できる。
【0140】
一方、ステップS407の判別の結果、メモリ304のPIA101の記憶状態と、現在のPIA101の記憶状態とが一致した場合、制御回路301は、書き換えが行われていないと認識し、再度タイマ303を所定のタイマ値に設定し(ステップS408)、上述したステップS403に戻り、それ以降のステップ処理を繰り返し実行する。
【0141】
上述のように、本実施の形態では、PIA101において、”H”の値が設定されているEEPROMメモリセルの数を暗号鍵として用い、設定されたその数と、現在のその数とに相違がないか否かを、定期的に検査して、その検査結果が「相違有り」の場合には、論理集積回路100の論理が書き換えられたと認識し、継続してこの論理集積回路100を使用することに対して警告を発するように構成した。
このように、論理集積回路100の論理を定期的に検査することにより、例えば、第三者により不正に書き換えられた論理集積回路100を使用者が不用意に使用してしまうことを防止できる。
尚、使用者が論理集積回路100の論理を書き換えたい場合は、第1の実施の形態で説明したように、図4のプログラムメモリ302に予め設定された図5に示すフローチャートに従った制御プログラムを制御回路301により読み出し実行すれば良い。
【0142】
尚、上述した第1、2の実施の形態では、”H”の値が設定されているEEPROMメモリセルの数を暗号鍵として用いるようにしたが、これに限らず、例えば、”L”の数を暗号鍵として用いてもよいし、或いは、”H”又は”L”の値が設定されているEEPROMメモリセルの数を示す信号に圧縮等を施した符号を暗号鍵として用いてもよい。或いは、論理が最後に書き換えられた日付けや論理が最後に書き換えられた時点での未使用のマクロセルの数等の情報を暗号鍵として用いてもよい。
【0143】
さらに、第2の実施の形態では、”H”又は”L”の値が設定されているEEPROMメモリセル200のアドレスを暗号鍵として、メモリ304のルックアップテーブルに記憶しておき、図6に示すフローチャートのステップS405において、”H”又は”L”の値が書き換えられたメモリセル200のアドレスを図3のセンス回路404を介して図4の制御回路301に読み込み、ステップS407にて、暗号鍵であるアドレスと書き換え後の現在のアドレスとを比較し、アドレスが異なればメモリセル200の”H”又は”L”の値が書き換えられと認識し、ステップS409で警告信号を出力するようにしてもよい。
【0144】
このように、”H”又は”L”の値が設定されているEEPROMメモリセル200のアドレスを暗号鍵として、メモリ304のルックアップテーブルに記憶しておけば、メモリセル200の値が書き換えられた場合に、ルックアップテーブルのアドレスを参照して、図3の選択回路402によりメモリセルを選択し、書込み回路403により書き換えられた前の論理状態に戻すことができる。さらに上記アドレスを示す信号に圧縮等を施した符号を暗号鍵として用いてもよい。尚、これらの暗号鍵の履歴表を第三者には分からない論理集積回路100の内部又は外部のルックアップテーブルに持ち、履歴表を参照して暗号鍵を定期的に変更することにより不正な書き換えに対する安全性が高まる。
【0145】
また、上記第1、第2実施例で説明したメモリセル200を多値メモリで構成すると、メモリセルに書き込まれる”H”又は”L”の値の組合せが複雑になり、この複雑な”H”又は”L”の値の組合せを暗号鍵として用いることにより不正な書き換えに対する安全性がさら高まる。
以下に図中のメモリセル200を多値メモリで構成した場合の”H”又は”L”の値の書き込み、読み出し方法の一例について説明する。
【0146】
(書き込み方法:例1)
ここでの多値メモリは、制御ゲートと、少なくとも3通りの異なる記憶状態を持たせることが可能な電荷蓄積層とを有し、その少なくとも3通り以上の記憶状態のうち、ある記憶状態を格納する多値メモリセルである。このような多値メモリとして、例えば、EEPROM(フラッシュEEPROM)を用いる。
【0147】
そこで、まず、EEPROMについて説明すると、該EEPROMは、図7に示すようなメモリセル900(図2のメモリセル200に対応)を複数配列した構成としている。
メモリセル900は、上記図7に示すように、p型シリコン基板901の表面領域にn型不純物拡散層からなるドレイン(一対の不純物拡散層)902及びソース903が各々形成され、これらの間がチャネル領域904となった構成としている。そして、チャネル領域904の上に、厚さ10nm程度のSiO2 膜からなるトンネル絶縁膜905が形成され、その上に、低抵抗ポリシリコンからなる浮遊ゲート(電荷蓄積層)913、層間絶縁膜906、及び低抵抗ポリシリコンからなる制御ゲート910が順次形成されている。また、ドレイン902には、ビット線911が接続され、ソース903には、ソース線912が接続されている。
【0148】
このような構成のメモリセル900を有するEEPROMに、例えば、”00”〜”11”の4値のデータを書き込む場合について説明する。
尚、”1”、”0”は、上述した第1、第2の実施の形態における”H”、”L”に対応する。
【0149】
対象メモリセルに”11”を書き込む場合、図3の選択回路402により選択されたビット線911を接地し、ソース線912を開放し、選択された制御ゲート(ワード線)910に10〜15V程度のパルス電圧を、図3のマルチプレクサ401を介して書込回路403により印加する。これにより、対象メモリセルの浮遊ゲート913に電圧が誘起され、この浮遊ゲート913とドレイン902の電圧差に応じて、ファウラーノルドハイムトンネリングにより、浮遊ゲート913に所定量の電荷が注入されることになる。そして、対象メモリセルの閾値が7V程度に上昇する。この状態を”11”とする。
このとき、対象メモリセル以外の他のメモリセルのビット線に3V程度の電圧を印加しておくことで、他のメモリセルでは、ファウラーノルドハイムトンネリングが起こらず、したがって、データの書き込みは行われない。
【0150】
また、同様にして、対象メモリセルに”10”を書き込む場合、選択されたビット線911を接地し、ソース線912を開放し、選択された制御ゲート(ワード線)910に1V程度のパルス電圧を印加する。これにより、対象メモリセルの閾値が5V程度に上昇する。この状態を”10”とする。
また、同様にして、対象メモリセルに”01”を書き込む場合、選択されたビット線911を接地し、ソース線912を開放し、選択された制御ゲート(ワード線)910に2V程度のパルス電圧を印加する。これにより、対象メモリセルの閾値が3V程度に上昇する。この状態を”01”とする。
また、同様にして、対象メモリセルに”00”を書き込む場合、選択されたビット線911を接地し、ソース線912を開放し、選択された制御ゲート(ワード線)910に3V程度のパルス電圧を印加する。これにより、対象メモリセルの閾値が1V程度に上昇する。この状態を”00”とする。
【0151】
尚、図3の書き込み回路403により、上述のような書き込み動作を行うためには、書き込み回路403を、例えば、特開平6−195987号に開示されているプログラム回路のように構成すればよい。
【0152】
(書き込み方法:例2)
以下、図8を参照しながら本発明の書き込み方法の第2の実施形態を具体的に説明する。
【0153】
本実施の形態で対象としている多値記憶EEPROMは、各メモリセルのしきい値電圧が、記憶する2ビットの情報(00、01、10、11)に対応して、4値(0、2、4、6V)に設定されている4値メモリで、バースト誤り訂正符号として、符号長n、バースト誤り訂正能力Lの符号Cをm回交錯する交錯法を用いている。
【0154】
本装置の書き換えは、まず、図4の制御回路301より記憶内容8ビットの入力を受ける毎に、図3の書き込み回路403は、これを4×2ビットの情報ビット(m11,m21,m31,m41)(m12,m22,m32,m42)に分割し、この情報ビットから3×2ビットの検査ビット(p11,p21,p31)(p12,p22,p32)を生成する。
そして、これらの情報ビット(m11,m21,m31,m41)(m12,m22,m32,m42)及び検査ビット(p11,p21,p31)(p12,p22,p32)から2個の符号語(m11,m21,m31,m41,p11,p21,p31)と、(m12,m22,m32,m42,p12,p22,p32)とを生成する。
【0155】
このようにして生成した2個の符号語を書き込み回路403に備えられるビット情報分散手段に与え、図8に示すように、2×7配列の各行に交錯させて並べる。そして、7個のメモリセルのそれぞれに、m11とm12,m21とm22、m31とm32、m41とm42、p11とp12、p21とp22、p31とp32の組み合わせで順次記憶する。
【0156】
尚、情報ビットの並べ替えが行われた入力情報は、書き込み回路403に備えられる電圧発生及び電圧制御回路に与えられ、情報ビットに応じた電圧が発生される。そして、この発生された電圧が図3のマルチプレクサ401を介してメモリセル202に加えられ、各メモリセルに所定のしきい値電圧が設定される。
すなわち、図8において、メモリセル1の上位ビットがm11,下位ビットがm12となり、同様にメモリセル2にm21とm22、メモリセル3にm31とm32、メモリセル4にm41とm42、メモリセル5にm51とm52、メモリセル6にp21,p22,メモリセル7にp31,p32が納められる。
【0157】
それぞれの符号語は、後で詳細に説明するように、1個の誤りが生じても訂正が可能であり、図8のように、例えばメモリセル3のしきい値電圧が変化して、長さ2のバースト誤りが生じても、各符号語に対しては1個の誤りになるので訂正が可能である。すなわち、7個のメモリセルのうち、1個のメモリセルのしきい値電圧が変化し、例えば“01”の記憶内容が“10”に変化するバースト誤りが発生しても、一つの符号語について見れば誤りは1ビットであるから訂正が可能である。
【0158】
(書き込み方法:例3)
ここで対象とする装置は、各メモリセルのしきい値電圧が、記憶する3ビットの情報(000、001、010、011、100、101、110、111)に対応して、8値(0、1、2、3、4、5、6、7V)に設定される8値メモリにも適用できる。
【0159】
本装置の書き換えは、先ず、記憶内容12ビットの入力を受ける毎に、これを4×3ビットの情報ビット(m11,m21,m31,m41)(m12,m22,m32,m42)(m13,m23,m33,m43)に分割し、この情報ビットから3×3ビットの検査ビット(p11,p21,p31)(p12,p22,p32)(p13,p23,p33)を得る。
【0160】
そしてこれら情報ビット、検査ビットから3個の符号語(m11,m21,m31,m41,p11,p21,p31)(m12,m22,m32,m42,p12,p22,p32)(m13,m23,m33,m43,p13,p23,p33)を、3×7配列の各行に並べ、7個のメモリセルにそれぞれ、m11とm12とm13、m21とm22とm23、m31とm32とm33、m41とm42とm43、p11とp12とp13、p21とp22とp23、p31とp32とp33を記憶する。
【0161】
すなわち、図9において、メモリセル1の上位ビットがm11,下位ビットがm12となり、同様にメモリセル2にm21とm22、メモリセル3にm31とm32、メモリセル4にm41とm42、メモリセル5にm51とm52、メモリセル6にp61,p62,メモリセル7にp71,p72が納められる。
【0162】
それぞれの符号語は、1個の誤りが生じても訂正が可能であり、したがって、図9に示すように、長さ3のバースト誤りが生じても、各符号語に対しては1個の誤りになるので訂正が可能である。すなわち、7個のメモリセルのうち、1個のメモリセルのしきい値電圧が変化して、例えば“100”の記憶内容が“011”に変化するバースト誤りが発生しても、訂正が可能である。
【0163】
(「書き込み方法:例3」の変形例1)
ここで対象とする装置は、各メモリセルの閾値電圧が、記憶する3ビット情報(000,001,010,011,100,101,110,111)に対応して、8値(0,1,2,3,4,5,6,7V)に設定される8値メモリである。この変形例1においては、符号語を構成する各ビットのうち、2個の誤りまでは誤り訂正が可能な所定の線型符号化規則に従った場合について例示する。
【0164】
本装置による書き換えにおいては、先ず、記憶内容が所定ビット、例えば、kビットの入力を受ける毎に、これを3つの(k/3)ビットの各情報ビットに分割する。そして、各情報ビットから冗長ビットを得て、14ビットの符号語(m11,m21,m31,m41,m51,m61,m71,m12,m22,m32,m42,m52,m62,m72)と、7ビットの符号語(m13,m23,m33,m43,m53,m63,m73)を作成する。
すなわち、この14ビット及び7ビットの各符号語のうち、各々所定数のビットが情報ビットであり、残りが誤り訂正用の冗長ビットである。
【0165】
次に、14ビットの符号語(m11,m21,m31,m41,m51,m61,m71,m12,m22,m32,m42,m52,m62,m72)を、7ビットずつの符号列(m11,m21,m31,m41,m51,m61,m71)(m12,m22,m32,m42,m52,m62,m72)に分割する。そして、符号列a(m11,m21,m31,m41,m51,m61,m71)及び符号列b(m12,m22,m32,m42,m52,m62,m72)と、1個の符号列c(m13,m23,m33,m43,m53,m63,m73)とを、3×7配列の各行に並べ、図10(A)に示すように、7個のメモリセルに各々、m11とm12とm13、m21とm22とm23、m31とm32とm33、m41とm42とm43、m51とm52とm53、m61とm62とm63、m71とm72とm73を記憶する。
【0166】
すなわち、図10(A)において、メモリセル1の上位ビットがm11、中位ビットがm12、下位ビットがm13となり、同様にメモリセル2にm21とm22とm23、メモリセル3にm31とm32とm33、メモリセル4にm41とm42とm43、メモリセル5にm51とm52とm53、メモリセル6にm61とm62とm63、メモリセル7にm71とm72とm73が収められる。
【0167】
符号列a,b及び符号語cは、1個の誤りが生じても訂正が可能であり、したがって、図10(A)に示すように、例えば、3番目のメモリセルの長さ3のバースト誤りが生じても、各符号列a,b及び符号語cに対しては、各々1個の誤りとなり、このとき符号列a,bから構成される符号語に対しては、2個の誤りとなるので、訂正が可能となる。
すなわち、7個のメモリセルのうち、1個のメモリセルの閾値電圧が変化して、例えば、”100”の記憶内容が”011”に変化するバースト誤りが発生しても、訂正が可能となる。
【0168】
(「書き込み方法:例3」の変形例2)
ここでの対象とする装置は、各メモリセルの閾値電圧が、記憶する3ビットの情報(000,001,010,011,100,101,110,111)に対応して、8値(0,1,2,3,4,5,6,7V)に設定される8値メモリである。この変形例2においては、符号語を構成する各ビットのうち、1個の誤りまでは誤り訂正が可能であり、2個の誤りまでは誤り検出が可能な符号化規則に従った場合について例示する。
【0169】
本装置による書き換えにおいては、先ず、記憶内容が12ビットの入力を受ける毎に、これを4×3ビットの情報ビット(m11,m21,m31,m41)(m12,m22,m32,m42)(m13,m23,m33,m43)に分割し、ハミング符号化により、この情報ビットから3×3ビットの冗長ビット(p11,p21,p31)(p12,p22,p32)(p13,p23,p33)を得る。
【0170】
続いて、3個の符号列(m11,m21,m31,m41,p11,p21,p31)(m12,m22,m32,m42,p12,p22,p32)(m13,m23,m33,m43,p13,p23,p33)の各々について、各ビット全てのEX−ORを算出し、その結果として得られた各冗長ビットq1,q2,q3を各符号列に付加して、3個の符号語(m11,m21,m31,m41,p11,p21,p31,q1)(m12,m22,m32,m42,p12,p22,p32,q2)(m13,m23,m33,m43,p13,p23,p33,q3)を作成する。
【0171】
そして、これら3個の符号語を3×8配列の各行に並べ、図10(B)に示すように、8個のメモリセルに各々、m11とm12とm13、m21とm22とm23、m31とm32とm33、m41とm42とm43、p11とp12とp13、p21とp22とp23、p31とp32とp33、q1とq2とq3を記憶する。
【0172】
すなわち、図10(B)において、メモリセル1の上位ビットがm11、中位ビットがm12、下位ビットがm13となり、同様にメモリセル2にm21とm22とm23、メモリセル3にm31とm32とm33、メモリセル4にm41とm42とm43、メモリセル5にp11とp12とp13、メモリセル6にp21とp22とp23、メモリセル7にp31とp32とp33、メモリセル8にq1とq2とq3が収められる。
【0173】
各々の符号語は、1個の誤りが生じても訂正可能であり、したがって、図10(B)に示すように、例えば、3番目のメモリセルに長さ3のバースト誤りが生じても、各符号語に対しては、1個の誤りとなるので、訂正が可能となる。
すなわち、8個のメモリセルのうち、1個のメモリセルの閾値電圧が変化して、例えば、”100”の記憶内容が”011”に変化するバースト誤りが発生しても、訂正が可能となる。さらに、極めて稀なことであるとは思われるが、例えば、もう1つのメモリセルに1〜3のバースト誤りが生じた場合、少なくとも1つの符号語に対しては、2個の誤りとなるが、このとき当該2個の誤りを検出することができ、そのうち1個については訂正可能となる。
【0174】
(書き込み方法:例4)
ここでの対象とする装置は、各メモリセルの閾値電圧が、記憶する4ビットの情報(0000,0001,0010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,1101,1110,1111)に対応して、16値(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15V)に設定される16値メモリである。
【0175】
本装置による書き換えにおいては、先ず、記憶内容16ビットの入力を受ける毎に、これを4×4ビットの情報ビット(m11,m21,m31,m41)(m12,m22,m32,m42)(m13,m23,m33,m43)(m14,m24,m34,m44)に分割し、この情報ビットから3×4ビットの冗長ビット(p11,p21,p31)(p12,p22,p32)(p13,p23,p33)(p14,p24,p34)を作成する。
【0176】
そして、4個の符号語(m11,m21,m31,m41,p11,p21,p31)(m12,m22,m32,m42,p12,p22,p32)(m13,m23,m33,m43,p13,p23,p33)(m14,m24,m34,m44,p14,p24,p34)を、4×7配列の各行に並べ、図11に示すように、7個のメモリセルに各々、m11とm12とm13とm14、m21とm22とm23とm24、m31とm32とm33とm34、m41とm42とm43とm44、p11とp12とp13とp14、p21とp22とp23とp24、p31とp32とp33とp34を記憶する。
【0177】
すなわち、図11において、メモリセル1の1位ビットがm11、2位ビットがm12、3位ビットがm13、4位ビットがm14となり、同様にメモリセル2にm21とm22とm23とm24、メモリセル3にm31とm32とm33とm34、メモリセル4にm41とm42とm43とm44、メモリセル5にp11とp12とp13とp14、メモリセル6にp21とp22とp23とp24、メモリセル7にp31とp32とp33とp34が収められる。
【0178】
各々の符号列は、1個の誤りが生じても訂正が可能であり、したがって、図11に示すように、例えば、3番目のメモリセルの長さ4のバースト誤りが生じても、各符号列に対しては、各々1個の誤りとなるので、訂正が可能となる。
すなわち、7個のメモリセルのうち、1個のメモリセルの閾値電圧が変化して、例えば、”1000”の記憶内容が”0011”に変化するバースト誤りが発生しても、訂正が可能となる。
【0179】
(「書き込み方法:例4」の変形例1)
ここでの対象とする装置は、各メモリセルの閾値電圧が、記憶する4ビットの情報(0000,0001,0010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,1101,1110,1111)に対応して、16値(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15V)に設定される16値メモリである。この変形例3においては、符号語を構成する各ビットのうち、2個の誤りまでは誤り訂正が可能な所定の線型符号化規則に従った場合について例示する。
【0180】
本装置による書き換えにおいては、先ず、記憶内容が所定ビット、例えば、pビットの入力を受ける毎に、これを4つの(p/3)ビットの各情報ビットに分割する。そして、各情報ビットから冗長ビットを得て、2つの14ビットの符号語(m11,m21,m31,m41,m51,m61,m71,m12,m22,m32,m42,m52,m62,m72)(m13,m23,m33,m43,m53,m63,m73,m14,m24,m34,m44,m54,m64,m74)を作成する。
すなわち、この14ビットの各符号語のうち、各々所定数のビットが情報ビットであり、残りが誤り訂正用の冗長ビットである。
【0181】
次に、14ビットの各符号語(m11,m21,m31,m41,m51,m61,m71,m12,m22,m32,m42,m52,m62,m72)(m13,m23,m33,m43,m53,m63,m73,m14,m24,m34,m44,m54,m64,m74)を、各々7ビットずつの符号列(m11,m21,m31,m41,m51,m61,m71)(m12,m22,m32,m42,m52,m62,m72)及び(m13,m23,m33,m43,m53,m63,m73)(m14,m24,m34,m44,m54,m64,m74)に分割する。そして、各符号列を、4×7配列の各行に並べ、図12(A)に示すように、7個のメモリセルに各々、m11とm12とm13とm14、m21とm22とm23とm24、m31とm32とm33とm34、m41とm42とm43とm44、m51とm52とm53とm54、m61とm62とm63とm64、m71とm72とm73とm74を記憶する。
【0182】
すなわち、図12(A)において、メモリセル1の1位ビットがm11、2位ビットがm12、3位ビットがm13、4位ビットがm14となり、同様にメモリセル2にm21とm22とm23とm24、メモリセル3にm31とm32とm33とm34、メモリセル4にm41とm42とm43とm44、メモリセル5にm51とm52とm53とm54、メモリセル6にm61とm62とm63とm64、メモリセル7にm71とm72とm73とm74が収められる。
【0183】
各々の符号列は、1個の誤りが生じても訂正が可能であり、したがって、図12(A)に示すように、例えば、3番目のメモリセルの長さ4のバースト誤りが生じても、各符号列に対しては、各々1個の誤りとなり、このとき2つの符号列から構成される各符号語に対しては、2個の誤りとなるので、訂正が可能となる。
すなわち、7個のメモリセルのうち、1個のメモリセルの閾値電圧が変化して、例えば、”1000”の記憶内容が”0011”に変化するバースト誤りが発生しても、訂正が可能となる。
【0184】
(「書き込み方法:例4」の変形例2)
ここでの対象とする装置は、各メモリセルの閾値電圧が、記憶する4ビットの情報(0000,0001,0010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,1101,1110,1111)に対応して、16値(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15V)に設定される16値メモリである。この変形例4においては、符号語を構成する各ビットのうち、1個の誤りまでは誤り訂正が可能であり、2個の誤りまでは誤り検出が可能な符号化規則に従った場合について例示する。
【0185】
本装置による書き換えにおいては、先ず、記憶内容が16ビットの入力を受ける毎に、これを4×4ビットの情報ビット(m11,m21,m31,m41)(m12,m22,m32,m42)(m13,m23,m33,m43)(m14,m24,m34,m44)に分割し、ハミング符号化により、この情報ビットから3×4ビットの冗長ビット(p11,p21,p31)(p12,p22,p32)(p13,p23,p33)(p14,p24,p34)を得る。
【0186】
続いて、4個の符号列(m11,m21,m31,m41,p11,p21,p31)(m12,m22,m32,m42,p12,p22,p32)(m13,m23,m33,m43,p13,p23,p33)(m14,m24,m34,m44,p14,p24,p34)の各々について、各ビット全てのEX−ORを算出し、その結果として得られた各冗長ビットq1,q2,q3,q4を各符号列に付加して、4個の符号語(m11,m21,m31,m41,p11,p21,p31,q1)(m12,m22,m32,m42,p12,p22,p32,q2)(m13,m23,m33,m43,p13,p23,p33,q3)(m14,m24,m34,m44,p14,p24,p34,q4)を作成する。
【0187】
そして、これら4個の符号語を4×8配列の各行に並べ、図12(B)に示すように、8個のメモリセルに各々、m11とm12とm13とm14、m21とm22とm23とm24、m31とm32とm33とm34、m41とm42とm43とm44、p11とp12とp13とp14、p21とp22とp23とp24、p31とp32とp33とp34、q1とq2とq3とq4を記憶する。
【0188】
すなわち、図12(B)において、メモリセル1の1位ビットがm11、2位ビットがm12、3位ビットがm13、4位ビットがm14となり、同様にメモリセル2にm21とm22とm23とm24、メモリセル3にm31とm32とm33とm34、メモリセル4にm41とm42とm43とm44、メモリセル5にp11とp12とp13とp14、メモリセル6にp21とp22とp23とp24、メモリセル7にp31とp32とp33とp34、メモリセル8にq1とq2とq3とq4が収められる。
【0189】
各々の符号語は、1個の誤りが生じても訂正可能であり、したがって、図12(B)に示すように、例えば、3番目のメモリセルに長さ4のバースト誤りが生じても、各符号語に対しては、1個の誤りとなるので、訂正が可能となる。
すなわち、8個のメモリセルのうち、1個のメモリセルの閾値電圧が変化して、例えば、”1000”の記憶内容が”0111”に変化するバースト誤りが発生しても、訂正が可能となる。さらに、極めて稀なことであるとは思われるが、例えば、もう1つのメモリセルに1〜4のバースト誤りが生じた場合、少なくとも1つの符号語に対しては、2個の誤りとなるが、このとき当該2個の誤りを検出することができ、そのうち1個については訂正可能となる。
【0190】
尚、上述の変形例3及び4に示した符号化方法以外にも、有用であると考えられる方法がある。
例えば、先ず、64個の元データに”0”のデータを56ビット付加して、合計120ビット長の情報ビットを得る。続いて、120ビットの情報ビットから、127ビット長のハミング符号を作成する。続いて、127ビット全てのEX−ORを算出し、その結果を追加128ビット長の符号を得る。その後、先に追加した56ビットの”0”を除去し、72ビット長の符号語を得る。
このような符号化方法は、符号語を構成する各ビットのうち、1個の誤りまでは誤り訂正が可能であり、2個の誤りまでは誤り検出が可能としており、主記憶装置用のSEC/DED符号(single-error-correcting/double-error-detecting code )として、頻繁に利用されている。
【0191】
ここで、1つの符号語について、1個の誤りが生じても訂正が可能な具体例を説明する。下記の表1は、4情報ビットに3検査ビットを付加したハミング符号を示している。

Figure 0003728098
【0192】
この符号で、1、2、4桁目は検査ビットであり、(1、3、5、7)、(2、3、6、7)及び(4、5、6、7)の各桁の組で偶数パリティになるように検査ビットが決められている。例えば、10進数「12」に対応する符号“0111100”を書き込んでおいたところ、誤りが発生して、“0101100”と読み出された場合、表1に示したように、誤りがある桁を2進数(この場合は011)で得ることができるので、誤りが発生しても容易に、かつ確実に訂正することができる。
【0193】
尚、この符号は、情報ビット数がさらに多い場合にまで拡張することができ、n個の情報ビットに対して必要な検査ビット数mは次式で表される。
2m =n+m+1 ・・・(1式)
【0194】
以上の説明では、本発明を浮遊ゲート型のメモリセルを有する不揮発性記憶装置に実施した場合を例に挙げて説明をしたが、多値記憶を行わせるメモリセルとしては、浮遊ゲート型のものに限らず、MNOS型のものでも良い。また、本発明は、EEPROM以外にも、EPROMやPROM、更には、例えば、電界効果トランジスタのチャネル領域にイオン注入する不純物の量を制御することによりしきい値を変化させて記憶状態を得るマスクROMにも適用することが可能である。また、4値と8値の場合を例に挙げたが、決してこの値に限定されるものでもない。
【0195】
さらに、本発明の書き込み方法はDRAMにも適用できる。この場合、書き込み時にプリチャージを行うことは言うまでもない。
【0196】
また、誤り訂正符号を得る方法として交錯法を例に説明をしたが、メモリセルに記憶する情報量に応じたバースト長の誤りを訂正できる誤り訂正符号であれば、交錯法以外の方法、例えば、巡回符号または短縮化巡回符号でもよい。
【0197】
一方、上述のようにして、メモリセルへ書き込まれたデータを暗号鍵として図5のステップS400、図6のステップS402で読み出すには、図3のセンス回路404を図13に示すような回路で構成すれば良い。
以下に図13に示すセンス回路404によりメモリセルに書き込まれたデータを暗号鍵として読み出す動作を説明する。
【0198】
多値メモリとして構成されたメモリセル202に設定された下位ビットに相当する閾値電圧Vth1が、インバータ40、トランジスタ41、42からなる出力バッファを介して、センスアンプ43の反転入力端子に与えられる。センスアンプ43の非反転入力端子には、トランジスタ47に設定された判定電圧V47が、インバータ46、トランジスタ44、45からなる出力バッファを介して与えられる。
【0199】
閾値電圧Vth1が判定電圧V47より小さい場合、センスアンプ43の出力は、Hightになるので、メモリセル202に記憶された下位ビットD0は”1”と判定される。センスアンプ43の出力がHightなので、トランジスタ52がオンする一方、インバータ53によりトランジスタ54がオフする。したがって、トランジスタ52に設定された判定電圧V52が、インバータ51、トランジスタ49、50からなる出力バッファを介して、センスアンプ48の非反転入力端子に与えられる。そして、メモリセル202に設定された上位ビットに相当する閾値電圧Vth2が、出力バッファ1を介して、センスアンプ48の反転入力端子に与えられる。
【0200】
閾値電圧Vth2が判定電圧V52より小さい場合、センスアンプ48の出力はHightになるので、メモリセル202に記憶された上位ビットD1は”1”と判定される。一方、閾値電圧Vth2が判定電圧V52より大きい場合、センスアンプ48の出力はLowになるので、メモリセル202に記憶された上位ビットD1は”0”として読み出される。
【0201】
また、閾値電圧Vth1が判定電圧V47より大きい場合、センスアンプ43の出力は、Lowになるので、メモリセル202に記憶された下位ビットD0は”0”と判定される。センスアンプ43の出力がLowなので、トランジスタ52がオフする一方、インバータ53によりトランジスタ54がオンする。したがって、トランジスタ52に設定された判定電圧V54が、出力バッファを介して、センスアンプ48の非反転入力端子に与えられる。そして、メモリセル202に設定された上位ビットに相当する閾値電圧Vth2が、出力バッファを介して、センスアンプ48の反転入力端子に与えられる。
【0202】
閾値電圧Vth2が判定電圧V54より小さい場合、センスアンプ48の出力はHightになるので、メモリセル202に記憶された上位ビットD1は”1”として読み出される。一方、閾値電圧Vth2が判定電圧V54より大きい場合、センスアンプ48の出力はLowになるので、メモリセル202に記憶された上位ビットD1は”0”として読み出される。
【0203】
このようにして、図5のステップS400、図6のステップS402で読み出された値が暗号鍵として図4に示すメモリ304に記憶される。
【0204】
尚、上記第1、第2の実施の形態では、メモリセル200としてEEPROMメモリセルを用いた場合について説明したが、例えば、特開平8ー124378に開示されているFRAM(強誘電体)多値メモリセルを用いても良い。
具体的には、ゲート絶縁膜に強誘電体膜を用いた電解効果型トランジスタ(FEMFET)で図2の各メモリセル200を構成し、強誘電体膜の分極状態が変わることにより各メモリセルのしきい値電圧の変化を利用して、各1メモリセルに3値”H”、”L”、”ーH”を記憶させる。FRAM(強誘電体)メモリセルをメモリセル200として用いることにより、EEPROMメモリセルよりさらに複雑な暗号鍵を構成することができ、第3者による不正な書き換えに対する安全性が一層高まる。
さらにメモリセル200として、MNOS、マスクROM、EPROM、PROM、フラッシュ不揮発性メモリによる多値メモリセルを用いてもよい。
【0205】
(3)第3の実施の形態
本実施の形態において、上述した第1、2の実施の形態と異なる点は、書換制御回路103の構成を、例えば、図14に示すような構成としたことである。
尚、ここでは、第1の実施の形態と異なる点についてのみ具体的に説明する。
【0206】
すなわち、本実施の形態においては、書換制御回路103は、信号線105からの命令信号が供給される制御回路311と、制御回路311の制御プログラムが格納されるプログラム用メモリ312と、論理集積回路100の論理の破壊を目的とした命令信号のパターンデータ(基準信号)を複数種類記憶されるパターンメモリ313とを具備している。
そして、プログラム用メモリ312には、例えば、図15に示すようなフローチャートに従った制御プログラムが予め設定されており、この制御プログラムが制御回路311により読み出され実行されることで、書換制御回路103は、以下のように動作する。
【0207】
先ず、制御回路311は、信号線105を介して外部から書換命令信号が入力されたか否かを判別し(ステップS411)、該書換命令信号が入力された場合には、次のステップS412に進み、入力されていない場合には、書換命令信号入力待ち状態となる。
【0208】
ステップS412では、制御回路311は、入力された書換命令信号を受け取る。
【0209】
そして、制御回路311は、パターンメモリ313に記憶されている複数種類のパターンデータの中に、ステップS412で受け取った書換命令信号に対応したパターンデータが存在するか否かを判別する(ステップS413)。
具体的には、パターンメモリ313には、論理集積回路100の論理の破壊を目的とした書換命令信号(ウィルス)として考えられる信号に対応した複数種類のパターンデータが予め記憶されている。このパターンメモリ313のパターンデータと、受け取った書換命令信号のパターンデータとを比較することで、該書換命令信号が書換命令信号(ウィルス)であるか否かを知ることができる。
【0210】
このようなステップS413の判別の結果、受け取った書換命令信号に対応したパターンデータが存在した場合、制御回路311は、論理集積回路100の論理の破壊を目的とした書換命令信号(ウィルス)が入力されたと認識し、該書換命令信号(ウィルス)を無効として、何も行わずに前述したステップS411に戻り、それ以降のステップ処理を繰り返し実行する。
【0211】
一方、ステップS413の判別の結果、受け取った書換命令信号に対応したパターンデータが存在しない場合、制御回路311は、その受け取った書換命令信号を有効とし、該書換命令信号に従って、複数のEEPROMメモリセル202を書き換え(ステップS415)、前述したステップS411に戻り、それ以降のステップ処理を繰り返し実行する。
【0212】
前述のように、本実施の形態では、外部より書換命令信号を受け取ると、この書換命令信号が、論理集積回路100の論理の破壊を目的とした書換命令信号(ウィルス)であるか否かを判別し、その判別の結果、書換命令信号(ウィルス)でなかった場合のみ、複数のEEPROMメモリセル202の書き換えを行うようにする。
このように構成することで、論理集積回路100の論理の破壊を目的とした書換命令信号(ウィルス)が論理集積回路100に入力されたとしても、その書換命令信号は、書換命令信号(ウィルス)であると判別され、複数のEEPROMメモリセル202の書き換えは行われないため、論理集積回路100の論理の不正な書換えは不可能となる。
したがって、本実施の形態においても、論理集積回路100の不正な書換えによる論理の破壊を確実に防ぐことができるので、書換可能な論理集積回路100は論理の破壊に対して耐久性のあるものとして提供することができる。尚、パターンメモリ313に記憶するパターンデータは新しいウイルスパターンが発見され次第、パターンメモリ313に追加記憶することにより論理の破壊に対する耐久性がさらに高まる。
【0213】
尚、前述した第1、2及び第3の実施の形態では、論理集積回路100をEEPROM型のものとしたが、これに限らず、例えば、SRAM型のものとしてもよい。
【0214】
(4)第4の実施の形態
本発明に係るの機密保持機能を備えた半導体装置は、例えば、図16に示すような半導体装置500に適用される。
【0215】
この半導体装置500は、前記図16に示すように、マスクROM501aとEEPROM501bと含む記憶装置501を具備し、情報を記憶するために必要な面積の小型化を図ることと、記憶内容を書き換え可能にすることの両方をバランス良く可能にしている。そして、マスクROM501aに暗号化された機密内容のデータを記憶している。このマスクROM501aに記憶した内容は暗号化してあるため、顕微鏡等を用いて構造解析しても、記憶内容を解読することはほとんど不可能である。
【0216】
また、半導体装置500は、SRAM型のFPGA(Field Programmable Gate Array )502と、演算装置であるCPU(中央演算装置)503とを具備している。
【0217】
ここで、FPGAとは、汎用論理集積回路として広く使われるようになってきた大規模PLD(Programmable Logic Device )のことであり、入力データを演算して出力データを得るための論理をユーザが電気的にプログラムすることができる回路、すなわち論理を電気的に書換可能な論理集積回路であり、しかもハード的に演算を行うため高速な回路である。
そこで、FPGA502は、第1、第2及び第3の実施の形態における論理集積回路100と同様の構成としており、前述したような論理防衛機能を有している。
尚、FPGA502の構成及びその機能については、第1、第2及び第3の実施の形態における論理集積回路100と同様であるため、その詳細な説明は省略する。
【0218】
さらに、記憶されたデータの外部出力先である外部装置600が、出力端子509を介して接続されている。
外部装置600には、記憶再生装置601及び記憶媒体602が設けられている。
【0219】
マスクROM501aに記憶された機密内容のデータの復号化の方法は、FPGA502が、CPU503で用いる論理上のアドレスAD−1からマスクROM501aの構造上のアドレス(暗号化されてばらばらの位置に記憶された一群のデータを復号化して読み出すためのアドレス)AD−2に変換することによって行う。すなわち、FPGA502は、後述するように、CPU503から出力された論理上のアドレスAD−1の入力を受け、それをマスクROM501aの構造上のアドレスAD−2に変換してマスクROM501aに出力する。
【0220】
以下に、半導体装置500の動作の一例を、図17のフローチャートに基づいて説明する。
【0221】
前記図17において、ステップS701で電源が投入され、半導体装置500が記憶内容の外部出力先と接続されると、ステップS702でCPU503が動作し、記憶内容の外部出力先に対してFPGA502に設定する論理演算のプログラムPを指定するように要求する。
【0222】
この要求に応答して、記憶再生装置601は、記憶媒体602から読み出したプログラムのデータを再生し、半導体装置500に送信する。
次に、そのプログラムをステップS703でデータI/O部504により受信すると、CPU503は、ステップS504で受信したデータを解釈しながらFPGA502をプログラムする論理演算のプログラムPを出力する。
【0223】
尚、FPGA502は、前述した論理防衛機能により、FPGA502をプログラムする論理演算のプログラムP(例えば、ウィルスプログラムであったの場合)によりFPGA502の論理が破壊されたか否か、或いは、該プログラムPがウィルスプログラムのようなFPGA502の論理の破壊を目的としたプログラムであるか否かを判別することで、FPGA502の論理の破壊を確実に防ぐようになされている。これにより、不正なデータが入力された場合は、半導体装置500に記憶されたデータを正しく出力できる状態にはならないようになっている。FPGA2のプログラムは、前述した命令信号に対応したものであり、予め多数配置されているトランジスタをONにしたり、OFFにしたりすることで、AND回路やOR回路を任意に組むことによって行う。
【0224】
ところで、予め固定のロジックを組んである論理回路では、顕微鏡等を用いてゲートアレイの配線を辿れば、AND回路やOR回路を識別することができ、その論理回路に設定されている論理を容易に解読することができる。
【0225】
これに対して、本実施の形態のように論理防衛機能を有するFPGA502を用いた場合は、トランジスタにチャージされる電荷の有無によって任意のロジックを後から組むので、顕微鏡等を用いて構造解析しても、設定された論理を解読することはほとんど不可能であると共に、その論理を破壊することもほとんど不可能である。
【0226】
このプログラムが終了すると、次に、CPU503は、ステップS705でデータの出力が可能になったことを示す信号をデータI/O部504を介して外部出力先に送信する。これに対応して、外部出力先からあるアドレスのデータの出力が要求され、ステップS6でそのアドレスをデータI/O部504で受信すると、CPU503は、この受信したアドレスAD−1をFPGA502に出力する。
【0227】
すると、FPGA502は、ステップS7で、ステップS704にて設定されたプログラムに基づいて、論理上のアドレスAD−1を基にマスクROM501aの構造上のアドレスAD−2を演算し、それをマスクROM501aに出力する。
そして、次のステップS708で、マスクROM501aは、FPGA502により演算された構造上のアドレスAD−2に従ってデータDをCPU3に出力する。CPU503は、入力されたデータDを、データI/O部504を介して外部出力先に出力する。
【0228】
このように、第4の実施の形態では、暗号化された記憶内容を復号化するのにFPGA502を使っているため、FPGA502のプログラムが終了した後はデータの出力を高速に行うことができる。しかも、そのデータ出力の間はCPU503はデータの出力のみを行っているので、CPU503は他の演算を行うことができる。この場合、マスクROM501aに記憶されたデータ等を用いて、CPU503が独自のデータ処理を行うことができることは言うまでもない。さらに、FPGA502は、EEPROMに比べて回路規模が小さく集積化が容易なので、半導体装置500は安価に提供することができる。
【0229】
また、FPGA502に論理防衛機能を持たせることで、FPGA502に設定された論理の破壊を確実に防ぐようになされているため、半導体装置500での正確な動作を常に保証することができ、半導体装置500はより高性能に提供することができる。
【0230】
尚、本実施の形態では、FPGA502としてSRAM型のものを用いた。この場合、電源を切るとFPGA502の記憶データが破壊されるため、電源を再び入れたときにはFPGA502のプログラムをやり直さなければならない。しかし、この問題はSRAM型のFPGAの代わりに、EEPROM型のFPGAを使用することによって回避することができる。
【0231】
以下に、前記図16に示したEEPROM501bに暗号化されたデータを記憶するための暗号化動作の一例を、図18のフローチャートに基づいて説明する。
【0232】
前記図18において、ステップS710で電源が投入され、半導体装置500が記憶すべきデータの外部入力元に備えられる、例えば、記憶再生装置601及び記憶媒体602と接続されると、ステップS711でCPU503が動作し、外部入力先に対してFPGA502に設定する論理演算のプログラムを指定するように要求する。
【0233】
この要求に応答して、記憶再生装置601が記憶媒体602からプログラムデータを再生し、半導体装置に送信する。次に、ステップS712で、そのプログラムをデータI/O部504により受信すると、CPU503は、ステップS713で受信したデータを解釈しながらFPGA502をプログラムする。
尚、上述したように、FPGA502は、前述した論理防衛機能を有するため、不正なデータが入力された場合は、半導体装置500へデータを正しく入力できる状態にはならないようになっている。
【0234】
このプログラムが終了すると、次にCPU503は、ステップS714で、データの出力が可能になったことを示す信号をデータI/O部504を介して外部出力先に送信する。これに応答して、外部入力元からあるアドレスのデータの入力が要求され、ステップS715でその論理上のアドレスAD−1をデータI/O部504で受信すると、CPU503は、この受信した論理上のアドレスAD−1をFPGA502に出力する。
【0235】
すると、FPGA502は、ステップS716で、ステップS704(前記図20)にて設定されたプログラムに基づいて、論理上のアドレスAD−1からEEPROM501bの構造上のアドレスAD−2を演算し、それをEEPROM501bに出力する。そして、次のステップS717で外部入力元からデータをデータI/O部504を介してCPU503に入力し、これを構造上のアドレスAD−2としてEEPROM501bに記憶する。
尚、ユーザが外部から暗号化キーを変える場合には、FPGA502に記憶させておいてもよい。
【0236】
このように、半導体装置500では、記憶すべきデータを暗号化するのにも論理防衛機能を有するFPGA502を使っているため、FPGA502のプログラムが終了した後はデータの入力を高速に行うことができ、正確なその動作を常に保証することができる。しかも、そのデータ入力の間はCPU503を使っていないので、CPU503は他の演算を行うことができる。
【0237】
ここで、ステップS716でFPGA502による構造上のアドレスAD−2の演算方法の一例を説明する。
【0238】
例えば、EEPROM501bのアドレスが0000hからFFFFhまであるとする。この場合、EEPROM501bの容量に応じて記憶すべきデータの順列が0000h番からFFFFh番まで存在する。そして、記憶すべきデータの順列を一定の法則に基づいて並べ直し、EEPROM501bに記憶する。
【0239】
具体的なデータの並べ直しの方法として、下記の表1に示すように、例えば、ABABhのデータにつき、ABABhを2進表示して(1010 1011
1010 1011)2 とし、さらにこの値を左シフトして(0101 0111 0101 0111)2 とする。つまり、5757h番目に並べなおす。
【0240】
【表1】
Figure 0003728098
【0241】
並べ直されて生成された新しい順列で、外部から与えられたデータがデータI/O部504、CPU503を介してEEPROM501bの各番地に記憶される。したがって、EEPROM501bに記憶されるデータの順列は元のデータの順列とは異なる暗号化されたものとなり、元のデータを解読するのは困難となる。
【0242】
前記暗号化処理されて記憶装置600に記憶されたデータを復号化(前記図8のステップS707)するには、CPU503からFPGA502に入力された論理上のアドレスAD−1から左シフトした構造上のアドレスAD−2を算出し、そのアドレスをデコードするプログラムをFPGA502に書き込んでおけば、このプログラムにより復号化されたデータを読み出すことができる。
【0243】
具体的なデータの並べ直しのさらなる方法としては、前述した表1において、例えば、ABABh番地のデータにつき、ABABh番地を2進表示して(1010 1011 1010 1011)2 とし、この値と適当に決めた乱数(1100 0110 1111 0111)2 との排他的論理和をとって得た値(0110 1101 0101 1100)2 、つまり6B5Ah番目に並べ直す。
【0244】
そして、並べ直され生成された新しい順列で、外部から与えられたデータをデータI/O部504、CPU503を介してEEPROM501bの各番地に記憶する。
【0245】
例えば、個人情報を記憶する場合において、新たな個人情報を追加したり、既存の個人情報を修正したりしたいという要求が多くある場合には、マスクROM501aの容量を小さくするとともに、EEPROM501bの記憶容量を大きくすることで、書換え可能なメモリ領域を大きくすることが可能である。なお、EEPROM501bの代わりにDRAM等の揮発性メモリを用いることも可能である。
【0246】
尚、前述した暗号化、復号化処理において、EEPROM501bを用いた場合には、FPGA502にアドレッシングのプログラムを書き込んでおけばよい。
【0247】
FPGAを利用した情報処理装置としては、例えば特開平7−168750号公報に開示されている。この装置では、プログラムデータが記憶されたメモリにFPGAが接続され、CPUの制御の下で、メモリに記憶されたプログラムデータに従ってFPGAの論理回路を制御するようにしている。
【0248】
しかし、前記公報の図1に示されたように、この装置ではメモリに記憶されたFPGAによりCPUと周辺機器との間でデータ通信を行うに過ぎないものであり、本実施の形態のように、FPGAに暗号化・復号化プログラムを保持しておく。そして、CPUから与えられたデータによりプログラムされたFPGAで暗号化されたデータをメモリに記憶し、前記記憶された暗号化データを復号することは開示されていない。
また、FPGAに論理防衛機能を持たせることで、装置での正確な動作を常に保証することも開示されていない。
【0249】
(5)第5の実施の形態
本発明に係る機密保持機能を備えた半導体装置は、例えば、図19に示すような半導体装置510に適用される。
【0250】
この半導体装置510は、前記図19に示すように、前述した第4の実施の形態における半導体装置500と同様に、マスクROM511a及びEEPROM511bよりなる記憶装置511と、FPGA512と、CPU513とを具備しており、FPGA512をデータの暗号化あるいは復号化を行うインタフェース回路として用いている。
また、FPGA512は、第4の実施の形態におけるFPGA502と同様に、論理防衛機能を有している。
【0251】
本実施の形態において、第4の実施の形態と異なる点は、外部出力先により指定されたアドレスがCPU513から記憶装置511に直接入力されるとともに、そのアドレスに従って記憶装置511より出力される構造上のデータD−2がFPGA512によって論理上のデータD−1に変換され、CPU513に入力されていることである。
【0252】
すなわち、本実施の形態においては、記憶装置511に記憶されている機密データの復号化の方法は、FPGA512が、マスクROM511aより読み出された構造上のデータ(暗号化されたままのデータ)D−2からCPU513で用いる論理上のデータD−1に変換することによって行う。
【0253】
換言すれば、FPGA512は、マスクROM511aからの構造上のデータD−2の入力を受け、それをCPU513の論理上のデータD−1に変換してCPU513に出力する。
【0254】
半導体装置510の動作は、電源が投入され、データの出力が可能な状態となるまでは、前記図12のステップS701〜S705と同様である。しかし、この第4の実施の形態では、その後の動作が第3の実施の形態と異なる。
【0255】
すなわち、図20に示すように、外部出力先からあるアドレスのデータの出力が要求され、ステップS706aでそのアドレスをデータI/O部514で受信すると、CPU513は、この受信したアドレスをFPGA512に出力する。
【0256】
すると、FPGA512は、ステップS707aにおいて、ステップS704で設定されたプログラムに基づいて論理上のデータを演算する。そして、次のステップS708で前記演算した論理上のデータを、CPU513から与えられたEEPROM511bのアドレスに記憶する。
【0257】
一方、図21に示すように、FPGA512からあるアドレスのデータの出力が要求され、ステップS715aでそのアドレスをデータI/O部514で受信すると、CPU513は、この受信したアドレスADを記憶装置511に出力する。
【0258】
すると、FPGA512は、ステップS713で設定されたプログラムに基づいて、ステップS716aで構造上のデータD−2を演算する。そして、次のステップS717で構造上のデータD−2をEEPROM511bのCPU513から与えられたアドレスに記憶する。
【0259】
このように、第5の実施の形態では、記憶すべきデータを暗号化するのにも論理防衛機能を有するFPGA512を使っているため、FPGA512のプログラムが終了した後はデータの入力を高速に行うことができ、その正確な動作を常に保証することができる。しかも、そのデータを出力する間はCPU513はデータ入力しか行っていないので、CPU513は他の演算を行うことができる。
【0260】
ここで、前記図21のステップS716aで行うFPGA512による構造上のデータの演算方法の一例を説明する。
【0261】
EEPROM511bの一つのアドレスにつき一つのワード(語長)が取り出され、一つのワード当たり16ビットのデータが含まれているとする。この16ビットのデータを一定の法則に基づいて並べ直し、EEPROM511bに記憶する。
【0262】
例えば、ABABhという16ビットのデータについて、ABABhを2進表示して(1010 1011 1010 1011)2 とし、さらにこの値を左シフトして(0101 0111 0101 0111)2 とする。つまり、データ5757hをEEPROM511bに記憶する。
【0263】
この結果、EEPROM511bに記憶されたデータは、元のデータとは異なる暗号化されたものとなり、元のデータを解読するのは困難となる。前記暗号化処理されてEEPROM511bに記憶されたデータを復号化(前記図15のステップS707a)するには、得られた16ビットのデータを左シフトするプログラムをFPGA512に書き込んでおけば、このプログラムにより復号化されたデータを読み出すことができる。
【0264】
尚、この第5の実施の形態でも第4の実施の形態と同様に、ユーザ側で記憶内容を電気的に自由に書き換えたいとのニーズに対応するために、書換え可能なEEPROM511bの記憶容量を大きくすることも可能である。この場合は、FPGA512に暗号化のためのプログラムを設定し、CPU513から供給されるデータをFPGA512で暗号化してEEPROM511bに供給するようにすれば良い。
【0265】
また、前記暗号化、復号化処理において、前記図19のEEPROM511bにデータを書き込んだ場合には、FPGA512にアドレッシングのプログラムを書き込んでおけばよい。
【0266】
また、第5の実施の形態でもFPGA512として、SRAM型のものを用いる形態を示しているが、この場合は、電源を切るとFPGA512の記憶データが破壊されるため、電源を再び入れたときにはFPGA512のプログラムをやり直さなければならない。しかし、この問題はSRAM型のFPGAの代わりにEEPROM型のFPGAを使用することによって回避することができる。
【0267】
この場合には、FPGA512にプログラムする複数のプログラムにそれぞれコードを割り当て、FPGA512にプログラムする時にはこの複数のプログラムから選択された1つのプログラムに従ってFPGA512をプログラムする。このとき、プログラムのコードも記憶しておく。
【0268】
一旦プログラムされたFPGA512にアクセスするときには、まず記憶されたプログラムコードがCPU513を通じて外部機器に出力され、外部機器はこのプログラムコードを元に、この半導体装置510に対するアクセスの仕方を変更してアクセスする。すなわち、半導体装置510と外部機器は、プログラムコードを共通の鍵として使用し、秘密情報の解読を協調して行うことができる。
【0269】
例えば、外部機器の方で1バイトずつのアドレスに対して所定ビットずつビットシフトを施してこの半導体装置510に供給する。そして、FPGA512では、それを逆方向にビットシフトして記憶装置511に対するアドレスとすることで暗号化する場合に利用できる。
【0270】
この場合、EEPROM511bに記憶する内容自体は共通でも、ビットシフト量をFPGA512の書き込み時に変更することで複数の暗号化が達成でき、頻繁にFPGA512を書き換えることにより、機密性をより高めることができる。なお、実際の暗号化では、ビットシフトと逆シフトといったような単純な変換ではなく、周辺機器側でより複雑な変換が行われる。
【0271】
また、前記図16及び図19に示した半導体装置500及び510において、記憶装置501及び511には暗号化していないデータを記憶しておき、それをFPGA502及びFPGA512で暗号化して出力するようにすることも可能である。例えば、半導体装置と外部出力先との間で行われる通信が傍受され機密内容が漏れることを防止するため、通信内容を暗号化する必要がある場合にこの方法を応用することができる。
【0272】
この場合は、例えば、第4の実施の形態において、CPU503よりデータI/O部504を介して外部出力先に出力する機密データの暗号化は、次のように行う。
例えば、CPU503は、外部出力先から受信したデータを解釈しながら、暗号化を行うためのプログラムをFPGA502にセットする。そして、FPGA502が、CPU503から供給される論理上のアドレスAD−1を構造上のアドレスAD−2に変換することによって行うようにしても良い。
【0273】
さらに、例えば、第5の実施の形態において、CPU513よりデータI/O部514を介して外部出力先に出力する機密データの暗号化は、次のように行う。
例えば、CPU513は、外部出力先から受信したデータを解釈しながら、暗号化を行うためのプログラムをFPGA20にセットする。そして、FPGA512が、その後マスクROM511aから読み出される構造上のデータ(暗号化されていない)D−2からCPU513で用いる論理上のデータ(暗号化されたデータ)D−1に変換することによって暗号化を行う。
【0274】
(6)第6の実施の形態
第6の実施の形態として、前記した第4の実施の形態と第5の実施の形態とを組み合わせることにより、アドレスとデータとの両者をFPGAで暗号化・復号化する演算を行い、その演算を常に正確に行うことを保証した装置を考えることができる。
この場合は、前記図16に示したアドレス変換用のFPGA5022と、前記図14に示したデータ変換用のFPGA512とを設け、それぞれに対して適当なプログラムをセットすることで実現することができる。
【0275】
(7)第7の実施の形態
本発明に係る機密保持機能を備えた半導体装置は、例えば、図22に示すような半導体装置800に適用される。
【0276】
この半導体装置800は、前記図22に示すように、前記図19に示した半導体装置510にRF部810及びアンテナ回路820を設けたものである。
尚、本実施の形態においては、記憶装置511としてマスクROM511aの他に、可変データを格納するEEPROM511bを設けている。また、本実施の形態でも、FPGA512に論理防衛機能を持たせた構成としている。
【0277】
アンテナ回路820は、コイル821とコンデンサ822からなる並列共振回路からなり、半導体装置の電源電力を図示しない端末機から受け取る機能と、端末機との間でデータ信号の送受信を行う機能とを兼ねたものであり、例えば、1MHz以上の高周波のキャリア信号による無線の信号伝送を行うことができるようにしている。
【0278】
このような構成により、コイル821を通じて端末機からの電波を受信すると、その受信電力がRF部810に供給される。RF部810は高周波処理を行うために設けられた回路であり、供給された受信電力から内部で使用する電源電圧を発生するとともに、受信電力中に含まれる信号成分を復調し、この復調した信号をI/O部514に出力する。I/O部514から先の動作は、前述した動作と同様である。
【0279】
一方、半導体装置800から信号を出力する場合には、前述した動作と逆の動作となる。すなわち、RF部810は、I/O部514から与えられた信号成分をキャリアに重畳して高周波電流を生成する。そして、生成した高周波電流をアンテナ回路820に供給し、端末機に向けて送信する。
尚、端末機との間で信号の送受信を行うときには、端末機から動作電力が送られているので、半導体装置800は送信電力を得ることができる。
【0280】
前述したように、本実施の形態における半導体装置800は、端末機と非接触でデータの送受信を行うことができるので、非接触型のICカードに内蔵する半導体装置として好適に使用することができる。
また、FPGA512に論理防衛機能を持たせているので、外部からの不正なデータによる記憶内容の破壊を確実に防ぎ、正確な動作を常に保証した半導体装置として好適に使用することができる。
【0281】
例えば、交通手段における定期券として使用した場合、端末機である改札口を非接触で通過することができるので、通行がスムースとなり、ラッシュアワー時における改札口の混雑を大幅に緩和することができるようになる。このように、定期券として使用した場合、定期券の有効期限等のように、内部に格納するデータを書き換える必要が生じる。
また、この場合には、定期券の記憶内容の破壊に対しても確実に防ぐことができる。例えば、第3者によりその記憶内容が書き換えられ不正に使用されるということも防ぐことができる。
【0282】
前記図17に示したように、本実施の形態の半導体装置800は、マスクROM511aの他にEEPROM511bを有しているので、EEPROM511bに可変データを格納するようにしておくことにより、何回でも繰り返し使用することができる。
尚、データを書き換える場合にも、非接触で行うことができるので、金属の接点を介してデータの送受を行う場合と比較して、内蔵しているデータの秘密を保持し易い利点もある。
【0283】
また、本実施の形態の場合には、端子830を設けているので、端末機と接触して使用するICカードとしても良好に使用することができる。
尚、前記図17においては、アンテナ回路820が装置本体から突出して示しているが、アンテナ回路820は、実際には装置本体の表面上に配置される。
【0284】
尚、前述した実施の形態を実現するために、前記図3、図16、図19、及び図22の各デバイスを動作させるように、各デバイスと接続された装置或いはシステム内のコンピュータ(CPU或いはMPU)に対し、前述した実施の形態を実現するためのソフトウェアのプログラムコードを供給し、そのコンピュータに格納されたプログラムに従って前記各デバイスを動作させることによって実施したものも本発明の範疇に入る。
【0285】
この場合、前記ソフトウェアのプログラムコード自体が前述した実施の形態を実現することになり、そのプログラムコード自体及びそのプログラムコードをコンピュータに供給するための手段、例えば、そのプログラムコードを格納した記憶媒体は本発明を構成する。
【0286】
例えば、図3において、制御回路301には記憶再生装置304及び記憶媒体305が接続される。記憶再生装置304により、記憶媒体305に格納されているプログラムコードが読み出され制御回路301を動作させる。
さらに、図16において、外部出力先(外部入力先)に設けられる記憶再生装置601及び記憶媒体602がデータI/O部504を介してCPU503に接続される。記憶再生装置601により、記憶媒体602に格納されているプログラムコードが読み出されデータI/O部504を介してCPU503を動作させる。
【0287】
前記プログラムコードを記憶する記憶媒体としては、例えば、フロッピーディスク、ハードディスク、光ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。
【0288】
【発明の効果】
以上説明したように本発明によれば、論理防衛機能を有し、論理の破壊に対する耐久性のある電気的に書換可能な論理集積回路を提供することができる。また、書換可能な論理集積回路を備える装置に対して、正確な動作を常に保証する機能を持たせることができる。
【0289】
また、記憶手段と、制御手段(中央演算装置等)と、電気的に書き換え可能な論理手段とを備え、前記論理手段は、論理防衛機能を有し、論理の破壊に対する耐久性のあるものである。そして、暗号化、復号化の際には、前記制御手段により設定される暗号化、復号化プログラムに従って論理手段を書き換えるるようにするとともに、前記論理が書き換えられた論理手段により記憶手段へ入力するデータの暗号化、及び前記暗号化されたデータの復号を行うようにしたので、構造解析によって論理が解読されないようにする構成を従来よりも小規模に実現することができると共に、そのときの正確な動作を常に保証することができる。しかも、前記論理手段に設定された論理がハードウェア的に実行されるので処理を速くすることができ、その処理の間に制御手段で他の処理を行うようにすることもできる。これにより、記憶内容の機密保持機能、及び正確な動作を常に保証する機能を備え、高速な動作が可能でかつ安価な半導体装置を提供することができる。
【0290】
さらに、端末機に対して非接触でデータの送受信を行うことができるので、内部に記憶しているデータを不測に読み取られたり、破壊されたりする危険を無くすことができる。これにより、例えば、ICカードに内蔵して使用するのに好適な半導体装置を提供することができる。
【図面の簡単な説明】
【図1】第1の実施の形態において、本発明を適用した論理集積回路の構成を示すブロック図である。
【図2】前記論理集積回路のPIAの構成を示す回路図である。
【図3】前記PIAの各メモリセルの構成を示す回路図である。
【図4】前記論理集積回路の書換制御回路の構成を示すブロック図である。
【図5】第1の実施の形態において、前記書換制御回路により実行される処理プログラムの一例を説明するためのフローチャートである。
【図6】第2の実施の形態において、前記書換制御回路により実行される処理プログラムの一例を説明するためのフローチャートである。
【図7】EEPROMメモリセルの構造を示す断面図である。
【図8】本発明を適用した書き込み方法の一例(例2)を説明するための図である。
【図9】本発明を適用した書き込み方法の一例(例3)を説明するための図である。
【図10】前記書き込み方法(例3)の変形例1、2を説明するための図である。
【図11】本発明を適用した書き込み方法の一例(例4)を説明するための図である。
【図12】本発明を適用した書き込み方法の一例(例4)の変形例1、2を説明するための図である。
【図13】センス回路の構成を示す回路図である。
【図14】第3の実施の形態における前記書換制御回路の構成を示すブロック図である。
【図15】第3の実施の形態において、前記書換制御回路により実行される処理プログラムの一例を説明するためのフローチャートである。
【図16】第4の実施の形態において、本発明を適用した半導体装置の構成を示すブロック図である。
【図17】第4の実施の形態において、前記半導体装置の復号化動作の一例を示すフローチャートである。
【図18】第4の実施の形態において、前記半導体装置の暗号化動作の一例を示すフローチャートである。
【図19】第5の実施の形態において、本発明を適用した半導体装置の構成を示すブロック図である。
【図20】第5の実施の形態において、前記半導体装置の復号化動作の一例を示すフローチャートである。
【図21】前記半導体装置の暗号化動作の一例を示すフローチャートである。
【図22】第7の実施の形態において、本発明を適用した半導体装置の構成を示すブロック図である。
【符号の説明】
100 論理集積回路
101 PIA
102X マクロセル
104X I/O回路
105 入力用信号線
106 出力用信号線[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a logic integrated circuit capable of electrically changing logic, a semiconductor device having a security function, a logic rewriting prevention method, a logic rewriting method, a code processing method for preventing logic destruction of the logic integrated circuit, And a storage medium storing the software.
[0002]
[Prior art]
In recent years, there has been an increasing demand for logic integrated circuits that can change (rewrite) logic for the purpose of shortening the development period of logic integrated circuits, updating after shipment to consumers, and the like. This rewritable logic integrated circuit can freely rewrite the logic, and can thereby realize a circuit having a completely different logic function. Such logic integrated circuits are widely used in communication devices such as mobile phones, computer add-on boards, video game devices, karaoke devices, and the like.
[0003]
On the other hand, in recent years, a program for illegally rewriting a computer rewritable storage device, for example, a hard disk device, a floppy disk device, or a BIOS storage flash memory, has become a problem.
Such a program is also referred to as a virus program, and is spread by infecting other computers one after another via a communication medium or a replaceable storage medium such as a floppy disk. Some virus programs make the operation impossible by destroying the stored contents of the computer, causing a great deal of damage to the computer user.
Therefore, a means for preventing or curing the infection of a virus program such as a vaccine program has been developed and widely used for a computer rewritable storage device.
For example, Japanese Patent Laid-Open No. 8-179742 discloses a computer system adapted to detect the presence of a virus program. Japanese Patent Laid-Open No. 8-22390 discloses a system for detecting whether data software in a computer has been rewritten by a virus program.
[0004]
Conventionally, a semiconductor device having a security function has been proposed.
For example, the device disclosed in Japanese Patent Laid-Open No. 4-232588 is particularly concerned with security maintenance when using an IC card, and includes a ROM storing basic software, encryption software, and an encryption key. An EEPROM for storing, a RAM for storing the manufacturer's identification number, and the like, and a CPU for controlling the encryption operation are provided.
Japanese Laid-Open Patent Publication No. 4-11420 discloses a one-chip microcomputer including a nonvolatile memory for storing ID data to be encrypted, an encryption circuit for encrypting ID data, a control circuit, and the like. Yes. JP-A-63-293637 discloses a nonvolatile memory (ROM) for storing encrypted programs and data, a volatile memory (RAM) for storing keys for encryption and decryption, A microcomputer having a rewritable memory (EEPROM) for storing data encrypted using an encryption key is disclosed.
In such a semiconductor device, since the EEPROM holds information depending on whether or not charge is accumulated, it is impossible to decode a program stored by structural analysis. For this reason, the logic for encrypting / decrypting confidential data cannot be decrypted. Therefore, it is extremely difficult to decrypt the encrypted confidential data in the mask ROM, and it is hardly decrypted.
[0005]
[Problems to be solved by the invention]
By the way, since the rewritable logic integrated circuit as described above has been used for an application in which the demand is increased and safety is more demanded, the countermeasure against the virus program ( It has become necessary to have an (immunity) function, that is, a logic defense function against logic destruction by a virus program.
However, there has been no countermeasure method (logic defense method) against a virus program in a rewritable logic integrated circuit.
That is, conventional countermeasures against virus programs such as those disclosed in Japanese Patent Application Laid-Open Nos. 8-17942 and 8-22390 provide data for controlling the operation of the entire computer system used by the CPU. The logic of the rewritable logic integrated circuit, which is the target, cannot be prevented from being rewritten by a virus program.
Therefore, the conventional rewritable logic integrated circuit cannot avoid the problem of logic destruction caused by a virus that the logic is illegally rewritten by a virus program.
[0006]
On the other hand, in the semiconductor device having the security function as described above, the EEPROM included in this device has a large area necessary for storing 1-bit information, and thus there is a problem that high integration is difficult. It was. In this device, since the CPU must process the program to encrypt / decrypt the confidential data, it takes time to output the data and the CPU does There was a problem that could not be processed. Furthermore, this apparatus has a possibility of being infected with a virus program, and there has been a problem that the stored contents of the apparatus are destroyed due to the infection of the virus program and become inoperable.
Therefore, the conventional nonvolatile semiconductor device having a security function has a problem that it is difficult to achieve high integration and cannot be provided at low cost. In addition, the stored data cannot be output at high speed, and the arithmetic unit cannot perform other processing while the data is being output. In addition, there is a problem of destruction of stored contents due to a virus, and accurate operation cannot always be guaranteed.
[0007]
Therefore, the present invention has been made to eliminate the above-mentioned drawbacks, and a first object of the present invention is to make it possible to reliably prevent logic destruction of a rewritable logic integrated circuit.
It is a second object of the present invention to provide a logic defense method for providing a rewritable logic integrated circuit with a function for reliably preventing logic destruction.
It is a third object of the present invention to provide a storage medium storing software for providing a rewritable logic integrated circuit with a function for reliably preventing logic destruction.
It is a fourth object of the present invention to enable high-speed operation of a semiconductor device having a function for maintaining the confidentiality of stored contents, to manufacture the semiconductor device at a low cost, and to assure accurate operation at all times. And
It is a fifth object of the present invention to provide an encryption / decryption method for providing a semiconductor device with a function for maintaining confidentiality of stored contents and a function for always guaranteeing an accurate operation.
It is a sixth object of the present invention to provide a storage medium storing software for providing a semiconductor device with a function for maintaining confidentiality of stored contents and a function for always ensuring accurate operation.
It is a seventh object of the present invention to provide a semiconductor device having a security function capable of transmitting / receiving data without contact with a terminal and a function for always guaranteeing an accurate operation. .
[0008]
[Means for Solving the Problems]
According to a first aspect of the present invention, there is provided a logic integrated circuit whose logic can be rewritten by an external command signal, first information relating to a current first logic state of the logic integrated circuit, and the logic included in the command signal. The second information related to the second logic state of the integrated circuit is compared, and when the first and second information do not match, the logic of the logic integrated circuit is changed from the first logic state to the second logic state. Means for prohibiting rewriting to a state, wherein the first information and the second information are information on a plurality of logic elements included in the logic integrated circuit, and the first information among the plurality of logic elements. A signal indicating the number of first elements used to configure the first logic state, the number of second elements not used to configure the first logic state, and the number of first or second elements. Code obtained by compression or the logic integrated circuit A semiconductor device, characterized in that at least one of said first logic state to a rewritten date further comprising storage means for storing as said first information.
In one aspect of the first invention, the logic integrated circuit includes a plurality of multi-value memory cells that hold one of three or more different storage states, and the semiconductor device further includes the first and second memory cells. When the information matches, at least a first code and a second code encoded by an arbitrary encoding method are given, and a plurality of first bit information constituting the first code and the second code Among the plurality of second bit information constituting the code, the plurality of first and second bit information are stored in one of the plurality of multilevel memory cells as a set of bit information having the same digit. Means for rearranging bit information; means for generating a plurality of voltages corresponding to the rearranged bit information; and receiving address information to convert the voltages into the plurality of multi-value memories. Corresponds to the address information in the cell And means for rewriting the logic is applied to the memory cell that.
According to a second aspect of the present invention, a logic integrated circuit whose logic is rewritable by a command signal from the outside, and first information relating to a current first logic state of the logic integrated circuit are detected according to the command signal. Comparing the second information related to the second logic state of the logic integrated circuit prior to the current time, and if the first and second information do not match, the logic of the logic integrated circuit is Determination means for determining that the logic state has been rewritten to the first logic state, wherein the first information and the second information are information relating to a plurality of logic elements included in the logic integrated circuit, The first number of elements used to configure the first logic state among a plurality of logic elements, the second number of elements not used to configure the first logic state, the first or Compress the signal indicating the number of second elements A semiconductor device further comprising storage means for storing at least one of the obtained code or the date when the logic integrated circuit is rewritten to the first logic state as the first information. It is.
In one aspect of the second invention, the determination means outputs a determination signal when it is determined that the logic of the logic integrated circuit has been rewritten.
In one aspect of the second invention, the determination means periodically performs the determination operation.
According to a third aspect of the present invention, a logic integrated circuit whose logic can be rewritten by an external command signal is compared with the command signal and at least one reference signal, and the command signal and the reference signal are the same signal. Prohibiting means for prohibiting rewriting of logic of the logic integrated circuit, wherein the logic integrated circuit includes a plurality of multi-value memory cells holding one of three or more different storage states, and the command signal is the reference When different from the signal, at least a first code and a second code encoded by an arbitrary encoding method are provided, and a plurality of first bit information constituting the first code and the second code Among the plurality of second bit information constituting the code, the plurality of first and second bit information are stored in one of the plurality of multilevel memory cells as a set of bit information having the same digit. Sort bit information Means for receiving the rearranged bit information and generating a plurality of voltages corresponding to the information; receiving the address information; and supplying the voltage to the plurality of multi-level memory cells. And a means for rewriting the logic by applying it to a memory cell corresponding to address information.
In one aspect of the third aspect of the present invention, the apparatus further comprises storage means for previously storing a plurality of types of signals as the reference signal, and the prohibiting means compares the command signal with the plurality of types of signals.
In one aspect of the third invention, the logic integrated circuit includes a plurality of arithmetic units each having a predetermined arithmetic function, and a wiring for rewriting the logic by changing the mutual wiring of the plurality of arithmetic units according to the command signal Means.
In one aspect of the third invention, the logic integrated circuit includes an FPGA (Field Programmable Gate Array).
In one aspect of the third invention, the multilevel memory cell has a control gate and a floating gate.
In one aspect of the third invention, the multi-value memory cell is at least one of MNOS, mask ROM, EEPROM, EPROM, PROM, FRAM, and flash nonvolatile memory.
In one aspect of the third invention, rewriting means for rewriting the logic of the logic integrated circuit in accordance with the command signal is further provided.
In one aspect of the third invention, there is further provided a reading means for reading the logic of the logic integrated circuit.
In one aspect of the third invention, the bit information rearranging means controls the number of bits in the same code stored in one of the plurality of multilevel memory cells according to the error correction capability of the one code. To do.
In one aspect of the third invention, the bit information rearranging means converts m pieces of bit information into the one multi-value when the number of bits stored in one of the plurality of multi-value memory cells is m. The m codes having the code length n are rearranged as each row of the m × n array so as to be stored in the memory cell.
According to a fourth aspect of the present invention, there is provided first information relating to a current first logic state of a logic integrated circuit whose logic can be rewritten by an external command signal, and a second information of the logic integrated circuit included in the command signal. The second information related to the logic state is compared, and when the first and second information do not match, the logic of the logic integrated circuit is rewritten from the first logic state to the second logic state. Including the step of prohibiting, wherein the first information and the second information are information relating to a plurality of logic elements included in the logic integrated circuit, and constitute the first logic state in the plurality of logic elements. Obtained by compressing a signal indicating the number of first elements used for the purpose, the number of second elements not used for configuring the first logic state, and the number of the first or second elements. The code or the logic integrated circuit is the first argument. A logic rewriting prevention method characterized by at least one of the date rewritten to the state and the first information.
A fifth invention is a semiconductor device having a security function, wherein at least temporarily a code processing program is held, a control means for outputting a command signal corresponding to the code processing program, and the command signal is provided. Logic means that changes logic in accordance with the program and performs code processing on at least one of the data and an address related to the data, a first storage means for storing the data, and the logic means And comparing the first information relating to the current first logic state with the second information relating to the second logic state of the logic means included in the command signal, and the first and second information Means for prohibiting rewriting of the logic of the logic means from the first logic state to the second logic state, the first information and the second information are: Information on a plurality of logic elements included in the logic means, for configuring the first logic state, the first number of elements used to configure the first logic state among the plurality of logic elements. The second element number not used for the code, the code obtained by compressing the signal indicating the first or second element number, or the date when the logic means is rewritten to the first logic state. The semiconductor device further comprises storage means for storing at least one of them as the first information.
A sixth aspect of the invention is a semiconductor device having a security function, which is provided with control means for holding a code processing program at least temporarily and outputting a command signal corresponding to the code processing program, and the command signal. Logic means that changes the logic in accordance with the program and performs code processing on at least one of the data and an address related to the data, a first storage means for storing the data, and the command signal And at least one reference signal, and when the command signal and the reference signal are the same signal, the logic means includes a prohibiting means for prohibiting rewriting of logic, and the logic means is different in three or more values. A plurality of multi-level memory cells that hold one of the storage states, and when the command signal is different from the reference signal, encoding is performed by an arbitrary encoding method At least a first code and a second code, and a plurality of first bit information constituting the first code and a plurality of second bit information constituting the second code. Means for rearranging the plurality of first and second bit information so that bit information having the same digit is stored in one of the plurality of multi-value memory cells as a set, and the rearranged bits Means for generating a plurality of voltages corresponding to the information and receiving the address information, and applying the voltage to a memory cell corresponding to the address information among the plurality of multi-level memory cells. And a means for rewriting the logic.
In one aspect of the sixth aspect of the present invention, the apparatus further comprises second storage means for previously storing a plurality of types of signals as the reference signal, and the prohibiting section compares the command signal with the plurality of types of signals.
In one aspect of the sixth invention, the logic means includes a plurality of arithmetic means each having a predetermined arithmetic function, and a wiring means for rewriting the logic by changing the mutual wiring of the plurality of arithmetic means according to the command signal. With.
In one aspect of the sixth invention, the logic means includes a field programmable gate array (FPGA).
In one aspect of the sixth invention, the multilevel memory cell has a control gate and a floating gate.
In an aspect of the sixth aspect of the present invention, rewrite means for rewriting the logic of the logic means in response to the command signal is further provided.
In an aspect of the sixth aspect of the invention, there is further provided a reading unit that reads out the logic of the logic unit.
In an aspect of the sixth invention, the logic means performs the encoding process including at least one of an encryption process and a decryption process.
In one aspect of the sixth invention, the logic means performs the encoding process for encrypting at least one of the data and the address before the data is stored in the first storage means.
In one aspect of the sixth invention, the logic means performs the encoding process for encrypting at least one of the data and an address related to the data when the data is output from the first storage means. Do.
In one aspect of the sixth invention, the logic means performs the encoding process for decoding at least one of the data and an address related to the data when the data is output from the first storage means. Do.
In one aspect of the sixth invention, the first storage means includes at least one of a mask ROM and an electrically rewritable nonvolatile storage device.
In one aspect of the sixth invention, the semiconductor device generates antenna power for transmitting and receiving the data in a contactless manner with a terminal, a power supply voltage from a reception output of the antenna means, and the terminal And a high-frequency processing means for generating a high-frequency current superimposed with the data to be transmitted to the terminal and outputting the high-frequency current to the antenna means.
A seventh invention is a code processing method of a semiconductor device comprising a logic circuit having a security function and a logic changeable, and a control device for controlling the logic circuit, wherein the control device performs code processing. A supplying step of supplying a program; an output step of outputting a command signal corresponding to the program from the control device; and a logic changing step of changing the logic of the logic circuit according to the program by supplying the command signal to the logic circuit And a code processing step of performing a code process on at least one of data and an address related to the data by the changed logic, and a step of storing the data in a storage device, wherein the logic changing step includes: First information relating to a current first logic state of the circuit and a second logic of the logic circuit included in the command signal; When the first and second information do not match, rewriting the logic of the logic circuit from the first logic state to the second logic state is prohibited. The first information and the second information are information relating to a plurality of logic elements included in the logic integrated circuit, and for configuring the first logic state in the plurality of logic elements. The number of first elements used, the number of second elements not used to configure the first logic state, the code obtained by compressing the signal indicating the number of first or second elements, Alternatively, at least one of dates when the logic integrated circuit is rewritten to the first logic state is used as the first information.
According to an eighth aspect of the invention, the logic is changeable, and either one of an encryption program and a decryption program is given, the logic is changed by an instruction signal corresponding to the program, and the signal is changed by the changed logic. A semiconductor device having a security function including logic means for processing the logic means, wherein the logic means compares a logic integrated circuit whose logic is rewritable by the command signal with the command signal and at least one reference signal. And a prohibiting means for prohibiting rewriting of the logic of the logic integrated circuit when the command signal and the reference signal are the same signal, and the logic integrated circuit holds one of three or more different storage states And at least a first code encoded by an arbitrary encoding method when the command signal is different from the reference signal A pair of bit information having the same digit among a plurality of first bit information constituting the first code and a plurality of second bit information constituting the second code is provided. Means for rearranging the plurality of first and second bit information so as to be stored in one of the plurality of multi-value memory cells, and the rearranged bit information is provided. Means for generating a plurality of corresponding voltages; and means for receiving the address information and applying the voltage to the memory cells corresponding to the address information among the plurality of multi-level memory cells to rewrite the logic. This is a semiconductor device.
According to a ninth aspect of the present invention, in the logic integrated circuit of the logic integrated circuit, the logic can be rewritten by an instruction signal from the outside, and the logic integrated circuit includes a plurality of multilevel memory cells that hold one of three or more different storage states. A signal is compared with at least one reference signal, and when the command signal is the same signal as the reference signal, rewriting of logic of the logic integrated circuit is prohibited, and the command signal is different from the reference signal In this case, among the plurality of first bit information constituting the first code and the plurality of second bit information constituting the second code, the plurality of bit information having the same digit as one set The plurality of first and second bit information are rearranged so as to be stored in one of the multivalued memory cells, a plurality of voltages corresponding to the rearranged bit information are generated, and address information is received. The above The pressure, the plurality of to applied to the memory cell corresponding to the address information of the multilevel memory cell, a logic rewriting method, which comprises a step of rewriting the logic.
According to a tenth aspect of the present invention, there is provided a program for preventing logic rewriting of a logic integrated circuit having a plurality of multi-valued memory cells that can rewrite logic by an external command signal and hold one of three or more different storage states. The Memorized computer readable A storage medium, wherein the program is On the computer, A procedure for comparing the command signal in the logic integrated circuit with at least one reference signal; and a procedure for prohibiting rewriting of logic in the logic integrated circuit when the command signal is the same signal as the reference signal; A step of inputting at least a first code and a second code encoded by an arbitrary encoding method when the command signal is different from the reference signal; and a plurality of second codes constituting the first code Among the plurality of second bit information constituting one bit information and the plurality of second bit information, the plurality of bit information having the same digit are stored in one of the plurality of multilevel memory cells as a set. The first bit information and the second bit information are rearranged, the plurality of voltages corresponding to the rearranged bit information are generated, the address information is received, and the voltages are converted into the plurality of multi-valued memos. It is applied to the memory cell corresponding to the address information of the cell, the logic of The procedure for rewriting What to do It is.
[0112]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0113]
(1) First embodiment
The semiconductor device according to the present invention is implemented by a logic integrated circuit 100 as shown in FIG.
[0114]
That is, the logic integrated circuit 100 is an EEPROM-type rewritable logic integrated circuit having a logic defense function, and includes a wiring matrix (PIA: Programmable Interconnect Array) 101 and a plurality of macro cells 1021 to 102n connected to the PIA 101. And a plurality of I / O circuits 1041 to 104n connected to the plurality of macrocells 1021 to 102n and a rewrite control circuit 103 of the PIA 101.
[0115]
First, the macro cells 1021 to 102n are each composed of a standard library of arithmetic logic such as a counter function, an AND function, a latch function, and the like, and can be connected to each other at a high speed with a certain delay by the PIA 101.
[0116]
The PIA 101 is formed of a global bus, and the rewrite control circuit 103 controls the connection of the macro cells 102 1 to 102 n by the PIA 101.
[0117]
Specifically, for example, as illustrated in FIG. 2, the PIA 101 includes a bus line 201 including m signal lines 0 to m, and an input unit 200 xin and an output unit 200 xout connected to the bus line 201. ing.
The input unit 200xin and the output unit 200xout correspond to an arbitrary macrocell 102x among the plurality of macrocells 1021 to 102n, and other macrocells also have an output unit having the same configuration as the output unit 200xout and the input unit 200xin And input units are provided correspondingly.
In FIG. 2, an input unit 200xin and an output unit 200xout corresponding to the macro cell 102x are shown for the sake of simplicity. Since the input unit and the output unit corresponding to other macro cells are the same as the input unit 200xin and the output unit 200xout corresponding to the macro cell 102x, the details thereof will be omitted.
[0118]
The input unit 200xin is connected to the EEPROM memory cells 202x0 to 202xm connected corresponding to the signal lines 0 to m, and connected to the EEPROM memory cells 202x0 to 202xm and corresponding to the signal lines 0 to m. AND circuits 203x0 to 203xm and an OR circuit 204x connected to the AND circuits 203x0 to 203xm, and the OR circuit 204x outputs to the macro cell 102x.
The output unit 200xout includes EEPROM memory cells 205x0, 205x1,..., AND circuits 203x0, 203x1,... Connected to the macrocell 102x and EEPROM memory cells 205x0, 205x1,. 203x0, 203x1,... Are connected to the OR circuit 207x, and the OR circuit 204x outputs to the signal line 0.
[0119]
Further, as shown in FIG. 3, each memory cell 202 is connected to a multiplexer 401 and a selection circuit 402, and a write circuit 403 and a sense circuit 404 are connected to the multiplexer 401. Further, these circuits 401, 402, 403, 404 are connected to a control circuit 301 included in the rewrite control circuit 103. 2 shows only the connection relationship between the memory cells 202xo, 202x1,..., 202xm and the above circuits, but the memory cells 205xo, 205x1,. It is connected.
[0120]
In such a PIA 101, in particular, the EEPROM memory cells 202x0 to 202xm control one input of the two-input AND circuits 203x0 to 203xm according to the storage state thereof, thereby connecting the macro cell 102x and the other macro cell. Is controlled.
Specifically, for example, when the threshold value of the EEPROM memory cell 202x0 is “L”, “L” is input to the AND circuit 203x0, so that the bus line data is not output to the macro cell 102x. On the other hand, if “H”, it is output.
In this way, by rewriting the values set in the EEPROM memory cells 2020 to 202m, the connection between the macro cell 102x and other macro cells can be controlled.
[0121]
Therefore, the mutual connection of the macro cells 1021 to 102n is controlled by the storage state of the EEPROM memory cells (hereinafter collectively referred to as "a plurality of EEPROM memory cells 202") corresponding to the macro cells of the PIA 101. That is, by rewriting the storage state of the plurality of EEPROM memory cells 202, the mutual connection of the macro cells 1021 to 102n can be changed. As a result, it is possible to obtain the logic integrated circuit 100 having completely different logic (logic function).
[0122]
Such rewriting of the storage states of the plurality of EEPROM memory cells 202 (hereinafter also referred to as “rewriting of PIA 101”) is performed by the rewrite control circuit 103.
[0123]
For example, a command signal from an external circuit (not shown) is given to the rewrite control circuit 103 via an input signal line 105.
When the command signal is a rewrite command signal, the rewrite control circuit 103 rewrites the PIA 101 according to the rewrite command signal.
[0124]
Here, for example, the case where the external rewrite command signal given to the rewrite control circuit 103 is a rewrite command signal (virus) for the purpose of destroying the logic of the logic integrated circuit 100 can be considered.
Therefore, the rewrite control circuit 103 realizes a function (logic defense function) that prevents the logic of the logic integrated circuit 100 from being destroyed from a rewrite command signal (virus) by the following configuration.
[0125]
For example, as illustrated in FIG. 4, the rewrite control circuit 103 includes a control circuit 301 to which a command signal from the signal line 105 is supplied, a program memory 302 in which a control program for the control circuit 301 is stored, and a memory in the PIA 101. A memory 304 for storing the status and a timer 303 for setting a predetermined timer value are provided.
In the program memory 302, for example, control programs according to flowcharts as shown in FIGS. 5 and 6 are set in advance, and any one of these control programs is read and executed by the control circuit 301. Thus, the rewrite control circuit 103 operates as follows.
In the first embodiment, the control program according to the flowchart shown in FIG. 5 is read and executed by the control circuit 301.
[0126]
First, the control circuit 301 detects the current storage state of the PIA 101, for example, the “H” value among the plurality of EEPROM memory cells 202 via the multiplexer 401 and the sense circuit 404, and the “H” value is detected. The set number of EEPROM memory cells (number of gates) is stored as a first encryption key (first information) in the memory 304 such as an EEPROM (step S400).
[0127]
Next, the control circuit 301 determines whether or not a rewrite command signal is input from the outside via the signal line 105 (step S410). If the rewrite command signal is input, the control circuit 301 proceeds to the next step S420. If it has not been input, the process returns to step S410 to repeat the command signal determination operation.
[0128]
In step S420, the control circuit 301 receives the input rewrite command signal.
Then, the control circuit 301 counts the number of EEPROM memory cells (gates) that are second encryption keys (second information) set by the user or a third party included in the rewrite command signal received in step S420. Number) and the number of EEPROM memory cells (number of gates) in which the value of “H” as the first encryption key stored in the memory 304 is set (step S430).
[0129]
If the result of the determination in step S430 is that the first encryption key and the second encryption key are different, the control circuit 301 disables the rewrite command signal received in step S420 and disables the rewrite (step S450). Return.
[0130]
On the other hand, as a result of the determination in step S430, if the first encryption key and the second encryption key match, the control circuit 301 validates the rewrite command signal received in step S420 and selects the selection circuit 402 according to the rewrite command signal. The memory cell to be rewritten is specified via the, and the EEPROM memory cell 202 is rewritten by the write circuit 403 (step S440), and the process returns to step S410.
[0131]
As described above, in the present embodiment, in the PIA 101, the number of EEPROM memory cells for which the value of “H” is currently set is set as the first encryption key by the user or a third party at the time of rewriting. There is no difference between the number indicated by the first encryption key and the number indicated by the second encryption key by the rewrite instruction as compared with the number of EEPROM memory cells (number of gates) which is the second encryption key included in the instruction. If the result of the inspection is “difference”, rewriting of the logic of the logic integrated circuit 100 is prohibited.
With this configuration, in order to rewrite the PIA 101, that is, to change the logic of the logic integrated circuit 100, it is necessary to accurately know the number of EEPROM memory cells that are currently set to a value of “H”. Rewriting is prohibited. Since the current number is known only to those who know the current logic of the rewritable logic integrated circuit 100 accurately, there is no possibility that the logic of the logic integrated circuit 100 can be changed.
[0132]
(2) Second embodiment
In the present embodiment, the difference from the first embodiment described above is that, in the first embodiment, when the check result by the encryption key is “not different” as described above, the logic of the logic integrated circuit 100 is rewritten. In the case of “there is a difference”, rewriting is prohibited to allow rewriting by the user, while, for example, unauthorized rewriting by a third party is prevented, whereas the second embodiment In the case where the user does not rewrite for the time being, the inspection using the encryption key is performed after the rewriting, and when the inspection result is “difference”, the logic integrated circuit 100 is used. And configured to issue a warning.
In the embodiment, the rewrite control circuit 103 is read by the control circuit 301 according to the flowchart shown in FIG. 6 preset in the program memory 302 of FIG. It operates as follows.
[0133]
First, the control circuit 301 sets a predetermined timer value in the timer 303 (step S401).
[0134]
Next, the control circuit 301 detects the storage state of the PIA 101, for example, the “H” value among the plurality of EEPROM memory cells 202 via the multiplexer 401 and the sense circuit 404, and the “H” value is detected. The set number of EEPROM memory cells (number of gates) is stored as an encryption key (second information) in the memory 304 such as an EEPROM (step S402).
[0135]
Next, the control circuit 301 determines whether or not a rewrite command signal is input from the outside via the signal line 105 (step S403). If the rewrite command signal is input, the control circuit 301 proceeds to the next step S404. If it has not been input, the process proceeds to step S406 to be described later.
[0136]
In step S404, the control circuit 301 receives the input rewrite command signal.
Then, the control circuit 301 specifies a memory cell to be rewritten via the selection circuit 402 in accordance with the rewrite command signal received in step S404, rewrites the EEPROM memory cell 202 by the write circuit 403 (step S405), and next step S406. Proceed to
[0137]
In step S406, the control circuit 301 determines whether or not the timer 303 has timed up. If the time has not expired, the control circuit 301 returns to step S403 described above and repeats the subsequent step processing.
[0138]
As a result of the determination in step S406, if the timer 303 times out, the control circuit 301 determines that the storage state of the PIA 101 that is the encryption key stored in the memory 304 in step S402 and the current storage state of the PIA 101, that is, “H”. The current number of EEPROM memory cells (first information) for which values are set is compared (step S407).
[0139]
As a result of the determination in step S407, when the storage state of the PIA 101 in the memory 304 is different from the current storage state of the PIA 101, the control circuit 301 recognizes that the logic of the logic integrated circuit 100 has been rewritten “illegally”. A warning (determination) signal indicating recognition is output to the outside, and this processing ends. This warning signal allows the user to recognize that the logic of the rewritable logic integrated circuit 100 has been “illegally” rewritten.
[0140]
On the other hand, as a result of the determination in step S407, if the storage state of the PIA 101 in the memory 304 matches the storage state of the current PIA 101, the control circuit 301 recognizes that rewriting has not been performed and sets the timer 303 again to the predetermined value. (Step S408), the process returns to the above-described step S403, and the subsequent step processing is repeatedly executed.
[0141]
As described above, in the present embodiment, in the PIA 101, the number of EEPROM memory cells in which the value of “H” is set is used as an encryption key, and there is a difference between the set number and the current number. If the result of the inspection is “difference”, it is recognized that the logic of the logic integrated circuit 100 has been rewritten, and the logic integrated circuit 100 is continuously used. It was configured to issue a warning for this.
As described above, by periodically checking the logic of the logic integrated circuit 100, for example, it is possible to prevent the user from inadvertently using the logic integrated circuit 100 that has been illegally rewritten by a third party.
When the user wants to rewrite the logic of the logic integrated circuit 100, as described in the first embodiment, the control program according to the flowchart shown in FIG. 5 preset in the program memory 302 in FIG. May be read and executed by the control circuit 301.
[0142]
In the first and second embodiments described above, the number of EEPROM memory cells in which the value of “H” is set is used as the encryption key. The number may be used as the encryption key, or a code obtained by compressing a signal indicating the number of EEPROM memory cells in which the value of “H” or “L” is set may be used as the encryption key. . Alternatively, information such as the date when the logic was last rewritten and the number of unused macro cells when the logic was last rewritten may be used as the encryption key.
[0143]
Furthermore, in the second embodiment, the address of the EEPROM memory cell 200 in which the value of “H” or “L” is set is stored in the lookup table of the memory 304 as an encryption key, and FIG. In step S405 of the flowchart shown in FIG. 4, the address of the memory cell 200 in which the value of “H” or “L” is rewritten is read into the control circuit 301 of FIG. 4 via the sense circuit 404 of FIG. The key address is compared with the current address after rewriting. If the addresses are different, it is recognized that the “H” or “L” value of the memory cell 200 has been rewritten, and a warning signal is output in step S409. May be.
[0144]
As described above, if the address of the EEPROM memory cell 200 in which the value of “H” or “L” is set is stored in the lookup table of the memory 304 as the encryption key, the value of the memory cell 200 is rewritten. In this case, referring to the address of the lookup table, the memory cell can be selected by the selection circuit 402 in FIG. 3 and returned to the logic state before being rewritten by the write circuit 403. Furthermore, a code obtained by compressing the signal indicating the address may be used as an encryption key. It is to be noted that these encryption key history tables are stored in an internal or external lookup table of the logic integrated circuit 100 that cannot be understood by a third party, and the encryption keys are periodically changed by referring to the history table. Increases safety against rewriting.
[0145]
Further, when the memory cell 200 described in the first and second embodiments is composed of a multi-value memory, the combination of “H” or “L” values written in the memory cell becomes complicated, and this complicated “H” By using the combination of “L” or “L” as an encryption key, the security against unauthorized rewriting is further increased.
Hereinafter, an example of a method of writing and reading “H” or “L” when the memory cell 200 in the figure is configured by a multi-level memory will be described.
[0146]
(Write method: Example 1)
The multilevel memory here has a control gate and a charge storage layer capable of having at least three different storage states, and stores a storage state among at least three storage states. This is a multi-valued memory cell. As such a multilevel memory, for example, an EEPROM (flash EEPROM) is used.
[0147]
First, the EEPROM will be described. The EEPROM has a configuration in which a plurality of memory cells 900 (corresponding to the memory cell 200 in FIG. 2) as shown in FIG. 7 are arranged.
As shown in FIG. 7, the memory cell 900 has a drain (a pair of impurity diffusion layers) 902 and a source 903 each formed of an n-type impurity diffusion layer formed on the surface region of the p-type silicon substrate 901. The channel region 904 is configured. Then, on the channel region 904, about 10 nm thick SiO. 2 A tunnel insulating film 905 made of a film is formed, and a floating gate (charge storage layer) 913 made of low-resistance polysilicon, an interlayer insulating film 906, and a control gate 910 made of low-resistance polysilicon are sequentially formed thereon. Yes. A bit line 911 is connected to the drain 902, and a source line 912 is connected to the source 903.
[0148]
For example, a case where four-value data “00” to “11” is written in the EEPROM having the memory cell 900 having such a configuration will be described.
Note that “1” and “0” correspond to “H” and “L” in the first and second embodiments described above.
[0149]
When “11” is written in the target memory cell, the bit line 911 selected by the selection circuit 402 in FIG. 3 is grounded, the source line 912 is opened, and about 10 to 15 V is applied to the selected control gate (word line) 910. Is applied by the writing circuit 403 via the multiplexer 401 in FIG. As a result, a voltage is induced in the floating gate 913 of the target memory cell, and a predetermined amount of charge is injected into the floating gate 913 by Fowler-Nordheim tunneling according to the voltage difference between the floating gate 913 and the drain 902. Become. Then, the threshold value of the target memory cell rises to about 7V. This state is assumed to be “11”.
At this time, by applying a voltage of about 3 V to the bit lines of other memory cells other than the target memory cell, Fowler-Nordheim tunneling does not occur in the other memory cells, and therefore data is written. Absent.
[0150]
Similarly, when “10” is written to the target memory cell, the selected bit line 911 is grounded, the source line 912 is opened, and a pulse voltage of about 1 V is applied to the selected control gate (word line) 910. Apply. As a result, the threshold value of the target memory cell rises to about 5V. This state is assumed to be “10”.
Similarly, when “01” is written to the target memory cell, the selected bit line 911 is grounded, the source line 912 is opened, and a pulse voltage of about 2 V is applied to the selected control gate (word line) 910. Apply. As a result, the threshold value of the target memory cell rises to about 3V. This state is set to “01”.
Similarly, when “00” is written to the target memory cell, the selected bit line 911 is grounded, the source line 912 is opened, and a pulse voltage of about 3 V is applied to the selected control gate (word line) 910. Apply. As a result, the threshold value of the target memory cell rises to about 1V. This state is set to “00”.
[0151]
In order to perform the above-described write operation by the write circuit 403 in FIG. 3, the write circuit 403 may be configured as a program circuit disclosed in, for example, Japanese Patent Laid-Open No. 6-195987.
[0152]
(Write method: Example 2)
Hereinafter, the second embodiment of the writing method of the present invention will be specifically described with reference to FIG.
[0153]
In the multi-value storage EEPROM which is the object of this embodiment, the threshold voltage of each memory cell corresponds to 4-bit information (00, 01, 10, 11) to be stored (four values (0, 2, 2)). 4 and 6V), a cross error method is used in which a code C having a code length n and a burst error correction capability L is crossed m times as a burst error correction code.
[0154]
In the rewriting of this apparatus, every time 8 bits of stored contents are input from the control circuit 301 of FIG. 4, the writing circuit 403 of FIG. 3 converts this into 4 × 2 information bits (m11, m21, m31, m41) (m12, m22, m32, m42), and 3 × 2 check bits (p11, p21, p31) (p12, p22, p32) are generated from this information bit.
From these information bits (m11, m21, m31, m41) (m12, m22, m32, m42) and check bits (p11, p21, p31) (p12, p22, p32), two code words (m11, m21, m31, m41, p11, p21, p31) and (m12, m22, m32, m42, p12, p22, p32) are generated.
[0155]
The two code words generated in this way are given to the bit information distribution means provided in the writing circuit 403, and are arranged in a row in a 2 × 7 array as shown in FIG. Then, each of the seven memory cells is sequentially stored in a combination of m11 and m12, m21 and m22, m31 and m32, m41 and m42, p11 and p12, p21 and p22, and p31 and p32.
[0156]
The input information on which the information bits are rearranged is given to a voltage generation and voltage control circuit provided in the writing circuit 403, and a voltage corresponding to the information bits is generated. The generated voltage is applied to the memory cell 202 via the multiplexer 401 in FIG. 3, and a predetermined threshold voltage is set for each memory cell.
That is, in FIG. 8, the upper bit of the memory cell 1 is m11 and the lower bit is m12. Similarly, the memory cell 2 has m21 and m22, the memory cell 3 has m31 and m32, the memory cell 4 has m41 and m42, and the memory cell 5 M51 and m52, p21 and p22 in the memory cell 6, and p31 and p32 in the memory cell 7, respectively.
[0157]
As will be described later in detail, each code word can be corrected even if one error occurs. For example, the threshold voltage of the memory cell 3 changes as shown in FIG. Even if a burst error of 2 occurs, there is one error for each codeword, so correction is possible. That is, even if a burst error occurs in which the threshold voltage of one memory cell among the seven memory cells changes and, for example, the stored content of “01” changes to “10”, one code word Since the error is 1 bit, it can be corrected.
[0158]
(Write method: Example 3)
In the target device, the threshold voltage of each memory cell corresponds to three bits of information (000, 001, 010, 011, 100, 101, 110, 111) to be stored. , 1, 2, 3, 4, 5, 6, 7V).
[0159]
In the rewriting of the apparatus, every time 12 bits of stored contents are received, 4 × 3 information bits (m11, m21, m31, m41) (m12, m22, m32, m42) (m13, m23) are received. , M33, m43), and 3 × 3 check bits (p11, p21, p31) (p12, p22, p32) (p13, p23, p33) are obtained from this information bit.
[0160]
From these information bits and check bits, three code words (m11, m21, m31, m41, p11, p21, p31) (m12, m22, m32, m42, p12, p22, p32) (m13, m23, m33, m43, p13, p23, p33) are arranged in each row of a 3 × 7 array, and m11, m12, and m13, m21, m22, and m23, m31, m32, and m33, and m41, m42, and m43 are arranged in seven memory cells, respectively. , P11 and p12 and p13, p21 and p22 and p23, and p31 and p32 and p33 are stored.
[0161]
9, the upper bit of the memory cell 1 is m11 and the lower bit is m12. Similarly, the memory cell 2 has m21 and m22, the memory cell 3 has m31 and m32, the memory cell 4 has m41 and m42, and the memory cell 5 M51 and m52, p61 and p62 in the memory cell 6, and p71 and p72 in the memory cell 7, respectively.
[0162]
Each codeword can be corrected even if one error occurs. Therefore, as shown in FIG. 9, even if a burst error of length 3 occurs, one codeword is used for each codeword. Since it becomes an error, it can be corrected. That is, even if a burst error occurs in which the memory voltage of “100” changes to “011”, for example, when the threshold voltage of one memory cell changes among the seven memory cells, correction is possible. It is.
[0163]
(Modification 1 of “Write Method: Example 3”)
In the target device, the threshold voltage of each memory cell corresponds to the stored 3-bit information (000, 001, 010, 011, 100, 101, 110, 111) in eight values (0, 1, 2, 3, 4, 5, 6, 7V). In the first modification, a case where a predetermined linear coding rule capable of error correction up to two errors in each bit constituting a code word is illustrated.
[0164]
In rewriting by this apparatus, first, every time a stored content is inputted with a predetermined bit, for example, k bits, it is divided into three (k / 3) information bits. Then, a redundant bit is obtained from each information bit, a 14-bit code word (m11, m21, m31, m41, m51, m61, m71, m12, m22, m32, m42, m52, m62, m72) and 7 bits Are generated (m13, m23, m33, m43, m53, m63, m73).
That is, of the 14-bit and 7-bit codewords, a predetermined number of bits are information bits, and the rest are redundant bits for error correction.
[0165]
Next, a 14-bit code word (m11, m21, m31, m41, m51, m61, m71, m12, m22, m32, m42, m52, m62, m72) is converted into a 7-bit code string (m11, m21, m31, m41, m51, m61, m71) (m12, m22, m32, m42, m52, m62, m72). The code sequence a (m11, m21, m31, m41, m51, m61, m71) and the code sequence b (m12, m22, m32, m42, m52, m62, m72) and one code sequence c (m13, m23, m33, m43, m53, m63, m73) are arranged in each row of a 3 × 7 array, and as shown in FIG. 10 (A), m11, m12, m13, m21, m22 and m23, m31 and m32 and m33, m41 and m42 and m43, m51 and m52 and m53, m61 and m62 and m63, m71 and m72 and m73 are stored.
[0166]
That is, in FIG. 10A, the upper bit of the memory cell 1 is m11, the middle bit is m12, and the lower bit is m13. Similarly, the memory cell 2 has m21, m22, and m23, and the memory cell 3 has m31 and m32. m33, m41, m42, and m43 in the memory cell 4, m51, m52, and m53 in the memory cell 5, m61, m62, and m63 in the memory cell 6, and m71, m72, and m73 in the memory cell 7, respectively.
[0167]
The code strings a and b and the code word c can be corrected even if one error occurs. Therefore, as shown in FIG. 10A, for example, a burst of length 3 of the third memory cell Even if an error occurs, there is one error for each of the code strings a and b and the code word c. At this time, two errors are generated for the code word composed of the code strings a and b. Therefore, correction becomes possible.
That is, even if a burst error occurs in which the memory voltage of “100” changes to “011” due to a change in the threshold voltage of one of the seven memory cells, correction is possible. Become.
[0168]
(Modification 2 of “Write Method: Example 3”)
In the target device here, the threshold voltage of each memory cell corresponds to three bits of information (000, 001, 010, 011, 100, 101, 110, 111) to be stored. 1, 2, 3, 4, 5, 6, 7V). In the second modification, an example is shown in which, according to an encoding rule that can correct an error up to one error and can detect an error up to two errors in each bit constituting a code word. To do.
[0169]
In rewriting by the present apparatus, first, every time 12 bits of stored contents are received, this is converted into 4 × 3 bits of information bits (m11, m21, m31, m41) (m12, m22, m32, m42) (m13). , M23, m33, m43) and 3 × 3 redundant bits (p11, p21, p31) (p12, p22, p32) (p13, p23, p33) are obtained from this information bit by Hamming coding. .
[0170]
Subsequently, three code strings (m11, m21, m31, m41, p11, p21, p31) (m12, m22, m32, m42, p12, p22, p32) (m13, m23, m33, m43, p13, p23) , P33), EX-OR of all the bits is calculated, and the redundant bits q1, q2, q3 obtained as a result are added to each code string, and three code words (m11, m21) are obtained. , M31, m41, p11, p21, p31, q1) (m12, m22, m32, m42, p12, p22, p32, q2) (m13, m23, m33, m43, p13, p23, p33, q3) .
[0171]
These three code words are arranged in each row of a 3 × 8 array, and as shown in FIG. 10B, each of eight memory cells has m11, m12, m13, m21, m22, m23, m31, and m31, respectively. m32 and m33, m41 and m42 and m43, p11 and p12 and p13, p21 and p22 and p23, p31 and p32 and p33, q1 and q2 and q3 are stored.
[0172]
That is, in FIG. 10B, the upper bit of the memory cell 1 is m11, the middle bit is m12, and the lower bit is m13. Similarly, the memory cell 2 has m21, m22, and m23, and the memory cell 3 has m31 and m32. m33, m41, m42 and m43 in memory cell 4, p11, p12 and p13 in memory cell 5, p21, p22 and p23 in memory cell 6, p31, p32 and p33 in memory cell 7, q1 and q2 in memory cell 8 q3 is stored.
[0173]
Each codeword can be corrected even if one error occurs. Therefore, as shown in FIG. 10B, for example, even if a burst error of length 3 occurs in the third memory cell, Since each code word has one error, it can be corrected.
That is, even if a burst error occurs in which the memory voltage of “100” changes to “011” due to a change in threshold voltage of one memory cell among the eight memory cells, correction is possible. Become. Furthermore, although it seems to be extremely rare, for example, if 1 to 3 burst errors occur in another memory cell, there will be 2 errors for at least one codeword. At this time, the two errors can be detected, and one of them can be corrected.
[0174]
(Write method: Example 4)
In this apparatus, the threshold voltage of each memory cell is stored as 4-bit information (0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 110, 1110, 1111), 16 values (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15V) are set. It is a 16-value memory.
[0175]
In rewriting by this apparatus, each time 16 bits of stored contents are received, this is converted to 4 × 4 information bits (m11, m21, m31, m41) (m12, m22, m32, m42) (m13, m23, m33, m43) (m14, m24, m34, m44) and 3 × 4 redundant bits (p11, p21, p31) (p12, p22, p32) (p13, p23, p33) from this information bit ) (P14, p24, p34).
[0176]
And four code words (m11, m21, m31, m41, p11, p21, p31) (m12, m22, m32, m42, p12, p22, p32) (m13, m23, m33, m43, p13, p23, p33) (m14, m24, m34, m44, p14, p24, p34) are arranged in each row of a 4 × 7 array, and as shown in FIG. 11, m11, m12, m13, and m14 are arranged in seven memory cells, respectively. , M21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44, p11, p12, p13, p14, p21, p22, p23, p24, p31, p32, p33, p34 To do.
[0177]
That is, in FIG. 11, the first bit of the memory cell 1 is m11, the second bit is m12, the third bit is m13, and the fourth bit is m14. Similarly, the memory cell 2 includes m21, m22, m23 and m24, memory M31, m32, m33, and m34 in cell 3, m41, m42, m43, and m44 in memory cell 4, p11, p12, p13, and p14 in memory cell 5, p21, p22, p23, and p24 in memory cell 6, memory cell 7 P31, p32, p33 and p34 are stored in
[0178]
Each code string can be corrected even if one error occurs. Therefore, as shown in FIG. 11, for example, even if a burst error of length 4 of the third memory cell occurs, each code string Since each column has one error, it can be corrected.
That is, even if a burst error occurs in which the memory voltage of “1000” changes to “0011” when the threshold voltage of one memory cell changes among the seven memory cells, for example, correction is possible. Become.
[0179]
(Modification 1 of “Write Method: Example 4”)
In this apparatus, the threshold voltage of each memory cell is stored as 4-bit information (0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 110, 1110, 1111), 16 values (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15V) are set. It is a 16-value memory. In the third modification, a case where a predetermined linear coding rule capable of error correction up to two errors in each bit constituting a code word is exemplified.
[0180]
In rewriting by this apparatus, first, every time a stored content receives a predetermined bit, for example, p bits, it is divided into four (p / 3) information bits. Then, redundant bits are obtained from each information bit, and two 14-bit code words (m11, m21, m31, m41, m51, m61, m71, m12, m22, m32, m42, m52, m62, m72) (m13) , M23, m33, m43, m53, m63, m73, m14, m24, m34, m44, m54, m64, m74).
That is, of each 14-bit code word, a predetermined number of bits are information bits, and the rest are redundant bits for error correction.
[0181]
Next, each 14-bit codeword (m11, m21, m31, m41, m51, m61, m71, m12, m22, m32, m42, m52, m62, m72) (m13, m23, m33, m43, m53, m63) , M73, m14, m24, m34, m44, m54, m64, m74) are each converted into a 7-bit code string (m11, m21, m31, m41, m51, m61, m71) (m12, m22, m32, m42, m52, m62, m72) and (m13, m23, m33, m43, m53, m63, m73) (m14, m24, m34, m44, m54, m64, m74). Then, the respective code strings are arranged in each row of a 4 × 7 array, and as shown in FIG. 12 (A), m11, m12, m13 and m14, m21, m22, m23 and m24, m31, m32, m33, m34, m41, m42, m43, m44, m51, m52, m53, m54, m61, m62, m63, m64, m71, m72, m73, and m74 are stored.
[0182]
That is, in FIG. 12A, the first bit of the memory cell 1 is m11, the second bit is m12, the third bit is m13, and the fourth bit is m14. Similarly, the memory cell 2 has m21, m22, and m23. m24, m31, m32, m33, and m34 in memory cell 3, m41, m42, m43, and m44 in memory cell 4, m51, m52, m53, and m54 in memory cell 5, m61, m62, m63, and m64 in memory cell 6, M71, m72, m73, and m74 are stored in the memory cell 7.
[0183]
Each code string can be corrected even if one error occurs. Therefore, as shown in FIG. 12A, for example, even if a burst error of length 4 of the third memory cell occurs. Each code string has one error, and at this time, each code word composed of two code strings has two errors, which can be corrected.
That is, even if a burst error occurs in which the memory voltage of “1000” changes to “0011” when the threshold voltage of one memory cell changes among the seven memory cells, for example, correction is possible. Become.
[0184]
(Modification 2 of “Write Method: Example 4”)
In this apparatus, the threshold voltage of each memory cell is stored as 4-bit information (0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 110, 1110, 1111), 16 values (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15V) are set. It is a 16-value memory. In the fourth modification, an example is shown in which, according to an encoding rule that can correct an error up to one error and can detect an error up to two errors in each bit constituting a code word. To do.
[0185]
In rewriting by the present apparatus, first, every time the stored content receives 16 bits, this is converted to 4 × 4 information bits (m11, m21, m31, m41) (m12, m22, m32, m42) (m13). , M23, m33, m43) (m14, m24, m34, m44), and 3 × 4 redundant bits (p11, p21, p31) (p12, p22, p32) from this information bit by Hamming coding. (P13, p23, p33) (p14, p24, p34) is obtained.
[0186]
Subsequently, four code strings (m11, m21, m31, m41, p11, p21, p31) (m12, m22, m32, m42, p12, p22, p32) (m13, m23, m33, m43, p13, p23) , P33) (m14, m24, m34, m44, p14, p24, p34), the EX-OR of all the bits is calculated, and the redundant bits q1, q2, q3, q4 obtained as a result are calculated. In addition to each code string, four code words (m11, m21, m31, m41, p11, p21, p31, q1) (m12, m22, m32, m42, p12, p22, p32, q2) (m13, m23, m33, m43, p13, p23, p33, q3) (m14, m24, m34, m44, p14, p24, p34, q4) are created.
[0187]
These four code words are arranged in each row of a 4 × 8 array, and as shown in FIG. 12 (B), m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44, p11, p12, p13, p14, p21, p22, p23, p24, p31, p32, p33, p34, q1, q2, q3, and q4. Remember.
[0188]
That is, in FIG. 12B, the first bit of the memory cell 1 is m11, the second bit is m12, the third bit is m13, and the fourth bit is m14. Similarly, the memory cell 2 has m21, m22, and m23. m24, m31, m32, m33, and m34 in the memory cell 3, m41, m42, m43, and m44 in the memory cell 4, p11, p12, p13, and p14 in the memory cell 5, p21, p22, p23, and p24 in the memory cell 6, The memory cell 7 stores p31, p32, p33, and p34, and the memory cell 8 stores q1, q2, q3, and q4.
[0189]
Each code word can be corrected even if one error occurs. Therefore, as shown in FIG. 12B, for example, even if a burst error of length 4 occurs in the third memory cell, Since each code word has one error, it can be corrected.
That is, even if a burst error occurs in which the memory voltage of “1000” changes to “0111” due to a change in threshold voltage of one of the eight memory cells, for example, correction is possible. Become. Furthermore, although it seems to be extremely rare, for example, if one to four burst errors occur in another memory cell, there will be two errors for at least one codeword. At this time, the two errors can be detected, and one of them can be corrected.
[0190]
In addition to the encoding methods shown in the third and fourth modifications, there are methods that are considered useful.
For example, 56 bits of “0” data are first added to 64 original data to obtain information bits having a total length of 120 bits. Subsequently, a 127-bit Hamming code is created from 120 information bits. Subsequently, EX-OR of all 127 bits is calculated, and an additional 128-bit code is obtained from the result. Thereafter, the previously added 56-bit “0” is removed to obtain a 72-bit codeword.
In such an encoding method, error correction is possible for up to one error in each bit constituting a code word, and error detection is possible for up to two errors. / DED code (single-error-correcting / double-error-detecting code) is frequently used.
[0191]
Here, a specific example will be described in which one codeword can be corrected even if one error occurs. Table 1 below shows a Hamming code in which 3 check bits are added to 4 information bits.
Figure 0003728098
[0192]
In this code, the 1st, 2nd, and 4th digits are check bits, and each digit of (1, 3, 5, 7), (2, 3, 6, 7) and (4, 5, 6, 7) The check bits are determined so that the parity becomes even parity. For example, when the code “0111100” corresponding to the decimal number “12” is written and an error occurs and “0101100” is read, as shown in Table 1, the digit with the error is displayed. Since it can be obtained as a binary number (in this case, 011), it can be easily and reliably corrected even if an error occurs.
[0193]
This code can be extended to a case where the number of information bits is larger, and the required number m of check bits for n information bits is expressed by the following equation.
2m = n + m + 1 (1 formula)
[0194]
In the above description, the case where the present invention is applied to a nonvolatile memory device having a floating gate type memory cell has been described as an example. However, as a memory cell for performing multi-value storage, a floating gate type memory cell is used. However, the MNOS type may be used. In addition to the EEPROM, the present invention also provides a mask for obtaining a memory state by changing the threshold value by controlling the amount of impurities ion-implanted into the channel region of the field effect transistor, in addition to the EEPROM and PROM. It can also be applied to ROM. Moreover, although the case of 4-value and 8-value was mentioned as an example, it is not limited to this value by any means.
[0195]
Furthermore, the writing method of the present invention can also be applied to a DRAM. In this case, needless to say, precharge is performed at the time of writing.
[0196]
In addition, the crossing method has been described as an example of a method for obtaining an error correction code, but any method other than the crossing method may be used as long as the error correction code can correct a burst length error according to the amount of information stored in the memory cell. It may be a cyclic code or a shortened cyclic code.
[0197]
On the other hand, in order to read the data written in the memory cell as described above in step S400 of FIG. 5 and step S402 of FIG. 6 as described above, the sense circuit 404 of FIG. What is necessary is just to comprise.
Hereinafter, an operation of reading data written in the memory cell by the sense circuit 404 shown in FIG. 13 as an encryption key will be described.
[0198]
A threshold voltage Vth1 corresponding to the lower bit set in the memory cell 202 configured as a multi-level memory is applied to the inverting input terminal of the sense amplifier 43 through an output buffer including the inverter 40 and the transistors 41 and. A determination voltage V47 set in the transistor 47 is applied to the non-inverting input terminal of the sense amplifier 43 via an output buffer including an inverter 46 and transistors 44 and 45.
[0199]
When the threshold voltage Vth1 is smaller than the determination voltage V47, the output of the sense amplifier 43 becomes High, so that the lower bit D0 stored in the memory cell 202 is determined to be “1”. Since the output of the sense amplifier 43 is High, the transistor 52 is turned on, while the transistor 54 is turned off by the inverter 53. Therefore, the determination voltage V52 set in the transistor 52 is applied to the non-inverting input terminal of the sense amplifier 48 through the output buffer including the inverter 51 and the transistors 49 and 50. A threshold voltage Vth 2 corresponding to the upper bit set in the memory cell 202 is applied to the inverting input terminal of the sense amplifier 48 via the output buffer 1.
[0200]
When the threshold voltage Vth2 is smaller than the determination voltage V52, the output of the sense amplifier 48 becomes High, so that the upper bit D1 stored in the memory cell 202 is determined to be “1”. On the other hand, when the threshold voltage Vth2 is larger than the determination voltage V52, the output of the sense amplifier 48 becomes Low, so the upper bit D1 stored in the memory cell 202 is read as “0”.
[0201]
Further, when the threshold voltage Vth1 is larger than the determination voltage V47, the output of the sense amplifier 43 becomes Low, so the lower bit D0 stored in the memory cell 202 is determined to be “0”. Since the output of the sense amplifier 43 is Low, the transistor 52 is turned off, while the transistor 54 is turned on by the inverter 53. Therefore, the determination voltage V54 set in the transistor 52 is applied to the non-inverting input terminal of the sense amplifier 48 via the output buffer. Then, a threshold voltage Vth2 corresponding to the upper bit set in the memory cell 202 is applied to the inverting input terminal of the sense amplifier 48 via the output buffer.
[0202]
When the threshold voltage Vth2 is smaller than the determination voltage V54, the output of the sense amplifier 48 becomes High, so that the upper bit D1 stored in the memory cell 202 is read as “1”. On the other hand, when the threshold voltage Vth2 is larger than the determination voltage V54, the output of the sense amplifier 48 becomes Low, so that the upper bit D1 stored in the memory cell 202 is read as “0”.
[0203]
In this way, the values read out in step S400 in FIG. 5 and step S402 in FIG. 6 are stored as encryption keys in the memory 304 shown in FIG.
[0204]
In the first and second embodiments, the case where an EEPROM memory cell is used as the memory cell 200 has been described. For example, an FRAM (ferroelectric) multivalue disclosed in JP-A-8-124378 is described. Memory cells may be used.
Specifically, each of the memory cells 200 of FIG. 2 is configured by a field effect transistor (FEMFET) using a ferroelectric film as a gate insulating film, and the polarization state of the ferroelectric film changes to change the memory cell. By utilizing the change in threshold voltage, three values “H”, “L”, and “−H” are stored in each memory cell. By using an FRAM (ferroelectric) memory cell as the memory cell 200, a more complicated encryption key than that of the EEPROM memory cell can be formed, and the security against unauthorized rewriting by a third party is further increased.
Further, as the memory cell 200, a multi-value memory cell using MNOS, mask ROM, EPROM, PROM, or flash nonvolatile memory may be used.
[0205]
(3) Third embodiment
The present embodiment is different from the first and second embodiments described above in that the rewrite control circuit 103 is configured as shown in FIG. 14, for example.
Here, only the points different from the first embodiment will be specifically described.
[0206]
In other words, in this embodiment, the rewrite control circuit 103 includes a control circuit 311 to which a command signal from the signal line 105 is supplied, a program memory 312 in which a control program for the control circuit 311 is stored, and a logic integrated circuit. And a pattern memory 313 for storing a plurality of types of pattern data (reference signals) of command signals for the purpose of destroying the logic of 100.
In the program memory 312, for example, a control program according to a flowchart shown in FIG. 15 is set in advance, and the control program 311 is read and executed by the control circuit 311, whereby the rewrite control circuit 103 operates as follows.
[0207]
First, the control circuit 311 determines whether or not a rewrite command signal is input from the outside via the signal line 105 (step S411). If the rewrite command signal is input, the control circuit 311 proceeds to the next step S412. If not input, a rewrite command signal input wait state is entered.
[0208]
In step S412, the control circuit 311 receives the input rewrite command signal.
[0209]
Then, the control circuit 311 determines whether or not there is pattern data corresponding to the rewrite command signal received in step S412 among a plurality of types of pattern data stored in the pattern memory 313 (step S413). .
Specifically, the pattern memory 313 stores in advance a plurality of types of pattern data corresponding to signals considered as rewrite command signals (viruses) for the purpose of destroying the logic of the logic integrated circuit 100. By comparing the pattern data of the pattern memory 313 and the pattern data of the received rewrite command signal, it can be determined whether or not the rewrite command signal is a rewrite command signal (virus).
[0210]
If there is pattern data corresponding to the received rewrite command signal as a result of the determination in step S413, the control circuit 311 receives a rewrite command signal (virus) for the purpose of destroying the logic of the logic integrated circuit 100. It recognizes that it has been performed, invalidates the rewrite command signal (virus), returns to the above-described step S411 without performing anything, and repeats the subsequent step processing.
[0211]
On the other hand, if the result of determination in step S413 is that there is no pattern data corresponding to the received rewrite command signal, the control circuit 311 validates the received rewrite command signal and, according to the rewrite command signal, a plurality of EEPROM memory cells. 202 is rewritten (step S415), the process returns to the above-described step S411, and the subsequent step processing is repeatedly executed.
[0212]
As described above, in this embodiment, when a rewrite command signal is received from the outside, it is determined whether or not this rewrite command signal is a rewrite command signal (virus) for the purpose of destroying the logic of the logic integrated circuit 100. Only when the result of the determination is not a rewrite command signal (virus), the plurality of EEPROM memory cells 202 are rewritten.
With this configuration, even if a rewrite command signal (virus) for the purpose of destroying the logic of the logic integrated circuit 100 is input to the logic integrated circuit 100, the rewrite command signal is a rewrite command signal (virus). Since the plurality of EEPROM memory cells 202 are not rewritten, the logic of the logic integrated circuit 100 cannot be illegally rewritten.
Therefore, in the present embodiment as well, it is possible to reliably prevent logic destruction due to unauthorized rewriting of the logic integrated circuit 100, so that the rewritable logic integrated circuit 100 is durable against logic destruction. Can be provided. The pattern data stored in the pattern memory 313 is further stored in the pattern memory 313 as soon as a new virus pattern is found, thereby further enhancing the durability against logic destruction.
[0213]
In the first, second, and third embodiments described above, the logic integrated circuit 100 is an EEPROM type. However, the present invention is not limited to this. For example, an SRAM type may be used.
[0214]
(4) Fourth embodiment
The semiconductor device having a security function according to the present invention is applied to a semiconductor device 500 as shown in FIG. 16, for example.
[0215]
As shown in FIG. 16, the semiconductor device 500 includes a storage device 501 including a mask ROM 501a and an EEPROM 501b, so that the area required for storing information can be reduced and the stored contents can be rewritten. Both are possible in a well-balanced manner. The encrypted confidential data is stored in the mask ROM 501a. Since the contents stored in the mask ROM 501a are encrypted, it is almost impossible to decrypt the stored contents even if the structure is analyzed using a microscope or the like.
[0216]
In addition, the semiconductor device 500 includes an SRAM type FPGA (Field Programmable Gate Array) 502 and a CPU (Central Processing Unit) 503 which is a processing unit.
[0217]
Here, the FPGA is a large-scale PLD (Programmable Logic Device) that has come to be widely used as a general-purpose logic integrated circuit, and the user has the logic to calculate the input data and obtain the output data. This is a circuit that can be programmed automatically, that is, a logic integrated circuit that can electrically rewrite logic, and is a high-speed circuit that performs hardware operations.
Therefore, the FPGA 502 has the same configuration as that of the logic integrated circuit 100 in the first, second, and third embodiments, and has a logic defense function as described above.
Note that the configuration and function of the FPGA 502 are the same as those of the logic integrated circuit 100 in the first, second, and third embodiments, and thus detailed description thereof is omitted.
[0218]
Further, an external device 600 that is an external output destination of stored data is connected via an output terminal 509.
The external device 600 is provided with a storage / reproduction device 601 and a storage medium 602.
[0219]
The method of decrypting the confidential content data stored in the mask ROM 501a is that the FPGA 502 uses the logical address AD-1 used by the CPU 503 to the structural address of the mask ROM 501a (encrypted and stored at different positions). An address for decoding and reading a group of data) is converted into AD-2. That is, as will be described later, the FPGA 502 receives the logical address AD-1 output from the CPU 503, converts it to the address AD-2 in the structure of the mask ROM 501a, and outputs it to the mask ROM 501a.
[0220]
Below, an example of operation | movement of the semiconductor device 500 is demonstrated based on the flowchart of FIG.
[0221]
In FIG. 17, when the power is turned on in step S701 and the semiconductor device 500 is connected to the external output destination of the stored content, the CPU 503 operates in step S702 and sets the external output destination of the stored content in the FPGA 502. Requests to specify a program P for logical operation.
[0222]
In response to this request, the storage / reproduction device 601 reproduces the program data read from the storage medium 602 and transmits it to the semiconductor device 500.
Next, when the data I / O unit 504 receives the program in step S703, the CPU 503 outputs a logical operation program P for programming the FPGA 502 while interpreting the data received in step S504.
[0223]
The FPGA 502 determines whether or not the logic of the FPGA 502 has been destroyed by the logic operation program P (for example, if it was a virus program) that programs the FPGA 502, or the program P By determining whether or not the program is intended to destroy the logic of the FPGA 502 such as a program, the logic of the FPGA 502 is surely prevented from being destroyed. As a result, when illegal data is input, the data stored in the semiconductor device 500 cannot be output correctly. The program of the FPGA 2 corresponds to the above-described command signal, and is performed by arbitrarily assembling an AND circuit or an OR circuit by turning on or off a number of previously arranged transistors.
[0224]
By the way, in a logic circuit in which a fixed logic is assembled in advance, an AND circuit and an OR circuit can be identified by tracing the wiring of the gate array using a microscope or the like, and the logic set in the logic circuit can be easily determined. Can be deciphered.
[0225]
On the other hand, when the FPGA 502 having a logic defense function is used as in this embodiment, since arbitrary logic is assembled later depending on the presence or absence of the charge charged in the transistor, the structure is analyzed using a microscope or the like. However, it is almost impossible to decipher the set logic, and it is almost impossible to destroy the logic.
[0226]
When this program ends, the CPU 503 transmits a signal indicating that data output is enabled in step S705 to the external output destination via the data I / O unit 504. Correspondingly, output of data at a certain address is requested from the external output destination, and when the data I / O unit 504 receives the address in step S6, the CPU 503 outputs the received address AD-1 to the FPGA 502. To do.
[0227]
Then, in step S7, the FPGA 502 calculates the structural address AD-2 of the mask ROM 501a based on the logical address AD-1 based on the program set in step S704, and stores it in the mask ROM 501a. Output.
In the next step S708, the mask ROM 501a outputs the data D to the CPU 3 in accordance with the structural address AD-2 calculated by the FPGA 502. The CPU 503 outputs the input data D to an external output destination via the data I / O unit 504.
[0228]
As described above, in the fourth embodiment, since the FPGA 502 is used to decrypt the encrypted storage content, data can be output at high speed after the program of the FPGA 502 is completed. Moreover, since the CPU 503 only outputs data during the data output, the CPU 503 can perform other calculations. In this case, it goes without saying that the CPU 503 can perform unique data processing using the data stored in the mask ROM 501a. Further, since the FPGA 502 has a smaller circuit scale and can be easily integrated than an EEPROM, the semiconductor device 500 can be provided at a low cost.
[0229]
In addition, since the FPGA 502 is provided with a logic defense function, the logic set in the FPGA 502 is surely prevented from being destroyed. Therefore, an accurate operation in the semiconductor device 500 can always be ensured. 500 can be provided with higher performance.
[0230]
In this embodiment, an SRAM type FPGA 502 is used. In this case, since the stored data of the FPGA 502 is destroyed when the power is turned off, the program of the FPGA 502 must be restarted when the power is turned on again. However, this problem can be avoided by using an EEPROM type FPGA instead of an SRAM type FPGA.
[0231]
Hereinafter, an example of the encryption operation for storing the encrypted data in the EEPROM 501b shown in FIG. 16 will be described based on the flowchart of FIG.
[0232]
In FIG. 18, when the power is turned on in step S710 and the semiconductor device 500 is connected to an external input source of data to be stored, for example, connected to the storage / playback device 601 and the storage medium 602, the CPU 503 in step S711. Operates and requests the external input destination to specify a logic operation program to be set in the FPGA 502.
[0233]
In response to this request, the storage / reproduction device 601 reproduces program data from the storage medium 602 and transmits it to the semiconductor device. Next, when the program is received by the data I / O unit 504 in step S712, the CPU 503 programs the FPGA 502 while interpreting the data received in step S713.
Note that, as described above, the FPGA 502 has the above-described logic defense function. Therefore, when invalid data is input, the FPGA 502 is not in a state where data can be correctly input to the semiconductor device 500.
[0234]
When this program ends, the CPU 503 transmits a signal indicating that data output is possible to the external output destination via the data I / O unit 504 in step S714. In response to this, input of data at an address from the external input source is requested, and when the logical address AD-1 is received by the data I / O unit 504 in step S715, the CPU 503 receives the received logical address. The address AD-1 is output to the FPGA 502.
[0235]
Then, in step S716, the FPGA 502 calculates the address AD-2 in the structure of the EEPROM 501b from the logical address AD-1 based on the program set in step S704 (FIG. 20), and calculates it as the EEPROM 501b. Output to. In the next step S717, data is input from the external input source to the CPU 503 via the data I / O unit 504, and stored in the EEPROM 501b as a structural address AD-2.
If the user changes the encryption key from the outside, it may be stored in the FPGA 502.
[0236]
As described above, since the semiconductor device 500 uses the FPGA 502 having the logic defense function to encrypt data to be stored, the data can be input at high speed after the program of the FPGA 502 is completed. Can always guarantee its correct operation. In addition, since the CPU 503 is not used during the data input, the CPU 503 can perform other calculations.
[0237]
Here, an example of a method for calculating the structural address AD-2 by the FPGA 502 in step S716 will be described.
[0238]
For example, it is assumed that the addresses of the EEPROM 501b are from 0000h to FFFFh. In this case, there are permutations of data to be stored according to the capacity of the EEPROM 501b, from 0000h to FFFFh. Then, the permutation of data to be stored is rearranged based on a certain rule and stored in the EEPROM 501b.
[0239]
As a specific data rearrangement method, as shown in Table 1 below, for example, ABABh is displayed in binary for the data of ABABh (1010 1011
1010 1011) 2, and this value is further left shifted to (0101 0111 0101 0111) 2. That is, they are rearranged to the 5757hth.
[0240]
[Table 1]
Figure 0003728098
[0241]
With a new permutation generated by rearrangement, data given from the outside is stored in each address of the EEPROM 501b via the data I / O unit 504 and the CPU 503. Therefore, the permutation of data stored in the EEPROM 501b is encrypted differently from the permutation of the original data, and it is difficult to decrypt the original data.
[0242]
In order to decrypt the encrypted data stored in the storage device 600 (step S707 in FIG. 8), the data is shifted left from the logical address AD-1 input from the CPU 503 to the FPGA 502. If the address AD-2 is calculated and a program for decoding the address is written in the FPGA 502, the data decoded by this program can be read out.
[0243]
As a further method of rearranging the specific data, for example, in the above-mentioned Table 1, for the data of the address ABABh, the address ABABh is displayed in binary (1010 1011 1010 1011) 2 and this value is determined appropriately. The value (0110 1101 0101 1100) 2 obtained by exclusive OR with the random number (1100 0110 1111 0111) 2, that is, rearranged to the 6B5Ahth.
[0244]
Then, the data given from the outside is stored in each address of the EEPROM 501b via the data I / O unit 504 and the CPU 503 in a new permutation generated by rearrangement.
[0245]
For example, when storing personal information, if there are many requests for adding new personal information or modifying existing personal information, the capacity of the mask ROM 501a is reduced and the storage capacity of the EEPROM 501b By increasing the size, it is possible to increase the rewritable memory area. Note that a volatile memory such as a DRAM can be used instead of the EEPROM 501b.
[0246]
In the above-described encryption / decryption process, when the EEPROM 501b is used, an addressing program may be written in the FPGA 502.
[0247]
An information processing apparatus using an FPGA is disclosed in, for example, Japanese Patent Laid-Open No. 7-168750. In this apparatus, an FPGA is connected to a memory in which program data is stored, and the logic circuit of the FPGA is controlled according to the program data stored in the memory under the control of the CPU.
[0248]
However, as shown in FIG. 1 of the above publication, this apparatus merely performs data communication between the CPU and peripheral devices using an FPGA stored in the memory, as in this embodiment. The encryption / decryption program is held in the FPGA. And it is not disclosed that the data encrypted by the FPGA programmed with the data given from the CPU is stored in the memory and the stored encrypted data is decrypted.
Also, it is not disclosed that an FPGA always has a logical defense function to always guarantee an accurate operation in the apparatus.
[0249]
(5) Fifth embodiment
The semiconductor device having a security function according to the present invention is applied to a semiconductor device 510 as shown in FIG. 19, for example.
[0250]
As shown in FIG. 19, the semiconductor device 510 includes a storage device 511 composed of a mask ROM 511a and an EEPROM 511b, an FPGA 512, and a CPU 513, like the semiconductor device 500 in the fourth embodiment described above. The FPGA 512 is used as an interface circuit for encrypting or decrypting data.
Further, the FPGA 512 has a logical defense function, like the FPGA 502 in the fourth embodiment.
[0251]
The present embodiment is different from the fourth embodiment in that the address specified by the external output destination is directly input from the CPU 513 to the storage device 511 and is output from the storage device 511 according to the address. Data D-2 is converted to logical data D-1 by the FPGA 512 and input to the CPU 513.
[0252]
That is, in the present embodiment, the method for decrypting confidential data stored in the storage device 511 is the structural data (data that remains encrypted) D that the FPGA 512 has read from the mask ROM 511a. -2 to the logical data D-1 used by the CPU 513.
[0253]
In other words, the FPGA 512 receives the structural data D-2 from the mask ROM 511a, converts it into logical data D-1 of the CPU 513, and outputs it to the CPU 513.
[0254]
The operation of the semiconductor device 510 is the same as that in steps S701 to S705 of FIG. 12 until the power is turned on and data output is possible. However, in the fourth embodiment, the subsequent operation is different from that of the third embodiment.
[0255]
That is, as shown in FIG. 20, when an output of data at an address is requested from an external output destination, and the address is received by the data I / O unit 514 in step S706a, the CPU 513 outputs the received address to the FPGA 512. To do.
[0256]
Then, the FPGA 512 calculates logical data in step S707a based on the program set in step S704. In the next step S708, the calculated logical data is stored in the address of the EEPROM 511b given from the CPU 513.
[0257]
On the other hand, as shown in FIG. 21, when an output of data at a certain address is requested from the FPGA 512 and the address is received by the data I / O unit 514 in step S715a, the CPU 513 stores the received address AD in the storage device 511. Output.
[0258]
Then, the FPGA 512 calculates the structural data D-2 in step S716a based on the program set in step S713. In the next step S717, the structural data D-2 is stored at the address given from the CPU 513 of the EEPROM 511b.
[0259]
As described above, in the fifth embodiment, since the FPGA 512 having the logic defense function is used to encrypt the data to be stored, the data is input at high speed after the program of the FPGA 512 is completed. And its precise operation can always be guaranteed. Moreover, since the CPU 513 only inputs data while outputting the data, the CPU 513 can perform other calculations.
[0260]
Here, an example of a structural data calculation method by the FPGA 512 performed in step S716a of FIG. 21 will be described.
[0261]
It is assumed that one word (word length) is taken out for one address of the EEPROM 511b, and 16-bit data is included in one word. The 16-bit data is rearranged based on a certain rule and stored in the EEPROM 511b.
[0262]
For example, with respect to 16-bit data ABABh, ABABh is binary-displayed to be (1010 1011 1010 1011) 2, and this value is further left-shifted to (0101 0111 0101 0111) 2. That is, the data 5757h is stored in the EEPROM 511b.
[0263]
As a result, the data stored in the EEPROM 511b is encrypted differently from the original data, and it is difficult to decrypt the original data. In order to decrypt the encrypted data stored in the EEPROM 511b (step S707a in FIG. 15), a program for shifting the obtained 16-bit data to the left is written in the FPGA 512. The decrypted data can be read out.
[0264]
In the fifth embodiment, similarly to the fourth embodiment, the rewritable EEPROM 511b has a storage capacity that is rewritable in order to meet the needs of the user to electrically rewrite the stored contents. It is also possible to enlarge it. In this case, an encryption program may be set in the FPGA 512, and the data supplied from the CPU 513 may be encrypted by the FPGA 512 and supplied to the EEPROM 511b.
[0265]
Further, when data is written in the EEPROM 511b of FIG. 19 in the encryption / decryption processing, an addressing program may be written in the FPGA 512.
[0266]
Also, in the fifth embodiment, an SRAM type is used as the FPGA 512. However, in this case, the stored data of the FPGA 512 is destroyed when the power is turned off, so that the FPGA 512 is turned on when the power is turned on again. The program must be redone. However, this problem can be avoided by using an EEPROM type FPGA instead of an SRAM type FPGA.
[0267]
In this case, a code is assigned to each of a plurality of programs to be programmed into the FPGA 512, and when programming into the FPGA 512, the FPGA 512 is programmed according to one program selected from the plurality of programs. At this time, the program code is also stored.
[0268]
When accessing the once programmed FPGA 512, the stored program code is first output to the external device through the CPU 513, and the external device accesses the semiconductor device 510 by changing the access method based on the program code. In other words, the semiconductor device 510 and the external device can use the program code as a common key, and can decrypt the secret information in cooperation.
[0269]
For example, the external device applies a bit shift by a predetermined bit to the address of 1 byte and supplies it to the semiconductor device 510. The FPGA 512 can be used for encryption by bit-shifting it in the reverse direction to obtain an address for the storage device 511.
[0270]
In this case, even if the content itself stored in the EEPROM 511b is common, a plurality of encryptions can be achieved by changing the bit shift amount at the time of writing the FPGA 512, and the confidentiality can be further improved by frequently rewriting the FPGA 512. In actual encryption, more complicated conversion is performed on the peripheral device side, not simple conversion such as bit shift and reverse shift.
[0271]
Further, in the semiconductor devices 500 and 510 shown in FIGS. 16 and 19, unencrypted data is stored in the storage devices 501 and 511, and is encrypted and output by the FPGA 502 and the FPGA 512. It is also possible. For example, this method can be applied when it is necessary to encrypt the communication content in order to prevent the communication performed between the semiconductor device and the external output destination from being intercepted and leaking the confidential content.
[0272]
In this case, for example, in the fourth embodiment, encryption of confidential data output from the CPU 503 to the external output destination via the data I / O unit 504 is performed as follows.
For example, the CPU 503 sets a program for performing encryption in the FPGA 502 while interpreting data received from an external output destination. Then, the FPGA 502 may perform the conversion by converting the logical address AD-1 supplied from the CPU 503 into the structural address AD-2.
[0273]
Further, for example, in the fifth embodiment, encryption of confidential data output from the CPU 513 to the external output destination via the data I / O unit 514 is performed as follows.
For example, the CPU 513 sets a program for encryption in the FPGA 20 while interpreting data received from an external output destination. Then, the FPGA 512 performs encryption by converting the structural data (not encrypted) D-2 read from the mask ROM 511a into the logical data (encrypted data) D-1 used by the CPU 513. I do.
[0274]
(6) Sixth embodiment
As the sixth embodiment, by combining the fourth embodiment and the fifth embodiment described above, an operation for encrypting and decrypting both an address and data with an FPGA is performed, and the operation is performed. Can be thought of as a device that guarantees that it always performs accurately.
This case can be realized by providing the address conversion FPGA 5022 shown in FIG. 16 and the data conversion FPGA 512 shown in FIG. 14, and setting an appropriate program for each of them.
[0275]
(7) Seventh embodiment
A semiconductor device having a security function according to the present invention is applied to a semiconductor device 800 as shown in FIG. 22, for example.
[0276]
In the semiconductor device 800, as shown in FIG. 22, an RF unit 810 and an antenna circuit 820 are provided in the semiconductor device 510 shown in FIG.
In this embodiment, an EEPROM 511b for storing variable data is provided as the storage device 511 in addition to the mask ROM 511a. Also in this embodiment, the FPGA 512 has a logic defense function.
[0277]
The antenna circuit 820 includes a parallel resonance circuit including a coil 821 and a capacitor 822, and has a function of receiving power from a semiconductor device (not shown) from a terminal device and a function of transmitting / receiving a data signal to / from the terminal device. For example, wireless signal transmission is possible using a carrier signal having a high frequency of 1 MHz or higher.
[0278]
With such a configuration, when a radio wave is received from the terminal through the coil 821, the received power is supplied to the RF unit 810. The RF unit 810 is a circuit provided for performing high frequency processing, generates a power supply voltage to be used internally from the supplied received power, demodulates a signal component included in the received power, and demodulates the demodulated signal. Is output to the I / O unit 514. The operation after the I / O unit 514 is the same as the operation described above.
[0279]
On the other hand, when a signal is output from the semiconductor device 800, the operation is the reverse of the above-described operation. That is, the RF unit 810 generates a high-frequency current by superimposing the signal component supplied from the I / O unit 514 on the carrier. The generated high-frequency current is supplied to the antenna circuit 820 and transmitted to the terminal.
When transmitting / receiving a signal to / from the terminal, the semiconductor device 800 can obtain transmission power because operating power is transmitted from the terminal.
[0280]
As described above, the semiconductor device 800 in this embodiment can transmit and receive data without contact with a terminal, and thus can be suitably used as a semiconductor device incorporated in a contactless IC card. .
Further, since the FPGA 512 is provided with a logic defense function, it can be suitably used as a semiconductor device that reliably prevents destruction of stored contents due to illegal data from the outside and always guarantees an accurate operation.
[0281]
For example, when it is used as a commuter pass for transportation, it can pass through the ticket gate, which is a terminal, in a non-contact manner, making the traffic smoother and greatly reducing the congestion at the ticket gate during rush hours. It becomes like this. As described above, when used as a commuter pass, it is necessary to rewrite data stored therein, such as the expiry date of the commuter pass.
In this case, destruction of the stored contents of the commuter pass can be surely prevented. For example, it is possible to prevent a third party from rewriting the stored content and using it illegally.
[0282]
As shown in FIG. 17, the semiconductor device 800 of this embodiment has an EEPROM 511b in addition to the mask ROM 511a. Therefore, by storing variable data in the EEPROM 511b, the semiconductor device 800 can be repeated any number of times. Can be used.
In addition, since rewriting data can be performed in a non-contact manner, there is an advantage that it is easy to maintain the secret of the built-in data as compared with the case where data is transmitted and received through a metal contact.
[0283]
In the case of this embodiment, since the terminal 830 is provided, it can be used well as an IC card used in contact with the terminal.
In FIG. 17, the antenna circuit 820 is shown protruding from the apparatus body, but the antenna circuit 820 is actually disposed on the surface of the apparatus body.
[0284]
In order to realize the above-described embodiment, a device (CPU or computer) in an apparatus or system connected to each device is operated so that each device shown in FIGS. 3, 16, 19, and 22 is operated. MPU), which is implemented by supplying software program codes for implementing the above-described embodiments and operating the devices in accordance with the programs stored in the computer, also falls within the scope of the present invention.
[0285]
In this case, the program code of the software itself realizes the above-described embodiment, and the program code itself and means for supplying the program code to a computer, for example, a storage medium storing the program code is provided. This constitutes the present invention.
[0286]
For example, in FIG. 3, a storage / reproduction device 304 and a storage medium 305 are connected to the control circuit 301. The program code stored in the storage medium 305 is read out by the storage / reproduction device 304 and the control circuit 301 is operated.
Further, in FIG. 16, a storage / reproduction device 601 and a storage medium 602 provided at an external output destination (external input destination) are connected to the CPU 503 via a data I / O unit 504. The program code stored in the storage medium 602 is read out by the storage / playback device 601 and the CPU 503 is operated via the data I / O unit 504.
[0287]
As the storage medium for storing the program code, for example, a floppy disk, a hard disk, an optical disk, a CD-ROM, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
[0288]
【The invention's effect】
As described above, according to the present invention, it is possible to provide an electrically rewritable logic integrated circuit having a logic defense function and having durability against logic destruction. In addition, a device including a rewritable logic integrated circuit can be provided with a function of always guaranteeing an accurate operation.
[0289]
In addition, it comprises storage means, control means (central processing unit, etc.), and electrically rewritable logic means, and the logic means has a logic defense function and is durable against logic destruction. is there. Then, at the time of encryption / decryption, the logic means is rewritten in accordance with the encryption / decryption program set by the control means, and the logic is rewritten and input to the storage means. Since the encryption of data and the decryption of the encrypted data are performed, the configuration that prevents the logic from being decrypted by the structural analysis can be realized on a smaller scale than before, and the accuracy at that time Can always be guaranteed. In addition, since the logic set in the logic means is executed by hardware, the processing can be speeded up, and other processing can be performed by the control means during the processing. As a result, it is possible to provide a low-cost semiconductor device that has a function for maintaining confidentiality of stored contents and a function that always guarantees an accurate operation, and that can operate at high speed.
[0290]
Furthermore, since data can be transmitted / received to / from the terminal without contact, it is possible to eliminate the risk of unexpectedly reading or destroying data stored therein. Thereby, for example, a semiconductor device suitable for use in an IC card can be provided.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a logic integrated circuit to which the present invention is applied in a first embodiment.
FIG. 2 is a circuit diagram showing a configuration of a PIA of the logic integrated circuit.
FIG. 3 is a circuit diagram showing a configuration of each memory cell of the PIA.
FIG. 4 is a block diagram showing a configuration of a rewrite control circuit of the logic integrated circuit.
FIG. 5 is a flowchart for explaining an example of a processing program executed by the rewrite control circuit in the first embodiment;
FIG. 6 is a flowchart for explaining an example of a processing program executed by the rewrite control circuit in the second embodiment;
FIG. 7 is a cross-sectional view showing the structure of an EEPROM memory cell.
FIG. 8 is a diagram for explaining an example (Example 2) of a writing method to which the present invention is applied;
FIG. 9 is a diagram for explaining an example (Example 3) of a writing method to which the present invention is applied;
FIG. 10 is a diagram for explaining Modifications 1 and 2 of the writing method (Example 3);
FIG. 11 is a diagram for explaining an example (Example 4) of a writing method to which the present invention is applied;
FIG. 12 is a diagram for explaining modifications 1 and 2 of an example (Example 4) of a writing method to which the present invention is applied;
FIG. 13 is a circuit diagram showing a configuration of a sense circuit.
FIG. 14 is a block diagram illustrating a configuration of the rewrite control circuit according to a third embodiment.
FIG. 15 is a flowchart for explaining an example of a processing program executed by the rewrite control circuit in the third embodiment;
FIG. 16 is a block diagram showing a configuration of a semiconductor device to which the present invention is applied in a fourth embodiment;
FIG. 17 is a flowchart showing an example of a decoding operation of the semiconductor device in the fourth embodiment.
FIG. 18 is a flowchart showing an example of the encryption operation of the semiconductor device in the fourth embodiment.
FIG. 19 is a block diagram showing a configuration of a semiconductor device to which the present invention is applied in a fifth embodiment.
FIG. 20 is a flowchart showing an example of a decoding operation of the semiconductor device in the fifth embodiment.
FIG. 21 is a flowchart showing an example of an encryption operation of the semiconductor device.
FIG. 22 is a block diagram showing a configuration of a semiconductor device to which the present invention is applied in a seventh embodiment;
[Explanation of symbols]
100 logic integrated circuit
101 PIA
102 X Macro cell
104 X I / O circuit
105 Input signal line
106 Output signal line

Claims (34)

外部からの命令信号により論理が書き換え可能な論理集積回路と、
前記論理集積回路の現在の第1の論理状態に係わる第1の情報と、前記命令信号に含まれる前記論理集積回路の第2の論理状態に係わる第2の情報とを比較し、前記第1、第2の情報が一致しないときは前記論理集積回路の論理の前記第1の論理状態から第2の論理状態への書き換えを禁止する手段とを備え
前記第1の情報及び前記第2の情報は、前記論理集積回路に含まれる複数論理素子に関する情報であり、
前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理集積回路が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報として記憶する記憶手段をさらに備えたことを特徴とする半導体装置。
A logic integrated circuit whose logic can be rewritten by an external command signal;
The first information relating to the current first logic state of the logic integrated circuit is compared with the second information relating to the second logic state of the logic integrated circuit included in the command signal, and the first information is compared. And means for prohibiting rewriting of the logic of the logic integrated circuit from the first logic state to the second logic state when the second information does not match ,
The first information and the second information are information on a plurality of logic elements included in the logic integrated circuit,
Among the plurality of logic elements, a first number of elements used for configuring the first logic state, a second number of elements not used for configuring the first logic state, the first Alternatively, at least one of a code obtained by compressing a signal indicating the number of second elements and a date when the logic integrated circuit is rewritten to the first logic state is stored as the first information. A semiconductor device characterized by further comprising a storage means .
前記論理集積回路は、3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備え、
前記半導体装置はさらに、
前記第1、第2の情報が一致したときに、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号が与えられ、前記第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報のうち、桁が同じビット情報同士が一組として前記複数の多値メモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手段と、
前記並べ替えられたビット情報が与えられて、これらの情報に対応した複数の電圧を発生する手段と、
アドレス情報を受けて、前記電圧を前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して前記論理を書き換える手段とを備えたことを特徴とする請求項1記載の半導体装置。
The logic integrated circuit includes a plurality of multi-value memory cells that hold one of three or more different storage states.
The semiconductor device further includes
When the first and second information match, at least a first code and a second code encoded by an arbitrary encoding method are provided, and a plurality of first codes constituting the first code are provided. The plurality of bit information and the plurality of second bit information constituting the second code are stored in one of the plurality of multi-valued memory cells as a set of bit information having the same digit. Means for rearranging the first and second bit information of
Means for generating a plurality of voltages corresponding to the rearranged bit information and corresponding to the information;
2. The circuit according to claim 1, further comprising means for receiving the address information and applying the voltage to a memory cell corresponding to the address information among the plurality of multi-level memory cells to rewrite the logic. Semiconductor device.
外部からの命令信号により論理が書き換え可能な論理集積回路と、
前記命令信号に応じて、前記論理集積回路の現在の第1の論理状態に係わる第1の情報を検出し、前記現在より前の前記論理集積回路の第2の論理状態に係わる第2の情報と比較し、前記第1、第2の情報が一致しないときは前記論理集積回路の論理が前記第2の論理状態から前記第1の論理状態へ書き換えられたと判定する判定手段とを備え
前記第1の情報及び前記第2の情報は、前記論理集積回路に含まれる複数論理素子に関する情報であり、
前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理集積回路が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報として記憶する記憶手段をさらに備えたことを特徴とする半導体装置。
A logic integrated circuit whose logic can be rewritten by an external command signal;
In response to the command signal, first information related to the current first logic state of the logic integrated circuit is detected, and second information related to the second logic state of the logic integrated circuit prior to the current time. And determining means for determining that the logic of the logic integrated circuit has been rewritten from the second logic state to the first logic state when the first and second information do not match ,
The first information and the second information are information on a plurality of logic elements included in the logic integrated circuit,
Among the plurality of logic elements, a first number of elements used for configuring the first logic state, a second number of elements not used for configuring the first logic state, the first Alternatively, at least one of a code obtained by compressing a signal indicating the number of second elements and a date when the logic integrated circuit is rewritten to the first logic state is stored as the first information. A semiconductor device characterized by further comprising a storage means .
前記判定手段は、前記論理集積回路の論理が書き換えられたと判定した場合に判定信号を出力することを特徴とする請求項3記載の半導体装置。  4. The semiconductor device according to claim 3, wherein the determination unit outputs a determination signal when it is determined that the logic of the logic integrated circuit has been rewritten. 前記判定手段は、定期的に前記判定動作を行うことを特徴とする請求項3記載の半導体装置。  The semiconductor device according to claim 3, wherein the determination unit periodically performs the determination operation. 外部からの命令信号により論理が書き換え可能な論理集積回路と、
前記命令信号と少なくとも1つの基準信号とを比較し、前記命令信号と前記基準信号が同じ信号である場合に前記論理集積回路の論理の書き換えを禁止する禁止手段とを備え
前記論理集積回路は3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備え、
前記命令信号が前記基準信号とは異なる場合に、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号が与えられ、前記第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット 情報同士が一組として前記複数の多値メモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手段と、前記並べ替えられたビット情報が与えられて、これらの情報に対応した複数の電圧を発生する手段と、
アドレス情報を受けて、前記電圧を前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して前記論理を書き換える手段とを備えたことを特徴とする半導体装置。
A logic integrated circuit whose logic can be rewritten by an external command signal;
A means for comparing the command signal with at least one reference signal, and prohibiting rewriting of logic of the logic integrated circuit when the command signal and the reference signal are the same signal ,
The logic integrated circuit includes a plurality of multi-value memory cells that hold one of three or more different storage states,
When the command signal is different from the reference signal, at least a first code and a second code encoded by an arbitrary encoding method are provided, and a plurality of first codes constituting the first code are provided. Among the plurality of second bit information constituting the second code and the bit information, the plurality of bit information having the same digit are stored in one of the plurality of multilevel memory cells as a set. Means for rearranging the first and second bit information, and means for generating a plurality of voltages corresponding to these information given the rearranged bit information;
Means for receiving address information and applying the voltage to a memory cell corresponding to the address information among the plurality of multi-level memory cells to rewrite the logic .
前記基準信号として複数種類の信号を予め記憶する記憶手段をさらに備え、
前記禁止手段は、前記命令信号と前記複数種類の信号とを比較することを特徴とする請求項6記載の半導体装置。
It further comprises storage means for previously storing a plurality of types of signals as the reference signal,
The semiconductor device according to claim 6, wherein the prohibiting unit compares the command signal with the plurality of types of signals.
前記論理集積回路は、各々が所定の演算機能を有する複数の演算手段と、
前記命令信号に従って前記複数の演算手段の相互配線を変更して前記論理を書き換える配線手段とを備えたことを特徴とする請求項6記載の半導体装置。
The logic integrated circuit includes a plurality of arithmetic units each having a predetermined arithmetic function;
7. The semiconductor device according to claim 6, further comprising wiring means for rewriting the logic by changing mutual wiring of the plurality of arithmetic means according to the command signal.
前記論理集積回路は、FPGA(Field Programmable Gate Array )を含むことを特徴とする請求項6記載の半導体装置。  7. The semiconductor device according to claim 6, wherein the logic integrated circuit includes an FPGA (Field Programmable Gate Array). 前記多値メモリセルは、制御ゲートと浮遊ゲートとを有することを特徴とする請求項6記載の半導体装置。The semiconductor device according to claim 6 , wherein the multi-level memory cell includes a control gate and a floating gate . 前記多値メモリセルは、MNOS、マスクROM、EEPROM、EPROM、PROM、FRAM、及びフラッシュ不揮発性メモリの少なくともいずれか一つであることを特徴とする請求項6記載の半導体装置。7. The semiconductor device according to claim 6 , wherein the multi-value memory cell is at least one of MNOS, mask ROM, EEPROM, EPROM, PROM, FRAM, and flash nonvolatile memory . 前記命令信号に応じて前記論理集積回路の論理を書き換える書き換え手段をさらに備えたことを特徴とする請求項6記載の半導体装置。  7. The semiconductor device according to claim 6, further comprising rewriting means for rewriting the logic of the logic integrated circuit in response to the command signal. 前記論理集積回路の論理を読み出す読み出し手段をさらに備えたことを特徴とする請求項6記載の半導体装置。  7. The semiconductor device according to claim 6, further comprising reading means for reading the logic of the logic integrated circuit. 前記ビット情報並替え手段は、前記一つの符号の誤り訂正能力に応じて、前記複数の多値メモリセルの一つに記憶する同一符号におけるビットの数を制御することを特徴とする請求項6記載の半導体装置。The bit information reordering means in response to the one code error correction capability, claim 6, characterized in that to control the number of bits in the same code to be stored in one of said plurality of multilevel memory cells The semiconductor device described. 前記ビット情報並替え手段は、前記複数の多値メモリセルの一つが記憶するビット数がmであるときに、m個のビット情報を前記1個の多値メモリセルに記憶させるように、符号長nの符号m個をm×n配列の各行として並べ替えることを特徴とする請求項6記載の半導体装置。The bit information rearranging means encodes the bit information so that m bit information is stored in the one multilevel memory cell when the number of bits stored in one of the plurality of multilevel memory cells is m. 7. The semiconductor device according to claim 6 , wherein m codes having a length of n are rearranged as rows of an mxn array. 外部からの命令信号により論理が書き換え可能な論理集積回路の現在の第1の論理状態に係わる第1の情報と、前記命令信号に含まれる前記論理集積回路の第2の論理状態に係わる第2の情報とを比較し、
前記第1、第2の情報が一致しないときは前記論理集積回路の論理の前記第1の論理状態から前記第2の論理状態への書き換えを禁止するステップを含み、
前記第1の情報及び前記第2の情報は、前記論理集積回路に含まれる複数論理素子に関する情報であり、
前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理集積回路が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報とすることを特徴とする論理書き換え防止方法。
First information related to the current first logic state of the logic integrated circuit whose logic can be rewritten by an external command signal, and second information related to the second logic state of the logic integrated circuit included in the command signal Compared with the information
The first, when the second information does not match viewing including the step of prohibiting rewriting to the second logic state from the logic of the first logic state of the logic integrated circuit,
The first information and the second information are information on a plurality of logic elements included in the logic integrated circuit,
Among the plurality of logic elements, a first number of elements used for configuring the first logic state, a second number of elements not used for configuring the first logic state, the first Alternatively, at least one of a code obtained by compressing a signal indicating the number of second elements or a date when the logic integrated circuit is rewritten to the first logic state is used as the first information. A logical rewrite prevention method characterized by that.
機密保持機能を有する半導体装置であって、
少なくとも一時的に符号処理プログラムを保持し、前記符号処理プログラムに対応した命令信号を出力する制御手段と、
前記命令信号が与えられて前記プログラムに従って論理を変更して、少なくともデータ及び前記データに関わるアドレスの何れか一方に符号処理を施す論理が可変な論理手段と、
前記データを記憶する第1の記憶手段と、
前記論理手段の現在の第1の論理状態に係わる第1の情報と、前記命令信号に含まれる前記論理手段の第2の論理状態に係わる第2の情報とを比較し、前記第1、第2の情報が一致しないときは前記論理手段の論理の前記第1の論理状態から前記第2の論理状態への書き換えを禁止する手段とを備え
前記第1の情報及び前記第2の情報は、前記論理手段に含まれる複数論理素子に関する情報であり、
前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理手段が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報として記憶する記憶手段をさらに備えたことを特徴とする半導体装置。
A semiconductor device having a security function,
Control means for holding a code processing program at least temporarily and outputting a command signal corresponding to the code processing program;
A logic means that is provided with the command signal and changes logic according to the program, and at least one of data and an address related to the data is subjected to code processing;
First storage means for storing the data;
The first information relating to the current first logic state of the logic means is compared with the second information relating to the second logic state of the logic means included in the command signal, and the first, And means for prohibiting rewriting of the logic of the logic means from the first logic state to the second logic state when the two information do not match ,
The first information and the second information are information relating to a plurality of logic elements included in the logic means,
Among the plurality of logic elements, a first number of elements used for configuring the first logic state, a second number of elements not used for configuring the first logic state, the first Alternatively, at least one of a code obtained by compressing a signal indicating the number of second elements or a date when the logic means is rewritten to the first logic state is stored as the first information. A semiconductor device further comprising storage means .
機密保持機能を有する半導体装置であって、
少なくとも一時的に符号処理プログラムを保持し、前記符号処理プログラムに対応した命令信号を出力する制御手段と、
前記命令信号が与えられて前記プログラムに従って論理を変更して、少なくともデータ及び前記データに関わるアドレスの何れか一方に符号処理を施す論理が可変な論理手段と、
前記データを記憶する第1の記憶手段と、
前記命令信号と少なくとも一つの基準信号とを比較し、前記命令信号と前記基準信号が同じ信号である場合に前記論理手段の論理の書き換えを禁止する禁止手段とを備え
前記論理手段は3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備え、
前記命令信号が前記基準信号とは異なる場合に、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号が与えられ、前記第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット情報同士が一組として前記複数の多値メモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手段と、 前記並べ替えられたビット情報が与えられて、これらの情報に対応した複数の電圧を発生する手段と、
アドレス情報を受けて、前記電圧を前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して前記論理を書き換える手段とを備えたことを特徴とする半導体装置。
A semiconductor device having a security function,
Control means for holding a code processing program at least temporarily and outputting a command signal corresponding to the code processing program;
A logic means that is provided with the command signal and changes logic according to the program, and at least one of data and an address related to the data is subjected to code processing;
First storage means for storing the data;
Comparing the command signal with at least one reference signal, and comprising a prohibiting means for prohibiting rewriting of logic of the logic means when the command signal and the reference signal are the same signal ,
The logic means comprises a plurality of multi-valued memory cells holding one of three or more different storage states;
When the command signal is different from the reference signal, at least a first code and a second code encoded by an arbitrary encoding method are provided, and a plurality of first codes constituting the first code are provided. Among the plurality of second bit information constituting the second code and the bit information, the plurality of bit information having the same digit are stored in one of the plurality of multilevel memory cells as a set. Means for rearranging the first and second bit information; means for generating a plurality of voltages corresponding to these information given the rearranged bit information;
Means for receiving address information and applying the voltage to a memory cell corresponding to the address information among the plurality of multi-level memory cells to rewrite the logic .
前記基準信号として複数種類の信号を予め記憶する第2の記憶手段をさらに備え、
前記禁止手段は、前記命令信号と前記複数種類の信号とを比較することを特徴とする請求項18記載の半導体装置。
A second storage means for storing a plurality of types of signals in advance as the reference signal;
19. The semiconductor device according to claim 18 , wherein the prohibiting unit compares the command signal with the plurality of types of signals.
前記論理手段は、各々が所定の演算機能を有する複数の演算手段と、
前記命令信号に従って前記複数の演算手段の相互配線を変更して前記論理を書き換える配線手段とを備えたことを特徴とする請求項18記載の半導体装置。
The logic means includes a plurality of arithmetic means each having a predetermined arithmetic function;
19. The semiconductor device according to claim 18, further comprising wiring means for rewriting the logic by changing mutual wiring of the plurality of arithmetic means according to the command signal.
前記論理手段は、FPGA(Field Programmable Gate Array )を含むことを特徴とする請求項18記載の半導体装置。19. The semiconductor device according to claim 18 , wherein the logic means includes a field programmable gate array (FPGA). 前記多値メモリセルは、制御ゲートと浮遊ゲートとを有することを特徴とする請求項18記載の半導体装置。The semiconductor device according to claim 18, wherein the multi-level memory cell includes a control gate and a floating gate. 前記命令信号に応じて前記論理手段の論理を書き換える書き換え手段をさらに備えたことを特徴とする請求項18記載の半導体装置。19. The semiconductor device according to claim 18 , further comprising rewriting means for rewriting the logic of the logic means in response to the command signal. 前記論理手段の論理を読み出す読み出し手段をさらに備えたことを特徴とする請求項18記載の半導体装置。19. The semiconductor device according to claim 18 , further comprising reading means for reading the logic of the logic means. 前記論理手段は、少なくとも暗号化及び復号化処理の何れか一方を含む前記符号処理を行うことを特徴とする請求項18記載の半導体装置。19. The semiconductor device according to claim 18 , wherein the logic means performs the code processing including at least one of encryption and decryption processing. 前記論理手段は、前記データが前記第1の記憶手段に記憶される前に少なくとも前記データ及び前記アドレスの何れか一方を暗号化する前記符号処理を行うことを特徴とする請求項18記載の半導体装置。19. The semiconductor according to claim 18 , wherein the logic means performs the code processing for encrypting at least one of the data and the address before the data is stored in the first storage means. apparatus. 前記論理手段は、前記データが前記第1の記憶手段から出力される際に少なくとも前記データ及び前記データに関わるアドレスの何れか一方を暗号化する前記符号処理を行うことを特徴とする請求項18記載の半導体装置。Said logic means, according to claim 18, wherein the data and performing the encoding processing of encrypting either one of the addresses relating to at least the data and the data in output from said first storage means The semiconductor device described. 前記論理手段は、前記データが前記第1の記憶手段から出力される際に少なくとも前記データ及び前記データに関わるアドレスの何れか一方を復号化する前記符号処理を行うことを特徴とする請求項18記載の半導体装置。Said logic means, according to claim 18, wherein the data and performing the encoding processing for decoding the one of the addresses relating to at least the data and the data in output from said first storage means The semiconductor device described. 前記第1の記憶手段は、少なくともマスクROM及び電気的に書き換え可能な不揮発性記憶装置の何れか一方を含むことを特徴とする請求項18記載の半導体装置。19. The semiconductor device according to claim 18, wherein the first memory means includes at least one of a mask ROM and an electrically rewritable nonvolatile memory device. 前記半導体装置は、
端末機との間で非接触で前記データの送受信を行うアンテナ手段と、
前記アンテナ手段の受信出力から電源電圧を発生し、且つ前記端末機から送られた信号を復調すると共に、前記端末機に送信する前記データを重畳した高周波電流を生成して前記アンテナ手段に出力する高周波処理手段とを備えたことを特徴とする請求項18記載の半導体装置。
The semiconductor device includes:
Antenna means for transmitting and receiving the data in a contactless manner with a terminal;
A power supply voltage is generated from the reception output of the antenna means, and a signal transmitted from the terminal is demodulated, and a high-frequency current superimposed with the data to be transmitted to the terminal is generated and output to the antenna means. 19. The semiconductor device according to claim 18, further comprising high frequency processing means.
機密保持機能を有し、論理が変更可能な論理回路と、前記論理回路を制御する制御装置とを備えた半導体装置の符号処理方法であって、
前記制御装置に符号処理プログラムを供給する供給ステップと、
前記制御装置から前記プログラムに対応した命令信号を出力させる出力ステップと、
前記命令信号を前記論理回路に与えて前記プログラムに従って前記論理回路の論理を変更する論理変更ステップと、
前記変更した論理によって少なくともデータ及び前記データに関わるアドレスの何れか一方に符号処理を施す符号処理ステップと、
前記データを記憶装置に記憶するステップとを含み、
前記論理変更ステップは、
前記論理回路の現在の第1の論理状態に係わる第1の情報と、前記命令信号に含まれる前記論理回路の第2の論理状態に係わる第2の情報とを比較し、
前記第1、第2の情報が一致しないときは前記論理回路の論理の前記第1の論理状態から前記第2の論理状態への書き換えを禁止するステップを含み、
前記第1の情報及び前記第2の情報は、前記論理集積回路に含まれる複数論理素子に関する情報であり、
前記複数論理素子の中で前記第1の論理状態を構成するために用いられる第1の素子数、前記第1の論理状態を構成するためには用いられない第2の素子数、前記第1又は第2の素子数を示す信号に圧縮を施して得た符号、又は前記論理集積回路が前記第1の論理状態に書き換えられた日付けの少なくともいずれか一つを前記第1の情報とすることを特徴とする符号処理方法。
A code processing method for a semiconductor device comprising a logic circuit having a security function and a logic changeable, and a control device for controlling the logic circuit,
A supplying step of supplying a code processing program to the control device;
An output step of outputting a command signal corresponding to the program from the control device;
A logic change step of changing the logic of the logic circuit according to the program by applying the command signal to the logic circuit;
A code processing step of performing code processing on at least one of data and an address related to the data by the changed logic;
Storing the data in a storage device,
The logic change step includes:
Comparing first information relating to a current first logic state of the logic circuit with second information relating to a second logic state of the logic circuit included in the command signal;
The first, when the second information does not match viewing including the step of prohibiting rewriting to the second logic state from the logic of the first logic state of said logic circuit,
The first information and the second information are information on a plurality of logic elements included in the logic integrated circuit,
Among the plurality of logic elements, a first number of elements used for configuring the first logic state, a second number of elements not used for configuring the first logic state, the first Alternatively, at least one of a code obtained by compressing a signal indicating the number of second elements or a date when the logic integrated circuit is rewritten to the first logic state is used as the first information. The code processing method characterized by the above-mentioned.
論理が変更可能であって、暗号化プログラム及び復号化プログラムの何れか一方が与えられ、前記プログラムに対応した命令信号により前記論理が変更され、前記変更された論理により信号を処理する論理手段を備えた機密保持機能を有する半導体装置であって、前記論理手段は、
前記命令信号により論理が書き換え可能な論理集積回路と、
前記命令信号と少なくとも一つの基準信号とを比較し、前記命令信号と前記基準信号が同じ信号である場合に前記論理集積回路の論理の書き換えを禁止する禁止手段とを備え
前記論理集積回路は3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備え、
前記命令信号が前記基準信号とは異なる場合に、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号が与えられ、前記第1の符号を構成する複数の第1 のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット情報同士が一組として前記複数の多値メモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手段と、前記並べ替えられたビット情報が与えられて、これらの情報に対応した複数の電圧を発生する手段と、
アドレス情報を受けて、前記電圧を前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して前記論理を書き換える手段とを備えたことを特徴とする半導体装置。
Logic means that can change logic, is provided with any one of an encryption program and a decryption program, the logic is changed by an instruction signal corresponding to the program, and a logic means for processing the signal by the changed logic A semiconductor device having a confidentiality maintaining function, wherein the logic means includes:
A logic integrated circuit whose logic can be rewritten by the command signal;
A means for comparing the command signal with at least one reference signal, and prohibiting rewriting of logic of the logic integrated circuit when the command signal and the reference signal are the same signal ,
The logic integrated circuit includes a plurality of multi-value memory cells that hold one of three or more different storage states,
When the command signal is different from the reference signal, at least a first code and a second code encoded by an arbitrary encoding method are provided, and a plurality of first codes constituting the first code are provided . Among the plurality of second bit information constituting the second code and the bit information, the plurality of bit information having the same digit are stored in one of the plurality of multi-level memory cells as one set. Means for rearranging the first and second bit information, and means for generating a plurality of voltages corresponding to these information given the rearranged bit information;
Means for receiving address information and applying the voltage to a memory cell corresponding to the address information among the plurality of multi-level memory cells to rewrite the logic .
外部からの命令信号により論理が書き換え可能で、3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備えた論理集積回路の論理集積回路における前記命令信号と少なくとも一つの基準信号とを比較し、
前記命令信号が前記基準信号と同じ信号である場合に、前記論理集積回路の論理の書き換えを禁止し、
前記命令信号が前記基準信号とは異なる信号である場合に、第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット情報同士が一組として前記複数の多値メメモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替え、
前記並べ替えられたビット情報に対応する複数の電圧を発生し、
アドレス情報を受けて、前記電圧を、前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して、前記論理の書き換えを行うステップを含むことを特徴とする論理書き換え方法。
The instruction signal and at least one reference in a logic integrated circuit of a logic integrated circuit having a plurality of multi-valued memory cells that can rewrite logic by a command signal from the outside and hold one of three or more different storage states Compare with the signal,
When the command signal is the same signal as the reference signal, rewriting the logic of the logic integrated circuit is prohibited,
When the command signal is a signal different from the reference signal, the digit of the plurality of first bit information constituting the first code and the plurality of second bit information constituting the second code Reordering the plurality of first and second bit information so that the same bit information is stored in one of the plurality of multilevel memory cells as a set,
Generating a plurality of voltages corresponding to the sorted bit information;
Receiving the address information, and applying the voltage to the memory cell corresponding to the address information among the plurality of multi-level memory cells, and rewriting the logic. .
外部からの命令信号により論理が書き換え可能で、3値以上の異なる記憶状態の一つを保持する複数の多値メモリセルを備えた論理集積回路の論理書き換えを防止するプログラムを記憶したコンピュータ読み取り可能な記憶媒体であって、
前記プログラムは、コンピュータに
前記論理集積回路における前記命令信号と少なくとも一つの基準信号とを比較する手順と、
前記命令信号が前記基準信号と同じ信号である場合に、前記論理集積回路の論理の書き換えを禁止する手順と、
前記命令信号が前記基準信号とは異なる場合に、任意の符号化方法によって符号化された少なくとも第1の符号と第2の符号を入力する手順と、
前記第1の符号を構成する複数の第1のビット情報と前記第2の符号を構成する複数の第2のビット情報の内、桁が同じビット情報同士が一組として前記複数の多値メメモリセルの一つに記憶されるように前記複数の第1と第2のビット情報を並べ替える手順と、
前記並べ替えられたビット情報に対応する複数の電圧を発生する手順と、
アドレス情報を受けて、前記電圧を、前記複数の多値メモリセルの内の前記アドレス情報に対応するメモリセルに印加して、前記論理書き換えを行う手順とを実行させることを特徴とする記憶媒体。
A computer-readable program storing a program for preventing logic rewriting of a logic integrated circuit having a plurality of multi-valued memory cells that hold one of three or more different memory states and can be rewritten by an external command signal. a Do not storage medium,
The program is stored on a computer .
Comparing the command signal and at least one reference signal in the logic integrated circuit;
A procedure for prohibiting rewriting of logic of the logic integrated circuit when the command signal is the same signal as the reference signal;
A step of inputting at least a first code and a second code encoded by an arbitrary encoding method when the command signal is different from the reference signal;
Among the plurality of first bit information constituting the first code and the plurality of second bit information constituting the second code, the bit information having the same digit is set as a set, and the plurality of multilevel memory cells Reordering the plurality of first and second bit information to be stored in one of
Generating a plurality of voltages corresponding to the sorted bit information;
Receiving the address information, applying the voltage to a memory cell corresponding to the address information among the plurality of multi-level memory cells, and executing a procedure of rewriting the logic. Medium.
JP12189398A 1997-09-05 1998-05-01 Semiconductor device, logic rewrite prevention method, logic rewrite method, code processing method, and storage medium Expired - Fee Related JP3728098B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP12189398A JP3728098B2 (en) 1997-12-12 1998-05-01 Semiconductor device, logic rewrite prevention method, logic rewrite method, code processing method, and storage medium
US09/168,116 US6260172B1 (en) 1997-09-05 1998-10-08 Semiconductor device with logic rewriting and security protection function

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP36301297 1997-12-12
JP9-363012 1997-12-12
JP12189398A JP3728098B2 (en) 1997-12-12 1998-05-01 Semiconductor device, logic rewrite prevention method, logic rewrite method, code processing method, and storage medium

Publications (2)

Publication Number Publication Date
JPH11232176A JPH11232176A (en) 1999-08-27
JP3728098B2 true JP3728098B2 (en) 2005-12-21

Family

ID=26459142

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12189398A Expired - Fee Related JP3728098B2 (en) 1997-09-05 1998-05-01 Semiconductor device, logic rewrite prevention method, logic rewrite method, code processing method, and storage medium

Country Status (1)

Country Link
JP (1) JP3728098B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4583808B2 (en) * 2004-05-17 2010-11-17 パナソニック株式会社 Program execution control device and program execution control method
JP2008077810A (en) 2006-09-25 2008-04-03 Toshiba Corp Nonvolatile semiconductor storage device
KR101541736B1 (en) * 2008-09-22 2015-08-04 삼성전자주식회사 LSB page recovering method for multi-level cell flash memory device

Also Published As

Publication number Publication date
JPH11232176A (en) 1999-08-27

Similar Documents

Publication Publication Date Title
CN109670346B (en) Semiconductor device, method of generating and registering security key, and electronic system
US10193701B2 (en) Apparatus and method for processing authentication information
TWI768113B (en) Integrated circuit for physically unclonable function and integrated circuit having the same
US6260172B1 (en) Semiconductor device with logic rewriting and security protection function
KR102608961B1 (en) Method for device-dependent encryption and apparatus performing the same
US8976586B2 (en) Semiconductor memory device for pseudo-random number generation
US9104610B2 (en) Method, system and medium for analog encryption in a flash memory
US8386990B1 (en) Unique identifier derived from an intrinsic characteristic of an integrated circuit
CN101149709B (en) Encryption processor of memory card and method for writing and reading data using the same
US20160156476A1 (en) Physically Unclonable Function Circuits and Methods of Performing Key Enrollment in Physically Unclonable Function Circuits
US9544138B2 (en) Authenticator, authenticatee and authentication method
JP2002328845A (en) Semiconductor integrated circuit and method for protecting security of ic card
CN101542496A (en) Authentication with physical unclonable functions
US20190221139A1 (en) Cryptographic device and memory based puf
US7512239B2 (en) Protection key for hardware and information management system
US20110314301A1 (en) Systems and methods for hardware key encryption
US9160534B2 (en) Authenticator, authenticatee and authentication method
KR101882289B1 (en) Apparatus and method for processing authentication information
CN101116081A (en) Method and system for microprocessor data security
Jia et al. Extracting robust keys from NAND flash physical unclonable functions
CN113079001A (en) Key updating method, information processing apparatus, and key updating device
CN1588328A (en) Data encrypting/de-encrypling method and its device
CN116648688A (en) Memory system and apparatus including an instance of generating access codes for memory regions using authentication logic
JP3728098B2 (en) Semiconductor device, logic rewrite prevention method, logic rewrite method, code processing method, and storage medium
CN116170161B (en) Physical unclonable function circuit based on ferroelectric transistor array and application thereof

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050330

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050405

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050606

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050628

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050826

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050927

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050930

R154 Certificate of patent or utility model (reissue)

Free format text: JAPANESE INTERMEDIATE CODE: R154

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20060417

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

A072 Dismissal of procedure [no reply to invitation to correct request for examination]

Free format text: JAPANESE INTERMEDIATE CODE: A072

Effective date: 20060901

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091007

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091007

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101007

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111007

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111007

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111007

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121007

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121007

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131007

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees