JPH01175629A - Blocking system for remainder operation - Google Patents

Blocking system for remainder operation

Info

Publication number
JPH01175629A
JPH01175629A JP33604587A JP33604587A JPH01175629A JP H01175629 A JPH01175629 A JP H01175629A JP 33604587 A JP33604587 A JP 33604587A JP 33604587 A JP33604587 A JP 33604587A JP H01175629 A JPH01175629 A JP H01175629A
Authority
JP
Japan
Prior art keywords
bytes
block
flag
bits
blocking
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.)
Granted
Application number
JP33604587A
Other languages
Japanese (ja)
Other versions
JPH0820847B2 (en
Inventor
Kazue Tanaka
田中 和恵
Eiji Okamoto
栄司 岡本
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP62336045A priority Critical patent/JPH0820847B2/en
Publication of JPH01175629A publication Critical patent/JPH01175629A/en
Publication of JPH0820847B2 publication Critical patent/JPH0820847B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To facilitate the processing of a byte unit by blocking an inputted bit string with the same number of bits as the number of integers N, and flagging with respect to a block larger than N as the result. CONSTITUTION:A text to be ciphered is read in the byte unit and 64 bytes are set to be one block. When the bytes do not reach 64 bytes, zeros are fulled up, for example. In the case of Mi>=N, if the value of (i)-numbered block is set to Mi, (i)-numbered flag Fi is flagged. For ciphering, MiEmodN or (Mi-N)EmodN is calculated, the cipher sentence Ci of 64 bytes is obtained, and then the cipher sentence Ci and the flag Fi are transmitted or stored in a file. Here, N shows the positive integer, and E a cipher key. Thus, the processing of the byte unit is attained by remainder operation without increasing the length of the text so much.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は剰余演算処理により符号化する入力ビツト列を
ブロック化する方法およびその復号化に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a method of blocking an input bit string to be encoded by remainder arithmetic processing and its decoding.

(従来の技術) 入力されたビット列をブロック化し、おのおののブロッ
クに関しである正整数Nを法とした剰余演算を行う場合
、Nのビット数よりも小さいビット数でブロック化を行
う方法が知られている。例えば、コンピュータ(Com
puter)誌1986年9月号に掲載された論文[ア
・プロポーズド・スタンダード・フォーマット・フォア
・アール・ニス・ニー・クリプトシステムズ(A  P
roposed 5tandard  Format 
for  R8ACryptosystems) Jで
は、入力されたバイト列をNのバイト数よりも1少ない
バイト数でブロック化する方法が提案されている。
(Prior art) When an input bit string is divided into blocks and a remainder operation is performed on each block modulo a positive integer N, a method is known in which the blocks are divided into blocks using a smaller number of bits than the number of bits of N. ing. For example, a computer (Com
A proposed standard format for cryptosystems (A.P. puter) magazine, September 1986.
roposed 5standard Format
For R8A Cryptosystems) J, a method is proposed in which an input byte string is divided into blocks with the number of bytes one less than the number of bytes of N.

(発明が解決しようとする問題点) 従来の方式において、1ビツト少なくブロッキングする
とバイト単位の処理が難しくなり、また、1バイト少な
くブロッキングすると、剰余演算後の出力はNと同じバ
イト数になるのでこの処理により1ブロツクに付き1バ
イト長さが増えるという欠点を持つ。
(Problems to be solved by the invention) In the conventional system, if one bit less is blocked, it becomes difficult to process byte by byte, and if one byte less is blocked, the output after the remainder operation will be the same number of bytes as N. This process has the disadvantage that the length increases by 1 byte per block.

(問題点を解決するため手段) 上記問題点は、次のブロック化方式で除去できる。即ち
、入力されたビット列に対して、正整数Nと同じビット
数でブロッキングし、その結果Nより大きくなるブロッ
クに対してはフラグをたてる剰余演算用ブロック化方式
、あるいは、正整数Nと同じビット数でブロッキングさ
れ、その結果Nより大きくなるブロックに対してはフラ
グをたてられた後、それぞれのブロックに剰余演算処理
をほどこされたビット列に対して、Nと同じビット数で
ブロッキングし、各ブロックに対応するフラグがたって
いるときはそのブロックにNを加算する方式、である。
(Means for solving the problem) The above problem can be removed by the following blocking method. In other words, the input bit string is blocked with the same number of bits as the positive integer N, and blocks that are larger than N as a result are flagged, or the blocking method is the same as the positive integer N. Blocking is performed by the number of bits, and blocks whose result is larger than N are flagged, and then the bit strings subjected to the remainder operation are blocked by the same number of bits as N, When the flag corresponding to each block is on, N is added to that block.

(実施例) 本発明をR8A暗号に実施した例を与える。(Example) An example will be given in which the present invention is implemented in the R8A cipher.

R8A暗号を簡単に説明する。暗号化したいメツセージ
M(ただしO≦MAN)を暗号化鍵Eを用いてC= M
EmodNを計算し、Cを暗号文とする。これを復号化
鍵りを用いてCDmodNを計算すればMが復号できる
という暗号方式である。詳細は前記の文献に載っている
The R8A encryption will be briefly explained. Message M to be encrypted (O≦MAN) using encryption key E, C=M
Calculate EmodN and let C be the ciphertext. This is an encryption method in which M can be decrypted by calculating CDmodN using a decryption key. Details can be found in the above-mentioned document.

いま、Nを64バイトの数とする。Now, let N be a number of 64 bytes.

まず、第一の発明の実施例を示す。第1図は実施例を示
すフローチャートである。
First, an example of the first invention will be shown. FIG. 1 is a flowchart showing an embodiment.

暗号化したいテキストをバイト単位で読み込み、64バ
イトを1ブロツクとする。64バイトに満たないときは
、例えば零詰めにする。i番目のブロックの値をMiと
するとMi2:Nのとき、i番目のフラグFiをたてる
。暗号化はMH”modN或は(MH−N)EmodN
を計算して64バイトの暗号文Ciを得る。暗号文C1
(i==0.1,2.・・・)とフラグFi(i=o、
1,2.・・・)を送信、或はファイルに格納する。
Read the text you want to encrypt in byte units, and define 64 bytes as one block. If it is less than 64 bytes, pad it with zeros, for example. Letting the value of the i-th block be Mi, when Mi2:N, the i-th flag Fi is set. Encryption is MH”modN or (MH-N)EmodN
is calculated to obtain a 64-byte ciphertext Ci. Ciphertext C1
(i==0.1, 2...) and flag Fi (i=o,
1, 2. ...) or store it in a file.

暗号文とフラグは、例えば別々のデータとしてもよいし
、暗号文の最初か最後にフラグを付けてもよい。第2図
は、この−例のフォーマットを示す図で、暗号文の最後
にフラグを付けている。フラグは8個で1バイトにパッ
クする。
For example, the ciphertext and the flag may be separate data, or the flag may be added to the beginning or end of the ciphertext. FIG. 2 is a diagram showing the format of this example, in which a flag is attached to the end of the ciphertext. Eight flags are packed into one byte.

次に第二の発明の実施例を示す。Next, an example of the second invention will be shown.

第三図は第2の実施例を示すフローチャートである。FIG. 3 is a flowchart showing the second embodiment.

上記のように暗号化された暗号文Ciとそれに対応する
フラグFiを用いて復号する。例えば第二図のようにフ
ォーマットされたファイルを受は取ったとする。このと
き、ファイルの大きさが分かれば、暗号文64バイトに
対してフラグが1ビツト付いているので、フラグと暗号
文の配分は一意に分かる。
Decryption is performed using the ciphertext Ci encrypted as described above and the corresponding flag Fi. For example, suppose you receive a file formatted as shown in Figure 2. At this time, if the size of the file is known, the allocation of flags and ciphertext can be uniquely determined since 1 bit is attached to a flag for every 64 bytes of ciphertext.

復号鍵りを用いて、Mi’=03DmodNを計算する
Using the decryption key, calculate Mi'=03DmodN.

もしフラグFiがたっていればこれにNをくわえたもの
をMl’とする。このときすべてのiに対してMi’;
Miが成り立っている。
If the flag Fi is on, N is added to it and set as Ml'. Then Mi' for all i;
Mi is established.

(発明の効果) 以上詳細に説明したように、本発明ブロック方式を用い
れば、テキストの長さをそれほど増やすことなく剰余演
算によるバイト単位の処理が行えるので、暗号などに適
用して効果が大きい。
(Effects of the Invention) As explained in detail above, by using the block method of the present invention, byte-by-byte processing can be performed using remainder operations without significantly increasing the length of the text, so it is highly effective when applied to cryptography, etc. .

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の実施例における暗号化のフローチャー
ト、第2図は暗号文とフラグのフォーマットの一例を示
す図、第3図は本第二発明の実施例における復号化のフ
ローチャートである。
FIG. 1 is a flowchart of encryption in an embodiment of the present invention, FIG. 2 is a diagram showing an example of the format of a cipher text and a flag, and FIG. 3 is a flowchart of decryption in an embodiment of the second invention.

Claims (1)

【特許請求の範囲】 1、入力されたビット列に対して、正整数Nと同じビッ
ト数でブロッキングし、その結果Nより大きくなるブロ
ックに対してはフラグをたてる剰余演算用ブロック化方
式。 2、正整数Nと同じビット数でブロッキングされ、その
結果Nより大きくなるブロックに対してはフラグをたて
られた後、それぞれのブロックに剰余演算処理をほどこ
されたビット列に対して、Nと同じビット数でブロッキ
ングし、各ブロックに対応するフラグがたっているとき
はそのブロックにNを加算する剰余演算用ブロック化方
式。
[Scope of Claims] 1. A blocking method for remainder calculations in which an input bit string is blocked with the same number of bits as a positive integer N, and blocks that are larger than N as a result are flagged. 2. After blocking with the same number of bits as the positive integer N, flags are set for blocks that are larger than N as a result, N and A blocking method for remainder calculations in which blocking is performed using the same number of bits, and when the flag corresponding to each block is set, N is added to that block.
JP62336045A 1987-12-29 1987-12-29 Blocking method for remainder calculation Expired - Lifetime JPH0820847B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62336045A JPH0820847B2 (en) 1987-12-29 1987-12-29 Blocking method for remainder calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62336045A JPH0820847B2 (en) 1987-12-29 1987-12-29 Blocking method for remainder calculation

Publications (2)

Publication Number Publication Date
JPH01175629A true JPH01175629A (en) 1989-07-12
JPH0820847B2 JPH0820847B2 (en) 1996-03-04

Family

ID=18295130

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62336045A Expired - Lifetime JPH0820847B2 (en) 1987-12-29 1987-12-29 Blocking method for remainder calculation

Country Status (1)

Country Link
JP (1) JPH0820847B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0275019U (en) * 1988-11-24 1990-06-08

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62118642A (en) * 1985-11-19 1987-05-30 Canon Inc Redundancy suppression coding system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62118642A (en) * 1985-11-19 1987-05-30 Canon Inc Redundancy suppression coding system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0275019U (en) * 1988-11-24 1990-06-08

Also Published As

Publication number Publication date
JPH0820847B2 (en) 1996-03-04

Similar Documents

Publication Publication Date Title
EP0792041B1 (en) Method and apparatus for block encryption
EP0725511B1 (en) Method for data encryption/decryption using cipher block chaining (CBC) and message authentication codes (MAC)
US7907725B2 (en) Simple universal hash for plaintext aware encryption
US8213607B2 (en) Method for securely extending key stream to encrypt high-entropy data
US8301905B2 (en) System and method for encrypting data
JPH06236148A (en) Data processing system for executing data-encrypting algorithm, wherein performance in ansi x3.92 data-encrypting algorithm standard is strengthened
EP2352251A1 (en) Content decoding apparatus, content decoding method and integrated circuit
JPH11109856A (en) Decoding apparatus
JPH01261689A (en) System for keeping secrecy of data
JPH0488736A (en) Data transmission system
JP3769804B2 (en) Decoding method and electronic device
EP0996250A2 (en) Efficient block cipher method
JPH0697930A (en) Block cipher processor
JPH01175629A (en) Blocking system for remainder operation
JP4287397B2 (en) Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program
JP2009098321A (en) Information processor
KR100494560B1 (en) Real time block data encryption/decryption processor using Rijndael block cipher and method therefor
JPS6281145A (en) Data ciphering system
JP2834450B2 (en) Encryption device
KR100546777B1 (en) Apparatus and method for SEED Encryption/Decryption, and F function processor therefor
JP3736731B2 (en) Replacement processing apparatus and program recording medium thereof
KR100262384B1 (en) Encryption method and apparatus
JP2003333036A (en) Message authentication device, message authenticating method, message authenticating program, and computer- readable recording medium with the program stored thereon
JP4094758B2 (en) Data replacement / division method and apparatus
JPH027080A (en) Variable enciphering device

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term