OTP-based one-time electronic wallet RFID card

1 Introduction

An e-wallet is a payment tool commonly used by customers in e-commerce shopping activities. It is a new wallet that is commonly used when shopping for small purchases or purchasing small items. E-wallet has two concepts: one is pure software, as long as it is used for online consumption, account management, such software is usually connected with a bank account or a bank card account; the second is a smart payment card for micropayments, The cardholder deposits a certain amount in the card in advance, and deducts the transaction amount directly from the card during the transaction. Because such a card does not require large system support like a bank card, it is applied in some active and small transactions. Very wide and most representative bus card.

The electronic wallet smart stored value card is generally based on radio frequency identification technology and includes three main components: chip, antenna and package. The chip storage value of the electronic wallet can be digital cash and other electronic money, can be consumed on the corresponding device, and can display how much money is in the user's electronic wallet, such as a public transportation card can be read on the corresponding public transportation card reader. Out of its stored value, on which to consume.

With the development of e-commerce and technology, the use of electronic wallets has become more and more, but the existing smart stored value cards are based on EEPROM (Electrically Erasable Programmable Read Only Memory) technology, and the cost is difficult to reduce, hindering The use of electronic wallets. A one-time electronic wallet is implemented using low-cost 0TP (one-time programmable) memory in combination with analog and digital circuits. The basic function of this one-time electronic wallet is to deposit a certain amount into the card at the time of card issuance, and then the end user consumes the unit value or a multiple of the unit value on the card reader until the amount is consumed. Because of the one-time programming nature of OTP memory, the one-time electronic wallet based on such a memory is very different in internal operation from the EEPROM-based electronic wallet.

2 One-time e-wallet features

Electronic wallets typically include the following main functions: initializing a wallet, deducting a wallet, adding a wallet, and reading a wallet. Initializing the wallet means that a certain amount of money is stored in the electronic wallet at the card issuer; the wallet is supported by the electronic wallet at a specified machine, and each amount is deducted by a certain amount; the wallet is for refilling the wallet; The balance of the e-wallet is read out. The one-time e-wallet does not have the function of adding a wallet, but other functions are the same as the commonly used e-wallet card such as the S50.

2.1 Memory allocation

The size of the OTP memory of the one-time electronic wallet is 8 KBits, which is mainly divided into two functional areas: one is an operation area for accessing information such as face value and password, and the size is 2 KBits; the other is a subtraction area for recording usage of unit values. The size is 6 KBits, and each bit in the subtraction area represents a unit value. The operating area is further divided into 4 sectors, each of which has 4 blocks, each of which has a size of 128 Bits. The fourth block of each sector stores the password, the first block of sector 0 is written by the card manufacturer, and the second block of sector 0 is written with the data of the face value of the one-time electronic wallet, and other user-defined data. The data block can be written by the user to any data.

2.2 Initialize the wallet

The face value of the e-wallet refers to the initial amount when the card issuer sends the smart card to the end user. Based on (the face value of the one-time e-wallet of the OTP memory is represented by two numbers, such as the unit value U is (32 Bits) and the unit value can be used as T16 (Bits), in a block of size 128Bits, its allocation is as The format shown in Figure 1 is written in. The face value is equal to the unit value U multiplied by the usable number T, such as the unit value is 32'd2, the usable number is 16'd50, and the face value is 100. In the subtraction area, each bit Represents a unit value, a total of 6000 Bits, the maximum number of times T can be set to 6000, but can also be any number less than 6000. The denomination block sets a block pointer, after the block is written, The pointer for programming is 1. After the block pointer is set to 1, the block cannot be written again, and each time the wallet and wallet operations are performed, it is checked whether the block pointer is 1.

Memory allocation map
Figure 1 memory allocation map

Face value representation

Figure 2 denomination representation

2.3 buckle wallet

After the one-time electronic wallet initializes the face value, the subtraction operation can be performed, but the operations such as addition and recharge cannot be performed as in the S50. The one-time electronic wallet subtraction operation is divided into the following steps: in the first step, the card and the card reader pass each other through identity authentication and password verification; the second step starts from the last address of the subtraction area (the 6000th). Find the address of the highest-order programmed bit in reverse order, record it as the third step of LBAddr, accept the subtraction value S from the card reader, and divide S by the unit value in the denomination area to get the result quotient Q and the remainder R. If the remainder R is not 0, it indicates that the subtraction value S is not an integer multiple of the unit value, and the operation fails, otherwise proceed to the next step; in the fourth step, the address FBAddr of the first bit in the subtraction area is subtracted by LBAddr to obtain the unit value. The number of times UT, if the sum of the usage times UT of the quotient Q and the unit value is less than or equal to the number T in the denomination area, the next step is performed, otherwise it is interrupted. In the fifth step, LBAddr plus quotient Q obtains a new programming address NBAddr. After receiving the programming command of the card reader, the value of the NBAddr bit is programmed to be 1, and the information of the successful subtraction operation is returned to the card reader.

Bucket wallet process

Figure 3 buckle wallet process

In the operation step of deducting the wallet, firstly, the address of the first bit (which is the last one in the sequential method) is searched in reverse order, and then the unit value of the electronic wallet is calculated in a sequential manner according to the address. The number of uses (that is, the amount already consumed); if the condition of re-consumption is established, the address programmed for this consumption is calculated again in a sequential manner, and finally programmed to 1 at this address (the initialization value of all Bits is 0). In this way, each time subtraction is performed, no matter how many times the subtraction value s is the unit value, only one bit is programmed. In the OTP used in this design, the data of one Bit is about 200μs, and the traditional method based on EEPROM is to program 1281. Bit data, the time takes about 4ms, greatly reducing the programming time. The entire process is shown in Figure 3.

2.4 reading wallet

Reading the wallet means reading the balance. This is the most basic operation in the electronic wallet. It is completed in three steps: the first step is to pass the identity authentication and password verification between the card and the card reader. The second step is Starting from the last address of the subtraction area, the address of the highest-order programmed bit is searched in reverse order, denoted as LBAddr; in the third step, the address FBAddr of the first bit in the subtraction area is subtracted from LBAddr to obtain the unit value. The number of times UT is used, and the unused number RT of the e-wallet unit value is obtained by subtracting the UT from the usable number of times T in the subtraction area; in the fourth step, U is multiplied by RT to obtain the balance R, and then returned to the card reader.

2.5 other

In addition to the function of a one-time electronic wallet, the design also has a total of 10 storage spaces for users to store other information, which can be used as a memory card with encryption function. At the same time, each sector corresponds to a cipher block, and each cipher block corresponds to a cipher pointer. When the password pointer is zero, the password used for cryptographic verification is the default password, which is automatically given by the digital circuit. When the user programs the cipher block, the corresponding cipher pointer is programmed at the same time, after which the cryptographic check operation uses the password written by the user.

3 implementation of e-wallet

The one-time e-wallet is based on the ISO/IEC 14443 TypeA protocol and is compatible with the popular MifareOne series of commands. Except for the INCREMENT and RESTORE instructions, the other instruction formats are the same as the S50 or its compatible card. Including the analog circuit, the chip of the disposable electronic wallet is shown in Figure 4.

Overall block diagram of the chip
Figure 4 Overall block diagram of the chip

In the analog circuit, the function of the rectifier circuit is to convert the AC voltage of the RF signal coupled in the card reader into a DC power supply voltage, and a first-stage voltage regulator circuit is added after the rectifier circuit to prevent the DC voltage from being too high; the power-on reset circuit is The digital circuit generates a reset signal to reset all registers of the digital circuit after the card enters the effective magnetic field range of the card machine; the demodulation circuit demodulates the data signal in the carrier as a signal input of the digital circuit; the modulation circuit is based on The signal returned by the digital circuit modulates the antenna and returns a signal to the card reader. The clock shaping circuit shapes the clock signal of 13.56M into the digital circuit in the carrier.

In the digital circuit, the receiving module mainly translates the signal encoded by the 14443 TypeA protocol into a binary code, and provides various frequency-divided clocks for future modules; the functions of the data processing module are mainly instruction decoding, 0TP memory for reading and writing operations. The state of the card is transferred; the encryption unit encrypts the data with a stream cipher. Except for the command specified by 14443 Type A, the communication of other commands is encrypted; the output module returns the signal to the card reader in the format specified by the 14443 Type A protocol.

In terms of memory, the company's patented XPM memory is used. XPM takes the principle of oxide breakdown and achieves one-time write multiple read. Compared with conventional RFID, the EEP-ROM can be realized in a conventional CMOS process, which is lower in cost than the EEPROM process, and has a data retention capacity of more than 50 years, while the EEPROM data retention capacity is less than 10 years. . XPM's storage mechanism makes it less susceptible to external interference (such as lasers, microwaves) and data loss, making it particularly suitable for security applications such as bus cards and e-passports.

4 Conclusion

A one-time electronic wallet RFID card is implemented in the 14443 Type A protocol. The one-time electronic wallet is based on OTP memory, and the command and encryption methods are compatible with the commercially available S50, which can be easily applied to existing card reader systems. The basic principle of the one-time electronic wallet is that each bit in the subtraction area represents the use of a unit value, and accordingly, the method for expressing the face value of the one-time electronic wallet, the implementation steps of the wallet and the operation method of reading the balance are given. The disposable electronic wallet was implemented under the SMIC 0.18/μm process conditions and successfully tested.

(Text/1. Sichuan Key Laboratory of Microelectronics Technology, School of Physical Science and Technology, Sichuan University, 2. Sichuan Kailuwei Electronics Co., Ltd., 1.2 Liu Jingshu, 1.2 Liu Junwei, 2 Wang Mingming, 1 Gong Min)

Artificial Commercial Grass  applies with a wide range, and can be used for sports like football pitch, tennis, golf, hockey, gateball, soccer ... as well as landscaping, back yard, garden, roof greening, balcony, school, indoor and outdoor decoration etc. It can replace real grass anythere you want. We offer effeciency recommendations according to the inquiry, feel free to ask us.

Commercial Grass

Artificial Grass Carpet,Commercial Grass,Commercial Artificial Grass,Pe Garden Grass

Shandong Shangkun Sports Health Technology Co.,Ltd. , http://www.shangkunsports.com

Posted on