JPS62118471A - Accounting device - Google Patents

Accounting device

Info

Publication number
JPS62118471A
JPS62118471A JP60259994A JP25999485A JPS62118471A JP S62118471 A JPS62118471 A JP S62118471A JP 60259994 A JP60259994 A JP 60259994A JP 25999485 A JP25999485 A JP 25999485A JP S62118471 A JPS62118471 A JP S62118471A
Authority
JP
Japan
Prior art keywords
random number
card
code
amount
error
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
JP60259994A
Other languages
Japanese (ja)
Other versions
JPH06101014B2 (en
Inventor
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 JP25999485A priority Critical patent/JPH06101014B2/en
Publication of JPS62118471A publication Critical patent/JPS62118471A/en
Publication of JPH06101014B2 publication Critical patent/JPH06101014B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Prepayment Telephone Systems (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

PURPOSE:To have no contradiction in an accounting processing between an IC card and an accounting device by providing a random number generating means for generating a random number in the accounting device for performing a finance transaction with a portable type device. CONSTITUTION:When the IC 107 card is inserted into the accounting device, a microprocessor 102 generates the random number KW in a random number generator 103, enciphers an amount of a charge F and the random number KW as a key in a cipher/decoder 104 and feeds to the IC card 107 through a card interface 101. Herein, the card 107 enciphers the amount of a payment and an error and alteration detection code CC by the random number KW and feeds. The microprocessor 102 decodes the received data in the decoder 104 by making the random number KW the key. If the code CC is correct, from the amount of the charge F, the amount of the payment F' is subtracted, and information A in which the the amount of the payment F' is subtracted or not and the code CC are enciphered in the decoder 104 according to the random number KW and fed to the card 107.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は演算機能を有するカード(以下ICカードと称
する)との間で課金処理を行なう課金装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a billing device that performs billing processing with a card having an arithmetic function (hereinafter referred to as an IC card).

(従来の技術) ICカードを利用した課金方式としては、ICカードの
認証機能を利用した次の方式がある。ICカードと課金
装置は秘密のコードKMを共有している。
(Prior Art) As a charging method using an IC card, there is the following method using the authentication function of the IC card. The IC card and the billing device share a secret code KM.

課金装置は乱数RNを生成し、KMで暗号化された料金
額Fと共にICカードに送る。ICカードは暗号化され
た料金額をKMで復号化して料金額Fを得、ICカード
に記憶されている残金がらFを引く。さらにRNをKM
で暗号化して課金装置に返送する。課金装置ではそれを
KMで復号化し、RNと一致すれば改ざんがなされなか
ったと見做して、料金額Fを清算する。
The charging device generates a random number RN and sends it to the IC card together with the charge amount F encrypted with KM. The IC card decrypts the encrypted fee amount using KM to obtain the fee amount F, and subtracts F from the remaining amount stored in the IC card. KM more RN
is encrypted and sent back to the billing device. The billing device decodes it using KM, and if it matches the RN, it is assumed that no tampering has been done, and the charge amount F is settled.

(発明が解決しようとする問題点) 従来の方式によれば、課金装置が改ざんありと判断した
時料金額Fを清算しないにもがかわらず、ICカードで
は残金を減額してしまうという欠点を有する。課金装置
で返送されたものをKMで復号化してRNが現われない
という事態は改ざんによる他、悪意によらない単なるエ
ラーの可能性もある。悪意のICカード所有者がメツセ
ージを改ざんした場合にはICカードのみ減額されても
自業自得であるが、それ以外の場合も多いので課金装置
が清算しない場合にはICカードも減算しない方が望ま
しい。
(Problems to be Solved by the Invention) According to the conventional system, when the billing device determines that there has been tampering, the charge amount F is not settled, but the IC card reduces the remaining balance. have A situation where the RN does not appear when the KM decodes what is returned by the billing device may be due to tampering, or it may be a simple error that is not malicious. If a malicious IC card holder falsifies a message, it is his fault even if only the IC card is deducted, but there are many other cases, so if the billing device does not clear the charge, it is better not to deduct the IC card as well. desirable.

本発明の目的はこの欠点を除去することにある。The aim of the invention is to eliminate this drawback.

(問題点を解決するための手段) 上記の問題点を解決するために、本発明は次の手段を採
用している。即ち、−ii月般型装置との間で金融取引
を行なう課金装置において、乱数を発生する乱数発生手
段と、前記可搬型装置に通知する料金額と前記乱数KW
をあらかじめ定められたパターンに依存して符号変換す
る第1の符号変換手段と、前記可搬型装置において前記
乱数KWに依存して符号変換された誤り・改ざん検出コ
ードを受けとり前記乱数KWに依存して逆変換を行なう
逆変換手段と、前記の受けとった誤り・改ざん検出コー
ドが正しいか否かを判定する判定手段と、前記判定手段
が肯定的に判定したときにのみ前記料金額を変更する演
算手段と、前記可搬型装置に通知する誤り・改ざん検出
パターンと前記判定手段の判定結果を前記乱数KWに依
存して符号変換する第2の符号変換手段とから成ること
を特徴とする課金装置である。
(Means for solving the problems) In order to solve the above problems, the present invention employs the following means. That is, in a billing device that performs financial transactions with a monthly general device, a random number generating means that generates a random number, and a charge amount and the random number KW that are notified to the portable device.
a first code conversion means that converts the code depending on a predetermined pattern; an inverse conversion means for performing inverse conversion; a determination means for determining whether the received error/tampering detection code is correct; and an operation for changing the charge amount only when the determination means makes a positive determination. and second code converting means for code converting the error/tampering detection pattern to be notified to the portable device and the determination result of the determining means depending on the random number KW. be.

(作用) 第2図を用いて本発明がどのように作用するかを示す。(effect) Figure 2 is used to illustrate how the invention works.

201は課金装置、202はICカードであり、両者は
秘密キーKMを共有している。課金装置がICカードに
支払ってもらいたい料金額をF、ICカードが所有して
いる金額即ち残金をC8とする。まず課金装置201は
乱数KWを発生し、料金額Fと共にKMで暗号化してI
Cカードに送る。ICカードはKMで暗号化されたEK
M(F、 KW)を受は取り、KMで復号化する。そし
て残金C8からF′ を引く。F′ は本来Fと一致す
べきものであるが、O8<Fのときなどに一部でも支払
おうとする場合に、実際に支払われる金額である。この
F′ と誤り・改ざん検出コードCCをキーKWで暗号
化して課金装置に送る。
201 is a billing device, 202 is an IC card, and both share a secret key KM. Let F be the amount of charge that the billing device wants the IC card to pay, and C8 be the amount of money owned by the IC card, that is, the remaining balance. First, the charging device 201 generates a random number KW, encrypts it together with the fee amount F using KM, and
Send to C card. IC card is EK encrypted with KM
It receives M(F, KW) and decodes it with KM. Then, subtract F' from the remaining amount C8. F' should originally match F, but it is the amount that is actually paid in cases where O8<F, such as when paying even a portion of the amount. This F' and the error/tampering detection code CC are encrypted with the key KW and sent to the billing device.

CCは具体的には、任意に定められたパターンである。Specifically, CC is an arbitrarily determined pattern.

課金装置は送られたメツセージを復号化し、もし正しい
CCが出てくればエラーや改ざんはないと判1析してF
′ をFから引き、さもなければFをそのままにして、
CCが正しがったが否がの情報AとCCをKWで暗号化
してICカードに送る。ICカードはそれを復号化し、
正しいCCが出てくればエラーや改ざんはないと判断し
、さらに情報Aが課金装置はFからF′ を減額してい
ないことを示していればC8にF′ を加えて、元のF
′ を減額する前の状態に戻す。
The billing device decrypts the sent message, and if a correct CC appears, it determines that there is no error or tampering, and then F
′ from F, otherwise leave F as is,
Whether CC is correct or not, information A and CC are encrypted with KW and sent to the IC card. The IC card decodes it,
If a correct CC appears, it is determined that there is no error or tampering, and if information A indicates that the billing device has not deducted F' from F, it adds F' to C8 and returns the original F.
′ is returned to the state before the reduction.

(実施例) 第1図は本発明の実施例を示すブロック図である。本発
明は第2図の課金装置201に関するものである。図に
おいてカードインターフェース101はICカードとイ
ンターフェースをとる。マイクロプロセッサー102は
各種データのコントロール、四則演算などを行ない、そ
のプログラムはROM105に記憶されている。RAM
106は料金額Fの記憶及びマイクロプロセッサ−の作
業領域である。なお、少なくとも料金額は不揮発性のR
AMに入れておく必要がある。乱数発生器103は乱数
を発生し、暗号・復号器104は暗号化、復号化を行な
う。
(Embodiment) FIG. 1 is a block diagram showing an embodiment of the present invention. The present invention relates to the billing device 201 shown in FIG. In the figure, a card interface 101 interfaces with an IC card. The microprocessor 102 controls various data and performs four arithmetic operations, and its programs are stored in the ROM 105. RAM
106 is a storage area for the charge amount F and a work area for the microprocessor. In addition, at least the charge amount is non-volatile R.
I need to put it on AM. A random number generator 103 generates random numbers, and an encoder/decryptor 104 performs encryption and decryption.

マイクロプロセッサ−102の作業をフローチャートに
して第3図に示す。ICカードが課金装置に差し込まれ
るとマイクロプロセッサ−は乱数発生器103に乱数K
Wを生成させ、料金額Fと共にKWをキーとして暗号・
復号器104で暗号化させカードインターフェース10
1を通じてICカード107に送る。ここでICカード
が支払金額と誤り・改ざん検出コードCCをKWで暗号
化して送るようにしておく。この受は取ったデータをマ
イクロプロセッサ−102は暗号・復号器104でKW
をキーとして復号化させる。もし誤り・改ざん検出コー
ドが正しいCCならば料金額Fから支払金額F′を減額
し、減額したか否かの情報Aと誤り・改ざん検出コード
CCをKWで暗号、復号器104で暗号化してICカー
ドに送る。
The operations of the microprocessor 102 are shown in a flowchart in FIG. When the IC card is inserted into the billing device, the microprocessor sends a random number K to the random number generator 103.
W is generated and encrypted using KW as a key along with the fee amount F.
The card interface 10 is encrypted by the decryptor 104.
1 to the IC card 107. Here, the IC card is configured to encrypt the payment amount and the error/tampering detection code CC with KW and send it. The microprocessor 102 sends the received data to the encoder/decryptor 104.
Decrypt using the key. If the error/tampering detection code is correct CC, the payment amount F' is subtracted from the fee amount F, and the information A indicating whether or not the amount has been reduced and the error/tampering detection code CC are encrypted by KW and decrypted by the decoder 104. Send to IC card.

本実施例において、キーKMは暗号・復ひ器に内蔵して
おくことが望ましい。また乱数発生器]−03は市販さ
れている自然乱数発生器でよい。暗号・復号器コ04は
ICカードに用いられているものと同一でなければなら
ない。マイクロプロセッサ−102で実行させることも
できるが、この場合にはKMを外部からアクセスできな
い領域に格納する。
In this embodiment, it is desirable that the key KM is built into the encryption/decryption device. Further, the random number generator ]-03 may be a commercially available natural random number generator. The encoder/decoder 04 must be the same as that used in the IC card. It can also be executed by the microprocessor 102, but in this case the KM is stored in an area that cannot be accessed from the outside.

本実施例において、課金装置ではICカードがら通知さ
れる支払金額F′が少なすぎるなどの理由により料金額
を減額しない」:うにすることができる。このときはA
=NOとすれば、1;い。この変更は本発明の範囲に含
まれる。
In this embodiment, the billing device may not reduce the fee due to reasons such as the payment amount F' notified from the IC card being too small. At this time A
If = NO, then 1; Yes. This modification is within the scope of the invention.

なお、本実施例において、ICカードがまず減額を通知
するようにすれば後に支払金額F′ を通知する必要が
なくなる。
In this embodiment, if the IC card first notifies the user of the reduction, there is no need to notify the payment amount F' later.

また、本実施例において、最初に課金装置がICカード
に送信するデータは、料金額Fと乱数KWをKMで暗号
化したものであるが、さらに誤り・改ざん検出コードを
追加することができる。このときICカードが復号化し
て正しい誤り・改ざん検出コードが現われなかったとき
は、ICカードは課金装置に打ち切りを通知することに
なる。
Further, in this embodiment, the data that the billing device first sends to the IC card is the charge amount F and the random number KW encrypted with KM, but an error/tampering detection code can be added. At this time, if the IC card decodes and a correct error/tampering detection code does not appear, the IC card will notify the billing device of termination.

(発明の効果) 以上詳細に説明したように、本発明を用いればICカー
ドと課金装置の間の課金処理に矛盾がないようにするこ
とができるので、その効果は大きい。
(Effects of the Invention) As described above in detail, the present invention has great effects because it is possible to prevent inconsistency in billing processing between the IC card and the billing device.

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

第1図は本発明の実施例を示すブロック図、第2図は本
発明の作用を示すための図、第3図はマイクロプロセッ
サーのなすべき作業のフローチャートである。図におい
て、101はカードインターフェース、102はマイク
ロプロセッサ−1103は乱数発生器、104は暗号・
復号器、J−05はROM、 106はRAM、201
は課金装置、107.202はICカードを各々示す。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a diagram showing the operation of the present invention, and FIG. 3 is a flow chart of the work to be performed by the microprocessor. In the figure, 101 is a card interface, 102 is a microprocessor, 1103 is a random number generator, and 104 is a cryptographic controller.
Decoder, J-05 is ROM, 106 is RAM, 201
107 and 202 indicate a billing device and an IC card, respectively.

Claims (1)

【特許請求の範囲】[Claims] 可搬型装置との間で金融取引を行なう課金装置において
、乱数を発生する乱数発生手段と、前記可搬型装置に通
知する料金額と前記乱数KWをあらかじめ定められたパ
ターンに依存して符号変換する第1の符号変換手段と、
前記可搬型装置において前記乱数KWに依存して符号変
換された誤り・改ざん検出コードを受けとり前記乱数K
Wに依存して逆変換を行なう逆変換手段と、前記の受け
とった誤り・改ざん検出コードが正しいか否かを判定す
る判定手段と、前記判定手段が肯定的に判定したときに
のみ前記料金額を変更する演算手段と、前記可搬型装置
に通知する誤り・改ざん検出パターンと前記判定手段の
判定結果を前記乱数KWに依存して符号変換する第2の
符号変換手段とから成ることを特徴とする課金装置。
In a billing device that performs financial transactions with a portable device, a random number generating means generates a random number, and a charge amount notified to the portable device and the random number KW are code-converted depending on a predetermined pattern. a first code conversion means;
The portable device receives an error/tampering detection code code-converted depending on the random number KW, and receives the random number K.
an inverse conversion means that performs inverse conversion depending on W; a determination means that determines whether or not the received error/tampering detection code is correct; and a second code converting means that converts the error/tampering detection pattern to be notified to the portable device and the judgment result of the judging means depending on the random number KW. billing device.
JP25999485A 1985-11-19 1985-11-19 Billing device Expired - Lifetime JPH06101014B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25999485A JPH06101014B2 (en) 1985-11-19 1985-11-19 Billing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25999485A JPH06101014B2 (en) 1985-11-19 1985-11-19 Billing device

Publications (2)

Publication Number Publication Date
JPS62118471A true JPS62118471A (en) 1987-05-29
JPH06101014B2 JPH06101014B2 (en) 1994-12-12

Family

ID=17341812

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25999485A Expired - Lifetime JPH06101014B2 (en) 1985-11-19 1985-11-19 Billing device

Country Status (1)

Country Link
JP (1) JPH06101014B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02187888A (en) * 1989-01-17 1990-07-24 Toshiba Corp Certification system
JPH02195376A (en) * 1989-01-24 1990-08-01 Matsushita Electric Ind Co Ltd Ic card provided with key sharing function
JPH02255398A (en) * 1989-03-30 1990-10-16 Toshiba Corp Portable electronic device
WO2004002059A1 (en) * 2002-06-20 2003-12-31 Sony Corporation Data communication system, information processing device and method, recording medium, and program
JP2006260589A (en) * 2006-04-19 2006-09-28 Sony Corp Data communication system, device, method and program of information processing

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02187888A (en) * 1989-01-17 1990-07-24 Toshiba Corp Certification system
JPH02195376A (en) * 1989-01-24 1990-08-01 Matsushita Electric Ind Co Ltd Ic card provided with key sharing function
JPH02255398A (en) * 1989-03-30 1990-10-16 Toshiba Corp Portable electronic device
WO2004002059A1 (en) * 2002-06-20 2003-12-31 Sony Corporation Data communication system, information processing device and method, recording medium, and program
CN100349401C (en) * 2002-06-20 2007-11-14 索尼株式会社 Data communication system, information processing device and method, recording medium and program
JP2006260589A (en) * 2006-04-19 2006-09-28 Sony Corp Data communication system, device, method and program of information processing

Also Published As

Publication number Publication date
JPH06101014B2 (en) 1994-12-12

Similar Documents

Publication Publication Date Title
US5839119A (en) Method of electronic payments that prevents double-spending
US6381589B1 (en) Method and apparatus for performing secure processing of postal data
US5638445A (en) Blind encryption
US7039809B1 (en) Asymmetric encrypted pin
EP0827120A1 (en) Method and system for mutual authentication of a first device and a second device
CN103729945A (en) Method and system for downloading terminal master key safely
JPH0695352B2 (en) Data center for remote variable recharge
JP2000227755A (en) Selective safe level proofing meter
CN110766543A (en) Block chain-based public welfare monitoring and tracking method for preventing data leakage
TW411427B (en) Payment process and system
US6424953B1 (en) Encrypting secrets in a file for an electronic micro-commerce system
JPS62118471A (en) Accounting device
JP3542007B2 (en) Content providing method and recording medium recording this method
JP2788296B2 (en) Card usage system
US20070030965A1 (en) Methods and apparatuses for management of entitlement to digital security operations
JP3570781B2 (en) Software protection system
JPS62118472A (en) Cash card
JPH0734212B2 (en) Billing device
JP3378487B2 (en) Method and system for accumulating money data
JPH04118777A (en) Electronic signature method by ic card
JPH0744377A (en) Method and device for preventing circulating software from being forged
JP3690035B2 (en) Information access control apparatus and method
KR20030055713A (en) The apparatus and method of digital contents&#39;s protection
JPH0638278B2 (en) Cash card
JPH11265417A (en) Electronic money method and device using user signature, and recording medium