With the continuous development of the entire social information process, especially the launch and development of the national “three gold projectâ€, the application scope of IC cards in China is expanding. At the same time, various aggression crimes against IC cards and their systems may appear at any time, which makes the research and implementation of IC card data encryption very important [1].
The security level of the IC card is divided into: non-encrypted memory card, logically encrypted memory card, and CPU card. Non-encrypted memory cards do not need to be cryptographically checked for read and write operations, and their security is the worst; logically encrypted memory cards need to be sent to the card through the device (usually a card reader), and the IC card checks the password. After correct, the correct response signal is output, so that the next step can be performed. This can prevent random reading and rewriting of the information in the card, and its security is much higher than that of the non-encrypted memory card; the CPU card has a microprocessor. With higher computing power and programming capabilities, it has a higher security level than a logically encrypted memory card.
In the subway AFC system, most of the domestic use of logical encryption memory cards, such as Nanjing Metro's current one-way ticket uses MIFARE's Ultralight Token, while the stored value ticket (square card) uses Mifare Desfire and Mifare Standard, which All types of cards are logically encrypted memory cards. In fact, non-encrypted memory cards have largely withdrawn from the market due to their poor security.
1 IC card security issues
1.1 Security Type Defects
Due to cost constraints, the IC card itself is difficult to ensure sufficient security. Illegal users can use a legitimate card reader or self-construct a card reader to communicate directly with the IC card, thus easily obtaining the stored data in the IC card. The IC card faces the risk of data being rewritten. The data communication link of the IC card is a wireless communication connection, and unlike the wired connection, the wireless transmission signal itself is open, which brings convenience for the illegal user to listen.
In the card reader, in addition to the middleware used to complete the data selection, time filtering and management, the card reader only provides the user service interface, but does not provide an interface that allows the user to improve the security performance.
1.2 Security issues of IC cards in AFC systems
(1) Ticket security: prevent counterfeiting, cloning, tampering, leaking, and stealing;
(2) Equipment safety: to prevent the ticket from being stolen, to add value or copy, to prevent the business program from being attacked and changed, to prevent important parameters and data from being changed;
(3) Data security: prevent tampering, stealing, loss, and refusal;
(4) System security: prevent attacks, damage, and leak important information.
For IC card one-way tickets, they are sold to passengers through semi-automatic ticket vending machines, ticket vending machines, etc., and then recycled to the exit gates. Throughout the use process, the IC card is in two states: (1) in the management of the system operator, including the procurement, initialization, sale, recycling, and recycling of the one-way ticket. (2) In the hands of passengers, from the purchase of a one-way ticket to the exit, the IC card stored value ticket, after being sold to the passengers through semi-automatic ticket vending machines, ticket vending machines, etc., will be reused in the hands of the passengers until Take back. In both cases, the IC card has a greater risk of insecurity when it is in the hands of the passenger. However, on the whole, the one-way ticket is in a safer range than the stored value ticket, especially the stored value ticket. Because the stored value may be larger, it is more likely to be attacked.
2 Overview of cryptography
Cryptography is often defined as the process and skill of decrypting and encrypting during communication.
Cryptography can be used to address security issues in three areas: [2]:
(1) Certification. Used to reliably determine the identity of someone or something, to prevent someone from impersonating a legitimate user or to prevent the device from impersonating legitimate resources.
(2) Encryption. Encode data to prevent wiretapping. The protection provided by encryption is also called confidential service, which is provided to protect data security and is not overheard by illegal people.
(3) Integrity. To ensure that the data has not been tampered with, you need to confirm that the received message is exactly the message sent.
This article covers both the security of transporting data and the security of stored data. The security of the transmitted data mainly includes the confidentiality, integrity, accessibility and authenticity of the data. The confidentiality, integrity, and accessibility of data is achieved by encrypting and decrypting data. The authenticity of the data is achieved through mutual authentication techniques. The security of stored data refers to the persistence of data, which is achieved through access condition control and redundant storage of the storage area.
3 Encryption measures for subway contactless IC cards
3.1 Certification
The password of the IC card must be authenticated before the IC card can be read or written. If the certification is passed, the next step is allowed.
The password authentication of the contactless IC card is divided into five steps, and the process is as shown in FIG. 1.
(A) A random data RB is sent from the IC card to the card reader.
(B) After receiving the RB, the card reader sends a token data TOKEN AB=EK (RB||RA||ID||T1) to the IC card, where RA is a random number issued by the card reader, and the ID is The physical unique serial number of the IC card, and T1 is the additional timestamp data. EK represents an encryption algorithm such as the ASH-1 algorithm.
(C) After receiving the TOKEN AB, the IC card decrypts the encrypted portion of TOKEN AB and verifies whether the random number RB sent by the IC card in (A) is the first time and the TOKEN AB received in (B) The RBs in the agreement are consistent.
(D) If the (C) link check result is correct, the IC card sends the token TOKEN BA=EK(RA||RB||T2) to the card reader to the card reader.
(E) After receiving the token TOKEN BA, the card reader will decrypt the RB (random number) in the token TOKEN BA; and check whether the random number RA issued by the card reader in (B) is (D) The RA in the received TOKEN BA is consistent.
The subway IC card has a total of 16 partitions, each of which has its own password and does not interfere with each other. Therefore, even if the password authentication of one partition is passed, the other partitions cannot be read or written. If you want to operate on other partitions, you must re-complete the above authentication process according to the partition password. Each partition can be used independently as an application, which is also the principle of multi-purpose IC card.
If each of the above steps is properly verified, the entire certification process will succeed. If any part of the certification process fails, the entire certification process is terminated and the certification process must be restarted. If the password of the IC card is not known in advance, all searches take a long time, and it is almost impossible to give a password randomly and open a partition of the IC card.
3.2 Message Encryption
At present, the most widely used cryptographic algorithms are DES (Data Encryption Standard), IDEA (International Data Encryption Algorithm) and public key algorithm RSA (reported by Rivest, Shamir, Adleman in 1978), DSA ( Digital Signature Algorithm) and so on.
3.2.1 Nanjing Metro Line 2 adopts 3DES algorithm
The DES algorithm was born in the 1970s and is a representative of traditional block cipher code. It is faster, but its key is too short (56 bit) to be broken by exhaustive methods. Therefore, an improved DES algorithm, namely the 3DES algorithm [3], has emerged. When the 3DES algorithm encrypts, it performs three DES processing on the original plaintext, and uses three different keys (lengths of 8 B) of K1, K2, and K3, as shown in Figure 2. When decrypting, the ciphertext is restored to the original plaintext in the reverse order. In order to reduce the overhead of the system in production and management of keys, K1 and K3 are generally set to the same value, but K1 and K2 must not be the same, otherwise Triple DES loses its meaning. Although 3DES reduces the speed of certain operations, the key length is twice that of the original, and the security performance has been greatly improved. It has not been broken yet and has become an internationally recognized encryption standard.
Its encryption code is shown in Figure 3.
1800W Hair Dryer,1800W Professional Hair Dryer,Ionic Hair Dryer
Zhejiang Hisun Electrical Appliance Co.,Ltd , https://www.cn-hisun.com