JP3573672B2 - Code conversion device - Google Patents

Code conversion device Download PDF

Info

Publication number
JP3573672B2
JP3573672B2 JP36040799A JP36040799A JP3573672B2 JP 3573672 B2 JP3573672 B2 JP 3573672B2 JP 36040799 A JP36040799 A JP 36040799A JP 36040799 A JP36040799 A JP 36040799A JP 3573672 B2 JP3573672 B2 JP 3573672B2
Authority
JP
Japan
Prior art keywords
information
value
position designation
column
square
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
JP36040799A
Other languages
Japanese (ja)
Other versions
JP2001175166A (en
Inventor
徹 伊東
Original Assignee
株式会社ネットコムセック
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 株式会社ネットコムセック filed Critical 株式会社ネットコムセック
Priority to JP36040799A priority Critical patent/JP3573672B2/en
Publication of JP2001175166A publication Critical patent/JP2001175166A/en
Application granted granted Critical
Publication of JP3573672B2 publication Critical patent/JP3573672B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は符号変換装置に係り、特に暗号通信や識別情報の作成のために変換表を使用して符号化あるいは復号化を行う符号変換装置に関する。
【0002】
【従来の技術】
暗号通信や識別情報の作成のため、入力情報をSボックス等の変換表を用いて符号変換して出力情報を得る符号変換方法が従来より知られている。図6は従来の符号変換方法の一例を示す。すなわち、符号化時は、同図(a)に示すように、ある数字(又は記号等)の集合からなる入力情報Pを、変換表11を使用して別の数字(又は記号等)の集合からなる出力情報Cに変換する。この変換表11を用いることにより、例えば、入力情報P中の数字“0”は“1”に、“1”は“4”に、“2”は“0”に、“3”は“8”に変換されることになる。
【0003】
また、復号化時は、図6(b)に示すように、上記の出力情報Cを変換表12を使用して元の入力情報Pに変換する。すなわち、変換表12を用いることにより、例えば入力される情報C中の数字“1”は“0”に、“4”は“1”に、“0”は“2”に、“8”は“3”というように、元の入力情報Pに変換されて出力される。
【0004】
【発明が解決しようとする課題】
しかるに、従来、上記の変換表11及び12の値の選択方法は、特に決められたものではなく、変換表11及び12の数字(又は記号等)の設定位置によっては、変換結果の偏りで変換特性に影響を及ぼさないとも限らなかった。
【0005】
本発明は上記の点に鑑みなされたもので、変換表の数字や記号の並びを一様化することにより、変換結果を分散化し得る符号変換装置を提供することを目的とする。
【0006】
また、本発明の他の目的は、魔方陣を使用した単純な構成で符号変換を行い得る符号変換装置を提供することにある。
【0007】
【課題を解決するための手段】
上記の目的を達成するため、請求項1記載の符号変換装置は、符号変換する入力情報の値又はこの値から1を引いた値を次数nで除算した時の商を行位置指定情報とし、入力情報の値又はこの値から1を引いた値を次数nで除算した時の余りを列位置指定情報とする行列指定部と、0又は1から始まるn 2 個の連続した自然数の要素からなる2次元配置の、次数nの魔方陣を、行位置指定情報と列位置指定情報で指定して、指定された行位置と列位置の魔方陣の要素を変換情報として出力する符号化部とを有する構成としたものである。
【0008】
魔方陣は、2次元配置された行列及び対角線上の要素の和が一定であり、要素の分散具合が均等となり、逆変換が確実に行えるという、変換表における好適な条件を有し、更に、次数nが大きくなった場合には、その方陣の存在する数も多数となり、使用する方陣を秘密にした場合には、いずれの方陣を使用したかの特定は困難であるという利点がある。
【0009】
そこで、この発明では、この利点に着目して、所定のビット数の入力情報で、2次元配置の魔方陣を変換表として用い、その行位置と列位置を指定し、指定した行列位置の魔方陣の要素を変換情報として出力することにより、ディジタル情報化された平文の内容の秘密を保持して伝送あるいは保存することを目的とする情報秘匿システムや個人の識別を行うことを目的とする識別システムに適用できる。
【0015】
また、上記の目的を達成するため、請求項記載の符号変換装置は、0又は1から始まるn2個の連続した自然数の要素からなる次数nの符号化用魔方陣を用いて符号変換された入力情報を受け、該入力情報の値又はこの値から1を引いた値を次数nで除算した時の商を行位置指定情報とし、入力情報の値又はこの値から1を引いた値を次数nで除算した時の余りを位置指定情報とする行列指定部と、0又は1から始まるn2個の連続した自然数の要素からなる2次元配置の、符号化用魔方陣と対応する復号化用方陣を、行位置指定情報と列位置指定情報で指定して、指定された行位置と列位置の魔方陣の要素を復元情報として出力する復号化部とを有する構成としたものである。この発明は、符号化したときの魔方陣に対応した逆変換を行う復号化用方陣を用いて、請求項1記載の符号変換装置と同様の手順で復号化を行うことができる。
【0016】
また、上記の目的を達成するため、請求項記載の符号変換装置は、0又は1から始まるn2個の連続した自然数の要素からなる次数nの符号化用魔方陣を用いて符号変換された入力情報で、符号化用魔方陣と対応する復号化用方陣を参照し、該復号化用方陣にある入力情報の値の行位置を行位置指定情報とし、列位置を列位置指定情報として出力する復号化部と、行位置指定情報と列位置指定情報とを入力として受け、行位置指定情報にnを掛けて、列位置指定情報の値を加算した値、又はこの加算値に更に1を加算した値を復元情報として出力する行列合成部とを有する構成としたものである。この発明では、符号化用魔方陣と同じ魔方陣を復号化用方陣として用いることができる。
【0017】
【発明の実施の形態】
次に、本発明の実施の形態について図面と共に説明する。図1(a)及び(b)は本発明になる符号変換装置の第1の実施の形態である符号化装置A及び第2の実施の形態である復号化装置Bのブロック図を示す。図1(a)に示す符号化装置Aは、符号化用の符号化用魔方陣Mを変換表として有する符号化部aと、入力情報Pにより符号化部aの行列の位置を指定する行列指定部RCとからなる。行列指定部RCは、更に列位置指定部RCcと行位置指定部RCrとからなる。
【0018】
ここで、符号化用魔方陣Mについて説明する前に、魔方陣の基本的な性質について説明する。連続な自然数を碁盤の目のように正方形に並べ、各行、各列及び両対角線に相当する部分の要素の和をすべて相等しくしたものを魔方陣という。魔方陣は、正方形に数字を要素として配置するので、各行、各列及び各対角線に相当する部分に含まれる数字の個数は相等しく、これらの数字の各個数がnである方陣をn次の魔方陣と呼ぶ。
【0019】
並びが異なった魔方陣の個数は、1次から5次までの範囲で知られているが、6次以上についての個数は知られておらず、それを算出するための公式的な計算式も存在は確認されていないようである。魔方陣の個数の数え方の条件として、並びが異なっていても魔方陣を回転させて同一の配置となるものと、裏返して同一の配置となるもの、そしてそれらの組み合わせによって得られるものは、いずれも同一の方陣として個数には入れない。
【0020】
要素が同じ範囲であれば、1次の魔方陣の個数は1個、2次の魔方陣の個数は0個、3次の魔方陣の個数は1個、4次の魔方陣の個数は880個、5次の魔方陣の個数は35,472,326個である。図3(a)及び(b)は3次の魔方陣を示し、図4(a)及び(b)は4次の魔方陣の二つの例を示す。3次の魔方陣は、値が0から8までのものは図3(a)に示すもの1個だけであり、値が1から9までのものは図3(b)に示すもの1個だけである。
【0021】
なお、回転と裏返しを個数に入れて数えると、上記の各次数でそれぞれ8倍の個数の魔方陣が存在する。ただし、1次は要素が一つしかないので、その条件から除く。n次の魔方陣の要素を1からnまでの自然数とすると、すべての数の和Snは、
Sn=1+2+3+・・・+n=n(n+1)/2
となる。また、行、列及び対角線上の各要素の数の和Lnは、
Ln=Sn/n=n(n+1)/2
となる。
【0022】
このような性質を有する魔方陣は、2次元配置された行列及び対角線上の要素の和が一定であり、要素の分散具合が均等となり、逆変換が確実に行えるという、変換表における好適な条件を有し、更に、次数nが大きくなった場合には、その方陣の存在する数も多数となり、使用する方陣を秘密にした場合には、いずれの方陣を使用したかの特定は困難であるという利点がある。そこで、本実施の形態では、この利点に着目して、魔方陣を変換表として用いるものである。
【0023】
すなわち、図1(a)の実施の形態では、入力情報Pを行列指定部RCの行位置指定部RCrで行位置指定情報RPに変換すると共に、列位置指定部RCcで列位置指定情報CPに変換する。符号化用魔方陣Mの行位置と列位置を指定することにより、符号化用魔方陣Mから変換情報Cを得る。ここで、n次の魔方陣の要素の値(以下、単に魔方陣の値ともいう)を0からn‐1とした場合には、入力情報Pの値は0からn‐1となり、行位置指定情報RPの値はP/nの商の値となり、列位置指定情報CPの値はP mod n(Pをnで割った余り)となる。
【0024】
実際の行位置指定情報RPと列位置指定情報CPの値は、0からn‐1となる(魔方陣の行列位置の指定も0行0列からn‐1行n−1列となる)。ここで、i番目の入力情報Piに対する行位置指定部RCrの出力行位置指定情報RPiを、RCr(Pi)と表し、列位置指定部RCcの出力列位置指定情報CPiを、RCc(Pi)と表すものとすると、図1(a)の符号化部aは、複数の魔方陣のうちから選択された一つの符号化用魔方陣MのRPiで指定された行位置と、CPiで指定された列位置の要素Mk(RPi,CPi)を変換情報Ciとして出力する。この変換情報Ciを数式で表すと、次式になる。
Ci=Mk(RPi,CPi) (1)
【0025】
なお、上式中、Mkのkは、複数の魔方陣のうちから、鍵として一つを選択するための変換表の番号である。
【0026】
また、符号化用魔方陣Mの値を1からnとした場合は、入力情報Pの値は1からnとなり、行位置指定情報RPの値は(P−1)/nの商の値となり、列位置指定情報CPの値は(P−1) mod n(P−1をnで割った余り)となる。実際のRPとCPの値は、0からn−1となる(魔方陣の行列位置の指定も0行0列からn−1行n−1列となる)。
【0027】
符号化用魔方陣Mの値を1からnとした場合、i番目の入力情報Piに対する行位置指定部RCrの出力行位置指定情報RPiは、RCr(Pi −1)と表わされ、列位置指定部RCcの出力列位置指定情報CPiは、RCc(Pi −1)と表わされ、図1の符号化部aは、複数の魔方陣のうちから選択された一つの符号化用魔方陣MのRPiで指定された行位置と、CPiで指定された列位置の、(1)式で表される要素Mk(RPi,CPi)を変換情報Ciとして出力する。
【0028】
図1(b)に示す復号化装置Bは、変換情報Cを入力として受け、行列指定部RCの行位置指定部RCrで行位置指定情報RPに変換し、かつ、列位置指定部RCcで列位置指定情報CPに変換し、これらで復号化部bで変換表として使用する復号化用方陣M´の行位置と列位置を指定し、復号化用方陣M´から復元情報Dを得る構成である。復号化用方陣M´は、符号化用魔方陣Mに対応した逆変換を行う方陣である。なお、符号化に使用した符号化用魔方陣Mに対応した逆変換を行う方陣は、必ず存在するが、それが魔方陣とは限らない。
【0029】
この方陣M´の値を0からn−1とした場合には、変換情報Cの値は0からn−1までの値となり、行位置指定情報RPの値はC/nの商の値となり、列位置指定情報CPの値はC mod n(Cをnで割った余り)となる。実際のRPとCPの値は、0からn−1となる。
【0030】
ここで、i番目の入力変換情報Ciに対する行位置指定部RCrの出力行位置指定情報RPiを、RCr(Ci)と表し、列位置指定部RCcの出力列位置指定情報CPiを、RCc(Ci)と表すものとすると、図1(b)の復号化部bは、複数の魔方陣のうちから選択された一つの符号化用魔方陣MのRPiで指定された行位置と、CPiで指定された列位置の要素M´k(RPi,CPi)を復元情報Diとして出力する。この復元情報Diを数式で表すと、次式になる。
Di=M´k(RPi,CPi) (2)
【0031】
なお、上式中、M´kのkは、複数の復号化用方陣M´のうちから、鍵として一つを選択するための変換表の番号である。
【0032】
また、復号化用方陣M´の値を1からnとした場合は、入力変換情報Cの値は1からnとなり、行位置指定情報RPの値は(C−1)/nとなり、列位置指定情報CPの値は(C−1) mod n(C−1をnで割った余り)となる。実際のRPとCPの値は、0からn−1となる(方陣の行列位置の指定も0行0列からn−1行n−1列となる)。
【0033】
復号化用方陣M´の値を1からnとした場合、i番目の入力変換情報Ciに対する行位置指定部RCrの出力行位置指定情報RPiは、RCr(Ci −1)と表わされ、列位置指定部RCcの出力列位置指定情報CPiは、RCc(Ci −1)と表わされ、図1(b)の復号化部bは、複数の復号化用方陣のうちから選択された一つの復号化用方陣M´のRPiで指定された行位置と、CPiで指定された列位置の、(2)式で表される要素Mk(RPi,CPi)を復元情報Diとして出力する。
【0034】
図2は本発明になる符号変換装置の第3の実施の形態である復号化装置B´のブロック図を示す。この復号化装置B´は、符号化装置Aで使用される符号化用魔方陣Mを復号化の変換表に使用する復号化部b´と、変換表の行と列の位置を合成して復元情報Dとする行列合成部MXとから構成されている。行列合成部MXは、行位置指定情報入力部RCr´と、列位置指定情報入力部RCc´とからなる。
【0035】
この実施の形態は、変換情報Cで符号化用魔方陣Mの値を指定することで、すなわち、変換情報Cと同一の値が符号化用魔方陣Mの何行何列目にあるかにより、行位置指定情報RPと列位置指定情報CPを得て、それらを行列合成部MXに入力し、ここで合成して復元情報Dを得る。
【0036】
上記の復号化部b´で使用する符号化用魔方陣Mの値が0からn‐1とした場合には、変換情報Cの値は0からn‐1となり、行位置指定情報RPの値と列位置指定情報CPの値は0からn−1となる(魔方陣の行列位置の指定も0行0列からn‐1行n−1列となる)。
【0037】
この実施の形態では、i番目の入力変換情報Ciに対する符号化用魔方陣Mの出力行位置指定情報RPiにnを掛けて、入力変換情報Ciに対する符号化用魔方陣Mの出力列位置指定情報CPiを加算したものを復元情報Diとする。これを数式で表すと次式のようになる。
(RPi,CPi)=Mk−1(Ci) (3)
Di=MX(RPi,CPi) (4)
【0038】
なお、上記の行列合成部MXの演算動作は、RPの値を2進数に変換した値を上位側、CPの値を2進数に変換した値を下位側とする2進数値を生成し、その値を更に10進数に変換した値を復元情報Dとして得ることと同じである。
【0039】
また、符号化用魔方陣Mの値を1からnとした場合は、入力変換情報Cの値は1からnとなり、行位置指定情報RPの値と列位置指定情報CPの値は、0からn−1となる(魔方陣の行列位置の指定も0行0列からn−1行n−1列となる)。この符号化用魔方陣Mの値を1からnとした場合、i番目の入力変換情報Ciに対する符号化用魔方陣Mの出力行位置指定情報RPiにnを掛けて、入力変換情報Ciに対する符号化用魔方陣Mの出力列位置指定情報CPiを加算したものに更に1を加算したものを復元情報Diとする。これを数式で表すと次式のようになる。
(RPi,CPi)=Mk−1(Ci −1) (5)
Di=MX(RPi,CPi) (6)
【0040】
【実施例】
次に、本発明の実施の形態について、具体的に説明する。まず、図1(a)の符号化装置Aの動作について、図1(a)及び図4(a)に示す4次(n=4)の魔方陣を符号化用魔方陣Mとして使用し、図5(a)の番号で示す順番で入力情報Pが入力された場合について説明する。まず、1番目の入力情報Pの値は図5(a)に示すように「5」であり、これは4ビットで表すと「0101」であるから、図1(a)の行列指定部RCにおいて、上位2ビット「01」の10進数の値である「1」が行位置指定情報RPとされ、また、下位2ビット「01」の10進数の値である「1」が列位置指定情報CPとされる。
【0041】
上記の行列指定部RCの演算を実施の形態で説明した方法で説明すると、行位置指定情報RPの値はP/nの商の値であるので、P=5、n=4を代入すると「1」となり、列位置指定情報CPの値はP mod nであるから、5/4の余りの「1」となる。
【0042】
上記の行位置指定情報RPと列位置指定情報CPは、符号化部aに供給され、符号化用魔方陣Mの1行1列目(なお、符号化用魔方陣Mの左端と上端との交点の桝目が0行0列目、右端と下端との交点の桝目が3行3列目である)を指定するため、図1(a)及び図4(a)から分かるように、値「6」が変換情報Cとして符号化部aから取り出される。従って、1番目の入力情報Pの値が「5」のときの出力変換情報Cの値は、図5(a)にIで示すように、「6」である。
【0043】
次に、2番目の入力情報Pの値は図5(a)に示すように「12」であり、これは4ビットで表すと「1100」であるから、図1(a)の行列指定部RCにおいて、上位2ビット「11」の10進数の値である「3」が行位置指定情報RPとされ、また、下位2ビット「00」の10進数の値である「0」が列位置指定情報CPとされる。
【0044】
上記の行位置指定情報RPと列位置指定情報CPは、符号化部aに供給され、符号化用魔方陣Mの3行0列目を指定するため、図1(a)及び図4(a)から分かるように、値「0」が変換情報Cとして符号化部aから取り出される。従って、2番目の入力情報Pの値が「12」のときの出力変換情報Cの値は、図5(a)にIIで示すように「0」である。
【0045】
以下、上記と同様にして、図5(a)に示すように、3番目の入力情報Pの値が「1」であるときの行位置指定情報RPは「0」、列位置指定情報CPは「1」であり、変換情報Cの値は「8」となり、4番目の入力情報Pの値が「15」であるときの行位置指定情報RPは「3」、列位置指定情報CPは「3」であり、変換情報Cの値は「12」となり、5番目の入力情報Pの値が「7」であるときの行位置指定情報RPは「1」、列位置指定情報CPは「3」であり、変換情報Cの値は「1」となる。
【0046】
次に、図1(b)の復号化装置Bの動作について、図1(b)及び図4(b)に示す4次(n=4)の方陣を復号化用方陣M´として使用し、図5(b)の番号で示す順番で変換情報Cが入力された場合について説明する。ここで、図1(b)及び図4(b)に示す復号化用方陣M´は、図1(a)及び図4(a)に示した符号化用魔方陣Mに対応した逆変換を行う方陣である。
【0047】
まず、1番目の入力変換情報Cの値は図5(b)に示すように「6」であり、これは4ビットで表すと「0110」であるから、図1(b)の行列指定部RCにおいて、上位2ビット「01」の10進数の値である「1」が行位置指定情報RPとされ、また、下位2ビット「10」の10進数の値である「2」が列位置指定情報CPとされる。
【0048】
上記の行列指定部RCの動作を実施の形態で説明した方法で説明すると、行位置指定情報RPの値はC/nの商の値で、行位置指定情報RPの値はその余りであるから、C/nにC=6、n=4を代入すると、行位置指定情報RPの値は「1」となり、行位置指定情報RPの値は「2」となる。
【0049】
上記の行位置指定情報RPと列位置指定情報CPは、復号化部bに供給され、復号化用方陣M´の1行2列目(なお、復号化用方陣M´の左端と上端との交点の桝目が0行0列目、右端と下端との交点の桝目が3行3列目である)を指定するため、図1(b)及び図4(b)から分かるように、値「5」が復元情報Dとして復号化装置bから取り出される。従って、1番目の入力変換情報Cの値が「6」のときの出力復元情報Dの値は、図5(b)にIIIで示すように、「5」である。
【0050】
次に、2番目の入力変換情報Cの値は図5(b)に示すように「0」であり、これは4ビットで表すと「0000」であるから、図1(a)の行列指定部RCにおいて、上位2ビット「00」の10進数の値である「0」が行位置指定情報RPとされ、また、下位2ビット「00」の10進数の値である「0」が列位置指定情報CPとされて復号化部bに供給され、復号化用方陣M´の0行0列目を指定するため、図1(b)及び図4(b)から分かるように、値「12」が復元情報Dとして復号化装置bから取り出される。従って、2番目の入力変換情報Cの値が「0」のときの出力復元情報Dの値は、図5(b)にIVで示すように、「12」である。
【0051】
以下、上記と同様にして、図5(b)に示すように、3番目の入力変換情報Cの値が「8」であるときの行位置指定情報RPは「2」、列位置指定情報CPは「0」であり、復元情報Dの値は「1」となり、4番目の入力変換情報Cの値が「12」であるときの行位置指定情報RPは「3」、列位置指定情報CPは「0」であり、復元情報Dの値は「15」となり、5番目の入力変換情報Cの値が「1」であるときの行位置指定情報RPは「0」、列位置指定情報CPは「1」であり、復元情報Dの値は「7」となる。
【0052】
図5(a)及び(b)を比較すると分かるように、符号化装置Aに入力された情報Pは、復号化装置Bにより復号化されて復元情報Dとして取り出される。
【0053】
次に、図2に示した復号化装置B´の動作について、図2及び図4(a)に示す4次(n=4)の方陣を復号化用方陣Mとして使用し、図5(c)の番号で示す順番で変換情報Cが入力された場合について説明する。ここで、図2及び図4(a)に示す復号化用方陣Mは、図1(a)に示した符号化用魔方陣Mと同一の魔方陣である。
【0054】
まず、1番目の入力変換情報Cの値は図5(c)に示すように「6」であり、復号化部b´で使用する魔方陣Mの値「6」が位置する1行1列目が検出されるため、「1」が行位置指定情報RPとされ、また、「1」が列位置指定情報CPとされる。これらの行位置指定情報RPと列位置指定情報CPは、行列合成部MXに供給され、ここで行位置指定情報RPを上位の2ビット、列位置指定情報CPを下位の2ビットとする「0101」から10進数「5」が求められ、これが復元情報Dとして取り出される。従って、1番目の入力変換情報Cの値が「6」のときの出力復元情報Dの値は、図5(c)にVで示すように「5」である。
【0055】
上記の行列合成部MXの動作を実施の形態で説明した方法で説明すると、復元情報Dは、入力変換情報Cに対する符号化用魔方陣Mの出力行位置指定情報RPにnを掛けて、入力変換情報Cに対する符号化用魔方陣Mの出力列位置指定情報CPを加算したものであるので、ここでは、RP=1、n=4、CP=1であるから、復元情報Dは「5」(=1×4+1)となる。
【0056】
次に、2番目の入力変換情報Cの値は図5(c)に示すように「0」であり、復号化部b´で使用する魔方陣Mの値「0」が位置する3行0列目が検出されるため、「3」が行位置指定情報RPとされ、また、「0」が列位置指定情報CPとされる。これらの行位置指定情報RPと列位置指定情報CPは、行列合成部MXに供給され、ここで行位置指定情報RPを上位の2ビット、列位置指定情報CPを下位の2ビットとする「1100」から10進数「12」が求められ、これが復元情報Dとして取り出される。
【0057】
換言すると、RP=3、n=4、CP=0であるから、復元情報Dは「12」(=3×4+0)となる。従って、2番目の入力変換情報Cの値が「0」のときの出力復元情報Dの値は、図5(c)にVIで示すように「12」である。
【0058】
以下、上記と同様にして、図5(c)に示すように、3番目の入力変換情報Cの値が「8」であるときの行位置指定情報RPは「2」、列位置指定情報CPは「0」であり、復元情報Dの値は「1」となり、4番目の入力変換情報Cの値が「12」であるときの行位置指定情報RPは「3」、列位置指定情報CPは「0」であり、復元情報Dの値は「15」となり、5番目の入力変換情報Cの値が「1」であるときの行位置指定情報RPは「0」、列位置指定情報CPは「1」であり、復元情報Dの値は「7」となる。
【0059】
図5(a)及び(c)を比較すると分かるように、符号化装置Aに入力された情報Pは、復号化装置B´により復号化されて復元情報Dとして取り出される。
【0060】
なお、本発明は以上の実施の形態に限定されるものではなく、変換表として使用する魔方陣は、他の4次の魔方陣、あるいは5次の魔方陣でもよい。
【0061】
【発明の効果】
以上説明したように、請求項記載の発明によれば、魔方陣を暗号通信あるいは認証情報の作成のためのブロック符号化方法の符号化を行う変換表に応用するようにしたため、単純な装置の構成で変換表の数字の並びを一様化することで演算結果の情報の分散化ができ、しかも正確かつ迅速な符号変換ができる。また、魔方陣の次数nの増加と共に魔方陣の選択の数が飛躍的に増加することから、難解性を飛躍的に高めることができ、魔方陣の利用価値と利用効果も飛躍的に高めることができる。
【0062】
また、請求項記載の発明によれば、符号化用魔方陣に対応した逆変換を行う復号化用方陣を使用するようにしているため、正確かつ迅速な復号化ができると共に、請求項と同じ手順、構成で復号化ができる。
【0064】
また、請求項記載の発明によれば、符号化の魔方陣と同一の魔方陣を復号化の変換表として使用するため、復号化用のための新たな方陣を用意することなく、正確かつ迅速な復号ができる。
【図面の簡単な説明】
【図1】本発明の第1及び第2の実施の形態のブロック図である。
【図2】本発明の第3の実施の形態のブロック図である。
【図3】3次の魔方陣の各例を示す図である。
【図4】本発明の実施例で用いる4次の魔方陣を示す図である。
【図5】本発明の各実施例で用いる入力情報と行位置指定情報と列位置指定情報と復元情報の各例を示す図である。
【図6】従来の符号変換方法の一例の説明図である。
【符号の説明】
A 符号化装置
a 符号化部
B、B´ 復号化装置
b、b´ 復号化部
M 符号化用魔方陣
M´ 復号化用方陣
RC 行列指定部
RCr 行指定部
RCc 列指定部
RP 行位置指定情報
CP 列位置指定情報
MX 行列合成部
[0001]
BACKGROUND OF THE INVENTION
The present invention isRetrofitCode conversion, which performs encoding or decoding using a conversion table, especially for encrypted communication or creation of identification information.RetrofitAbout the installation.
[0002]
[Prior art]
2. Description of the Related Art A code conversion method of obtaining input information by performing code conversion on input information using a conversion table such as an S box for generating encrypted communication and identification information has been conventionally known. FIG. 6 shows an example of a conventional code conversion method. That is, at the time of encoding, as shown in FIG. 3A, the input information P consisting of a set of a certain number (or a symbol or the like) is converted into another set of a number (or a symbol or the like) using the conversion table 11. Is converted into output information C composed of By using the conversion table 11, for example, the number “0” in the input information P becomes “1”, “1” becomes “4”, “2” becomes “0”, and “3” becomes “8”. ".
[0003]
At the time of decoding, the output information C is converted into the original input information P using the conversion table 12, as shown in FIG. That is, by using the conversion table 12, for example, the number “1” in the input information C becomes “0”, “4” becomes “1”, “0” becomes “2”, and “8” becomes It is converted to the original input information P and output as "3".
[0004]
[Problems to be solved by the invention]
However, conventionally, the method of selecting the values of the conversion tables 11 and 12 is not particularly determined, and depending on the setting positions of the numbers (or symbols, etc.) in the conversion tables 11 and 12, the conversion results may be biased by the bias of the conversion result. It did not necessarily affect the properties.
[0005]
The present invention has been made in view of the above points, and a code conversion that can disperse a conversion result by unifying the arrangement of numbers and symbols in a conversion table.RetrofitThe purpose is to provide a device.
[0006]
Another object of the present invention is to provide a code conversion that can perform code conversion with a simple configuration using a magic square.RetrofitTo provide a location.
[0007]
[Means for Solving the Problems]
2. The code conversion according to claim 1, wherein the above-mentioned object is achieved.apparatusIs the input information to be transcodedOr the value obtained by subtracting 1 from this value divided by the order n is used as the row position designation information, and the remainder obtained by dividing the value of the input information or the value obtained by subtracting 1 from this value by the order n is given by A matrix designating section as column position designating information and n starting from 0 or 1 Two The magic square of degree n in a two-dimensional arrangement consisting of a series of natural number elements is specified by the row position designation information and the column position designation information, and the magic square element at the designated row position and column position is converted. And an encoding unit that outputs the information.
[0008]
The magic square has a favorable condition in the conversion table that the sum of the two-dimensionally arranged matrix and the elements on the diagonal line is constant, the degree of dispersion of the elements is uniform, and the inverse transformation can be reliably performed. When the degree n increases, the number of the squares increases, and when the square to be used is kept secret, it is difficult to specify which square is used.
[0009]
Therefore, in the present invention, focusing on this advantage, a two-dimensional arrangement magic square is used as a conversion table with input information of a predetermined number of bits, its row position and column position are designated, and the magic position of the designated matrix position is designated. By outputting the elements of the square as conversion information, an information concealment system for the purpose of transmitting or preserving the confidentiality of the contents of the digitized plaintext and identification for the purpose of identifying individuals Applicable to system.
[0015]
In order to achieve the above object,2The transcoder described has n starting from 0 or 1.TwoWhen receiving input information that has been code-converted using an encoding magic square of order n consisting of consecutive natural elements, and dividing the value of the input information or a value obtained by subtracting 1 from the value by the order n Of the input information or the value obtained by subtracting 1 from this value is divided by the degree n,ColumnA matrix designation unit as position designation information and n starting from 0 or 1TwoThe magic square for encoding and the decoding square corresponding to the magic square for two-dimensional arrangement consisting of elements of consecutive natural numbers are designated by row position designation information and column position designation information, and the designated row position and column position And a decoding unit that outputs the element of the magic square as restoration information.According to the present invention, decoding can be performed in the same procedure as that of the code conversion device according to the first aspect, using a decoding square that performs an inverse transform corresponding to a magic square at the time of encoding.
[0016]
In order to achieve the above object,3The transcoder described has n starting from 0 or 1.TwoWith input information that has been code-transformed using an encoding magic square of degree n consisting of elements of consecutive natural numbers, the encoding magic square and the corresponding decoding square are referenced, and the decoding square is A decoding unit that outputs a row position of a value of a certain input information as row position designation information and outputs a column position as column position designation information, and receives the row position designation information and the column position designation information as inputs, and The matrix combining unit outputs a value obtained by multiplying n and adding the value of the column position designation information or a value obtained by adding 1 to the added value as restoration information.In the present invention, the same magic square as the encoding square can be used as the decoding square.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments of the present invention will be described with reference to the drawings. FIGS. 1A and 1B are block diagrams of a coding apparatus A according to a first embodiment of the code conversion apparatus according to the present invention and a decoding apparatus B according to a second embodiment. An encoding device A illustrated in FIG. 1A includes an encoding unit a having an encoding magic square M for encoding as a conversion table, and a matrix that specifies a position of a matrix of the encoding unit a based on input information P. It consists of a designation part RC. The matrix specifying unit RC further includes a column position specifying unit RCc and a row position specifying unit RCr.
[0018]
Here, before describing the magic square for encoding M, the basic properties of the magic square will be described. A magic square is formed by arranging continuous natural numbers in a square like a grid, and summing the sum of elements in each row, each column, and portions corresponding to both diagonals. Since the magic square arranges numbers as elements in a square, the number of numbers included in each row, each column, and the portion corresponding to each diagonal line is equal, and a square in which each number of these numbers is n is an nth-order square. Call it the magic square.
[0019]
The number of magic squares with different arrangements is known in the range of 1st to 5th order, but the number of 6th and higher order is not known, and there is no official formula for calculating it. It does not appear to be confirmed. Regarding the conditions for counting the number of magic squares, those that rotate the magic square and have the same arrangement even if the arrangement is different, those that turn the magic square upside down and have the same arrangement, and those that are obtained by combining them, None of them are counted as the same square.
[0020]
If the elements are in the same range, the number of the first magic square is 1, the number of the second magic square is 0, the number of the third magic square is 1, and the number of the fourth magic square is 880. The number of individual, fifth-order magic squares is 35,472,326. 3A and 3B show a third-order magic square, and FIGS. 4A and 4B show two examples of a fourth-order magic square. Only one cubic magic square with a value of 0 to 8 shown in FIG. 3 (a) and one with a value of 1 to 9 shown in FIG. 3 (b) It is.
[0021]
In addition, when the rotation and the flip are counted in the number, there are eight times the number of magic squares in each of the above orders. However, since the primary has only one element, it is excluded from the condition. The elements of the n-th magic square are 1 to n2Assuming that the natural numbers are up to, the sum Sn of all numbers is
Sn = 1 + 2 + 3 +... + N2= N2(N2+1) / 2
It becomes. Also, the sum Ln of the numbers of rows, columns and diagonal elements is:
Ln = Sn / n = n (n2+1) / 2
It becomes.
[0022]
A magic square having such a property is a preferable condition in the conversion table that the sum of the two-dimensionally arranged matrix and the elements on the diagonal lines is constant, the degree of dispersion of the elements is uniform, and the inverse conversion can be performed reliably. In addition, when the degree n increases, the number of the squares increases, and when the square to be used is kept secret, it is difficult to specify which square is used. There is an advantage. Therefore, in the present embodiment, the magic square is used as the conversion table, paying attention to this advantage.
[0023]
That is, in the embodiment of FIG. 1A, the input information P is converted into the row position designation information RP by the row position designation unit RCr of the matrix designation unit RC, and is converted into the column position designation information CP by the column position designation unit RCc. Convert. By specifying the row position and the column position of the magic square M for encoding, the conversion information C is obtained from the magic square M for encoding. Here, the value of the element of the n-th magic square (hereinafter, also simply referred to as the value of the magic square) is from 0 to n.2If −1, the value of the input information P is from 0 to n2−1, the value of the row position designation information RP is the value of the quotient of P / n, and the value of the column position designation information CP is P mod n (the remainder of dividing P by n).
[0024]
The actual values of the row position designation information RP and the column position designation information CP range from 0 to n-1 (the matrix position of the magic square is also designated from 0 row 0 column to n-1 row n-1 column). Here, the output row position designation information RPi of the row position designation unit RCr for the i-th input information Pi is represented by RCr (Pi), and the output column position designation information CPi of the column position designation unit RCc is represented by RCc (Pi). 1A, the encoding unit a of FIG. 1A is configured to specify one of the magic squares M for encoding selected from a plurality of magic squares M by a row position designated by RPi and a designated by CPi. The element Mk (RPi, CPi) at the column position is output as conversion information Ci. When this conversion information Ci is represented by a mathematical expression, the following expression is obtained.
Ci = Mk (RPi, CPi) (1)
[0025]
In the above equation, k of Mk is a number of a conversion table for selecting one as a key from a plurality of magic squares.
[0026]
Also, the value of the magic square M for encoding is 1 to n2, The value of the input information P is from 1 to n2And the value of the row position designation information RP is the value of the quotient of (P-1) / n, and the value of the column position designation information CP is (P-1) mod n (the remainder obtained by dividing P-1 by n). Become. The actual values of RP and CP are from 0 to n-1 (the specification of the matrix position of the magic square is also from 0 row 0 column to n-1 row n-1 column).
[0027]
The value of the magic square M for encoding is 1 to n2In this case, the output row position designation information RPi of the row position designation unit RCr for the i-th input information Pi is represented as RCr (Pi-1), and the output column position designation information CPi of the column position designation unit RCc is RCc (Pi −1), and the encoding unit a in FIG. 1 uses the line position designated by RPi of one encoding magic square M selected from a plurality of magic squares, and the CPi by CPi. The element Mk (RPi, CPi) at the designated column position represented by the expression (1) is output as conversion information Ci.
[0028]
The decoding device B shown in FIG. 1B receives the conversion information C as an input, converts it into row position designation information RP by the row position designation unit RCr of the matrix designation unit RC, and converts the column information by the column position designation unit RCc. In this configuration, the decoding unit b specifies the row position and the column position of the decoding square M ′ to be used as a conversion table in the decoding unit b, and obtains the restoration information D from the decoding square M ′. is there. The decoding square M ′ is a square that performs inverse transformation corresponding to the encoding magic square M. It should be noted that there is always a square for performing the inverse transformation corresponding to the encoding magic square M used for encoding, but this is not necessarily the magic square.
[0029]
The value of this square M ′ is 0 to n2If the value is -1, the value of the conversion information C is 0 to n2The value of the row position designation information RP becomes the value of the quotient of C / n, and the value of the column position designation information CP becomes C mod n (the remainder obtained by dividing C by n). The actual values of RP and CP are from 0 to n-1.
[0030]
Here, the output row position designation information RPi of the row position designation unit RCr for the i-th input conversion information Ci is represented as RCr (Ci), and the output column position designation information CPi of the column position designation unit RCc is represented by RCc (Ci). 1 (b), the decoding unit b of FIG. 1 (b) determines the row position specified by RPi of one magic square M for encoding selected from a plurality of magic squares, and the CPi specified by CPi. The element M′k (RPi, CPi) at the column position thus output is output as restoration information Di. When this restoration information Di is expressed by a mathematical formula, the following formula is obtained.
Di = M'k (RPi, CPi) (2)
[0031]
In the above equation, k of M'k is the number of a conversion table for selecting one as a key from a plurality of squares M 'for decryption.
[0032]
Also, the value of the decoding square M ′ is 1 to n.2, The value of the input conversion information C is 1 to n2And the value of the row position designation information RP is (C-1) / n, and the value of the column position designation information CP is (C-1) mod n (the remainder obtained by dividing C-1 by n). The actual values of RP and CP are from 0 to n-1 (the matrix position of the square is also specified from 0 row 0 column to n-1 row n-1 column).
[0033]
The value of the decoding square M ′ is 1 to n2In this case, the output row position specifying information RPi of the row position specifying unit RCr for the i-th input conversion information Ci is represented as RCr (Ci-1), and the output column position specifying information CPi of the column position specifying unit RCc is , RCc (Ci −1), and the decoding unit b in FIG. 1B is designated by RPi of one decoding square M ′ selected from a plurality of decoding squares. The element Mk (RPi, CPi) represented by the expression (2) at the row position and the column position specified by CPi is output as restoration information Di.
[0034]
FIG. 2 shows a block diagram of a decoding device B 'which is a third embodiment of the code conversion device according to the present invention. The decoding device B ′ combines the decoding unit b ′ that uses the magic square M for encoding used in the encoding device A with the conversion table for decoding, and the positions of the rows and columns of the conversion table. And a matrix synthesizing unit MX for the restoration information D. The matrix synthesizing unit MX includes a row position designation information input unit RCr 'and a column position designation information input unit RCc'.
[0035]
In this embodiment, the value of the magic square M for encoding is specified by the conversion information C, that is, the number of rows and the columns of the magic square M for encoding indicate the same value as the conversion information C. , And the row position designation information RP and the column position designation information CP are obtained, and they are input to the matrix synthesizing unit MX, where they are synthesized to obtain restoration information D.
[0036]
The value of the magic square M for encoding used in the decoding unit b 'is 0 to n2If −1, the value of the conversion information C is 0 to n2-1, and the values of the row position designation information RP and the column position designation information CP range from 0 to n-1 (the matrix position of the magic square is also designated from 0 row 0 column to n-1 row n-1 column). Become).
[0037]
In this embodiment, the output row position specification information RPi of the magic square M for encoding with respect to the i-th input conversion information Ci is multiplied by n, and the output column position specification information of the magic square M for encoding with respect to the input conversion information Ci. The sum of CPi is referred to as restoration information Di. This can be expressed by the following equation.
(RPi, CPi) = Mk-1 (Ci) (3)
Di = MX (RPi, CPi) (4)
[0038]
The arithmetic operation of the matrix synthesizing unit MX generates a binary value in which the value obtained by converting the value of RP into a binary number is on the upper side, and the value obtained by converting the value of CP into a binary number is on the lower side. This is the same as obtaining a value obtained by further converting a value into a decimal number as restoration information D.
[0039]
Also, the value of the magic square M for encoding is 1 to n2, The value of the input conversion information C is 1 to n2And the value of the row position designation information RP and the value of the column position designation information CP are from 0 to n-1 (the matrix position of the magic square is also from 0 row 0 column to n-1 row n-1 column). ). The value of the magic square M for encoding is 1 to n2, The output row position designation information RPi of the magic square M for encoding with respect to the i-th input conversion information Ci is multiplied by n to obtain the output column position designation information CPi of the magic square M for encoding with respect to the input conversion information Ci. A value obtained by further adding 1 to the sum is referred to as restoration information Di. This can be expressed by the following equation.
(RPi, CPi) = Mk-1 (Ci-1) (5)
Di = MX (RPi, CPi) (6)
[0040]
【Example】
Next, embodiments of the present invention will be specifically described. First, regarding the operation of the encoding apparatus A in FIG. 1A, the fourth-order (n = 4) magic square shown in FIGS. 1A and 4A is used as the magic square M for encoding. The case where the input information P is input in the order indicated by the numbers in FIG. First, the value of the first input information P is “5” as shown in FIG. 5A, which is “0101” when represented by 4 bits. , The decimal value “1” of the upper two bits “01” is used as the row position designation information RP, and the decimal value “1” of the lower two bits “01” is used as the column position designation information RP. CP.
[0041]
If the above-described operation of the matrix specifying unit RC is described using the method described in the embodiment, the value of the row position specifying information RP is the value of the quotient of P / n. 1 ”, and the value of the column position designation information CP is P mod n, which is“ 1 ”, which is the remainder of 5/4.
[0042]
The above-described row position designation information RP and column position designation information CP are supplied to the encoding unit a, and are located in the first row and first column of the encoding magic square M (note that the left end and upper end of the encoding magic square M As shown in FIG. 1 (a) and FIG. 4 (a), the value "" is used to specify that the cell at the intersection is the 0th row and the 0th column and the cell at the intersection of the right end and the lower end is the 3rd row and the 3rd column. 6 ”is extracted from the encoding unit a as the conversion information C. Therefore, when the value of the first input information P is “5”, the value of the output conversion information C is “6” as indicated by I in FIG.
[0043]
Next, the value of the second input information P is “12” as shown in FIG. 5A, which is “1100” when represented by 4 bits. In RC, "3" which is a decimal value of upper two bits "11" is used as row position designation information RP, and "0" which is a decimal value of lower two bits "00" is column position designation. Information CP.
[0044]
The above-described row position designation information RP and column position designation information CP are supplied to the encoding unit a and specify the third row and the 0th column of the magic square M for encoding. ), The value “0” is extracted from the encoding unit a as the conversion information C. Therefore, when the value of the second input information P is “12”, the value of the output conversion information C is “0” as indicated by II in FIG. 5A.
[0045]
Hereinafter, in the same manner as above, as shown in FIG. 5A, when the value of the third input information P is “1”, the row position designation information RP is “0”, and the column position designation information CP is It is “1”, the value of the conversion information C is “8”, and when the value of the fourth input information P is “15”, the row position designation information RP is “3” and the column position designation information CP is “3”. 3 ", the value of the conversion information C is" 12 ", and when the value of the fifth input information P is" 7 ", the row position designation information RP is" 1 "and the column position designation information CP is" 3 ". ”, And the value of the conversion information C is“ 1 ”.
[0046]
Next, regarding the operation of the decoding device B in FIG. 1B, the fourth-order (n = 4) square shown in FIGS. 1B and 4B is used as the decoding square M ′, The case where the conversion information C is input in the order indicated by the numbers in FIG. 5B will be described. Here, the decoding square M ′ shown in FIGS. 1B and 4B performs an inverse transform corresponding to the encoding magic square M shown in FIGS. 1A and 4A. The square to do.
[0047]
First, the value of the first input conversion information C is "6" as shown in FIG. 5 (b), which is "0110" when represented by 4 bits. In the RC, "1" which is a decimal value of the upper two bits "01" is used as row position designation information RP, and "2" which is a decimal value of the lower two bits "10" is column position designation. Information CP.
[0048]
The operation of the matrix specifying unit RC will be described in the method described in the embodiment. The value of the row position specifying information RP is the value of the quotient of C / n, and the value of the row position specifying information RP is the remainder. , C / n with C = 6 and n = 4, the value of the row position designation information RP becomes “1” and the value of the row position designation information RP becomes “2”.
[0049]
The above-described row position designation information RP and column position designation information CP are supplied to the decoding unit b, and are stored in the first row and second column of the decoding square M ′ (note that the left end and the top end of the decoding square M ′ As shown in FIGS. 1 (b) and 4 (b), since the cell at the intersection is the 0th row and the 0th column and the cell at the intersection between the right end and the lower end is the 3rd row and the 3rd column, 5 ”is extracted from the decoding device b as the restoration information D. Therefore, when the value of the first input conversion information C is “6”, the value of the output restoration information D is “5” as indicated by III in FIG. 5B.
[0050]
Next, the value of the second input conversion information C is “0” as shown in FIG. 5B, which is “0000” when represented by 4 bits. In the unit RC, “0” which is a decimal value of the upper two bits “00” is used as the row position designation information RP, and “0” which is a decimal value of the lower two bits “00” is the column position. As shown in FIG. 1 (b) and FIG. 4 (b), the value “12” is supplied to the decoding unit b as the designation information CP and designates the 0th row and the 0th column of the decoding square M ′. Is extracted from the decoding device b as the restoration information D. Therefore, when the value of the second input conversion information C is “0”, the value of the output restoration information D is “12” as indicated by IV in FIG. 5B.
[0051]
Thereafter, similarly to the above, as shown in FIG. 5B, when the value of the third input conversion information C is “8”, the row position designation information RP is “2”, and the column position designation information CP Is “0”, the value of the restoration information D is “1”, and when the value of the fourth input conversion information C is “12”, the row position designation information RP is “3” and the column position designation information CP Is “0”, the value of the restoration information D is “15”, and when the value of the fifth input conversion information C is “1”, the row position designation information RP is “0” and the column position designation information CP Is “1”, and the value of the restoration information D is “7”.
[0052]
As can be seen by comparing FIGS. 5A and 5B, the information P input to the encoding device A is decoded by the decoding device B and extracted as restoration information D.
[0053]
Next, regarding the operation of the decoding device B ′ shown in FIG. 2, the fourth-order (n = 4) square shown in FIGS. 2 and 4A is used as the decoding square M, and FIG. The case where the conversion information C is input in the order indicated by the numbers in ()) will be described. Here, the decoding square M shown in FIG. 2 and FIG. 4A is the same magic square as the encoding magic square M shown in FIG.
[0054]
First, the value of the first input conversion information C is “6” as shown in FIG. 5C, and the 1st row and 1st column where the value “6” of the magic square M used in the decoding unit b ′ is located Since an eye is detected, “1” is set as the row position designation information RP, and “1” is set as the column position designation information CP. The row position designation information RP and the column position designation information CP are supplied to the matrix synthesizing unit MX, where the row position designation information RP is set to the upper 2 bits and the column position designation information CP is set to the lower 2 bits “0101”. To obtain a decimal number “5”, which is extracted as restoration information D. Therefore, when the value of the first input conversion information C is “6”, the value of the output restoration information D is “5” as indicated by V in FIG.
[0055]
The operation of the matrix synthesizing unit MX will be described using the method described in the embodiment. The restoration information D is obtained by multiplying the output row position designation information RP of the magic square M for encoding with respect to the input conversion information C by n. Since the output column position designation information CP of the magic square M for encoding with respect to the conversion information C is added, here, since RP = 1, n = 4, and CP = 1, the restoration information D is “5”. (= 1 × 4 + 1).
[0056]
Next, the value of the second input conversion information C is “0” as shown in FIG. 5C, and the third row 0 where the value “0” of the magic square M used in the decoding unit b ′ is located Since the column is detected, “3” is set as the row position specifying information RP, and “0” is set as the column position specifying information CP. The row position designation information RP and the column position designation information CP are supplied to the matrix synthesizing unit MX, where the row position designation information RP is set to the upper 2 bits and the column position designation information CP is set to the lower 2 bits “1100”. To obtain a decimal number “12”, which is extracted as restoration information D.
[0057]
In other words, since RP = 3, n = 4, and CP = 0, the restoration information D is “12” (= 3 × 4 + 0). Accordingly, when the value of the second input conversion information C is “0”, the value of the output restoration information D is “12” as indicated by VI in FIG. 5C.
[0058]
Thereafter, similarly to the above, as shown in FIG. 5C, when the value of the third input conversion information C is “8”, the row position designation information RP is “2”, and the column position designation information CP Is “0”, the value of the restoration information D is “1”, and when the value of the fourth input conversion information C is “12”, the row position designation information RP is “3” and the column position designation information CP Is “0”, the value of the restoration information D is “15”, and when the value of the fifth input conversion information C is “1”, the row position designation information RP is “0” and the column position designation information CP Is “1”, and the value of the restoration information D is “7”.
[0059]
As can be seen by comparing FIGS. 5A and 5C, the information P input to the encoding device A is decoded by the decoding device B ′ and taken out as restoration information D.
[0060]
The present invention is not limited to the above embodiment, and the magic square used as the conversion table may be another fourth-order magic square or a fifth-order magic square.
[0061]
【The invention's effect】
As explained above, the claims1According to the described invention, since the magic square is applied to the conversion table for performing the block coding method for the encryption communication or the creation of the authentication information, the sequence of the numbers in the conversion table is configured by a simple device. , The information of the operation result can be dispersed, and accurate and quick code conversion can be performed. In addition, since the number of magic squares to be selected increases drastically with the increase of the degree n of the magic square, it is possible to dramatically increase the esotericity, and to dramatically increase the use value and the use effect of the magic square. Can be.
[0062]
Claims2According to the described invention, since a decoding square for performing an inverse transformation corresponding to a magic square for encoding is used, accurate and quick decoding can be performed, and the claims can be made.1Decoding can be performed by the same procedure and configuration as described above.
[0064]
Claims3According to the described invention, since the same magic square as the encoding magic square is used as the conversion table for decoding, accurate and quick decoding can be performed without preparing a new square for decoding. .
[Brief description of the drawings]
FIG. 1 is a block diagram of first and second embodiments of the present invention.
FIG. 2 is a block diagram of a third embodiment of the present invention.
FIG. 3 is a diagram illustrating each example of a third-order magic square;
FIG. 4 is a diagram showing a fourth-order magic square used in the embodiment of the present invention.
FIG. 5 is a diagram showing each example of input information, row position designation information, column position designation information, and restoration information used in each embodiment of the present invention.
FIG. 6 is an explanatory diagram of an example of a conventional code conversion method.
[Explanation of symbols]
A coding device
a Encoding unit
B, B 'decoding device
b, b 'decoding unit
Magic square for encoding M
M 'decryption square
RC matrix designator
RCr line specification section
RCc column designation section
RP line position specification information
CP column position specification information
MX matrix synthesis unit

Claims (3)

符号変換する入力情報の値又はこの値から1を引いた値を次数nで除算した時の商を行位置指定情報とし、前記入力情報の値又はこの値から1を引いた値を次数nで除算した時の余りを位置指定情報とする行列指定部と、
0又は1から始まるn2個の連続した自然数の要素からなる2次元配置の、次数nの魔方陣を、前記行位置指定情報と列位置指定情報で指定して、指定された行位置と列位置の前記魔方陣の要素を変換情報として出力する符号化部と
を有することを特徴とする符号変換装置。
The quotient obtained by dividing the value of the input information to be code-converted or the value obtained by subtracting 1 from this value by the order n is defined as the row position designation information, and the value of the input information or the value obtained by subtracting 1 from the value is the order n. A matrix designation unit that sets the remainder after division as column position designation information;
Two n starting from 0 or 1 consecutive 2-dimensional arrangement consisting of a natural number of elements, the magic square of order n, and designated by the row position specifying information and column position specifying information, specified line position and column A coding unit that outputs an element of the magic square at a position as conversion information.
0又は1から始まるn2個の連続した自然数の要素からなる次数nの符号化用魔方陣を用いて符号変換された入力情報を受け、該入力情報の値又はこの値から1を引いた値を次数nで除算した時の商を行位置指定情報とし、前記入力情報の値又はこの値から1を引いた値を次数nで除算した時の余りを位置指定情報とする行列指定部と、
0又は1から始まるn2個の連続した自然数の要素からなる2次元配置の、前記符号化用魔方陣と対応する復号化用方陣を、前記行位置指定情報と列位置指定情報で指定して、指定された行位置と列位置の前記魔方陣の要素を復元情報として出力する復号化部と
を有することを特徴とする符号変換装置。
Receives input information that has been code-converted using an encoding magic square of degree n consisting of n 2 consecutive natural numbers starting from 0 or 1, and the value of the input information or a value obtained by subtracting 1 from this value And a matrix specifying unit that sets a quotient obtained by dividing the input information by the order n as row position specifying information, and sets a remainder obtained by dividing the value of the input information or a value obtained by subtracting 1 from the value by the order n as column position specifying information. ,
The decoding square corresponding to the magic square for encoding and the decoding square corresponding to the two-dimensional arrangement of n 2 consecutive natural numbers starting from 0 or 1 are designated by the row position designation information and the column position designation information. A decoding unit that outputs, as restoration information, an element of the magic square at a specified row position and column position as restoration information.
0又は1から始まるn2個の連続した自然数の要素からなる次数nの符号化用魔方陣を用いて符号変換された入力情報で、前記符号化用魔方陣と対応する復号化用方陣を参照し、該復号化用方陣にある前記入力情報の値の行位置を行位置指定情報とし、列位置を列位置指定情報として出力する復号化部と、
前記行位置指定情報と前記列位置指定情報とを入力として受け、前記行位置指定情報にnを掛けて、前記列位置指定情報の値を加算した値、又はこの加算値に更に1を加算した値を復元情報として出力する行列合成部と
を有することを特徴とする符号変換装置。
Input information that is code-converted using an encoding magic square of degree n consisting of n 2 consecutive natural numbers starting from 0 or 1, and refer to the decoding magic square corresponding to the encoding magic square. A decoding unit that outputs a row position of the value of the input information in the decoding square as row position designation information, and outputs a column position as column position designation information;
The row position designation information and the column position designation information are received as inputs, the row position designation information is multiplied by n, and the value of the column position designation information is added, or 1 is further added to the added value. A code synthesizing unit that outputs a value as restoration information.
JP36040799A 1999-12-20 1999-12-20 Code conversion device Expired - Fee Related JP3573672B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP36040799A JP3573672B2 (en) 1999-12-20 1999-12-20 Code conversion device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP36040799A JP3573672B2 (en) 1999-12-20 1999-12-20 Code conversion device

Publications (2)

Publication Number Publication Date
JP2001175166A JP2001175166A (en) 2001-06-29
JP3573672B2 true JP3573672B2 (en) 2004-10-06

Family

ID=18469281

Family Applications (1)

Application Number Title Priority Date Filing Date
JP36040799A Expired - Fee Related JP3573672B2 (en) 1999-12-20 1999-12-20 Code conversion device

Country Status (1)

Country Link
JP (1) JP3573672B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2182709A1 (en) * 2001-07-09 2003-03-01 Crespo Jose Agustin Franc Vega Portable system for storing and emitting pre-established codes for authentication purposes and the authentication method used
JP4554851B2 (en) * 2001-09-03 2010-09-29 文男 益冨 Security-enhanced communication system using a magic sequence
EP1527551A2 (en) * 2002-07-27 2005-05-04 XStream Security Solutions Ltd., LLC Apparatus and method for encryption and decryption
US9292259B2 (en) * 2008-08-06 2016-03-22 Cassy Holdings Llc Uncertainty random value generator

Also Published As

Publication number Publication date
JP2001175166A (en) 2001-06-29

Similar Documents

Publication Publication Date Title
US6298136B1 (en) Cryptographic method and apparatus for non-linearly merging a data block and a key
Rueppel Correlation immunity and the summation generator
KR100415410B1 (en) Encryption device and method, arithmetic unit, and decryption device and method
KR101246490B1 (en) A closed galois field cryptographic system
US6891950B1 (en) Extended key generator, encryption/decryption unit, extended key generation method, and storage medium
CN101099329B (en) New trapdoor one-way function on elliptic curves and their applications to shorter signatures and asymmetric encryption
US7801307B2 (en) Method of symmetric key data encryption
CN100466514C (en) Weighted secret key sharing and reconstructing method
CN107239709A (en) A kind of method of New chaotic image encryption, apparatus and system
US8331559B2 (en) Diffused data encryption/decryption processing method
US20020006196A1 (en) Extended key preparing apparatus, extended key preparing method, recording medium and computer program
CN111245598B (en) Method for realizing lightweight AEROGEL block cipher
US7680270B2 (en) System for elliptic curve encryption using multiple points on an elliptic curve derived from scalar multiplication
Aslan et al. Algebraic construction of cryptographically good binary linear transformations
CN115766190A (en) Random set element encryption method, random set element decryption method and electronic equipment
JP3573672B2 (en) Code conversion device
KR100309565B1 (en) A method for data encryption using feistel network
Malik et al. Analysis of traditional and modern image encryption algorithms under realistic ambience
Tabash et al. Image encryption algorithm based on chaotic map
Debbarma et al. 2D Chaos based color image encryption using pseudorandom key generation
US20060078107A1 (en) Diffused data encryption/decryption processing method
Ramírez Torres et al. Partial image encryption using cellular automata
EP1043863B1 (en) Method for the cryptographic conversion of L-bit input blocks of digital data info into L-bit output blocks
Malik et al. Assessment of diverse image encryption mechanisms under prevalent invasion
Deepthi et al. Image processing in encrypted domain for distributed storage in cloud

Legal Events

Date Code Title Description
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: 20040601

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040629

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3573672

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

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: 20080709

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20090709

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20090709

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100709

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20110709

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20110709

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120709

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120709

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130709

Year of fee payment: 9

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees