JP5073635B2 - Cryptographic system and cryptographic program - Google Patents

Cryptographic system and cryptographic program Download PDF

Info

Publication number
JP5073635B2
JP5073635B2 JP2008286011A JP2008286011A JP5073635B2 JP 5073635 B2 JP5073635 B2 JP 5073635B2 JP 2008286011 A JP2008286011 A JP 2008286011A JP 2008286011 A JP2008286011 A JP 2008286011A JP 5073635 B2 JP5073635 B2 JP 5073635B2
Authority
JP
Japan
Prior art keywords
data
bytes
divided
byte
value
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
JP2008286011A
Other languages
Japanese (ja)
Other versions
JP2010113168A (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 JP2008286011A priority Critical patent/JP5073635B2/en
Priority to PCT/JP2009/058435 priority patent/WO2010052944A1/en
Publication of JP2010113168A publication Critical patent/JP2010113168A/en
Application granted granted Critical
Publication of JP5073635B2 publication Critical patent/JP5073635B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation

Description

本発明は、暗号システム、及び暗号プログラムに関するものであり、特に、高度な暗号処理によって、暗号文の解読の困難な高い“機密性”を保持し、かつ情報の改竄や破壊等を防ぐ“完全性(正真性)”、及び「なりすまし」等による被害を防ぐ情報の“信頼性”の三つの優れた機能を併せ持つ暗号処理システム等に関するものである。 The present invention is a cryptographic system, relates beauty encryption program, in particular, by sophisticated encryption processing, holds a hard high "secrecy" of decryption of the ciphertext, and prevent tampering of information and destruction " The present invention relates to a cryptographic processing system having three excellent functions of “integrity (integrity)” and “reliability” of information for preventing damage caused by “spoofing”.

近年の情報通信技術の発達及び情報通信機器の高機能化等に伴って、複数のコンピュータ同士をインターネット等の通信回線に接続し、データの送受を行う事が活発にされている。新たな通信手段として利用される電子メール等、金融機関の電算化処理システム等のビジネスでの使用も増えている。一方、家庭では、所謂インターネット通販の利用が増えている。このように各種情報やデータの送受を行う場合、通信経路の途中で第三者によって情報が不正に詐取される危険性がある。そのため、顧客データ等のビジネスにおける重要な情報や、インターネット通販における注文者の住所、氏名、クレジットカード番号等の個人情報を、何ら処理を施すことなく送受することは第三者による不正詐取の可能性が著しく高く、これらの情報をインターネット等の通信回線を通じてそのまま送ることは、情報漏洩の危険性が高く、躊躇することがあった。そこで、各種情報及びデータ等の送受の際には、送り手側で情報等を暗号し、さらに暗号されたデータを受取った受け手側で、認識可能な平文に復号の処理を行うことにより、通信回線を通じて送出される各種情報が、たとえ第三者が入手したとしても暗号データを解読するための鍵を知らない限り、その内容を見ることができず、通信内容の秘匿性及び機密性が保持される。   With the recent development of information communication technology and advanced functions of information communication devices, it has become active to send and receive data by connecting a plurality of computers to a communication line such as the Internet. Business use of electronic processing systems of financial institutions such as e-mails used as new communication means is also increasing. On the other hand, the use of so-called Internet shopping is increasing at home. When various types of information and data are transmitted and received in this way, there is a risk that information is illegally fraudulently obtained by a third party in the middle of the communication path. Therefore, sending and receiving important business information such as customer data, and personal information such as the orderer's address, name, and credit card number in online shopping can be fraudulent by a third party. Therefore, sending these pieces of information as they are through a communication line such as the Internet has a high risk of information leakage, which may be hesitant. Therefore, when various types of information and data are sent and received, the information is encrypted on the sender side, and the recipient side that has received the encrypted data performs decryption processing into plain text that can be recognized. Even if a variety of information sent over the line knows the key for decrypting the encrypted data even if it is obtained by a third party, the contents cannot be seen and the confidentiality and confidentiality of the communication contents are maintained. Is done.

暗号処理の方式は、対称鍵暗号方式(共通鍵暗号方式)及び非対称鍵暗号方式(公開鍵暗号方式)の二つに大別できる。対称暗号方式の場合、暗号化のための暗号鍵と、暗号文を復号し、平文に戻すための復号鍵とが同一であり、送り手側は、暗号文とともに、共通の鍵を秘匿性の高い何らかの手法(Diffe−Hellman鍵共有方式等)で受け手側に送出する必要がある。一方、公開鍵暗号方式は、アルゴリズムとともに公開される公開鍵と、復号者のみが保管する秘密鍵とを用い、相手の公開鍵を使用して送り手側が平文を暗号化し、それを受け手側の秘密鍵で暗号文を復号するものである。共通鍵暗号方式の中には、「ストリーム暗号」と「ブロック暗号」の二つが一般に知られている。ストリーム暗号(Stream Cipher)は、逐次暗号とも呼ばれ、同一の鍵を使用して平文を1ビット単位若しくは1バイト単位で逐次的に処理するものである。そのため、1ビット若しくは1バイトの処理単位で同一処理を繰返し実施することになり、平文及び暗号文の対応関係の類推が比較的容易にできる欠点を有している。その結果、短時間での解読の可能性が示唆されている。なお、ストリーム暗号の一種である「バーナム暗号」は、乱数を用い、平文と同一長さの鍵を生成し、この鍵を1度の使用毎に破棄することにより、対応関係の類推を防止でき、理論的には第三者の解読が不可能であるとされている。しかし、処理毎に平文と同一長さの長大な鍵を生成する煩雑な処理が必要であり、鍵の生成、授受、及び管理等の運用上の課題が多く存在し、実用なものではなかった。   Cryptographic processing methods can be broadly divided into two types: symmetric key cryptography (common key cryptography) and asymmetric key cryptography (public key cryptography). In the case of the symmetric encryption method, the encryption key for encryption and the decryption key for decrypting the ciphertext and returning it to the plaintext are the same, and the sender side uses a secret key together with the ciphertext for confidentiality. It is necessary to send the message to the receiver side by some high technique (Diffe-Hellman key sharing method or the like). On the other hand, the public key cryptosystem uses a public key published together with the algorithm and a private key stored only by the decryptor, and the sender side encrypts the plaintext using the other party's public key, and the receiver side encrypts it. The ciphertext is decrypted with the secret key. Among the common key cryptosystems, there are generally known “stream cipher” and “block cipher”. The stream cipher is also called sequential cipher, and sequentially processes plaintext in units of 1 bit or 1 byte using the same key. For this reason, the same processing is repeatedly performed in 1-bit or 1-byte processing units, and there is a drawback that it is relatively easy to estimate the correspondence between plaintext and ciphertext. As a result, the possibility of decoding in a short time is suggested. In addition, “Burnum cipher”, which is a kind of stream cipher, uses a random number to generate a key with the same length as plaintext, and discards this key every time it is used. It is theoretically impossible for a third party to decipher. However, each process requires complicated processing to generate a long key with the same length as plain text, and there are many operational issues such as key generation, exchange, and management, which are not practical. .

一方、ブロック暗号は、平文を一定数のビットからなるブロックに分割し、該ブロックに対して暗号処理を行う方式である。このとき、ブロック毎に換字処理や転値(シフト)処理等を組合わせることで仮に暗号データの一部についての対応関係が把握できても、暗号文全体の解読を行うことは極めて困難であり、機密性が十分に確保された。しかし、近年のコンピュータの解析能力の向上により、想定可能な全種類の鍵の組合わせを試みる全数探索法(Brute Force Search(Attack))と「差分解読法」や「線形解読法」等を組合わることで数百億から数千億パターンの鍵の中から解読又は解読の可能性を示唆することができ、解読に要する時間は年々短縮化されていた。そのため、将来的には実用的な時間で解読可能と予測され、完全な機密性の保証ができなかった。また、使用される鍵は、半導体チップに記録されていることが多く、暗号及び復号の際に必要に応じて読込まれていた。このときの消費電力や実行時間等の情報(サイドチャネル情報)を計測し、結果を解析することによって鍵を得るサイドチャネル攻撃が提案されている。これにより、半導体チップのメモリ内に記録された鍵であっても、単純電力解析や差分電力解析によるサイドチャネル攻撃によって暗号処理の際の消費電力を示す信号波形の解析によって、鍵の解読がなされ、暗号文の解読が可能となる(例えば、特許文献1参照)。そのため、係る攻撃に対する防御として、サイドチャネル攻撃に対する高耐性を有する暗号方法、暗号装置及び暗号プログラムの開発が行われている(例えば、特許文献2参照)。   On the other hand, the block cipher is a method in which plaintext is divided into blocks each having a certain number of bits and cryptographic processing is performed on the blocks. At this time, it is extremely difficult to decipher the entire ciphertext even if the correspondence of a part of the encrypted data can be grasped by combining substitution processing, shift value processing, etc. for each block. , Confidentiality was ensured enough. However, due to recent improvements in computer analysis capabilities, a combination of the full search method (Brute Force Search (Attack)), which tries to combine all types of keys that can be assumed, and "differential cryptanalysis", "linear cryptanalysis", etc. As a result, it is possible to indicate the possibility of decryption or decryption from keys of hundreds to hundreds of billions of patterns, and the time required for decryption has been shortened year by year. For this reason, it was predicted that it could be decrypted in a practical time in the future, and complete confidentiality could not be guaranteed. In addition, the key to be used is often recorded on a semiconductor chip, and is read as necessary during encryption and decryption. A side channel attack that obtains a key by measuring information (side channel information) such as power consumption and execution time at this time and analyzing the result has been proposed. As a result, even if the key is recorded in the memory of the semiconductor chip, the key is decrypted by analyzing the signal waveform indicating the power consumption during the encryption process by side channel attack using simple power analysis or differential power analysis. The ciphertext can be decrypted (see, for example, Patent Document 1). For this reason, as a defense against such an attack, an encryption method, an encryption device, and an encryption program having high resistance against a side channel attack have been developed (see, for example, Patent Document 2).

特開2001−268072号公報JP 2001-268072 A 特開2008−141385号公報JP 2008-141385 A

暗号処理は、暗号化によって情報についての秘匿性及び機密性を確保し、通信過程で第三者によって何らかの改竄がなされ、正しいデータでない可能性を排除するためデータの完全性を保証する機能が求められ、第三者の所謂「なりすまし」等を防ぐための信頼性が求められていた。しかし、この三つの機能・特徴を合わせ持つ暗号アルゴリズムは従来において確認されておらず、上述のストリーム暗号方式及びブロック暗号方式の双方の利点を有する暗号アルゴリズムはなかった。そこで、本発明は、上記実情に鑑み、ストリーム暗号及びブロック暗号の双方の利点を有する新規なアルゴリズムを用いて構成された暗号システム、及び暗号プログラムの提供を課題とするものである。 Cryptographic processing requires a function that guarantees the integrity of data in order to ensure the confidentiality and confidentiality of information through encryption, and to prevent the possibility of incorrect data being altered by a third party in the course of communication. Therefore, there is a need for reliability to prevent so-called “spoofing” by a third party. However, an encryption algorithm having these three functions and features has not been confirmed in the past, and there has been no encryption algorithm having the advantages of both the stream encryption method and the block encryption method. The present invention has been made in view of the above circumstances, in which the cryptographic system configured using the novel algorithm having both benefits of stream cipher and block cipher, to provide beauty encryption program and an object.

上記の課題を解決するための構成である暗号対象データ取得手段とは、任意のバイト数の共通鍵データ及び暗号対象データを取得するものであり、例えば、暗号作成者がキーボード等から直接入力するもの、或いはメモリ等の記憶手段に記憶されたデータを読込むことで取得するものであってもよい。なお暗号対象データは、平文でも、最低一回以上の暗号処理が施されたもののいずれであっても構わない。また、共通鍵データ及び暗号対象データは、各々任意のバイト数で構成され、両者を合算した合算バイト数を基数で除算することによって第一データが生成される。ここで、基数(または底)とは、位取り記数法で指定された自然数Nをいい、例えば、10進数の場合、N=10であり、8進数の場合、N=8である。すなわち、ビットによって表すことの可能な数(通り)を示し、例えば、3ビットの場合、8進数として8通りとなり、4ビットの場合、16進数として16通りとなる。なお、第一データは、小数点以下第一位を四捨五入することによって整数の値が指定される。   The encryption target data acquisition means, which is a configuration for solving the above problem, is for acquiring common key data and encryption target data of an arbitrary number of bytes. For example, the encryption creator inputs directly from a keyboard or the like. Or data obtained by reading data stored in a storage means such as a memory. The encryption target data may be either plain text or data subjected to at least one encryption process. The common key data and the encryption target data are each composed of an arbitrary number of bytes, and the first data is generated by dividing the total number of bytes obtained by adding both together by the radix. Here, the radix (or base) refers to a natural number N specified by a scale system, for example, N = 10 in the case of a decimal number and N = 8 in the case of an octal number. That is, it indicates the number (street) that can be represented by bits. For example, in the case of 3 bits, there are 8 octal numbers, and in the case of 4 bits, 16 hexadecimal numbers. The first data is specified as an integer value by rounding off the first decimal place.

データ取得手段とは、共通鍵データを構成するバイトの任意位置のバイト(例えば、最上位バイト)のバイト値データを取得し、さらに、任意バイトを構成するビットで、規定された任意の位置及び桁数(例えば、下3桁)のビット値データを取得するものである。1バイト=8ビットとした場合、下3桁の値は、2の3乗、すなわち、0〜7の何れかの値を2進法で表したものとなる。なお、バイト値データ等は予測不能な値であり、これを変数として使用することにより、暗号処理の乱数として使用できる。さらに、分割手段とは、共通鍵データ及び暗号対象データを構成するそれぞれのバイト数長さを対比し、何れか一方の長いバイト数のデータを分割し、他方の短いバイト数の短データ(共通鍵データまたは暗号対象データ)のバイト数長さと合わせた分割データ、及び、その余からなる分割余データを生成するものである。   The data acquisition means acquires byte value data of a byte at an arbitrary position (for example, the most significant byte) constituting the common key data, and further, an arbitrary position specified by a bit constituting the arbitrary byte and The bit value data of the number of digits (for example, the last 3 digits) is acquired. When 1 byte = 8 bits, the value of the last three digits is the cube of 2, that is, any value from 0 to 7 is represented in binary. Byte value data or the like is an unpredictable value, and can be used as a random number for cryptographic processing by using this as a variable. Further, the dividing means compares the lengths of the respective bytes constituting the common key data and the data to be encrypted, divides one of the long bytes of data, and the other of the short bytes of the short data (common The divided data combined with the length of the number of bytes of the key data or the encryption target data) and the divided remainder data including the remainder are generated.

さらに、ビット値データに基づいてデータ単位またはバイト単位で転値処理が行われる(転値手段)。例えば、ビット値データがn=2の場合、各バイト(ビット)をそれぞれ2つシフト(最上位側から最下位側等)する。これにより、データ等の並びが所定の値(ビット値データ)に基づいてずれる。ビット値データの値は、任意バイトの任意桁数(下3桁等)から求められる予測不可能な値である。その後、同一のバイト数長さに揃えた分割データ及び短データを規定の加算処理をすることにより、分割データ及び短データのバイト数の合計バイト数の加算データが生成される。ここで、加算処理の加算順序及び並び順は、加算規則に基づいて任意に規定されるため、加算データの各値から元の値を予測することは困難となる。例えば、8ビットの加算処理の場合、加算する値を“A”,“B”とすると、A+B≦255の場合、加算された値がそのまま加算結果として求められ、A+B>255の場合、A+B−255の値が加算結果として求められる。すなわち、多数の組合わせの可能性がある加算結果からは、“A”及び“B”を予測することは困難であり、仮に加算結果のみが第三者に漏出したとしても、“A”及び“B”の値を特定することは不可能となる。なお、上記は8ビットの場合を想定し、繰上がりの最大値を255としているが、1バイトをXビットとした場合には、“2のX乗−1”で最大値が表される。   Further, a value conversion process is performed in units of data or bytes based on the bit value data (value conversion means). For example, when the bit value data is n = 2, each byte (bit) is shifted by two (from the most significant side to the least significant side, etc.). Thereby, the arrangement of data and the like is shifted based on a predetermined value (bit value data). The value of the bit value data is an unpredictable value obtained from an arbitrary number of digits (lower 3 digits, etc.) of an arbitrary byte. After that, the divided data and the short data having the same number of bytes are subjected to a prescribed addition process, thereby generating addition data of the total number of bytes of the divided data and the short data. Here, since the addition order and arrangement order of the addition processing are arbitrarily defined based on the addition rule, it is difficult to predict the original value from each value of the addition data. For example, in the case of 8-bit addition processing, assuming that the values to be added are “A” and “B”, if A + B ≦ 255, the added value is directly obtained as the addition result, and if A + B> 255, A + B− A value of 255 is obtained as the addition result. That is, it is difficult to predict “A” and “B” from the addition results having a large number of combinations, and even if only the addition results leak to a third party, It is impossible to specify the value of “B”. The above assumes the case of 8 bits and the maximum carry value is 255. However, when 1 byte is X bits, the maximum value is represented by “2 to the power of X−1”.

すなわち、繰上げ分を所謂「桁落ち」する処理により、加算結果自体が偶発的な意味を有する値となり、解読を困難なものとしている。このとき、加算処理及び加算規則において、分割データ及び短データのそれぞれの任意位置(例えば、分割データの最上位バイト及び短データの最下位バイト)を基準点として設定し、これらを共通鍵データから求めたバイト値データmと排他的論理和(XOR)を計算することにより、共通鍵データ自体を取得しない限り、解読が不可能となり、解読の困難性をさらに高めている。特に基準点の位置は、第三者にとって想定不能であるため、より解読が困難となっている。また、分割余データの各ビット値を“1”→“0”、“0”→“1”のように、反転処理し、加算データの先頭または末尾のバイト端に結合することにより、共通鍵データ及び暗号対象データを合算した合算バイト数と同じバイト数の暗号データが生成される。係る暗号処理は、上述したように、分割処理、任意の値(ビット値データ)に基づく転値処理、反転処理、加算処理、及び結合処理により構築されているため、仮に一部の対応関係が外部に漏出し、解読されても、暗号データ全体としての解読を進めることは困難である。特に、暗号データを復号する場合には、各処理を逆から順次行う必要があり、処理の順番及び復号処理が正しくなければ最終的に平文に到達することができない。そのため、本システムによる平文等の暗号対象データの暗号処理は十分に機密性の高いものとなる。   That is, the so-called “digit removal” processing of the carry is made, and the addition result itself becomes a value having an accidental meaning, making it difficult to decipher. At this time, in the addition process and the addition rule, arbitrary positions of the divided data and the short data (for example, the most significant byte of the divided data and the least significant byte of the short data) are set as reference points, and these are determined from the common key data. By calculating the obtained byte value data m and exclusive OR (XOR), it becomes impossible to decrypt unless the common key data itself is obtained, and the difficulty of decryption is further increased. In particular, since the position of the reference point cannot be assumed by a third party, it is more difficult to decipher. In addition, each bit value of the divided remainder data is inverted like “1” → “0”, “0” → “1”, and combined with the leading or trailing byte end of the added data, thereby sharing the common key. Encryption data having the same number of bytes as the total number of bytes obtained by adding the data and encryption target data is generated. As described above, the encryption process is constructed by the division process, the transposition process based on an arbitrary value (bit value data), the inversion process, the addition process, and the combination process. Even if it is leaked outside and decrypted, it is difficult to proceed with decryption of the entire encrypted data. In particular, when decrypting encrypted data, it is necessary to perform each process sequentially from the reverse, and if the order of the processes and the decryption process are not correct, the plaintext cannot finally be reached. Therefore, the encryption processing of encryption target data such as plain text by this system is sufficiently confidential.

さらに、本発明の暗号システムにおける回数データ取得手段とは、暗号処理の繰返回数を回数データとして取得するものである。なお、繰返回数の数が多ければ、より解読が困難となるものの、暗号及び復号のそれぞれの処理に要する時間が多大となり、実用的な回数データを指定することが好ましい。一方、第二データ生成手段とは、生成された第一データをさらに基数で除算することによって第二データを求めるものである。ここで、第二データは、除算結果を小数点以下第一位で四捨五入した整数値として求められる。なお、除算結果が1未満の場合は、1に近似する処理を行っても構わない。係る第二データの値は、分割位置データの決定のために、ビット値データの加算を繰返す回数を指定するものとして使用される。この値も予測不可能であり、乱数値として暗号処理に導入される。   Furthermore, the number-of-times data acquisition means in the encryption system of the present invention acquires the number of repetitions of encryption processing as number-of-times data. Note that if the number of repetitions is large, decryption becomes more difficult, but the time required for each of the encryption and decryption processes increases, and it is preferable to specify practical number data. On the other hand, the second data generation means obtains second data by further dividing the generated first data by the radix. Here, the second data is obtained as an integer value obtained by rounding off the division result to the first decimal place. If the division result is less than 1, processing that approximates 1 may be performed. The value of the second data is used to specify the number of times to repeat the addition of the bit value data in order to determine the division position data. This value is also unpredictable and is introduced into the cryptographic process as a random value.

さらに、データ指定手段とは、共通鍵データ及び暗号対象データ(暗号データ)が同一バイト数であり、各バイト数の差異に基づく分割処理が行えない、または暗号データが偶数で構成され、等分割によって同一バイト数の一対の等分割データとして生成されるときには、バイト数の長さで長データ及び短データを特定することができない。そこで、何れか一方を長データ及び他方を短データに指定することにより、事後の暗号処理を可能にできる。なお、係る指定を行わず、次処理を実行するものであっても構わない。分割位置生成手段は、第一データとビット値データの積算値を求め、さらに得られた積算値に生成された第二データの値によって指定される回数分、任意バイト(通常は最上位バイト)の次位置に相当する次位置バイト(例えば、下位バイト)へ移行し、位置バイトのビット値データの加算を繰返して分割位置データを生成するものであり、暗号分割手段によって暗号データの最上位バイトまたは最下位バイト側から、該分割位置データに基づいて、長データ及び短データに分割して生成するものである。すなわち、分割位置生成手段は、上記処理により、既に最低一度は暗号処理がなされた暗号データを再び分割し、暗号処理を繰返すために行うものである。このとき、分割位置データは、任意のビット値データを利用して求められているため、暗号データの分割位置も予測することのできないものとなる。   Furthermore, the data designating means means that the common key data and the data to be encrypted (encrypted data) have the same number of bytes and cannot be divided based on the difference in the number of bytes, or the encrypted data is composed of an even number and is divided equally. Therefore, long data and short data cannot be specified by the length of the number of bytes. Therefore, by designating either one as long data and the other as short data, post-encryption processing can be performed. Note that the next process may be executed without performing such designation. The division position generation means obtains the integrated value of the first data and the bit value data, and further, arbitrary bytes (usually the most significant byte) for the number of times specified by the value of the second data generated in the obtained integrated value It shifts to the next position byte (for example, the lower byte) corresponding to the next position, and repeats the addition of the bit value data of the position byte to generate the divided position data. The most significant byte of the encrypted data by the encryption dividing means Alternatively, it is generated from the least significant byte side by dividing into long data and short data based on the division position data. In other words, the division position generation means performs the above-described process to divide again the encrypted data that has already been subjected to the cryptographic process at least once and repeat the cryptographic process. At this time, since the division position data is obtained using arbitrary bit value data, the division position of the encrypted data cannot be predicted.

さらに、本発明の暗号システムによれば、復号処理において、暗号処理に使用した共通鍵データ、復号対象の暗号データ、及び暗号処理の繰返回数を示す回数データとを用いて暗号処理の逆の処理を原則として実行することにより、平文からなる暗号対象データに戻すことができる。ここで、共通鍵データの復号者への受渡は特に注意が必要であり、Diffie−Hellmann鍵交換方式のような復号者に限定して共通鍵データが渡るような処理をする必要がある。なお、暗号データは、共通鍵データがない限り、理論的には解読が困難であり、第三者の入手可能性が高い手段(電子メールの添付ファイル)等で送出するものであっても構わない。復号処理において、復号第一データ及び復号第二データは、上述した第一データ等と同一である。復号データ取得手段とは、復号のための基準となるバイト値データ及びビット値データを求めるものであり、繰返回数と共通鍵データのバイト数の長さを対比してバイト値データを取得したバイト(回数バイトまたは余バイト)の位置を特定し(復号データ取得手段)、これに基づいて復号位置データを求めることにより、暗号データを減算前データとその余の復号分割余データに特定し、復号の範囲を指定することができる。その後、暗号処理と基本的に逆の処理となる減算処理、逆転値処理、反転処理、及び結合処理を実行することにより、暗号データを復号データに生成することが可能となる。なお、得られた復号データが未だ暗号処理されている場合には、上記処理を指定された回数だけ繰返すことにより最終的に平文からなる復号データを得ることができる。   Furthermore, according to the encryption system of the present invention, in the decryption process, the reverse of the encryption process is performed using the common key data used for the encryption process, the encryption data to be decrypted, and the count data indicating the number of repetitions of the encryption process. By executing the processing in principle, it is possible to return to the encryption target data consisting of plain text. Here, it is necessary to pay particular attention to the delivery of the common key data to the decryption person, and it is necessary to perform a process for passing the common key data to only the decryption person as in the Diffie-Hellmann key exchange method. The encrypted data is theoretically difficult to decipher unless there is common key data, and may be sent by means (e-mail attachment file) that is highly available to a third party. Absent. In the decoding process, the decoded first data and the decoded second data are the same as the first data described above. Decrypted data acquisition means is for obtaining byte value data and bit value data as a reference for decryption, and acquires byte value data by comparing the number of repetitions with the length of the number of bytes of common key data. By specifying the position of the byte (number of bytes or extra bytes) (decryption data acquisition means) and obtaining the decryption position data based on this, the encrypted data is specified as the data before subtraction and the remainder of the decryption division remainder data, The range of decoding can be specified. Thereafter, it is possible to generate encrypted data as decrypted data by executing a subtraction process, an inverted value process, an inversion process, and a combining process, which are basically the reverse processes of the encryption process. If the obtained decrypted data is still subjected to encryption processing, it is possible to finally obtain decrypted data consisting of plaintext by repeating the above processing a specified number of times.

た、本発明の暗号プログラムは、プログラムを起動することにより、上記の暗号システムにおける暗号コンピュータによって、上述の暗号システムによる作用効果を奏することができる。 Also, the cryptographic program of the present invention, by activating the program, the encryption computer in the encryption system, advantages can be attained by the above-described encryption system.

本発明の効果として、任意のバイト数から構成された共通鍵データを利用し、高度な機密性を有する暗号データを作成することができる。このとき、共通鍵データ及び暗号対象データの分割、第一データ等の取得、転値処理、暗号データの分割位置は、それぞれ任意若しくは予測不能な値で決定されるため、情報の安全性を極めて高いものとすることができる。特に、バイト値データ及びビット値データの取得は、予測不能な偶発的な乱数であり、係る値を暗号処理に利用することにより、分割位置の特定を困難とすることができる。また、加算処理の際の桁落処理により、一部が判明若しくは解読されたとしても、暗号データ全体の解読を行うことが極めて困難となる。   As an effect of the present invention, encrypted data having a high level of confidentiality can be created using common key data composed of an arbitrary number of bytes. At this time, the division of the common key data and the encryption target data, the acquisition of the first data, the transposition processing, and the division position of the encryption data are determined by arbitrary or unpredictable values, respectively, and thus the security of information is extremely high. Can be expensive. In particular, acquisition of byte value data and bit value data is an unpredictable accidental random number, and the use of such values for cryptographic processing can make it difficult to specify the division position. In addition, even if a part is found or decrypted by the digit processing during the addition process, it is extremely difficult to decrypt the entire encrypted data.

以下、本発明の一実施形態である暗号システム1(以下、「システム1」と称す)について、図1乃至図8に基づいて説明する。図1及び図2は本実施形態のシステム1の暗号処理及び復号処理に係る機能的構成を示すブロック図であり、図3,図4乃至図6,図7は暗号処理及び復号処理のアルゴリズムを模式的に示す説明図であり、図5,図8は暗号処理及び復号処理の流れを示すフローチャートである。システム1は、高度な処理能力を有するワークステーション等から構築される暗号コンピュータ2(以下、「暗号PC2」と称す)によって主に構成されている。暗号PC2は、内部に格納された暗号プログラム3によって、暗号PC2をシステム1として機能させることができる。暗号PC2は、図1及び図2に示すように、平文を暗号文等に変換する暗号処理に係る暗号処理機能4及び暗号文を平文に変換する復号処理に係る復号処理機能5に大別された二つの機能から構成されている。暗号処理機能4(図1参照)は、暗号処理の繰返回数を示す回数データRDを取得する回数データ取得手段11を一部機能として有し、共通鍵データK及び平文または既暗号処理の暗号文からなる暗号対象データFDをそれぞれ取得する暗号対象データ取得手段12と、第一データFA、及び該第一データFAから第二データSAを生成する第二データ生成手段13を含んでいる割合生成手段14と、共通鍵データKからバイト値データm及びビット値データnを取得するデータ取得手段15と、共通鍵データK及び暗号対象データFDのバイト数に基づいて分割データDV及び分割余データLOを生成する分割手段16と、分割データDVをデータ単位等で、ビット値データnの値に基づいて転値処理する転値手段17と、転値処理後の分割データDV’及び短データSN(図2参照)を予め規定した加算規則に則って加算処理し、分割データDV’及び短データSNを合計したバイト数の加算データADを生成する加算手段18と、分割余バイトLOを反転処理し、生成された反転データINを加算データADの最上位バイト19aのバイト端に結合し、暗号データEを生成する暗号生成手段21とを具備している。分割手段16の中には、共通鍵データK及び暗号対象データFDが同一バイト数で構成されている、または暗号処理後の暗号データEを同一バイト数の一対の等分割データEQで分割する場合、何れか一方の共通鍵データK及び暗号対象データFD若しくは等分割データEQを分割データDVとして指定し、他方を短データSNとして指定するデータ指定手段22と、第一データFAとビット値データnを積算し、得られた積算値に生成された第二データSAの値によって指定される回数分、任意バイト(共通鍵データKの最上位バイト23a)の次位置に相当する次位置バイト23bから下位バイト23c,23dへの移行及び下位バイトのビット値データnの加算を繰返して分割位置データDPを生成する分割位置生成手段25及び分割位置データDPに基づいて暗号データEを最下位バイト24側から分割し、長データLN(図4参照)及び短データSNを生成する暗号分割手段27を有し、取得した回数データRDによって暗号処理を繰返す暗号処理繰返手段28をさらに有している。   Hereinafter, an encryption system 1 (hereinafter referred to as “system 1”) according to an embodiment of the present invention will be described with reference to FIGS. 1 and 2 are block diagrams showing a functional configuration related to encryption processing and decryption processing of the system 1 of this embodiment, and FIGS. 3, 4 to 6 and 7 show algorithms for encryption processing and decryption processing. FIG. 5 and FIG. 8 are flowcharts showing the flow of encryption processing and decryption processing. The system 1 is mainly configured by an encryption computer 2 (hereinafter referred to as “encryption PC 2”) constructed from a workstation having high processing capability. The encryption PC 2 can cause the encryption PC 2 to function as the system 1 by the encryption program 3 stored therein. As shown in FIGS. 1 and 2, the encryption PC 2 is roughly divided into an encryption processing function 4 related to encryption processing for converting plaintext into ciphertext and the like, and a decryption processing function 5 related to decryption processing for converting ciphertext to plaintext. It consists of two functions. The cryptographic processing function 4 (see FIG. 1) has, as a partial function, frequency data acquisition means 11 that acquires the frequency data RD indicating the number of repetitions of cryptographic processing. Proportion generation including encryption target data acquisition means 12 for acquiring encryption target data FD consisting of sentences, first data FA, and second data generation means 13 for generating second data SA from the first data FA Means 14, data acquisition means 15 for acquiring byte value data m and bit value data n from common key data K, and divided data DV and divided remainder data LO based on the number of bytes of common key data K and encryption target data FD. A dividing means 16 for generating a value, a value changing means 17 for converting the divided data DV in units of data based on the value of the bit value data n, and a part after the value processing. Adding means 18 for adding the data DV ′ and the short data SN (see FIG. 2) in accordance with a predetermined addition rule, and generating the sum data AD of the number of bytes obtained by summing the divided data DV ′ and the short data SN; The cipher generation means 21 is provided to invert the divided remainder byte LO and combine the generated inversion data IN with the byte end of the most significant byte 19a of the addition data AD to generate the cipher data E. In the dividing means 16, the common key data K and the encryption target data FD are configured with the same number of bytes, or the encrypted data E after encryption processing is divided into a pair of equally divided data EQ with the same number of bytes , One of the common key data K and the encryption target data FD or the equally divided data EQ is designated as the divided data DV, and the other is designated as the short data SN, the first data FA and the bit value data n. From the next position byte 23b corresponding to the next position of an arbitrary byte (the most significant byte 23a of the common key data K) for the number of times specified by the value of the second data SA generated in the obtained integrated value. Division position generation means 25 and division for generating division position data DP by repeating the transition to lower bytes 23c and 23d and addition of bit value data n of the lower bytes The encryption data E is divided from the least significant byte 24 side based on the position data DP, and has the encryption division means 27 for generating the long data LN (see FIG. 4) and the short data SN, and the encryption processing is performed by the acquired number of times data RD The encryption processing repeating means 28 for repeating the above is further provided.

一方、暗号PC2の復号処理機能5(図2参照)は、共通鍵データK、復号対象となる暗号データE、及び回数データRDを取得する復号対象データ取得手段30と、暗号データEのバイト数を基数で除算してなる復号第一データDF及び復号第一データDFをさらに基数で除算してなる復号第二データDSを生成する復号割合生成手段31と、回数データRDによる繰返回数を示す回数値と、共通鍵データKのバイト数を対比し、共通鍵データKのバイト数が回数値と同一若しくは大の場合、共通鍵データKの最上位バイト23a側から回数値を数えた位置に相当する回数バイト32のバイト値データm及びビット値データnをそれぞれ取得し、一方、共通鍵データKのバイト数が回数値よりも小の場合、回数値を共通鍵データのバイト数で除算し、その余として算出された余値を最上位バイト23a側から数えた位置に相当する余バイト33のバイト値データm及びビット値データnをそれぞれ取得する復号データ取得手段34と、復号第一データDFに生成された復号第二データDSの値によって指定される回数分、次位置バイトの下位バイトへの移行及びビット値データnの加算を繰返して算出される復号位置データFPを生成する復号位置生成手段36と、復号位置データFPに基づいて、暗号データEを同一バイト数を有する減算前データMD及びその余からなる復号分割余データDLに分割する復号暗号分割手段37と、復号位置データFPの倍数が暗号データEのバイト数よりも大の場合、復号位置データの倍数から暗号データEのバイト数を減算し、得られた減算値によって暗号データEの最上位バイト35及び最下位バイトの何れか一方から数えた位置で分割して復号分割余データDLを取得し、暗号データEの下位側の復号分割データDbから分割された復号分割余データDLとして指定し、一方、復号位置データの倍数が暗号データEのバイト数よりも小の場合、暗号データEのバイト数から復号位置データの倍数を減算し、得られた減算値によって暗号データEの最上位バイト35及び最下位バイトの何れか一方から数えた位置で分割して復号分割余データDLを取得し、暗号データEの上位側の復号分割データDaから分割された復号分割余データDLとして指定し、復号位置データの倍数と暗号データEのバイト数とが等しい場合、復号分割余データDLをゼロとして指定する範囲指定手段39と、減算前データMDを予め規定した減算規則に則って減算処理し、分割データDV’及び短データSNを生成する減算手段40と、生成された分割データDV’に対し、データ単位若しくはバイト単位の少なくとも何れか一方で、ビット値データnに基づいて転値手段17と逆方向へ転値処理する逆転値手段41と、分割された復号分割余データDLをビット毎に反転処理し、生成された分割余データLOを転値処理された分割データDVの最上位バイト42aまたは最下位バイト42bの何れか一方のバイト端に結合し、共通鍵データK若しくは暗号データEの復号データDRを生成する復号生成手段43とを具備する。   On the other hand, the decryption processing function 5 (see FIG. 2) of the encryption PC 2 includes the decryption target data acquisition means 30 for acquiring the common key data K, the encryption data E to be decrypted, and the number-of-times data RD, and the number of bytes of the encryption data E. Decoding ratio generation means 31 for generating decoded second data DS obtained by further dividing the decoded first data DF and decoded first data DF by the radix, and the number of repetitions by the number data RD When the number of bytes and the number of bytes of the common key data K are compared, and the number of bytes of the common key data K is the same as or larger than the number of times, the number of times is counted from the most significant byte 23a side of the common key data K. When the byte value data m and the bit value data n of the corresponding number of bytes 32 are respectively obtained, and the number of bytes of the common key data K is smaller than the number of times, the number of bytes is the number of bytes of the common key data. Decoding data acquisition means 34 for acquiring the byte value data m and bit value data n of the surplus byte 33 corresponding to the position obtained by dividing and calculating the surplus value calculated as the remainder from the most significant byte 23a side; Generate decoded position data FP calculated by repeatedly shifting the next position byte to the lower byte and adding bit value data n by the number of times specified by the value of decoded second data DS generated in one data DF. Based on the decryption position generation means 36, based on the decryption position data FP, the decryption / encryption splitting means 37 that divides the encrypted data E into the pre-subtraction data MD having the same number of bytes and the decryption split remainder data DL comprising the remainder, and the decryption position If the multiple of the data FP is larger than the number of bytes of the encrypted data E, the number of bytes of the encrypted data E is subtracted from the multiple of the decryption position data, and the obtained reduction The data is divided at the position counted from either the most significant byte 35 or the least significant byte of the encrypted data E according to the value to obtain the decrypted divided remainder data DL, and is divided from the decrypted divided data Db on the lower side of the encrypted data E. If the multiple of the decryption position data is specified as the decryption remainder data DL and the multiple of the decryption position data is smaller than the number of bytes of the encryption data E, the subtraction value obtained by subtracting the multiple of the decryption position data from the number of bytes of the encryption data E Is obtained by dividing the encrypted data E at the position counted from either the most significant byte 35 or the least significant byte to obtain the decrypted divided remainder data DL, and the decrypted data divided from the upper decrypted divided data Da of the encrypted data E Range designating means for designating as the division remainder data DL and designating the decryption division remainder data DL as zero when the multiple of the decryption position data and the number of bytes of the encrypted data E are equal 39, subtraction means 40 for subtracting the pre-subtraction data MD in accordance with a predetermined subtraction rule to generate divided data DV ′ and short data SN, and data unit or byte for the generated divided data DV ′. At least one of the units, a reverse value means 41 that performs a reverse value process in the reverse direction to the reverse value means 17 based on the bit value data n, and an inverse process for the divided decoded division remainder data DL for each bit to generate The divided division data LO is combined with either the most significant byte 42a or the least significant byte 42b of the divided data DV subjected to the conversion process, and the decrypted data DR of the common key data K or the encrypted data E is generated. And a decryption generation means 43 for performing the above.

なお、上記各手段は、いずれも暗号PC2に格納されている。さらに、暗号処理機能4及び復号処理機能5の双方に共通する構成として、各種データの記憶及び一時保存を含む記憶処理に係る半導体メモリやHDD等からなる記憶手段44を暗号PC2は具備している。記憶手段44は、予め記憶された共通鍵データKの他、暗号処理等の過程で生成される各種データを記憶することができる。なお、暗号処理等の過程で生成されたデータが漏出すると、第三者による解読を容易にする可能性が高くなる。そこで、データ等は揮発性の半導体メモリ(RAM等)に一時的に記憶し、処理が完了した後は、データは速やかに消失するものが望ましい。そのため、復号された復号データDRの保存も一定条件下に制限し、画面上に表示するのみ等の対策を施してもよい。記憶手段44は、暗号処理機能4及び復号処理機能5に共通する構成であり、図1及び図2は、それぞれ暗号処理及び復号処理に使用されるデータ等を抜粋し、その他のデータについては復号関連情報6及び暗号関連情報7としてまとめて図示している。また、各処理において一時的に生成される一部データ等については、図示を省略している。   Note that each of the above means is stored in the encryption PC 2. Further, as a configuration common to both the encryption processing function 4 and the decryption processing function 5, the encryption PC 2 includes a storage means 44 composed of a semiconductor memory, an HDD, etc. related to storage processing including storage and temporary storage of various data. . In addition to the common key data K stored in advance, the storage unit 44 can store various data generated in the course of cryptographic processing and the like. Note that if data generated in the course of cryptographic processing or the like leaks, there is a high possibility that a third party can easily decrypt the data. Therefore, it is desirable that data or the like is temporarily stored in a volatile semiconductor memory (RAM or the like), and the data is quickly lost after the processing is completed. For this reason, the storage of the decrypted decrypted data DR may be restricted under certain conditions, and measures such as only displaying on the screen may be taken. The storage unit 44 has a configuration common to the encryption processing function 4 and the decryption processing function 5, and FIGS. 1 and 2 respectively extract data used for the encryption processing and the decryption processing, and decrypt other data. The related information 6 and the encryption related information 7 are collectively shown. Further, some data temporarily generated in each process is not shown.

加えて、暗号PC2は、該暗号PC2に対し、各種指令、操作、及びデータの入力等の処理を行うためのキーボード及びマウス等の操作端末からなる操作手段45と、暗号処理及び復号処理の進捗状況を確認し、最終的に暗号された暗号データE若しくは復号された復号データDRを視覚によって確認することができるように画面表示する液晶ディスプレイ等の表示装置からなる表示手段46とを含んで構成されている。なお、係る構成以外にも、通常のサーバーやパーソナルコンピュータにおいて使用される周知の周辺機器等の技術的構成を含んで構築されるものであっても構わない。   In addition, the encryption PC 2 includes an operation unit 45 including an operation terminal such as a keyboard and a mouse for performing various commands, operations, data input, and the like, and the progress of the encryption process and the decryption process. And display means 46 including a display device such as a liquid crystal display for displaying a screen so that the situation can be confirmed, and finally the encrypted data E or the decrypted decrypted data DR can be visually confirmed. Has been. In addition to such a configuration, a configuration including a technical configuration of a known peripheral device used in a normal server or a personal computer may be used.

次に、システム1による暗号処理及び復号処理の具体例について、図3、図4、図6、及び図7の模式図、及び図5及び図8のフローチャートに基づいて説明する。システム1は、8バイトのバイト数長さの共通鍵データKによって、5バイトのバイト数長さの暗号対象の平文からなる暗号対象データFDを暗号処理するものについて例示する。暗号処理の繰返回数(回数データRDの値)は、“5”として設定し、暗号処理及び復号処理を5回繰返すものについて例示する。係る繰返回数は、高度な処理能力を有する暗号PC2においては、実用的な範囲のものであり、暗号処理及び復号処理に多大な時間を要するものではない。なお、本実施形態において、暗号処理及び復号処理を一つの暗号PC2において実施するものを例示しているが、これに限定されるものではなく、暗号処理及び復号処理をそれぞれ単一の機能として奏することのできるコンピュータ(暗号用コンピュータ及び復号用コンピュータ)を用いるものであっても構わない。この場合、暗号プログラム3は、それぞれの暗号処理機能4及び復号処理機能5をそれぞれ分離した二つのプログラムとして構築される必要がある。その他条件は、基数として“8”(8進数、8通り)を使用し、1バイトは8ビットから構成され、1バイトの値は“2の8乗”により、0〜255の間の何れかの値を示すものとする。   Next, specific examples of encryption processing and decryption processing by the system 1 will be described based on schematic diagrams of FIGS. 3, 4, 6, and 7, and flowcharts of FIGS. The system 1 illustrates an example in which encryption target data FD composed of plain text to be encrypted having a byte number length of 5 bytes is encrypted with the common key data K having a byte number length of 8 bytes. The number of times the encryption process is repeated (the value of the number data RD) is set as “5”, and the encryption process and the decryption process are repeated five times. The number of repetitions is within a practical range in the encryption PC 2 having a high processing capability, and it does not require much time for encryption processing and decryption processing. In the present embodiment, the encryption process and the decryption process are performed in one encryption PC 2, but the present invention is not limited to this, and the encryption process and the decryption process each have a single function. It is also possible to use a computer capable of encryption (encryption computer and decryption computer). In this case, the encryption program 3 needs to be constructed as two programs in which the encryption processing function 4 and the decryption processing function 5 are separated from each other. For other conditions, "8" (octal number, 8 types) is used as the radix, 1 byte is composed of 8 bits, and the value of 1 byte is between 0 and 255 depending on "2 to the 8th power". The value of

始めに、操作手段45によって直接入力されたデータK等を受付け、共通鍵データK、暗号対象データFD、及び回数データRDの暗号処理に必要な三つのデータを取得する(暗号対象データ取得工程:ステップS1(図3(a)参照))。図3(a)の四角形のマスの一つが1バイトを表し、紙面左方側が上位側及び右方側が下位側のバイトを示している。暗号PC2は、三つのデータK等を取得した後、第一データFA及び第二データSAをそれぞれ生成する(割合生成工程:ステップS2)。詳述すると、共通鍵データKのバイト数(8バイト)と、暗号対象データFDのバイト数(5バイト)を合算した合算バイト数(13バイト)を、1バイト当りの基数(8)で除算することにより、第一データFAを生成する(図3(a)参照)。ここでは、“13÷8=1.625”の計算式から、“第一データFA=1.625”となる。なお、本実施形態では、小数点以下第一位を四捨五入することにより、“≒2”として整数に近似する処理が行われる。一方、第二データSAは、第一データFAをさらに基数(8)で除算するものである(図3(a)参照)。この場合、“2÷8=0.25”となり、第二データSAの値が1以下になる。第二データSAの値が1以下の場合、第二データSAは最低でも1以上である必要があるため、第二データを“1”に繰上げる処理を行う。一方、1以上の第二データSAが生成された場合は、第一データFAと同様に小数点以下第一位を四捨五入する処理が行われる。   First, the data K or the like directly input by the operation means 45 is received, and three data necessary for the encryption process of the common key data K, the encryption target data FD, and the number of times data RD are acquired (encryption target data acquisition step: Step S1 (see FIG. 3A)). One square square in FIG. 3A represents one byte, and the left side of the drawing represents the upper byte and the right side represents the lower byte. After acquiring the three pieces of data K and the like, the encryption PC 2 generates the first data FA and the second data SA (ratio generation process: step S2). Specifically, the total number of bytes (13 bytes) obtained by adding the number of bytes of the common key data K (8 bytes) and the number of bytes of the encryption target data FD (5 bytes) is divided by the base (8) per byte. Thus, the first data FA is generated (see FIG. 3A). Here, from the calculation formula “13 ÷ 8 = 1.625”, “first data FA = 1.625”. In the present embodiment, processing that approximates an integer as “≈2” is performed by rounding off the first decimal place. On the other hand, the second data SA is obtained by further dividing the first data FA by the radix (8) (see FIG. 3A). In this case, “2 ÷ 8 = 0.25”, and the value of the second data SA is 1 or less. When the value of the second data SA is 1 or less, the second data SA needs to be at least 1 or more, and therefore the second data is incremented to “1”. On the other hand, when 1 or more 2nd data SA are produced | generated, the process which rounds off the first decimal place similarly to 1st data FA is performed.

さらに別例を使用して説明すると、合算バイト数が120バイトの場合、第一データFAは、“120÷8=15”となり、一方、第二データSAは、“15÷8=1.8145≒2”として生成される。ここで、第二データSAは、後述のビット値データnに基づく分割処理を実施する際の処理回数の値として利用される。すなわち、第二データSAが、“2”である場合には、分割範囲を2回調整することができる。つまり、ビット値データnを最高で2回分足し込む処理を行うことが可能なことを示している。以上のことにより、合算バイト数の長さに対して求められる第一データFA、第二データSAが異なり、それらを用いて算出される分割位置データDPが第二データSAに基づいて変化するため、共通鍵データKが仮に同じであったとしても後述する暗号データEを分割する位置は予測することが困難となる。そして、共通鍵データKの左方端の最上位バイト(図3(b)参照))の値をバイト値データmとして取得し、さらに該最上位バイト23の任意桁数のビット値(ここでは、下3ビットの値)を、8進数で表したビット値データnとして取得する(データ取得工程:ステップS3)。なお、本実施形態では、“n=2”の値を取得したものとして処理を行う。   Further, using another example, when the total number of bytes is 120 bytes, the first data FA is “120 ÷ 8 = 15”, while the second data SA is “15 ÷ 8 = 1.8145. Is generated as ≈2 ". Here, the second data SA is used as a value of the number of times of processing when performing a division process based on bit value data n described later. That is, when the second data SA is “2”, the division range can be adjusted twice. That is, it is possible to perform processing for adding bit value data n up to twice. Due to the above, the first data FA and the second data SA required for the length of the total number of bytes are different, and the division position data DP calculated using them changes based on the second data SA. Even if the common key data K is the same, it is difficult to predict the position where the encrypted data E described later is divided. Then, the value of the most significant byte (see FIG. 3B) at the left end of the common key data K is acquired as byte value data m, and a bit value (here, the arbitrary number of digits of the most significant byte 23). , The lower 3 bits) is acquired as bit value data n expressed in octal (data acquisition step: step S3). In the present embodiment, processing is performed assuming that a value of “n = 2” has been acquired.

ここで、バイト値データm及びビット値データnは、後述する暗号処理を繰返し行う場合には、バイト値データmを取得した位置(ここでは、最上位バイト23a)から下位の位置(右隣り)の次位置バイト23bに移行し、係る次位置バイト23bからバイト値データm及びビット値データnをそれぞれ取得し、暗号処理の度に下位バイト23c,23d・・に移行して各値m,nを取得する。なお、複数回の暗号処理により、共通鍵データKの最下位バイトに到達した後は、再び最上位バイト23aに戻り、処理を繰返すこととなる。その後、暗号PC2は、暗号処理を実行する対象範囲を確定する処理を行う。なお、ステップS4は複数回に亘って暗号処理を行う場合の処理であり、処理回数が一回目の場合、分割位置データDPを生成することなく、短バイトデータSN及び長バイトデータLN(一回目の場合は、共通鍵データK及び暗号対象データFDに相当)の長さを対比するステップS5の処理に移行する。具体的に示すと、共通鍵データK及び暗号対象データFDの長さ(ここでは、8バイトと5バイト)を対比する(ステップS5)。そして、共通鍵データK及び暗号対象データFDのバイト数が異なっている場合(ステップS5においてYES)、何れか一方の長いバイト数の長データLN(ここでは、8バイトの共通鍵データKに相当)を二つに分割し、何れか他方の短データ(ここでは、5バイトの暗号対象データFDに相当)のバイト数に合わせた分割データDVと、長データLNから分割データDV分のバイト数を差し引いた分割余データLOとを生成する(分割工程:ステップS6(図3(c)参照))。つまり、分割データDVは、短データSNとしての暗号対象データFDを同じバイト数(5バイト)で構成され、一方、その余としてなる分割余データLOは、“8−5=3”によって、3バイトで構成されることとなる。ここで、共通鍵データK及び暗号対象データFDが、同一のバイト数で構成される場合(ステップS5においてNO:例えば、共に8バイトの場合)、両者の間で差異が生じないため、共通鍵データK及び暗号対象データFDの何れか一方を長データLN(分割データDV)として強制的に指定し、何れか他方を短データSNとして強制的に指定する(データ指定工程:ステップS7)。係る処理は、後述の暗号データEを同一バイト数の一対の等分割データEQに分割する場合も同様の処理を行う。係る場合、バイト数の長短に差異が見られないため、長データLNの分割処理がなされることはなく、分割余データLOのバイト数は、ゼロとなる。その後、ステップS8の処理に移行する。この場合、転値処理をキャンセルし、直接加算処理を行うものであっても構わない(図5破線参照)。   Here, the byte value data m and the bit value data n are lower positions (right adjacent) from the position where the byte value data m is acquired (here, the most significant byte 23a) when the encryption processing described later is repeated. , The byte value data m and the bit value data n are acquired from the next position byte 23b, and the value m, n is transferred to the lower bytes 23c, 23d,. To get. In addition, after reaching the least significant byte of the common key data K by a plurality of encryption processes, the process returns to the most significant byte 23a again and the process is repeated. Thereafter, the encryption PC 2 performs a process of determining a target range for executing the encryption process. Note that step S4 is a process when the cryptographic process is performed a plurality of times. When the number of processes is the first, the short byte data SN and the long byte data LN (first time are generated without generating the division position data DP. In this case, the process proceeds to the process of step S5 for comparing the lengths of the common key data K and the encryption target data FD). Specifically, the lengths of the common key data K and the encryption target data FD (here, 8 bytes and 5 bytes) are compared (step S5). If the number of bytes of the common key data K and the encryption target data FD are different (YES in step S5), either one of the long data LN (in this case, the 8-byte common key data K is equivalent). ) Are divided into two and divided data DV corresponding to the number of bytes of one of the other short data (here, equivalent to 5-byte encryption target data FD) and the number of bytes corresponding to divided data DV from long data LN Is generated (division step: step S6 (see FIG. 3C)). That is, the divided data DV is composed of the same number of bytes (5 bytes) as the encryption target data FD as the short data SN. On the other hand, the remaining divided data LO is “8−5 = 3”, which is 3 It will consist of bytes. Here, when the common key data K and the encryption target data FD are configured with the same number of bytes (NO in step S5: for example, when both are 8 bytes), there is no difference between them, so the common key Either one of the data K and the encryption target data FD is forcibly designated as the long data LN (divided data DV), and the other is forcibly designated as the short data SN (data designation step: step S7). The same processing is performed when the later-described encrypted data E is divided into a pair of equally divided data EQ having the same number of bytes. In such a case, since there is no difference in the length of the number of bytes, the long data LN is not divided, and the number of bytes of the division remaining data LO is zero. Thereafter, the process proceeds to step S8. In this case, the inversion process may be canceled and the direct addition process may be performed (see the broken line in FIG. 5).

暗号PC2は、分割若しくは指定された分割データDVに対し、データ単位またはバイト単位によって、ビット値データn(=2)に基づいて転値処理を行う(転値工程:ステップS8(図3(d)参照)。ここで、転値処理(シフト処理)は、図3(d)に示すように、1バイト内の値を右にn個(=2個)シフトする処理(2ビット右シフト)を行う。このとき、転値処理の基準となるビット値データnは、共通鍵データKのバイト値データmから任意桁数のビット値として抽出されたものであり、第三者によって予測することは不可能な偶発的な数(乱数)である。そのため、第三者は、共通鍵データKを取得しない限り、転値処理前の元の分割データDVの値を知ることはできない。すなわち、ビット値データnに基づく転値処理によって、第三者の解読をさらに困難なものとしている。なお、転値処理は、上述のバイト単位で行うものではなく、ビット単位等で実施するものであっても構わず、さらに、所定の規則に基づいてデータ単位及びバイト単位で変化させるものであっても構わない。そして、転値処理された分割データDV’と短データSNを、所定の加算規則に従って加算処理し、分割データDV’(若しくは短データSN)の倍のバイト数を有する加算データADを生成する(加算工程:ステップS9(図4(a)参照)。ここで、加算規則の一例を、図4(a)に基づいて示すと、例えば、5バイトからなる分割データDV’の各バイトの位置及び値を前から(紙面左方側から)順にA,B,C,D,Eとして設定し、一方、短データSNは、前から順にF,G,H,I,Jとして設定する。そして、これにより、生成される加算データAD(バイト数=10)は、前から順にa,b,c,d,e,f,g,h,i,jとして表されるものとし、上記規定に従ってそれぞれ表記する。以下に、その加算規則の詳細の一例を示す。   The encryption PC 2 performs the conversion process on the divided or designated divided data DV based on the bit value data n (= 2) in units of data or bytes (inversion process: step S8 (FIG. 3 (d) Here, as shown in FIG. 3D, the shift value process (shift process) shifts the value in one byte to the right by n (= 2) (two-bit right shift). At this time, the bit value data n serving as a reference for the transposition processing is extracted as a bit value having an arbitrary number of digits from the byte value data m of the common key data K, and is predicted by a third party. Therefore, the third party cannot know the value of the original divided data DV before the transposition process unless the common key data K is acquired. For transposition processing based on bit value data n In this case, the transposition processing is not performed in units of bytes as described above, but may be performed in units of bits or the like. The divided data DV ′ and the short data SN that have been subjected to the inversion process are added according to a predetermined addition rule, and the divided data DV may be changed. '(Or short data SN) is generated as addition data AD having the number of bytes twice (addition step: step S9 (see FIG. 4A)). Here, an example of the addition rule is shown in FIG. For example, the position and value of each byte of the divided data DV ′ consisting of 5 bytes are set as A, B, C, D, E sequentially from the front (from the left side of the page), while the short data SN in order from the front , G, H, I, J. Thus, the generated addition data AD (number of bytes = 10) is a, b, c, d, e, f, g, h, It shall be expressed as i and j, respectively, and will be described according to the above rules.

<加算規則>
(1)分割データDV’の“A”を基準点とし、共通鍵データKのバイト値データmと排他的論理和(XOR)を算出し、算出結果を加算データADのaとして入力する。/(2)短データSNの“J”を基準点とし、共通鍵データKのバイト値データmと排他的論理和(XOR)を算出し、算出結果を加算データADのbとして入力する。/(3)DとFを加算し、加算結果をcとして入力する。/(4)GとEを加算し、加算結果をdとして入力する。/(5)CとGを加算し、加算結果をeとして入力する。/(6)HとDを加算し、加算結果をfとして入力する。/(7)BとHを加算し、加算結果をgとして入力する。/(8)IとCを加算し、加算結果をhとして入力する。/(9)AとIを加算し、加算結果をiとして入力する。/(10)JとBを加算し、加算結果をjとして入力する。
<Addition rules>
(1) Using “A” of the divided data DV ′ as a reference point, the byte value data m of the common key data K and the exclusive OR (XOR) are calculated, and the calculation result is input as a of the addition data AD. / (2) Using “J” of the short data SN as a reference point, the byte value data m of the common key data K and the exclusive OR (XOR) are calculated, and the calculation result is input as b of the addition data AD. / (3) Add D and F and input the addition result as c. / (4) Add G and E and input the addition result as d. / (5) Add C and G, and input the addition result as e. / (6) Add H and D and input the addition result as f. / (7) Add B and H and input the addition result as g. / (8) Add I and C and input the addition result as h. / (9) Add A and I, and input the addition result as i. / (10) Add J and B, and input the addition result as j.

これにより、図4(b)に示される基準値a及び基準値bが、最上位バイト19a及びその次位置バイト19bにそれぞれ入力された加算データADが生成される。ここで、上記加算処理において、分割データDV’側の値(例えば、A)と、短データSN側の値(例えば、I)との2つの値は、加算データADのiの値が判明したとしても容易に推定することはできない。すなわち、本実施形態の加算処理では、それぞれの和が255以上になった場合、和から255を引いた数を加算結果として入力する桁落ちの処理を行っているため、係る式を満たす両者の値は数多く存在し、その特定は非常に困難である。すなわち、A+I≦255の場合、入力される加算結果は、そのまま“A+I”の値である。一方、A+I>255の場合、入力される加算結果は、“A+I−255”となる。これにより、仮に加算結果の“i”の値が第三者によって知られたとしても、“A”及び“I”の組合わせの可能性は膨大であり、両者を特定することは困難である。その後、得られた加算データADの最上位バイト19a(“a”の位置)の前に、分割余データLOの値を反転処理(“1”→“0”、“0”→“1”)した反転データINを接続し、暗号データEが完成する(暗号生成工程:ステップS10(図4(c)参照))。   Thereby, the addition data AD in which the reference value a and the reference value b shown in FIG. 4B are respectively input to the most significant byte 19a and the next position byte 19b is generated. Here, in the above addition process, the value of i of the addition data AD has been found for the two values of the divided data DV ′ side value (for example, A) and the short data SN side value (for example, I). However, it cannot be estimated easily. That is, in the addition processing of the present embodiment, when each sum is 255 or more, since the digit removal processing is performed in which the number obtained by subtracting 255 from the sum is input as the addition result, There are many values, and their identification is very difficult. That is, when A + I ≦ 255, the input addition result is the value of “A + I” as it is. On the other hand, when A + I> 255, the input addition result is “A + I-255”. As a result, even if the value of “i” of the addition result is known by a third party, the possibility of combination of “A” and “I” is enormous, and it is difficult to specify both. . Thereafter, before the most significant byte 19a (position “a”) of the obtained addition data AD, the value of the division remainder data LO is inverted (“1” → “0”, “0” → “1”). The inverted data IN thus connected is connected, and the encrypted data E is completed (encryption generation step: step S10 (see FIG. 4C)).

これにより、十分に機密性の高い暗号データEが完成する。しかし、より機密性を高めるために、回数データRDに示された繰返回数の回数値に従って、暗号処理を繰返すことが行われる。すなわち、暗号処理の繰返回数が回数データRDで示された回数値よりも小さい場合(ステップS11においてYES)、ステップS3の処理に戻り、バイト値データm及びビット値データnを取得した後(ステップS3)、暗号データEから分割位置データDPを生成し(分割位置生成工程:ステップS4)、短バイトデータSN及び長バイトデータLNの対比(ステップS5)及び分割データDV、分割余データLO、及び短データSNにそれぞれ分割する(ステップS6)。具体的に説明すると、既に求めた第一データFA及び第二データSAを利用し、暗号データEを右(最下位バイト)から分割する処理を行う。始めに、ビット値データnに第一データFAを積算した積算値を求め、生成された第二データSAの値によって指定される回数分、前記ビット値データnの加算を繰返すことにより、分割位置データDPを生成する。例えば、第一データFAが“2”、現在のビット値データnが“2”、加算処理の回数を示す第二データSAが“1”の場合、積算値は、“2×2=4”となる。さらに、第二データSAにより1回の加算処理を行うことから、次位置バイト23bにおけるビット値データnを求め、“n=1”であることから、“4+1=5”が分割位置データDPとなる。そのため、暗号データEを右から5バイト分の位置で分割することで暗号処理に係る長データLN(=8バイト)と短データSNが(=5バイト)が生成される(図4(d)参照)。これにより、上記の暗号処理に係るステップを所定回数繰返すことが可能となる。このとき、暗号データEを分割する位置は、繰返回数毎に求めるビット値データn及び第一データFA等によって異なるため、予測をすることが困難である。そのため、解読困難な暗号データEを生成することができる。そして、回数データRDの回数と暗号処理の回数が同一の場合(ステップS11においてNO)、最終的な暗号データEが完成し、暗号処理が完了する(ステップS12)。上記暗号処理によって、共通鍵データKに基づく偶発性、転値処理による乱数化、及び加算規則による基準値等の決定の非容易性、基準値を除いた暗号、及びこれらに対する重複暗号の処理を行うことにより、強力な暗号及び乱数化の処理が可能となり、第三者によって解読困難なシステム1を構築することが可能となる。   Thereby, the encryption data E having sufficiently high confidentiality is completed. However, in order to further improve confidentiality, the encryption process is repeated according to the number of repetitions indicated in the number-of-times data RD. That is, when the number of repetitions of the encryption process is smaller than the number of times indicated by the number of times data RD (YES in step S11), the process returns to step S3, and after acquiring byte value data m and bit value data n ( Step S3), the division position data DP is generated from the encrypted data E (division position generation step: step S4), the short byte data SN and the long byte data LN are compared (step S5), the division data DV, the division remainder data LO, And short data SN (step S6). More specifically, a process of dividing the encrypted data E from the right (least significant byte) is performed using the first data FA and the second data SA that have already been obtained. First, an integrated value obtained by adding the first data FA to the bit value data n is obtained, and the addition of the bit value data n is repeated for the number of times specified by the value of the generated second data SA, thereby dividing the position. Data DP is generated. For example, when the first data FA is “2”, the current bit value data n is “2”, and the second data SA indicating the number of addition processes is “1”, the integrated value is “2 × 2 = 4”. It becomes. Further, since the addition process is performed once with the second data SA, the bit value data n in the next position byte 23b is obtained, and since “n = 1”, “4 + 1 = 5” becomes the divided position data DP. Become. Therefore, by dividing the encrypted data E at the position of 5 bytes from the right, the long data LN (= 8 bytes) and the short data SN (= 5 bytes) related to the encryption processing are generated (FIG. 4D). reference). This makes it possible to repeat the steps related to the encryption processing a predetermined number of times. At this time, since the position where the encrypted data E is divided differs depending on the bit value data n and the first data FA that are obtained for each number of repetitions, it is difficult to predict. Therefore, it is possible to generate encrypted data E that is difficult to decipher. If the number of times data RD is the same as the number of encryption processes (NO in step S11), the final encrypted data E is completed and the encryption process is completed (step S12). By the above encryption process, the randomness based on the common key data K, the randomization by the transposition process, the inability to determine the reference value by the addition rule, the encryption excluding the reference value, and the duplicate encryption process for these By doing so, it is possible to perform strong encryption and randomization processing, and it is possible to construct a system 1 that is difficult for a third party to decipher.

次に、本実施形態のシステム1における復号処理の流れについて説明する。ここで、暗号データEを元の平文に復号する処理において、暗号処理と同一構成を有するもの、若しくは単純にその逆の処理を行うものについては、同一番号を付し、説明を簡略化するため詳細な説明を省略するものとする。まず、共通鍵データK、復号対象データとなる暗号データE、及び暗号処理の処理回数を示す回数データRDをそれぞれ取得する(復号対象データ取得工程:ステップT1(図6(a)参照))。そして、暗号データEのバイト数を基数(=8)で除算した復号第一データDF及びさらに復号第一データDFを基数で除算した復号第二データDSを生成する(復号割合生成工程:ステップT2)。なお、係る生成処理は、第一データFA及び第二データSAの生成処理と略同一であるため、ここでは説明を省略する。さらに、回数データRDによって指定される繰返回数の回数値(ここでは、“5”)と、取得した共通鍵データKのバイト数を対比し、共通鍵データKのバイト数が処理回数の値と同一若しくは大きい場合、処理回数の値によって指定される共通鍵データKの最上位バイト23aから回数値を数えた位置に相当する回数バイト32のバイト値データm及びビット値データnをそれぞれ取得し、一方、共通鍵データKのバイト数が回数値より小さい場合、回数値を共通鍵データKのバイト数で除算し、その余として算出された値(余値)を最上位バイト23aから数えた位置に相当する余バイト33のバイト値データm及びビット値データnをそれぞれ取得する(復号データ取得工程:ステップT3)。ここで、本実施形態の場合、回数値が“5”であり、共通鍵データKのバイト数は“8”であるため、前者の処理が行われ、最上位バイト23aから右に5つ数えた位置のバイト(回数バイト32)のバイト値データm及びビット値データnが取得される。   Next, the flow of decoding processing in the system 1 of the present embodiment will be described. Here, in the process of decrypting the encrypted data E into the original plaintext, those having the same configuration as the encryption process, or simply performing the reverse process are given the same numbers to simplify the description. Detailed description will be omitted. First, the common key data K, the encrypted data E that is the decryption target data, and the number-of-times data RD indicating the number of encryption processes are obtained (decryption target data acquisition step: step T1 (see FIG. 6A)). Then, the decrypted first data DF obtained by dividing the number of bytes of the encrypted data E by the radix (= 8) and the decrypted second data DS obtained by dividing the decrypted first data DF by the radix are generated (decryption ratio generating step: step T2). ). Since the generation process is substantially the same as the generation process of the first data FA and the second data SA, the description thereof is omitted here. Furthermore, the number of repetitions specified by the number data RD (here, “5”) is compared with the number of bytes of the acquired common key data K, and the number of bytes of the common key data K is the value of the number of processes. Is equal to or larger than the byte value data m and the bit value data n of the number of bytes 32 corresponding to the position where the number of times is counted from the most significant byte 23a of the common key data K specified by the value of the number of processes. On the other hand, when the number of bytes of the common key data K is smaller than the number of times, the number of times is divided by the number of bytes of the common key data K, and the value calculated as the remainder (residue value) is counted from the most significant byte 23a. The byte value data m and the bit value data n of the extra byte 33 corresponding to the position are respectively acquired (decoded data acquisition step: step T3). Here, in the case of the present embodiment, since the count value is “5” and the number of bytes of the common key data K is “8”, the former processing is performed, and five bytes are counted to the right from the most significant byte 23a. The byte value data m and the bit value data n of the byte at the position (number of bytes 32) are acquired.

そして、取得したバイト値データm及びビット値データnを利用して、復号位置データFPを生成し(復号位置生成工程:ステップT4)、13バイトのバイト数(繰返し復号の場合、長データLN及び短データSNを規定の順序で結合した新たな復号対象データ)で構成された暗号データEにおける復号範囲を指定する(範囲指定工程:ステップT5)。なお、復号位置データFPの生成は、暗号処理において上述した分割位置データDPの生成と略同一であるため、ここでは説明を省略する。そして、復号位置データFPとして生成された値に基づいて、暗号データEにおける復号処理の範囲を決定する。ここで、復号位置データFPによって、暗号データEを減算前データMDと、その余からなる復号分割余データDLに分割する。すなわち、図6(b)に示すように、ビット値データnが“2”、復号第一データDFが“2”、及び、復号第二データDSが“1”の場合、生成される復号位置データFPは“5”となる。そして、復号位置データFPの倍数と暗号データEの長さを後述する方法で比較することにより、暗号処理範囲及び復号分割余バイトDLが確定することから、暗号データEを右から(最下位バイトから)5バイトずつ分割した一対の復号分割データDa,Dbと、その余からなる3バイトの復号分割余バイトDLに分割されることになる。さらに、係る処理において、最下位バイトから分割された一対の復号分割データDa,Dbが共通鍵データKまたは暗号対象データFDの何れかであるかの判定処理を行う(ステップT5)。ここで、暗号データEの長さが、生成された復号位置データFPの倍数よりも小さい場合、暗号データEの最上位バイト35から、“復号位置データFPの倍数−暗号データEのバイト数”の差分のバイト数が復号分割余データDLして指定され、かつ暗号データEの右方側の復号分割データDbから分割したものと判定され、一方、暗号データの長さが、生成された復号位置データFPの倍数よりも大きい場合、暗号データEの最上位バイト35から、“暗号データEのバイト数−復号位置データFPの倍数”の差分のバイト数が復号分割余データDLとして指定され、かつ暗号データEの左方側の復号分割データDaから分割したものと判定される。つまり、前者の場合、右方側の復号分割データDbの方が大きいことが示され、一方、後者の場合、左方側の復号分割データDaの方が大きいことが示されるため、復号分割余データDLの帰属する復号分割データDa,Dbが決定される。その後、生成した減算前データMDから減算規則に基づいた減算処理が行われる(減算工程:ステップT6(図7(a)参照))。本実施形態の場合、暗号処理における加算データADの生成の際に、加算規則(1)及び(2)において基準値a及び基準値bを加算データADの最上位バイト19a及び次位置バイト19bに入力して設定している。すなわち、上述したように、単純な減算処理では、それぞれの値を導き出すことが困難であるものの、共通鍵データK及びバイト値データmを得ることにより、係る基準値a及び基準値bの位置及び値を特定することができ、これに基づいてそれぞれの値を減算処理し、分割データDV’及び短データSNを生成することができる。減算規則は、図7(a)に図示し、基本的に加算処理と逆操作であるため、説明を省略する。   Then, using the acquired byte value data m and bit value data n, the decoding position data FP is generated (decoding position generation step: step T4), and the number of bytes of 13 bytes (in the case of iterative decoding, the long data LN and A decryption range in the encrypted data E composed of the new decryption target data obtained by combining the short data SN in a prescribed order is designated (range designation step: step T5). Note that the generation of the decryption position data FP is substantially the same as the generation of the divided position data DP described above in the encryption process, and thus the description thereof is omitted here. Then, based on the value generated as the decryption position data FP, the range of decryption processing in the encrypted data E is determined. Here, based on the decryption position data FP, the encrypted data E is divided into pre-subtraction data MD and decryption division remainder data DL comprising the remainder. That is, as shown in FIG. 6B, when the bit value data n is “2”, the decoded first data DF is “2”, and the decoded second data DS is “1”, the generated decoding position The data FP is “5”. Then, by comparing the multiple of the decryption position data FP and the length of the encryption data E by the method described later, the encryption processing range and the decryption division extra byte DL are determined. From this, the data is divided into a pair of decoded divided data Da, Db divided by 5 bytes and a decoded divided redundant byte DL of 3 bytes consisting of the remainder. Further, in such a process, it is determined whether the pair of decrypted divided data Da and Db divided from the least significant byte is the common key data K or the encryption target data FD (step T5). Here, when the length of the encrypted data E is smaller than a multiple of the generated decryption position data FP, “the multiple of the decryption position data FP−the number of bytes of the encrypted data E” from the most significant byte 35 of the encrypted data E. Is determined as being divided from the decryption division data Db on the right side of the encryption data E, while the length of the encryption data is determined to be the generated decryption data DL. If it is larger than a multiple of the position data FP, the byte number of the difference of “the number of bytes of the encrypted data E−multiple of the decrypted position data FP” from the most significant byte 35 of the encrypted data E is designated as the decryption division remainder data DL, Further, it is determined that the encrypted data E is divided from the decrypted divided data Da on the left side. That is, in the former case, the right side decoded divided data Db is shown to be larger, while in the latter case, the left side decoded divided data Da is shown to be larger. Decoded divided data Da and Db to which the data DL belongs are determined. Thereafter, a subtraction process based on the subtraction rule is performed from the generated pre-subtraction data MD (subtraction process: step T6 (see FIG. 7A)). In the case of the present embodiment, when generating the addition data AD in the encryption process, the reference value a and the reference value b are added to the most significant byte 19a and the next position byte 19b of the addition data AD in the addition rules (1) and (2). Enter and set. That is, as described above, although it is difficult to derive each value by a simple subtraction process, by obtaining the common key data K and the byte value data m, the position of the reference value a and the reference value b and A value can be specified, and based on this, each value can be subtracted to generate divided data DV ′ and short data SN. The subtraction rule is illustrated in FIG. 7A and is basically the reverse operation of the addition process, and thus the description thereof is omitted.

その後、範囲指定工程(ステップT5)によって、指定された復号分割余データDLを、ビット毎に反転処理することによって元の分割余データLOに戻し、さらに減算処理によって得られた分割データDV’を暗号処理と逆方向に転値処理し、分割データDVを得る(逆転値工程:ステップT7(図示省略))。そして、分割データDV(範囲指定工程によって特定されたDaまたはDb)と分割余データLOとを結合し、復号データDRを生成する(復号生成工程:ステップT8(図7(b)参照))。これにより、得られた長データLN及び短データSNの何れか一方が共通鍵データKであり、何れか他方が暗号対象データFDとなる。なお、回数データRDによって暗号処理が複数回実施されている場合には、上記の復号処理を回数データRDに基づいて繰返すことにより(図8破線矢印参照)、最終的に平文からなる復号データDRを得ることができ、復号処理が完了する。復号処理の繰返しについては、説明を簡略化するため、図示を省略している。このとき、復号データDRを得ると同時に、本実施形態のシステム1は、暗号処理に使用した共通鍵データKも生成されることとなる。そのため、復号者に対して復号処理のために与えられた共通鍵データK(復号用鍵)と、復号処理の過程で生成された共通鍵データK(生成鍵)とを対比することにより、復号処理の完全性、信頼性を確認することができる。すなわち、第三者によって暗号データEに改竄が施されている場合、正しい共通鍵データKを用いても、元の暗号対象データFDに復元されることがなく、また復号処理後のそれぞれの共通鍵データKが全く相違したものと認められる。すなわち、情報改竄の可能性を認識することができる。そのため、本実施形態のシステム1によれば、第三者に解読されることのない高度な機密性を有するとともに、共通鍵データKの対比による情報改竄がないことによるデータの完全性、及びこれに基づく情報の信頼性を有することとなる。   Thereafter, in the range designating step (step T5), the designated decoded divided remainder data DL is inverted to each bit to return to the original divided remainder data LO, and the divided data DV ′ obtained by the subtraction process is further converted. Inversion processing is performed in the opposite direction to the encryption processing to obtain divided data DV (inversion value process: step T7 (not shown)). Then, the divided data DV (Da or Db specified by the range designating step) and the divided remainder data LO are combined to generate decoded data DR (decoded generation step: step T8 (see FIG. 7B)). Thereby, one of the obtained long data LN and short data SN is the common key data K, and the other is the encryption target data FD. If the encryption processing is performed a plurality of times by the number-of-times data RD, the above-described decryption processing is repeated based on the number-of-times data RD (see the broken line arrow in FIG. 8), and finally the decrypted data DR consisting of plaintext. And the decoding process is completed. The repetition of the decoding process is not shown in order to simplify the description. At this time, simultaneously with obtaining the decrypted data DR, the system 1 of the present embodiment also generates the common key data K used for the encryption processing. Therefore, decryption is performed by comparing the common key data K (decryption key) given to the decryptor for the decryption process and the common key data K (generated key) generated in the course of the decryption process. The completeness and reliability of processing can be confirmed. That is, when the encrypted data E has been tampered with by a third party, even if the correct common key data K is used, it is not restored to the original encryption target data FD, and each common after decryption processing It is recognized that the key data K is completely different. That is, the possibility of information falsification can be recognized. Therefore, according to the system 1 of the present embodiment, it has high confidentiality that is not deciphered by a third party, and the integrity of data due to the absence of information falsification due to the comparison of the common key data K, and this The reliability of information based on

以上、本発明について好適な実施形態を挙げて説明したが、本発明の要旨を逸脱しない範囲において、種々の改良及び設計の変更が可能である。すなわち、暗号処理に時間に係るパラメータを付加し、暗号データEの保全に係る有効時間を設定するものであっても構わない。これにより、復号についての時間的な制限を付すことができる。また、暗号データEは、共通鍵データK及び暗号対象データFDに基づいて強力に乱数化されたものであり、暗号データを共通鍵データKの一種として利用することができる。そのため、Diffie−Hellmann鍵交換方式を採用し、本システムによって暗号処理された共通鍵データKを取得し、任意サイズで、かつ容易にバーナム暗号を処理する可能性を有する。この場合、鍵の長さに制約を受けることのない共通鍵を大量に作成可能となり、かつ鍵の交換及び乱数値を作成するための元データは、元来意味を有しない単なるデータであるため、共通鍵の授受は比較的自由に実施できる。そのため、従来に比して、鍵交換の手続きを簡略化することが可能となる。また、本発明の暗号処理システム1は、一般的なインターネットを通じた各端末間のデータの送受に係る使用に限定されるものではなく、例えば、携帯電話間のデータの送受や、従来はSSL等の暗号処理を行っていたシステムからの転換を容易に行うことが可能となり、幅広い分野においての応用を期待することができる。   While the present invention has been described with reference to the preferred embodiments, various improvements and design changes can be made without departing from the scope of the present invention. That is, a parameter related to time may be added to the encryption process to set an effective time related to the maintenance of the encrypted data E. As a result, it is possible to place a time restriction on decoding. The encrypted data E is strongly randomized based on the common key data K and the encryption target data FD, and the encrypted data can be used as a kind of the common key data K. For this reason, the Diffie-Hellmann key exchange method is adopted, the common key data K encrypted by the present system is acquired, and there is a possibility that the Vernam cipher can be easily processed with an arbitrary size. In this case, it is possible to create a large number of common keys that are not restricted by the length of the key, and the original data for exchanging keys and creating random numbers is simply data that has no meaning originally. The common key can be exchanged relatively freely. Therefore, it is possible to simplify the key exchange procedure as compared with the prior art. Further, the cryptographic processing system 1 of the present invention is not limited to the use related to the transmission / reception of data between terminals via a general Internet, for example, the transmission / reception of data between mobile phones, and the conventional SSL, etc. Therefore, it is possible to easily change from the system that has been performing the cryptographic processing, and application in a wide range of fields can be expected.

暗号システムの暗号処理に係る機能的構成を示すブロック図である。It is a block diagram which shows the functional structure which concerns on the encryption process of an encryption system. 暗号システムの復号処理に係る機能的構成を示すブロック図である。It is a block diagram which shows the functional structure which concerns on the decoding process of an encryption system. 暗号処理のアルゴリズムを模式的に示す説明図である。It is explanatory drawing which shows the algorithm of an encryption process typically. 暗号処理のアルゴリズムを模式的に示す説明図である。It is explanatory drawing which shows the algorithm of an encryption process typically. 暗号PCにおける暗号処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the encryption process in encryption PC. 復号処理のアルゴリズムを模式的に示す説明図である。It is explanatory drawing which shows the algorithm of a decoding process typically. 復号処理のアルゴリズムを模式的に示す説明図である。It is explanatory drawing which shows the algorithm of a decoding process typically. 暗号PCにおける復号処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the decoding process in encryption PC.

符号の説明Explanation of symbols

1 システム(暗号システム)
2 暗号PC(暗号コンピュータ)
3 暗号プログラム
11 回数データ取得手段
12 暗号対象データ取得手段
13 第二データ生成手段
14 割合生成手段
15 データ取得手段
16 分割手段
17 転値手段
18 加算手段
21 暗号生成手段
22 データ指定手段
25 分割位置生成手段
27 暗号分割手段
28 暗号処理繰返手段
30 復号対象データ取得手段
31 復号割合生成手段
34 復号データ取得手段
36 復号位置生成手段
37 復号暗号分割手段
39 範囲指定手段
40 減算手段
41 逆転値手段
43 復号生成手段
1 system (encryption system)
2 Encryption PC (encryption computer)
DESCRIPTION OF SYMBOLS 3 Cryptographic program 11 Time count data acquisition means 12 Encryption object data acquisition means 13 Second data generation means 14 Ratio generation means 15 Data acquisition means 16 Division means 17 Transfer value means 18 Addition means 21 Encryption generation means 22 Data specification means 25 Data location means 25 Means 27 Encryption division means 28 Encryption processing repetition means 30 Decryption target data acquisition means 31 Decryption rate generation means 34 Decryption data acquisition means 36 Decryption position generation means 37 Decryption encryption division means 39 Range designation means 40 Subtraction means 41 Reverse value means 43 Decryption Generation means

Claims (5)

任意のバイト数で構成された共通鍵データ及び暗号処理の対象となる平文若しくは暗号処理済の暗号対象データを取得する暗号対象データ取得手段と、前記共通鍵データ及び前記暗号対象データのバイト数を合算し、得られた合算バイト数を基数で除算してなる第一データを生成する割合生成手段と、前記共通鍵データの任意位置における任意バイトのバイト値データ、及び前記任意バイトの任意桁数のビット値データを取得するデータ取得手段と、前記共通鍵データ及び前記暗号対象データを対比し、何れか一方の長いバイト数を有する長データを分割し、何れか他方の短いバイト数を有する短データのバイト数に合わせた分割データ及びその余からなる分割余データを生成する分割手段と、前記分割データをデータ単位若しくはバイト単位の少なくとも何れか一方で、前記ビット値データの値に基づいて転値処理する転値手段と、転値処理された前記分割データ及び前記短データを規定の加算規則に則って加算処理し、前記分割データ及び前記短データを合計したバイト数を有する加算データを生成する加算手段と、前記分割余データをビット毎に反転処理し、生成された反転データを前記加算データの最上位バイトまたは最下位バイトの何れか一方のバイト端に結合し、暗号データを生成する暗号生成手段とを具備することを特徴とする暗号システム。   Encryption key data acquisition means for acquiring common key data composed of an arbitrary number of bytes and plaintext or encryption target data subjected to encryption processing, and the number of bytes of the common key data and the encryption target data A ratio generating means for generating first data obtained by summing and dividing the obtained total number of bytes by a radix, byte value data of an arbitrary byte at an arbitrary position of the common key data, and an arbitrary number of digits of the arbitrary byte The data acquisition means for acquiring the bit value data is compared with the common key data and the encryption target data, the long data having either one of the long bytes is divided, and the other is the short having the short number of bytes. Dividing means for generating divided data according to the number of bytes of data and the remainder of the divided data, and the divided data as data units or byte units. At least one of the above, a value conversion means for performing a value conversion process based on the value of the bit value data, an addition process according to a specified addition rule for the divided data and the short data subjected to the value conversion process, Addition means for generating addition data having the total number of bytes obtained by dividing the divided data and the short data, the division remainder data is inverted for each bit, and the generated inverted data is converted into the most significant byte or the least significant byte of the addition data. A cryptographic system comprising cryptographic generation means coupled to any one byte end of the bytes to generate cryptographic data. 前記暗号対象データ取得手段は、暗号処理の繰返回数を示す回数データを取得する回数データ取得手段をさらに有し、前記割合生成手段は、前記第一データを前記基数でさらに除算してなる第二データを生成する第二データ生成手段をさらに有し、前記分割手段は、前記共通鍵データ及び前記暗号対象データが同一バイト数で構成されている、若しくは、暗号処理された前記暗号データを同一バイト数の一対の等分割データとして分割するときに、何れか一方の前記共通鍵データ及び前記暗号対象データ若しくは前記等分割データを前記分割データとして指定し、何れか他方を前記短データとして指定するデータ指定手段と、前記第一データと前記ビット値データを積算し、得られた積算値に生成された前記第二データの値によって指定される回数分、前記任意バイトの次位置に相当する次位置バイトへの移行及び前記位置バイトの前記ビット値データの加算を繰返して分割位置データを生成する分割位置生成手段及び前記分割位置データに基づいて前記暗号データを分割し、前記長データ及び前記短データを生成する暗号分割手段を有する暗号処理繰返手段とをさらに具備することを特徴とする請求項1に記載の暗号システム。   The encryption target data acquisition means further includes number-of-times data acquisition means for acquiring number-of-times data indicating the number of repetitions of encryption processing, and the ratio generation means further divides the first data by the radix. A second data generation unit configured to generate two data, wherein the dividing unit is configured such that the common key data and the encryption target data are configured with the same number of bytes, or the encrypted encryption data is the same. When dividing as a pair of equally divided data of the number of bytes, either one of the common key data and the encryption target data or the equally divided data is designated as the divided data, and any other is designated as the short data. The data designation means is designated by the value of the second data generated by integrating the first data and the bit value data and generating the obtained integrated value. Based on the divided position data and divided position generation means for generating divided position data by repeating the transition to the next position byte corresponding to the next position of the arbitrary byte and the addition of the bit value data of the position byte by the number of times. The cryptographic system according to claim 1, further comprising: a cryptographic processing repeating unit having a cryptographic dividing unit that divides the cryptographic data and generates the long data and the short data. 前記共通鍵データ、復号対象となる前記暗号データ、及び前記回数データを取得する復号対象データ取得手段と、前記暗号データのバイト数を前記基数で除算してなる復号第一データ、及び前記復号第一データを前記基数でさらに除算してなる復号第二データを生成する復号割合生成手段と、前記回数データに基づく回数値と前記共通鍵データのバイト数を対比し、前記共通鍵データのバイト数が前記回数値と同一若しくは大の場合、前記共通鍵データの前記任意バイトから前記回数値を数えた位置に相当する回数バイトの前記バイト値データ及び前記ビット値データを取得し、一方、前記共通鍵データのバイト数が前記回数値よりも小の場合、前記回数値を前記共通鍵データのバイト数で除算し、その余として算出された余値を前記任意バイトから数えた位置に相当する余バイトの前記バイト値データ及び前記ビット値データを取得する復号データ取得手段と、前記復号第一データに前記ビット値データを積算し、得られた復号積算値に生成された前記復号第二データの値によって指定される回数分、前記ビット値データを取得した前記回数バイト若しくは前記余バイトの次位置の前記次位置バイトへの移行及び前記ビット値データの加算を繰返して復号位置データを生成する復号位置生成手段と、前記復号位置データの倍数が前記暗号データのバイト数よりも大の場合、前記復号位置データの倍数から前記暗号データのバイト数を減算し、得られた減算値によって前記暗号データの最上位バイト及び最下位バイトの何れか一方から数えた位置で分割し、前記最下位バイト側から分割したときは前記暗号データの下位側から分割された復号分割余データとして指定し、一方、前記最上位バイト側から分割したときは前記暗号データの上位側から分割された前記復号分割余データとして指定し、前記復号位置データの倍数が前記暗号データのバイト数よりも小の場合、前記暗号データのバイト数から前記復号位置データの倍数を減算し、得られた減算値によって前記暗号データの前記最上位バイト及び前記最下位バイトの何れか一方から数えた位置で分割し、前記最下位バイト側から分割したときは前記暗号データの上位側から分割された前記復号分割余データとして指定し、一方、前記最上位バイト側から分割したときは前記暗号データの下位側から分割された前記復号分割余データとして指定し、前記復号位置データの倍数と前記暗号データのバイト数とが等しい場合、前記復号分割余データをゼロとして指定する範囲指定手段と、前記復号位置データ及び前記範囲指定手段に基づいて、前記暗号データを減算前データ、及びその余からなる前記復号分割余データに分割する復号暗号分割手段と、前記減算前データを予め規定した減算規則に則って減算処理し、前記分割データ及び前記短データを生成する減算手段と、生成された前記分割データに対し、データ単位若しくはバイト単位の少なくとも何れか一方で、前記ビット値データに基づいて前記転値手段と逆方向へ転値処理する逆転値手段と、分割された前記復号分割余データをビット毎に反転処理し、生成された前記分割余データを転値処理された前記分割データの最上位バイトまたは最下位バイトの何れか一方のバイト端に結合し、前記共通鍵データ若しくは前記暗号データの復号データを生成する復号生成手段とを具備することを特徴とする請求項1または請求項2に記載の暗号システム。   Decryption target data acquisition means for acquiring the common key data, the encryption data to be decrypted, and the number-of-times data; first decryption data obtained by dividing the number of bytes of the encryption data by the radix; and A decryption ratio generating means for generating decrypted second data obtained by further dividing one data by the radix, a number value based on the number data and a number of bytes of the common key data, and a number of bytes of the common key data Is the same as or larger than the number value, the byte value data and the bit value data of the number of bytes corresponding to the position where the number value is counted from the arbitrary byte of the common key data are obtained, When the number of bytes of the key data is smaller than the number of times, the number of times is divided by the number of bytes of the common key data, and the remainder calculated as the remainder is the arbitrary buffer. Decoding data acquisition means for acquiring the byte value data and bit value data of the surplus bytes corresponding to the positions counted from the data, and adding the bit value data to the decoded first data, and obtaining the decoded integrated value For the number of times specified by the value of the generated decoded second data, the transition of the next byte of the number byte or the extra byte from which the bit value data has been acquired to the next position byte and addition of the bit value data are performed. Decryption position generation means for repeatedly generating decryption position data, and if the multiple of the decryption position data is larger than the number of bytes of the encrypted data, subtract the number of bytes of the encrypted data from the multiple of the decryption position data, Divide at the position counted from either the most significant byte or the least significant byte of the encrypted data by the obtained subtraction value, and from the least significant byte side When it is divided, it is designated as the decryption remainder data divided from the lower side of the encrypted data. On the other hand, when it is divided from the most significant byte side, the decryption remainder data is divided from the upper side of the encrypted data. If the multiple of the decryption position data is smaller than the number of bytes of the encryption data, the multiple of the decryption position data is subtracted from the number of bytes of the encryption data, the obtained subtraction value of the encryption data Dividing at the position counted from either the most significant byte or the least significant byte, and when dividing from the least significant byte side, specify as the decryption division remaining data divided from the upper side of the encrypted data, When the data is divided from the most significant byte side, it is designated as the decryption division remaining data divided from the lower side of the encrypted data, and the decryption position data When the multiple and the number of bytes of the encrypted data are equal, range designation means for designating the decryption remainder data as zero, and based on the decryption position data and the range designation means, the encrypted data is subtracted from the data, and A decryption / encryption division unit that divides the data into the decryption division remainder data, and a subtraction unit that subtracts the pre-subtraction data according to a predetermined subtraction rule to generate the divided data and the short data; Inverted value means for performing reverse value processing in the opposite direction to the inverted value means based on the bit value data in at least one of data units and byte units for the divided data, and the divided decoding division The surplus data is inverted for each bit, and the generated segmented surplus data is converted into the most significant byte or the least significant byte of the segmented data that has been transcoded. Re or bonded to one byte end, the common key data or cryptographic system according to claim 1 or claim 2, characterized in that it comprises a decoding generating means for generating a decoded data of the encrypted data. 任意のバイト数で構成された共通鍵データ及び暗号処理の対象となる平文若しくは暗号処理済の暗号対象データ、及び暗号処理の処理回数を示す回数データを取得する暗号対象データ取得手段、前記共通鍵データ及び前記暗号対象データのバイト数を合算し、得られた合算バイト数を基数で除算してなる第一データ、及び前記第一データを前記基数でさらに除算してなる第二データを生成する割合生成手段、前記共通鍵データの任意位置における任意バイトのバイト値データ、及び前記任意バイトの任意桁数のビット値データを取得するデータ取得手段、前記共通鍵データ及び前記暗号対象データを対比し、何れか一方の長いバイト数を有する長データを分割し、何れか他方の短いバイト数を有する短データのバイト数に合わせた分割データ及びその余からなる分割余データを生成するとともに、前記共通鍵データ及び前記暗号対象データが同一バイト数で構成されている、若しくは暗号処理された前記暗号データを同一バイト数の一対の等分割データとして分割するときに、何れか一方の前記共通鍵データ及び前記暗号対象データ若しくは前記等分割データを前記分割データとして指定し、何れか他方を前記短データとして指定するデータ指定手段、及び、前記第一データと前記ビット値データを積算し、得られた積算値に生成された前記第二データの値によって指定される回数分、前記任意バイトの次位置に相当する次位置バイトへの移行及び前記位置バイトの前記ビット値データの加算を繰返して分割位置データを生成する分割位置生成手段及び前記分割位置データに基づいて前記暗号データを分割し、前記長データ及び前記短データを生成する暗号分割手段を有する暗号処理繰返手段とを有する分割データ生成手段、前記分割データをデータ単位若しくはバイト単位の少なくとも何れか一方で、前記ビット値データの値に基づいて転値処理する転値手段、転値処理された前記分割データ及び前記短データを規定の加算規則に則って加算処理し、前記分割データ及び前記短データを合計したバイト数を有する加算データを生成する加算データ生成手段、及び前記分割余データをビット毎に反転処理し、生成された前記反転データを前記加算データの最上位バイトまたは最下位バイトの何れか一方のバイト端に結合し、暗号データを生成する暗号生成手段として、暗号コンピュータを機能させることを特徴とする暗号プログラムEncryption target data acquisition means for acquiring common key data composed of an arbitrary number of bytes, plaintext or encryption target data to be encrypted, and number of times data indicating the number of times of encryption processing, the common key The data and the number of bytes of the data to be encrypted are added together, and the first data obtained by dividing the obtained total number of bytes by the radix and the second data obtained by further dividing the first data by the radix are generated. Ratio generation means , data acquisition means for acquiring byte value data of an arbitrary byte at an arbitrary position of the common key data, and bit value data of an arbitrary number of digits of the arbitrary byte, the common key data and the encryption target data are compared. , One of the long data having a long number of bytes is divided, and the other is divided data according to the number of short data bytes having a short number of bytes And the shared key data and the encryption target data are configured with the same number of bytes, or the encrypted encrypted data is used as a pair of equally divided data with the same number of bytes. Data specifying means for specifying any one of the common key data and the encryption target data or the equally divided data as the divided data and specifying the other as the short data when dividing, and the first The data and the bit value data are integrated, and the transition to the next position byte corresponding to the next position of the arbitrary byte and the position are the number of times specified by the value of the second data generated in the obtained integrated value based on the dividing position generating means and the division position data to generate the division position data by repeating the addition of the bit value data bytes Wherein dividing the encrypted data, the length data and the divided data generation means and a cryptographic processing repeating unit having an encryption dividing means for generating the short data, the divided data in at least one of the data units or bytes, A transposition means for performing a transposition process based on the value of the bit value data, an addition process of the divided data and the short data subjected to the transposition process in accordance with a predetermined addition rule, and the divided data and the short data Addition data generation means for generating addition data having the total number of bytes, and the division remainder data is inverted for each bit, and the generated inverted data is either the most significant byte or the least significant byte of the addition data. bonded to one byte end, as the encryption generating means for generating encrypted data, the encryption-flop, characterized in Rukoto to function cryptographic computer Program . 前記共通鍵データ、復号対象となる前記暗号データ、及び前記回数データを取得する復号対象データ取得手段、前記暗号データのバイト数を前記基数で除算してなる復号第一データ、及び前記復号第一データを前記基数でさらに除算してなる復号第二データを生成する復号割合生成手段、前記回数データに基づく暗号処理の繰返回数を示す回数値と、取得した前記共通鍵データのバイト数を対比し、前記共通鍵データのバイト数が前記回数値と同一若しくは大の場合、前記共通鍵データの前記任意バイトから前記回数値を数えた位置に相当する回数バイトの前記バイト値データ及び前記ビット値データを取得し、一方、前記共通鍵データのバイト数が前記回数値よりも小の場合、前記回数値を前記共通鍵データのバイト数で除算し、その余として算出された余値を前記任意バイトから数えた位置に相当する余バイトの前記バイト値データ及び前記ビット値データを取得する復号データ取得手段、前記復号第一データに前記ビット値データを積算し、得られた復号積算値に生成された前記復号第二データの値によって指定される回数分、前記ビット値データを取得した前記回数バイト若しくは前記余バイトの次位置の前記次位置バイトへの移行及び前記ビット値データの加算を繰返して復号位置データを生成する復号位置生成手段、前記復号位置データの倍数が前記暗号データのバイト数よりも大の場合、前記復号位置データの倍数から前記暗号データのバイト数を減算し、得られた減算値によって前記暗号データの最上位バイト及び最下位バイトの何れか一方から数えた位置で分割し、前記最下位バイト側から分割したときは前記暗号データの下位側から分割された復号分割余データとして指定し、一方、前記最上位バイト側から分割したときは前記暗号データの上位側から分割された前記復号分割余データとして指定し、前記復号位置データの倍数が前記暗号データのバイト数よりも小の場合、前記暗号データのバイト数から前記復号位置データの倍数を減算し、得られた減算値によって前記暗号データの前記最上位バイト及び前記最下位バイトの何れか一方から数えた位置で分割し、前記最下位バイト側から分割したときは前記暗号データの上位側から分割された前記復号分割余データとして指定し、一方、前記最上位バイト側から分割したときは前記暗号データの下位側から分割された前記復号分割余データとして指定し、前記復号位置データの倍数と前記暗号データのバイト数とが等しい場合、前記復号分割余データをゼロとして指定する範囲指定手段、前記復号位置データ及び前記範囲指定手段に基づいて、前記暗号データを減算前データ、及びその余からなる前記復号分割余データに分割する復号暗号分割手段、前記減算前データを予め規定した減算規則に則って減算処理し、前記分割データ及び前記短データを生成する減算手段、生成された前記分割データに対し、データ単位若しくはバイト単位の少なくとも何れか一方で、前記ビット値データに基づいて前記転値手段と逆方向へ転値処理する逆転値手段及び分割された前記復号分割余データをビット毎に反転処理し、生成された前記分割余データを転値処理された前記分割データの最上位バイトまたは最下位バイトの何れか一方のバイト端に結合し、前記共通鍵データ若しくは前記暗号データの復号データを生成する復号生成手段として、前記暗号コンピュータをさらに機能させることを特徴とする請求項4に記載の暗号プログラム。 Decryption target data acquisition means for acquiring the common key data, the encryption data to be decrypted, and the number of times data, first decryption data obtained by dividing the number of bytes of the encryption data by the radix, and the first decryption Decryption ratio generation means for generating second decryption data obtained by further dividing the data by the radix, a number value indicating the number of repetitions of encryption processing based on the number of times data, and the number of bytes of the acquired common key data When the number of bytes of the common key data is equal to or larger than the number of times, the byte value data and the bit value of the number of bytes corresponding to a position obtained by counting the number of times from the arbitrary byte of the common key data On the other hand, if the number of bytes of the common key data is smaller than the number of times value, the number of times is divided by the number of bytes of the common key data, and the remainder Decoded data acquisition means an extra value calculated to acquire the byte value data and the bit value data over bytes corresponding to the position counted from the arbitrary byte Te, integrated the bit value data to said decoded first data The transition to the next position byte of the next position of the number of bytes or the surplus bytes that acquired the bit value data by the number of times specified by the value of the decoded second data generated in the obtained decoded integrated value And decryption position generation means for repeatedly generating addition of the bit value data to generate decryption position data, and when the multiple of the decryption position data is larger than the number of bytes of the encryption data, the encryption data is calculated from the multiple of the decryption position data. The number of bytes is subtracted, and the obtained subtraction value is divided at the position counted from either the most significant byte or the least significant byte of the encrypted data. When the data is divided from the least significant byte side, it is designated as decryption remainder data divided from the lower side of the encrypted data. On the other hand, when it is divided from the most significant byte side, it is divided from the upper side of the encrypted data. If the multiple of the decryption position data is smaller than the number of bytes of the encrypted data, the multiple of the decryption position data is subtracted from the number of bytes of the encrypted data. Dividing at a position counted from either the most significant byte or the least significant byte of the encrypted data according to a value, and when dividing from the least significant byte side, the decryption division divided from the upper side of the encrypted data On the other hand, when the data is divided from the most significant byte side, it is designated as the decryption divided remainder data divided from the lower side of the encrypted data. When the multiple of the decryption position data is equal to the number of bytes of the encrypted data, the encryption is performed based on the range designating means for designating the decryption remainder data as zero, the decryption position data, and the range designating means. Decryption / encryption dividing means for dividing data into pre-subtraction data and the decryption-partitioned remainder data comprising the remainder, and subtracting the pre-subtraction data in accordance with a predetermined subtraction rule to generate the divided data and the short data subtraction means for, with respect to generated the divided data, at least one of the data units or bytes, reversing value means for processing the rolling value to the rolling value means the opposite direction based on the bit value data, and division The decoded divided remainder data is inverted for each bit, and the generated divided remainder data is converted to the highest order byte of the divided data that has been transposed. Or bonded to any one of the byte ends the least significant byte, the common key as the data or decoding generating means for generating a decoded data of the encrypted data, according to claim 4, characterized in Rukoto further function the encrypted computer The encryption program described in .
JP2008286011A 2008-11-07 2008-11-07 Cryptographic system and cryptographic program Expired - Fee Related JP5073635B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008286011A JP5073635B2 (en) 2008-11-07 2008-11-07 Cryptographic system and cryptographic program
PCT/JP2009/058435 WO2010052944A1 (en) 2008-11-07 2009-04-22 Encryption system, encryption method, and encryption program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008286011A JP5073635B2 (en) 2008-11-07 2008-11-07 Cryptographic system and cryptographic program

Publications (2)

Publication Number Publication Date
JP2010113168A JP2010113168A (en) 2010-05-20
JP5073635B2 true JP5073635B2 (en) 2012-11-14

Family

ID=42152756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008286011A Expired - Fee Related JP5073635B2 (en) 2008-11-07 2008-11-07 Cryptographic system and cryptographic program

Country Status (2)

Country Link
JP (1) JP5073635B2 (en)
WO (1) WO2010052944A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5214703A (en) * 1990-05-18 1993-05-25 Ascom Tech Ag Device for the conversion of a digital block and use of same
JPH07271297A (en) * 1994-03-31 1995-10-20 Toppan Printing Co Ltd Ciphering method, ciphering device, deciphering method, deciphering device and cipher system
ATE403992T1 (en) * 1999-06-22 2008-08-15 Hitachi Ltd CRYPTOGRAPHIC APPARATUS AND METHOD
JP2005309148A (en) * 2004-04-22 2005-11-04 Hitachi Ltd Data converter and the data conversion method

Also Published As

Publication number Publication date
WO2010052944A1 (en) 2010-05-14
JP2010113168A (en) 2010-05-20

Similar Documents

Publication Publication Date Title
Ahmad et al. An experimental comparison of chaotic and non-chaotic image encryption schemes
CN111866018B (en) Data information encryption transmission method and device, computer equipment and storage medium
JP2011164607A (en) Method and system for privacy-preserving computation of edit distance of symbol sequence
US7894608B2 (en) Secure approach to send data from one system to another
JP2008513811A (en) Calculation conversion method and system
Gafsi et al. High securing cryptography system for digital image transmission
Vyakaranal et al. Performance analysis of symmetric key cryptographic algorithms
Ahmad et al. A secure network communication protocol based on text to barcode encryption algorithm
Gupta et al. Session key based novel lightweight image encryption algorithm using a hybrid of Chebyshev chaotic map and crossover
Kumar et al. Overview of information security using genetic algorithm and chaos
US11411720B2 (en) Key distribution system, terminal device, key distribution method, and program
Sakib Analysis of Fundamental Algebraic Concepts and Information Security System
Jana et al. A novel time-stamp-based audio encryption scheme using sudoku puzzle
Krishnamoorthy et al. Implementation and management of cloud security for industry 4. O-data using hybrid elliptical curve cryptography
Faragallah Digital image encryption based on the RC5 block cipher algorithm
Radhakrishnan et al. Securing distributed database using elongated RSA algorithm
Jumaa Digital image encryption using AES and random number generator
CN115765963A (en) Text image audit information recording and extracting method based on reversible steganography of ciphertext domain
Adebayo et al. Data Privacy System Using Steganography and Cryptography
Sultana et al. Keyless lightweight encipher using homomorphic and binomial coefficients for smart computing applications
Walia Cryptography Algorithms: A Review
JP5073635B2 (en) Cryptographic system and cryptographic program
Tarawneh Cryptography: Recent Advances and Research Perspectives
Ullagaddi et al. Symmetric synchronous stream encryption using images
Al-Attab et al. Lightweight effective encryption algorithm for securing data in cloud computing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120605

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120717

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120822

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150831

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees