JPH06138820A - Ciphering device and deciphering device - Google Patents

Ciphering device and deciphering device

Info

Publication number
JPH06138820A
JPH06138820A JP29248992A JP29248992A JPH06138820A JP H06138820 A JPH06138820 A JP H06138820A JP 29248992 A JP29248992 A JP 29248992A JP 29248992 A JP29248992 A JP 29248992A JP H06138820 A JPH06138820 A JP H06138820A
Authority
JP
Japan
Prior art keywords
plaintext
blocks
block
ciphertext
less
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.)
Pending
Application number
JP29248992A
Other languages
Japanese (ja)
Inventor
Shinji Ishii
晋司 石井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP29248992A priority Critical patent/JPH06138820A/en
Publication of JPH06138820A publication Critical patent/JPH06138820A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To cipher fixed-data-length data of a sector, a frame, etc., without varying the data length. CONSTITUTION:An input plain sentence is divided by a division part 10 into (k) bit plain sentence blocks and a separation part 11 separates the plain sentence blocks into blocks of >(n) constitution and blocks of <=(n) constitution; and a bit inversion part 12 inverts the bits of the plain sentence blocks of >(n) constitution to convert them into plain sentence blocks of <=(n) constitution, and both the plain sentence blocks of <(n) constitution are ciphered by RSA ciphering by using open keys (e) and (n). A mapping part 13 perform 1:1 mapping to values (n)-2k for blocks corresponding to blocks converted to <=(n) among the ciphered blocks and ciphered blocks for values larger than (n) and plain sentence block of <=(n) constitution which are not converted are put together by a composition part 14 in the order of corresponding divided plain sentence blocks, thereby outputting a ciphered sentence.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、m進数(m:2以
上)でk桁(k:自然数)より十分長いデータを平文と
し、その平文をm進数でk桁の除数nを使用しべき乗剰
余計算を利用するRSA公開鍵暗号アルゴリズム(以下
RSA暗号と略す)等で知られている暗号化装置及び暗
号復号装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention defines plaintext data that is m-adic (m: 2 or more) and is sufficiently longer than k digits (k: natural number), and uses the plaintext as an exponentiation using a k-divisor n. The present invention relates to an encryption device and an encryption / decryption device that are known by an RSA public key encryption algorithm (hereinafter abbreviated as RSA encryption) that uses a remainder calculation.

【0002】[0002]

【従来の技術】従来の公開鍵暗号アルゴリズムとして代
表例として、RSA暗号が知られている。公開鍵暗号ア
ルゴリズムの特徴として、暗号化鍵を公表することがで
きる(暗号化鍵を秘密に配送する必要がないという長所
を持っている)。ここで、RSA暗号について、この発
明に関連する事項だけを示す。詳細な説明は、社団法人
電子情報通信学会発行現代暗号理論第6章を参照のこ
と。
2. Description of the Related Art RSA encryption is known as a representative example of conventional public key encryption algorithms. As a feature of the public key cryptographic algorithm, the encryption key can be made public (it has an advantage that the encryption key does not need to be secretly delivered). Here, regarding the RSA encryption, only matters related to the present invention will be shown. For a detailed explanation, refer to Chapter 6 of Contemporary Cryptography, published by The Institute of Electronics, Information and Communication Engineers.

【0003】RSA暗号は、2つの大きな素数の合成数
(実システムでは、2の600乗程度)の素因数分解の
困難さに安全性の根拠をおいている。べき乗剰余の計算
により暗号化/復号を行う暗号である。ここで、暗号化
をE、復号をD、平文をM、暗号文をC、暗号化鍵を
e,n、復号鍵をd,nとする。e,nは公開し、dは
復号側が秘密にしておく。
The security of the RSA cryptosystem is based on the difficulty of factoring two large prime numbers (in the actual system, about 2600). It is a cipher that performs encryption / decryption by calculating a modular exponentiation. Here, the encryption is E, the decryption is D, the plaintext is M, the ciphertext is C, the encryption key is e, n, and the decryption key is d, n. e and n are made public, and d is kept secret by the decryption side.

【0004】暗号化側と復号側の処理は C=E(M)=Me mod n・・・・・ 暗号化側の処理 M=D(C)=Cd mod n・・・・・ 復号側の処理 のように行なう。なお、0≦M≦n−1なる任意の整数
Mに対して D(E(M))=M つまり、 MedM≡1(mod n) が成り立つ。
Processing on the encryption side and the decryption side is C = E (M) = M e mod n ... Processing on the encryption side M = D (C) = C d mod n. Do the same as on the side. Incidentally, D with respect to 0 ≦ M ≦ n-1 becomes any integer M (E (M)) = M words, M ed M≡1 (mod n) it holds.

【0005】パラメータの生成 (i)相異なる2つの大きな素数p,qを選び、その積
n=pqを計算する。 (ii)(p−1)と(q−1)の最小公倍数Lを計算
し、Lと互いに素でLより小さな任意の整数eを求め
る。 (iii)ed≡1(mod L)をユークリッド互除法により
解き、dを求める。
Generation of parameters (i) Two large prime numbers p and q which are different from each other are selected, and the product n = pq is calculated. (Ii) The least common multiple L of (p-1) and (q-1) is calculated, and an arbitrary integer e relatively prime to L and smaller than L is obtained. (Iii) ed ≡ 1 (mod L) is solved by the Euclidean mutual division method to obtain d.

【0006】このようなRSA公開鍵暗号アルゴリズム
等のべき乗剰余を利用した、公開鍵暗号システムは、ア
ルゴリズムの特徴からk桁の除数n未満の正数のみの暗
号化に制限されている。そこで、k桁より十分長い桁数
あるいは、連続して発生するデータを暗号化しようとす
ると、データをn未満のデータに区切る必要がでてく
る。その区切られたデータは、除数nの桁数kであるか
も知れないし、k−1桁であるかも知れない。図7Aに
m=2、n=21、k=5のときの具体例を示す。最初
のk=5桁(10110)はn=21以上であるからk
−1=4桁の(1011)で区切り、次の5桁(001
00)は21以下であるから5桁(00100)で区切
り、次の5桁(11101)は21以上であるから4桁
(1110)で区切る。以下同様にk=5桁がk−1=
4桁に区切る。
The public key cryptosystem utilizing the modular exponentiation of such RSA public key cryptosystem algorithm is limited to the encryption of only positive numbers less than the k digit divisor n due to the characteristics of the algorithm. Therefore, when it is attempted to encrypt the number of digits sufficiently longer than k digits or data that occurs continuously, it becomes necessary to divide the data into data of less than n. The delimited data may be k digits of the divisor n or k-1 digits. FIG. 7A shows a specific example when m = 2, n = 21, and k = 5. Since the first k = 5 digits (10110) is n = 21 or more, k
-1 = 4 digits separated by (1011), next 5 digits (001
Since 00) is 21 or less, it is delimited by 5 digits (00100), and the next 5 digits (11101) is 21 or more and is delimited by 4 digits (1110). Similarly, k = 5 digits is k−1 =
Divide into 4 digits.

【0007】また、ある区切りのデータがk−1桁であ
ったとしても暗号化されたデータは、k桁になる可能性
もある。従って、元のデータに対し暗号化されたデータ
は、桁数が増加することになる。これとは逆にk桁のデ
ータを暗号化すると、k−1桁に減少する場合もある。
さらに、このような暗号化データの復号を容易にするた
め桁揃えを行なうために、k−1桁の暗号化データに対
しては、先頭ビットの頭に0を1桁挿入しておかないと
復号出来なくなる。図7Bに、図7Aの各区切りデータ
をそれぞれ暗号化したデータを示し、その各暗号化デー
タ中のk−1=4桁のものについては先頭にDを挿入し
たものを図7Cに示す。このようにして全体の暗号文の
桁数は平文の桁数よりも増加する。
Further, even if the data of a certain delimiter has k-1 digits, the encrypted data may have k digits. Therefore, the number of digits in the data encrypted with respect to the original data increases. On the contrary, when k-digit data is encrypted, it may be reduced to k-1 digits.
Further, in order to perform digit alignment for facilitating the decryption of such encrypted data, one digit of 0 must be inserted at the beginning of the head bit for k-1 digit encrypted data. Can't decrypt. FIG. 7B shows data obtained by encrypting each of the delimited data shown in FIG. 7A, and FIG. 7C shows data obtained by inserting D at the head of each encrypted data having k−1 = 4 digits. In this way, the number of digits in the entire ciphertext is larger than the number of digits in plaintext.

【0008】[0008]

【発明が解決しようとする課題】コンピュータデータの
記録・伝送方法にはさまざまな方法が採用されている
が、その共通の特徴として、ある一定のデータ長を単位
(セクタ・フレーム)として記録・伝送される場合が多
い。このようにある一定長のデータに暗号をかけるとき
に必要なことは、もとの平文と暗号文とでデータの増減
がないことである。特に暗号文が平文に比べて増加する
ことは、増加した分暗号文は、もとの平文のあったセク
タ・フレーム等と同一の場所にすべての情報を記録する
ことは、不可能である。例を取って言い換えると、全セ
クタにデータが記録されているフロッピーディスクに暗
号をかけることは不可能であると言うことになる。
Various methods have been adopted for recording / transmitting computer data, and a common feature is that recording / transmitting a certain data length as a unit (sector / frame). It is often done. As described above, what is required when a certain length of data is encrypted is that the original plaintext and the ciphertext do not increase or decrease. In particular, it is impossible to record all the information in the same place as the sector / frame where the original plaintext is, because the ciphertext is increased compared to the plaintext. In other words, it is impossible to encrypt a floppy disk in which data is recorded in all sectors.

【0009】しかしRSA暗号をデータ通信やデータ蓄
積に使用しようとしたとき、先に述べたようにもとのデ
ータ(以下平文と言う)と暗号化された平文(以下暗号
文と言う)との桁数が必ずしも一致するとは限らないた
め、磁気ディスク等のセクタや通信システムのフレーム
長などの固定されたブロックデータに対して暗号処理を
すると、もとの暗号文が元のセクタや、フレーム長に入
らなくなるため、従来においては、データ長が固定化さ
れている装置やシステムはRSA暗号を適用出来なかっ
た。
However, when the RSA encryption is used for data communication or data storage, the original data (hereinafter referred to as plaintext) and the encrypted plaintext (hereinafter referred to as ciphertext) are used as described above. Since the numbers of digits do not always match, when performing encryption processing on fixed block data such as a sector of a magnetic disk or the frame length of a communication system, the original ciphertext changes the original sector or frame length. In the past, the RSA encryption cannot be applied to a device or system in which the data length is fixed.

【0010】この発明の目的は、データ通信やデータ蓄
積等のデータに公開鍵暗号アルゴリズムを利用し暗号を
かけたとき、平文データと暗号化データが常に同じ桁数
となる公開鍵暗号システムの暗号化装置及び暗号復号装
置を提供することにある。
An object of the present invention is to encrypt a public key cryptosystem in which plaintext data and encrypted data always have the same number of digits when data is encrypted by using a public key cryptographic algorithm for data communication and data storage. It is to provide an encryption device and an encryption / decryption device.

【0011】[0011]

【課題を解決するための手段】請求項1の発明によれば
入力平文は平文分割手段でk桁ごとのブロックに区切ら
れ、その区切られた平文ブロックはn以上の平文ブロッ
クとn未満の平文ブロックとに平文分離手段により分離
され、その分離されたn以上の平文ブロックは各桁反転
手段により、各桁の数値とm−1との差の絶対値がとら
れてn未満の平文ブロックに変換される。このn未満に
変換された平文ブロック及び変換されないn未満の平文
ブロックは暗号化手段により公開暗号化鍵e,nを用い
てn未満の暗号化ブロックに変換され、n未満に変換さ
れた平文ブロックに対する暗号化ブロックは写像手段に
よりn以上の値に1対1に写像(変換)される。各暗号
化ブロックと各写像されたn以上の値とは、平文分割手
段で分割された平文ブロックの対応するものの順に合成
手段により合成されて暗号化文として出力される。
According to the invention of claim 1, the input plaintext is divided into k-digit blocks by the plaintext dividing means, and the divided plaintext blocks are plaintext blocks of n or more and plaintexts of less than n. The plaintext block is separated into blocks by a plaintext separating means, and the separated plaintext blocks of n or more are taken as absolute values of the difference between the numerical value of each digit and m-1 by each digit inverting means to form a plaintext block of less than n. To be converted. The plaintext block converted to less than n and the plaintext block not converted to less than n are converted to an encrypted block less than n using the public encryption keys e and n by the encryption means, and a plaintext block converted to less than n. The encrypted block for is mapped (converted) to a value of n or more on a one-to-one basis by the mapping means. Each encryption block and each mapped value of n or more are combined by the combining means in the order of the corresponding plaintext blocks divided by the plaintext dividing means and output as an encrypted text.

【0012】請求項2の発明によれば入力暗号文は暗号
文分割手段によりk桁ごとの暗号文ブロックに分割さ
れ、その分割された暗号文ブロックはn未満の暗号文ブ
ロックと、n以上の暗号文ブロックとに暗号文分離手段
により分離され、そのn以上の暗号文ブロックは暗号化
処理で行われた写像と逆の写像が逆写像手段により行わ
れてn未満の暗号文ブロックとされる。この逆写像され
たn未満の暗号文ブロック及び逆写像されないn未満の
暗号文ブロックが復号手段により秘密鍵dと公開暗号化
鍵nとを用いて平文ブロックに復号される。逆写像によ
りn未満となった暗号文ブロックは各桁反転手段により
その各桁の数値とm−1との差の絶対値をとることによ
りn以上の平文ブロックに変換される。そのn以上の平
文ブロックと、上記変換されない平文ブロックとが、上
記分割された暗号文ブロックの対応するものの順に合成
手段により合成されて復号平文として出力される。
According to the second aspect of the present invention, the input ciphertext is divided into k-digit ciphertext blocks by the ciphertext dividing means, and the divided ciphertext blocks are ciphertext blocks less than n and n or more. The ciphertext block is separated into ciphertext blocks, and the ciphertext blocks of n or more are subjected to reverse mapping by the reverse mapping means to obtain ciphertext blocks of less than n. . The inverse-mapped ciphertext block of less than n and the non-inverse-mapped ciphertext block of less than n are decrypted into plaintext blocks by the decryption means using the secret key d and the public encryption key n. The ciphertext block that has become less than n by the inverse mapping is converted into a plaintext block of n or more by taking the absolute value of the difference between the numerical value of each digit and m-1 by each digit inverting means. The n or more plaintext blocks and the unconverted plaintext blocks are combined by the combining means in the order of corresponding ones of the divided ciphertext blocks, and output as decrypted plaintext.

【0013】上述の暗号化において、分割した平文ブロ
ック(例えばセクタ、フレーム単位)のデータ長の約数
か倍数の何れかを上記nとすることにより平文の桁数を
変化させずに暗号文を生成する。つまり例えば平文を単
位(セクタ、フレーム等)で平文ブロックに分割し、そ
の平文ブロックを2進数表現したときpビットで、nを
2進数表現したときjビットであったとすると、 j=pk (k=…1/3,1/2,1,2,3,…) が成立するようにする。
In the above-mentioned encryption, the ciphertext is changed without changing the number of digits of the plaintext by setting n to be either a divisor or a multiple of the data length of the divided plaintext block (for example, sector or frame unit). To generate. That is, for example, if a plaintext is divided into plaintext blocks in units (sectors, frames, etc.), and the plaintext block is represented by a binary number with p bits, and when n is represented by a binary number with j bits, then j = pk (k = ... 1/3, 1/2, 1, 2, 3, ...) are established.

【0014】n以上の平文ブロックに関して、m進数の
場合、その平文ブロックの各桁の数値とm−1との差の
絶対値(2進数の場合、全ビット反転と同じ意味)をと
ることにより、n未満の平文ブロックになる理由を図1
を利用して説明する。mがkビットであると言うこと
は、最上位ビットの数値は0ではない(即ち1)であ
る。なぜなら最上位ビットが0であるということは、そ
のビットはないものとして考えば、nがk−1ビットあ
るいはそれ以下であるといえる。また、1の反転は0で
あるから上記各桁とm−1との差の絶対値をとることに
より最上位ビットが0となったということは、n以上の
ブロックはいかなる数値であっても必ずn未満のブロッ
クに変換されるので、n以上のデータブロック(図1A
の元データブロックの斜線部分に相当)の全ビット反転
をすれば、必ずn未満の値(図1Bの全ビット反転の斜
線部分に相当)に写像されることがわかる。図1Bの全
ビット反転の斜線部分を暗号化すると図1Cの暗号化の
斜線部分に拡散される。さらに拡散されたデータに小さ
い順にnから2k までの番号を割り当てることにより、
図1Cの暗号化の斜線部分を図1Dの写像の斜線部分
(nから2k の間)に1対1の写像をすることが出来
る。
For a plaintext block of n or more, in the case of an m-ary number, by taking the absolute value of the difference between the value of each digit of the plaintext block and m-1 (in the case of a binary number, the same meaning as all bit inversion). , The reason why it becomes a plaintext block less than n
Use to explain. The fact that m is k bits means that the numerical value of the most significant bit is not 0 (that is, 1). Because the most significant bit is 0, it can be said that n is k-1 bits or less, assuming that the bit is not present. In addition, since the reversal of 1 is 0, the most significant bit becomes 0 by taking the absolute value of the difference between each digit and m−1, which means that any block of n or more has any numerical value. Since it is always converted into blocks smaller than n, data blocks larger than n (see FIG. 1A).
It can be seen that if all bits are inverted (corresponding to the shaded portion of the original data block), a value less than n is always mapped (corresponding to the shaded portion of all-bit inversion in FIG. 1B). When the hatched portion of all bit inversion in FIG. 1B is encrypted, it is spread to the encrypted hatched portion of FIG. 1C. By assigning numbers from n to 2 k to the spread data in ascending order,
One-to-one mapping can be performed on the hatched portion of the encryption of FIG. 1C to the hatched portion (between n and 2 k ) of the mapping of FIG. 1D.

【0015】ほとんどのセクタは128,256,51
2,1024byteなどの1024bit(=128
byte)の倍数である。そこで、nが1024bit
になるようにp,qを決めれば、(ii)を満たすことに
なる。あとは、通常のRSA暗号アルゴリズムと同様に
して暗号化鍵e,n・復号鍵dの生成をすればよい。
Most sectors are 128, 256, 51
2,1024 bytes such as 1024 bits (= 128
It is a multiple of (byte). Therefore, n is 1024 bits
(Ii) is satisfied if p and q are determined so that After that, the encryption keys e, n and the decryption key d may be generated in the same manner as the normal RSA encryption algorithm.

【0016】[0016]

【実施例】この発明の暗号化装置及び暗号復号装置を用
いた公開鍵暗号システムを図2に示す。暗号化処理側で
は、従来のRSA暗号化処理部1に加えて暗号化拡張処
理部2を、復号処理側では、同様に、RAS復号処理部
3に加えて復号拡張処理部4を備える。暗号化処理側で
の平文7の暗号化は暗号化鍵5(e,n)を利用して暗
号化拡張処理部2およびRSA暗号化処理部1で行なわ
れて暗号文8を得る。この暗号文8が例えば磁気ディス
クに書き戻される。復号処理側での暗号文8の復号は、
復号鍵6(d,n)を利用して復号拡張処理部4および
RSA復号処理部3で行なわれて復号文(=平文)9を
得る。従来のシステムでは、暗号化拡張処理部2、復号
拡張処理部4がなかった。
FIG. 2 shows a public key cryptosystem using the encryption device and the encryption / decryption device of the present invention. The encryption processing side includes an encryption extension processing unit 2 in addition to the conventional RSA encryption processing unit 1, and the decryption processing side similarly includes a decryption expansion processing unit 4 in addition to the RAS decryption processing unit 3. Encryption of the plaintext 7 on the encryption processing side is performed by the encryption extension processing unit 2 and the RSA encryption processing unit 1 using the encryption key 5 (e, n) to obtain the ciphertext 8. This ciphertext 8 is written back to the magnetic disk, for example. Decryption of the ciphertext 8 on the decryption processing side is
The decryption key 6 (d, n) is used to perform the decryption extension processing unit 4 and the RSA decryption processing unit 3 to obtain a decrypted text (= plain text) 9. In the conventional system, the encryption extension processing unit 2 and the decryption extension processing unit 4 were not provided.

【0017】請求項1の発明の暗号化装置の実施例を図
3に示し、これと図4とを利用してその動作を説明す
る。入力平文7を平文分割部10でnのビット長kと同
一のkビットごとに平文ブロックに分割する。分割した
平文ブロックは、平文分離部11で、n以上の平文ブロ
ックとn未満の平文ブロックとに分ける(図4では、A
の上部と下部の斜線をかけた部分に相当)。
FIG. 3 shows an embodiment of the encryption device according to the first aspect of the invention, and the operation thereof will be described with reference to FIG. 3 and FIG. The plaintext dividing unit 10 divides the input plaintext 7 into plaintext blocks for each k bits having the same bit length k as n. The divided plaintext block is divided into plaintext blocks of n or more and plaintext blocks of less than n by the plaintext separation unit 11 (A in FIG. 4).
Equivalent to the shaded area on the top and bottom).

【0018】n以上の平分ブロックはそのままでは、暗
号化することが出来ないので、ビット反転部(各桁反転
部)12によりすべてのビットを反転することにより、
n未満の平分ブロック(図4B)に変換する。そのn未
満に変換された平分ブロックと、変換されないn未満の
平分ブロックとをRSA暗号化処理部1で暗号化する
(図4C)。変換されないn未満の平文ブロックの暗号
化ブロックは直接データ合成部14に伝達する。全ビッ
ト反転をされたのちに暗号化された暗号化ブロックは写
像部13でn以上の値に写像する(図4D)。図4の具
体例では、暗号化ブロックの各値に小さい順にnから2
k までの番号を割り当てる。この写像の方法は、小さい
順でなくともよいが、盗聴者が小さい順に写像したこと
を知ったとしても、暗号化強度の低下に依存しないの
で、便宜上1通りに決めておいても問題はない。
Since the plain block of n or more cannot be encrypted as it is, by inverting all bits by the bit inverting unit (each digit inverting unit) 12,
Convert to a flat block less than n (FIG. 4B). The plaintext block converted to less than n and the plaintext block less than n that is not converted are encrypted by the RSA encryption processing unit 1 (FIG. 4C). The encrypted blocks of plaintext blocks less than n that are not converted are directly transmitted to the data synthesizing unit 14. The encrypted block that has been subjected to all bit inversion and then encrypted is mapped by the mapping unit 13 to a value of n or more (FIG. 4D). In the specific example of FIG. 4, each value of the encrypted block is from n to 2 in ascending order.
Assign numbers up to k . This mapping method does not have to be in the ascending order, but even if the eavesdropper learns that the mapping is done in the ascending order, it does not depend on the decrease in the encryption strength, so there is no problem in choosing one method for convenience. .

【0019】写像部13を経た暗号化ブロックをデータ
合成部14に直接供給した暗号化ブロックとを、平文分
割部10で分割されたブロック列の順に合成して暗号文
8として出力する(図4E)。この暗号文は例えば入力
平文が記録されていた磁気ディスクに書き戻す。請求項
2の発明の暗号復号装置の実施例を図5に示し、この動
作を図6を参照して説明する。
The encrypted block that has passed through the mapping unit 13 and the encrypted block that has been directly supplied to the data combining unit 14 are combined in the order of the block strings divided by the plaintext dividing unit 10 and output as ciphertext 8 (FIG. 4E). ). This ciphertext is written back to the magnetic disk on which the input plaintext was recorded, for example. FIG. 5 shows an embodiment of the encryption / decryption device according to the invention of claim 2, and its operation will be described with reference to FIG.

【0020】入力暗号文8を暗号文分割部15で(kビ
ットごとの暗号文ブロックに分割する。つぎに、暗号文
分離部16で暗号文ブロックがn未満か、n以上かによ
り暗号化ブロックを分離させる(図6Aの斜線なし部分
と斜線部分)。n未満の暗号文ブロックは、そのままR
SA復号処理部3で復号してデータ合成部19に伝達す
る。一方、n以上の暗号文ブロックは、逆写像部17で
パラメータをもとに暗号化時とは逆の写像を行なう(図
6B)。この逆写像部17で用いるパラメータは暗号化
鍵n,eの値から生成する。この生成方法は、nから2
k までのすべての値を暗号処理と全く同様にして、暗号
化データを生成する。これをメモリに保持しておき、n
から2k の平文とそれらの暗号文との関係付けが出来る
ようにしておく。
The input ciphertext 8 is divided into ciphertext blocks for every k bits by the ciphertext division unit 15. Next, the ciphertext block is divided by the ciphertext separation unit 16 depending on whether the ciphertext block is less than n or greater than n. Are separated (the non-shaded portion and the shaded portion of FIG. 6A).
The SA decoding processing unit 3 decodes the data and transmits it to the data synthesizing unit 19. On the other hand, for the ciphertext blocks of n or more, the inverse mapping unit 17 performs the inverse mapping based on the parameter based on the parameter (FIG. 6B). The parameters used in the inverse mapping unit 17 are generated from the values of the encryption keys n and e. This generation method is from n to 2
Encrypted data is generated by making all values up to k exactly the same as the cryptographic process. Keep this in memory and
To be able to associate 2 k plaintexts with their ciphertexts.

【0021】この逆写像された暗号文ブロックをRSA
復号処理部3で復号してビット反転部18で全ビット反
転し(図6D)、その反転したデータをデータ合成部1
9に伝達する。データ合成部19では、2つの経路を経
て復号化されたブロックを、暗号文分割部15で分割し
たブロック列の順に戻して復号文を得る。以上で、暗号
化処理時の平文の暗号化、および復号処理時の暗号文の
復号が成立する。
This inverse-mapped ciphertext block is RSA
The decoding processing unit 3 performs decoding, all bits are inverted by the bit inverting unit 18 (FIG. 6D), and the inverted data is used by the data synthesizing unit 1
9 is transmitted. In the data synthesizing unit 19, the blocks decrypted via the two paths are returned in the order of the block strings divided by the ciphertext dividing unit 15 to obtain the decrypted text. As described above, the plaintext encryption at the time of the encryption processing and the decryption of the ciphertext at the time of the decryption processing are established.

【0022】[0022]

【発明の効果】この発明によれば、暗号化しようとする
データ長の約数の何れかを選択することにより、暗号強
度を低下させることなく、m進数表現で暗号鍵nと同じ
桁数のデータの暗号化および復号をすることが出来、暗
号化により平文の桁数を増加させることがない。よって
固定データ長のセクタ・フレームに平文と同様に暗号文
を対応させることができる。
According to the present invention, by selecting any one of the divisors of the data length to be encrypted, the same number of digits as the encryption key n in m-ary number representation can be obtained without lowering the encryption strength. Data can be encrypted and decrypted, and encryption does not increase the number of plaintext digits. Therefore, a ciphertext can be associated with a sector frame having a fixed data length in the same manner as plaintext.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明を利用するとn以上の2k までの値が
暗号化出来る根拠を説明する図。
FIG. 1 is a diagram for explaining the reason why a value of n or more up to 2 k can be encrypted by using the present invention.

【図2】この発明を施した公開鍵暗号システムを示すブ
ロック図。
FIG. 2 is a block diagram showing a public key cryptosystem according to the present invention.

【図3】請求項1の発明の暗号化装置の実施例を示すブ
ロック図。
FIG. 3 is a block diagram showing an embodiment of an encryption device according to the invention of claim 1.

【図4】図3の装置の動作の説明に具体的な値を当ては
めた図。
FIG. 4 is a diagram in which specific values are applied to the description of the operation of the apparatus of FIG.

【図5】請求項2の発明の暗号復号装置の実施例を示す
ブロック図。
FIG. 5 is a block diagram showing an embodiment of an encryption / decryption device according to the invention of claim 2;

【図6】図3の装置の動作の説明に具体的な値を当ては
めた図。
6 is a diagram in which specific values are applied to the description of the operation of the apparatus in FIG.

【図7】従来のRSA暗号を用いた暗号化の動作を説明
する図。
FIG. 7 is a diagram illustrating an encryption operation using a conventional RSA encryption.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 m進数(m:2以上)でk桁(k:自然
数)より十分長いデータを平文とし、その平文をm進数
でk桁の除数nを使用しべき乗剰余計算を利用する公開
鍵暗号法の暗号化装置において、 入力平文をk桁ごとのブロックに区切る平文分割手段
と、 その平文分割手段でk桁に分割された平文ブロックをn
以上の平文ブロックとn未満の平文ブロックとに分離す
る平文分離手段と、 その平文分離手段で分離されたn以上の平文ブロック
を、その各桁の数値とm−1との差の絶対値をとること
よりn未満の平文ブロックに変換する各桁反転手段と、 公開暗号化鍵e,nを用いて上記n未満の平文ブロック
及び上記n未満に変換された平文ブロックをn未満の暗
号化ブロックに変換する暗号化手段と、 上記変換されたn未満の平文ブロックに対する上記暗号
化ブロックをn以上の値に1対1に写像する写像手段
と、 上記変換されることなく暗号化されたブロックと上記写
像されたn以上の値とを上記平文分割手段により分割さ
れた平文ブロックの対応するものの順序に合成する合成
手段と、 を具備する暗号化装置。
1. Public disclosure using m-adic number (m: 2 or more), which is sufficiently longer than k digits (k: natural number), as plaintext, and uses the modular exponentiation calculation using the plaintext with a k-digit divisor n. In an encryption device of the key encryption method, a plaintext dividing unit that divides an input plaintext into k-digit blocks and a plaintext block divided into k digits by the plaintext dividing unit is n
The plaintext separating means for separating the above plaintext blocks and the plaintext blocks less than n, and the plaintext blocks of n or more separated by the plaintext separating means are defined as the absolute value of the difference between each digit and m-1. By using each digit inverting means for converting into a plaintext block of less than n, the plaintext block of less than n and the plaintext block converted to less than n using the public encryption keys e and n are encrypted blocks of less than n. An encryption means for converting the encrypted plaintext block to a value less than n and a mapping means for mapping the encrypted block to a value of n or more on a one-to-one basis; and a block encrypted without conversion. An encryption apparatus comprising: a combining unit configured to combine the mapped values of n or more into the order of corresponding plaintext blocks divided by the plaintext dividing unit.
【請求項2】 m進数(m:2以上)でk桁(k:自然
数)より十分長いデータを平文とし、その平文をm進数
でk桁の除数nを使用しべき乗剰余計算を利用する公開
鍵暗号法により暗号化された暗号文の復号装置におい
て、 入力暗号文をk桁ごとのブロックに区切る暗号文分割手
段と、 その暗号分割手段で分割された暗号ブロックをn以上の
暗号文ブロックとn未満の暗号文ブロックとに分割する
暗号文分離手段と、 上記n以上の暗号文ブロックに対して暗号化処理で行な
われた写像と逆の写像を行なってn未満の暗号文ブロッ
クにする逆写像手段と、 秘密鍵dと公開暗号化鍵nを用いてこの逆写像されたn
未満の暗号文ブロック及び上記n未満の暗号文ブロック
を平文ブロックに復号する復号手段と、 上記逆写像によりn未満となった暗号文ブロックに対す
る復号平文ブロックを、その各桁の数値とm−1との差
を絶対値をとることよりn以上の平文ブロックに変換す
る各桁反転手段と、 上記変換されたn以上の平文ブロックと、上記変換され
ない復号平文ブロックとを上記暗号文分割手段により分
割された暗号ブロックの対応するものの順序に合成する
合成手段と、 を具備する暗号復号装置。
2. Public disclosure using m-adic number (m: 2 or more), which is sufficiently longer than k digits (k: natural number), as plaintext, and uses the modular exponentiation calculation using the plaintext with a k-digit divisor n of m-adic number. In a decryption device for a ciphertext encrypted by a key cryptosystem, a ciphertext dividing unit that divides an input ciphertext into blocks of k digits, and ciphertext blocks divided by the cipher dividing unit are n or more ciphertext blocks. A ciphertext separating unit that divides the ciphertext block into n or less ciphertext blocks, and an inverse mapping to the ciphertext block of n or more to reverse the mapping performed in the encryption process to obtain a ciphertext block of less than n. This inverse mapping n using the mapping means and the private key d and the public encryption key n
A ciphertext block of less than or equal to n and a decryption unit for decrypting the ciphertext block of less than n to a plaintext block, and a decryption plaintext block for a ciphertext block of less than n due to the inverse mapping, the numerical value of each digit and m-1 Each digit inverting means for converting into a plaintext block of n or more by taking an absolute value of the difference between, and the plaintext block of n or more converted, and the decrypted plaintext block not converted are divided by the ciphertext dividing means. An encryption / decryption device comprising: a combining unit that combines the corresponding encrypted blocks in order.
JP29248992A 1992-10-30 1992-10-30 Ciphering device and deciphering device Pending JPH06138820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29248992A JPH06138820A (en) 1992-10-30 1992-10-30 Ciphering device and deciphering device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29248992A JPH06138820A (en) 1992-10-30 1992-10-30 Ciphering device and deciphering device

Publications (1)

Publication Number Publication Date
JPH06138820A true JPH06138820A (en) 1994-05-20

Family

ID=17782486

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29248992A Pending JPH06138820A (en) 1992-10-30 1992-10-30 Ciphering device and deciphering device

Country Status (1)

Country Link
JP (1) JPH06138820A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011521292A (en) * 2008-05-20 2011-07-21 イルデト・コーポレート・ビー・ヴイ Cryptosystem
JP2012032740A (en) * 2010-08-03 2012-02-16 Chugoku Electric Power Co Inc:The Encryption device and method thereof
CN113676437A (en) * 2020-05-14 2021-11-19 中国移动通信集团云南有限公司 Parameter analysis method, parameter acquisition method, parameter setting method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011521292A (en) * 2008-05-20 2011-07-21 イルデト・コーポレート・ビー・ヴイ Cryptosystem
US8724802B2 (en) 2008-05-20 2014-05-13 Irdeto Corporate B.V. Cryptographic system
JP2012032740A (en) * 2010-08-03 2012-02-16 Chugoku Electric Power Co Inc:The Encryption device and method thereof
CN113676437A (en) * 2020-05-14 2021-11-19 中国移动通信集团云南有限公司 Parameter analysis method, parameter acquisition method, parameter setting method and device
CN113676437B (en) * 2020-05-14 2023-08-18 中国移动通信集团云南有限公司 Parameter acquisition method, parameter setting method and device

Similar Documents

Publication Publication Date Title
JP3901909B2 (en) ENCRYPTION DEVICE AND RECORDING MEDIUM CONTAINING PROGRAM
US6570989B1 (en) Cryptographic processing apparatus, cryptographic processing method, and storage medium storing cryptographic processing program for realizing high-speed cryptographic processing without impairing security
US7221757B2 (en) Method and system for accelerated data encryption
KR101187854B1 (en) Permutation Data Transformation to Enhance Security
US6081598A (en) Cryptographic system and method with fast decryption
US20070195948A1 (en) Method and device for the encryption and decryption of data
JPH09230787A (en) Encoding method and device therefor
JP4427693B2 (en) Data processing apparatus and method, and data decoding processing apparatus and method
WO2006095891A1 (en) Data processing apparatus
US20070277043A1 (en) Methods for Generating Identification Values for Identifying Electronic Messages
JPH0946332A (en) Communication system for communication statement enciphered by rsa procedure
JP2004157535A (en) Data ciphering method
JPH0697930A (en) Block cipher processor
US20040039918A1 (en) Secure approach to send data from one system to another
JPH06138820A (en) Ciphering device and deciphering device
JPH1117673A (en) Common key encryption communication method and its communication network
JPH06282227A (en) Public-key cipher device and public-key decoding device
RU2206961C2 (en) Method for iterative block encryption of binary data
EP1043863B1 (en) Method for the cryptographic conversion of L-bit input blocks of digital data info into L-bit output blocks
EP1529390B1 (en) Method and system for accelerated data encryption
JP7486693B2 (en) Ciphertext conversion system, ciphertext conversion method, and ciphertext conversion program
JP2001285281A (en) Encryption system
JPH0918468A (en) Cipher communication equipment and ciphering device
JP2000089666A (en) Encoding/decoding device
JP2004347885A (en) Encryption device processing method, decryption device processing method, device and program for same