Location: HomeNews Technical News

Introduction to CPU Card Knowledge Tutorial - Chapter 7 CPU Card Security

2023-08-24 15:16:40

Question introduction: If you have 6 important documents in your hands now

1. Property deed

2. Bank passbook

3. Graduation certificate

4. Household registration book

5. A promissory note from someone who owes you 1 million yuan (hehe, pretend you have so much money, you are a millionaire and very generous, a good person)

6. Marriage certificate (this seems to only be available to married individuals)

These are all important things for us, we must keep them properly and safely! You can save it this way:

Method 1:

Lock these files in six safes, one cabinet for each file

Method 2:

Lock all six files in a safe

Method 3:

Lock six files in n safes, which are smaller than 6 and larger than 1

Method 4:

Put the files in a small safe, put the small safe in a big safe, or if you find it fun, put the big safe in a big safe, so that one safe can be placed in another safe, as long as you have money, as long as you still want to use it, I don't object.

The storage of files in the CPU card can also have these issues, for example, if you have 6 files and want to store them in an application on the CPU card. Considering security issues, the file security and access mechanism of CPU cards are implemented through authentication (such as authentication keys, authentication PINs, etc.)

We now explain that authentication is achieved through key authentication:

Method 1:

6 files are protected with 6 keys, each corresponding to a key

Method 2:

Using only one key to protect 6 files

Method 3:

Classify 6 files and protect them with n keys, which are smaller than 6 and larger than 1

Method 4:

The file is protected with a key set key. For example, File 1 is protected by Key 1, and the use of Key 1 must be authenticated by Key 2. Or even more complex, the use of Key 2 must be authenticated through Key 3. You can imagine the key as the key to a safe, and the key to a small safe must be used under the control of a large safe. The key to a small safe must be activated after the key to the large safe has been opened. This statement seems a bit awkward, and it's like trying a tongue twister, haha. In fact, most safes require passwords, which means that the key to a safe must be used together with the password. Both are essential, and it seems that doing so would be safer, but in fact, it is. As for whether to open the key first and then enter the password or enter the password first and then open the key, it mainly depends on the design of the safe. It can be implemented in a CPU card, which can be achieved by adding a user password and a key on the card. It can be designed into two modes:

Method 1: The password can only be used after successful key authentication.

Method 2: The key can only be used after successful password verification.

This must be done in order, as in method one. If you want to verify your password first, sorry, the card will give you a prompt: the security status is not met. At this point, what you must do is to authenticate the key now. After the key authentication is successful, verifying the password will not prompt that the security status is not met. The above mechanism may sound complex, but it is not actually complicated. (It's not easy to talk about, maybe you would say so)

A popular and relatively simple method to implement in cards is the state machine mechanism

The security authentication design of a CPU card file involves three states:

1. The current security status of the system

2. The states that must be met for file operations

3. The state of the key

Let's take a safe as an example:

For example, we want to check the content of the 1 million promissory note in the safe.

1. Current status of the corresponding system: Safe closed status

2. The file operation must meet the following status: safe open status

How to change the current state of the system from the closed safe state to the required state for file operations: open safe state? We use the key to the safe to open it.

3. The subsequent state after using the key: the safe is open, which enables us to operate on the files. In the CPU card, the status can be represented by a number, such as 0

We define:

1. System default current security state: 0

2. The states that must be met for file operations: 6

3. Subsequent status of key: 6

Steps:

1. Directly operating on the file, the file comparison "system default state: 0" does not equal the "state that must be met for file operation: 6" prompt, indicating that the security status is not met.

2. We authenticate the key, and after the authentication is successful, assign the value "Subsequent state of the key: 6" to "System default current security state"

In this way, the default state of the system is 6. Next, we will operate on the file, File comparison: "The current state of the system: 6" is equal to "The state that must be met for file operations: 6. The file can be operated on. The representation of the security state is generally represented by 1 byte (hexadecimal) in actual use. The low 4 bits represent the lower limit of the security level (0-15), and the high 4 bits represent the upper limit of the security level (0-15). Assuming that the value of a byte is: XY (0<=X<=F) (0<=Y<=F) Now let's explain with the status of the file: Assuming the file's status is: 1. 0Y (e.g. 01, 02, 03, 04...), it means there are no security restrictions on accessing the file (i.e. the file can be accessed casually). 2. If X>Y (e.g. 10, 32, 85, etc.), it means that access to the file is prohibited. 3. If X<=Y (e.g. 13, 11, 33, 38), it means that access to the file must be granted before accessing it. For example, the access permission for a file is 13, and the current permission must be 1, 2, or 3 to access the file. For example, the access permission for a file is 38, and the current permission must be a value from 3 to 8 to access the file. For example, the access permission for a file is 33, and the current permission must be 3 to access the file system. Generally, a default permission is specified, such as 0

About FONGWAH
FONGWAH Technology is a high-tech enterprise that specializes in research, development, production, and operation of intelligent IC cards, embedded IC card modules, desktop IC card readers, and related IC card reading and writing devices
Last News

Related products

Page

Hot News