A self-service card writing pre-checking method for a SIM card combined with a multiple check mechanism
By introducing a multi-verification mechanism and the DES-ECB encryption algorithm to generate verification codes, the problem of low security in self-service card writing technology is solved, realizing a more efficient and secure self-service card writing process, which is suitable for various self-service scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- EASTCOMPEACE TECH
- Filing Date
- 2025-02-14
- Publication Date
- 2026-07-10
AI Technical Summary
In existing self-service card writing technologies, password or PIN code verification methods have low security, are easily stolen, and lack multiple verification mechanisms, making the system vulnerable and difficult to resist security threats.
A multi-factor verification mechanism is adopted, including card type verification, card status verification, ICCID verification, and verification code verification. The verification code is generated using the DES-ECB encryption algorithm and multiple verifications are performed in the pre-card writing verification process to ensure the legality and validity of the card.
It improves the security and flexibility of the self-service card writing process, effectively identifies and locks illegal cards, protects user data and device security, and adapts to the needs of different application scenarios.
Smart Images

Figure CN120050655B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile communication technology, and specifically to a pre-verification method for self-service SIM card writing that combines multiple verification mechanisms. Background Technology
[0002] With the rapid development of technology, self-service equipment is becoming increasingly common in daily life, bringing great convenience to people. Self-service card writing technology, as an important technology in self-service equipment, is widely used in various scenarios, such as self-service top-up and self-service business processing. Existing self-service card writing technology mainly relies on password verification or PIN code verification to ensure operational security.
[0003] In existing self-service card writing systems, users typically need to enter the correct password or PIN code on the user equipment (UE). After receiving the verification information from the user, the system performs verification. If the verification is successful, the system allows the user to perform subsequent card writing operations, such as recharging, information inquiry, or modification. This verification method, due to its simplicity and ease of implementation, to a certain extent meets the operational convenience requirements of self-service equipment.
[0004] However, with the increasing severity of cybersecurity threats, existing password verification or PIN code verification methods are gradually revealing their low security levels. Specifically, the following security vulnerabilities exist:
[0005] Passwords or PIN codes are easily stolen: Attackers can use various methods, such as keyloggers and network sniffing, to steal users' entered passwords or PIN codes. Once a password or PIN code is stolen, attackers can impersonate legitimate users to perform illegal operations, thereby threatening the security of user data and privacy.
[0006] Limited Verification Methods: Existing self-service card writing technologies typically only use passwords or PIN codes for verification, lacking multi-factor authentication mechanisms. This single verification method makes the system vulnerable to attacks and difficult to effectively defend against various security threats.
[0007] Insufficient user security awareness: Some users lack awareness of password or PIN code protection when using self-service equipment, making it easy for them to set weak passwords or leak password information, which further increases the security risks of the system.
[0008] In conclusion, the password verification or PIN code verification methods in existing self-service card writing technologies have obvious security problems, and there is an urgent need to propose a more secure and reliable verification method to protect the security of user data and privacy. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention provides a pre-verification method for SIM card self-service writing that combines multiple verification mechanisms. This method can improve the security and reliability of the system and meet users' security requirements for self-service devices.
[0010] The present invention achieves the above objectives through the following technical solutions:
[0011] A pre-verification method for self-service SIM card writing that combines multiple verification mechanisms includes the following steps:
[0012] Before the service is launched, predefine the SIM card type, card status, and verification code generation rules;
[0013] When purchasing a SIM card of a specified type, a verification code corresponding to that SIM card is obtained simultaneously.
[0014] Before writing the card, the multi-verification mechanism 1 is automatically triggered. This mechanism automatically verifies the card type and card status of the SIM card in sequence. If the verification passes, the multi-verification mechanism 2 is activated.
[0015] In the multi-verification mechanism 2, the SIM card's ICCID is first displayed to the user for confirmation. If the user confirms, the number of times the verification code has been entered is read, and it is determined whether the SIM card is locked.
[0016] If the SIM card is not locked, the system will display a verification code input interface, where the user will enter the obtained verification code.
[0017] The SIM card parses and verifies the verification code entered by the user. If the verification is successful, the self-service card writing process is initiated, and the SIM card status is updated to "used".
[0018] According to the present invention, a SIM card self-service card writing pre-verification method combining a multi-verification mechanism is provided, wherein the card type definition includes: the card type file name is a preset specific code, and the card type is a SIM card type combining a multi-verification mechanism; wherein, the multi-verification mechanism is automatically triggered before the card writing operation is executed;
[0019] The card status definition includes: the card status file name is a preset identification code, and the card status includes unused status, used status and locked status, which are represented by specific values, including the value "0" for unused status, the value "1" for locked status and the value "2" for used status.
[0020] According to the present invention, a pre-verification method for self-service SIM card writing combining multiple verification mechanisms is provided, wherein the verification code generation rules specifically include:
[0021] The verification code consists of 15 pure numbers, which is composed of the last 11 digits of the IMSI plus a 4-digit verification code.
[0022] The maximum number of times the verification code can be entered is a 2-digit positive integer, specifically defined as 2 times.
[0023] According to the present invention, a pre-verification method for self-service SIM card writing combining multiple verification mechanisms is provided, wherein the verification code generation algorithm includes:
[0024] The encrypted data item consists of the last 16 digits of the ICCID and a combined string consisting of the specific string "94600" and the last 11 digits of the IMSI.
[0025] The encryption key is K1, which is divided into two parts: the first 16 bits and the last 16 bits, which are used for single DES operations respectively.
[0026] The encryption and decryption algorithm uses the DES-ECB mode.
[0027] According to the present invention, a pre-verification method for self-service SIM card writing combining multiple verification mechanisms is provided, wherein the calculation steps of the verification code include:
[0028] Step 1: Use the first 16 bits of K1 as the key and the last 16 bits of ICCID as the encrypted data, perform DES-ECB encryption, and take the last 2 bits of the ciphertext.
[0029] Step 2: Using the last 16 bits of K1 as the key, combine the specific string "94600" with the last 11 bits of IMSI as the encrypted data, perform DES-ECB encryption, and take the last 2 bits of the ciphertext.
[0030] Step 3: Combine the last two digits obtained in Step 1 and Step 2 into a 4-digit verification code; if letters are generated during the combination process, divide the letter by 10 in alphabetical order and take the remainder to convert it into the corresponding number, forming a 4-digit verification code.
[0031] Step 4: Combine the last 11 digits of the IMSI with the 4-digit verification code obtained in Step 3 to obtain a 15-digit verification code.
[0032] According to the present invention, a pre-verification method for self-service SIM card writing combining a multi-verification mechanism is provided. The specific process of the multi-verification mechanism includes the following steps:
[0033] When the SIM card is inserted into the UE and the device is powered on, the UE triggers the SIM card to read the 2F00 file, which is pre-defined as a card type file.
[0034] If the 2F00 file read from the SIM card indicates that the card type is 01, meaning it is specified as a self-service card writing type, then the process continues; otherwise, the process ends.
[0035] The SIM card reads the 2F0A file, which is pre-defined as a card status file;
[0036] If the 2F0A file read from the SIM card indicates that the card status is 0, i.e., unused, the process continues; otherwise, the process ends.
[0037] The SIM card reads the ICCID and displays it to the user, prompting the user to verify that the ICCID matches the one printed on the card.
[0038] If the user confirms that the ICCID matches, the process continues; otherwise, the process ends and the user needs to replace the card with the correct one and start again.
[0039] Verification code reading steps: The SIM card reads and determines the number of times the verification code has been entered. If the number of times the verification code has been entered is less than 2, the process continues; if the number of times the verification code has been entered reaches or exceeds 2, the card is locked and the user is prompted to go to the service center to unlock it.
[0040] According to the present invention, a SIM card self-service card writing pre-verification method combining multiple verification mechanisms is provided, which displays an input verification code interface to the user, and the user inputs a 15-digit verification code, which is verification code 1;
[0041] The SIM card records the number of times the verification code is entered and increments by 1, and parses whether the verification code 1 entered by the user conforms to the predefined verification code structure and rules;
[0042] If verification code 1 is parsed correctly, proceed to the next step; otherwise, if the verification code is incorrect, return to the verification code reading step.
[0043] The SIM card generates verification code 2 according to the predefined verification code generation rules, and performs a consistency check between verification code 2 and the verification code 1 entered by the user.
[0044] If verification code 1 and verification code 2 match, the verification passes and the process continues; otherwise, the verification code is incorrect, and the process returns to the verification code reading step.
[0045] According to the present invention, a SIM card self-service card writing pre-verification method combining a multi-verification mechanism is provided. After the verification in the multi-verification mechanism stage is passed, the SIM card update card status is 2, that is, the used status; the self-service card writing pre-verification process is completed, and the subsequent self-service card writing process is triggered.
[0046] According to the present invention, a pre-verification method for self-service SIM card writing combining multiple verification mechanisms is provided, wherein the encryption / decryption algorithm adopts DES-ECB mode, including:
[0047] Generate a valid DES key. The key length must be 64 bits. If the length of the input key string is less than 8 bytes, it is padded according to the standard ECB padding rules, that is, 0x01 is added for every 1 bit missing, 0x02 0x02 is added for every 2 bits missing, and so on.
[0048] The generated key is permuted according to a specified order or "table". The permuted key contains only the 56 valid bits of the original key.
[0049] The data to be encrypted is grouped into 64-bit blocks. If the last data block is less than 64 bits long, it is padded according to the standard ECB padding rules.
[0050] Each data block is encrypted. The encryption process includes generating a 32-bit block using a function f. This function f operates on two blocks: a 32-bit data block and a 48-bit key Kn. The calculation method of function f includes expanding the 32-bit data block to 48 bits, and then performing an S-box transformation and permutation P to obtain the final 32-bit output.
[0051] During the encryption process, it is iterated 16 times in a row. Each iteration uses a different subkey and combines the right 32 bits of the previous result with the left 32 bits of the current result using XOR addition. At the same time, the function f is used to process the right 32 bits of the current result with the left 32 bits of the previous result.
[0052] Each encrypted data block is combined sequentially to form the final ciphertext.
[0053] According to the SIM card self-service writing pre-verification method combined with multiple verification mechanisms provided by the present invention, the decryption process is the reverse of the encryption process:
[0054] Use the same key and subkey order, but reverse the order in which the subkeys are applied;
[0055] The ciphertext is divided into blocks, and each block is decrypted. The decryption process also includes iterative calculations using the function f.
[0056] Each decrypted data block is combined sequentially to form the final plaintext, and padding bytes are removed.
[0057] Therefore, compared with the prior art, the present invention has the following beneficial effects:
[0058] 1. Enhanced Security Through Multiple Verification Mechanisms: This invention significantly improves the security of the self-service card writing process by introducing multiple verification mechanisms, including card type verification, card status verification, ICCID verification, and verification code verification. This mechanism comprehensively and meticulously verifies the card information submitted by the user, ensuring that only legitimate and valid cards can pass verification and proceed with subsequent operations. For invalid or expired cards, the system can quickly identify and trigger a locking mechanism, effectively preventing unauthorized users from using self-service equipment for risky operations such as card opening. This not only protects the legitimate rights and interests of users but also maintains the reputation and security of the self-service equipment.
[0059] 2. More Flexible Adaptability to Diverse Needs: The multiple verification mechanisms of this invention are highly flexible and can be customized according to different application scenarios and user needs. Specifically, the system can define different card types and card states according to actual needs to meet the specific requirements of different business scenarios. At the same time, the verification code generation rules can also be flexibly adjusted according to actual needs to ensure the accuracy and effectiveness of the verification process. This flexibility makes this invention widely applicable to various self-service scenarios; whether in finance, telecommunications, or other industries, a suitable verification solution can be found for their business needs.
[0060] In summary, by introducing multiple verification mechanisms and a highly flexible design approach, this invention effectively enhances the security and applicability of self-service card writing technology. This not only provides users with a safer and more convenient self-service experience, but also provides operators of self-service equipment with more reliable and efficient technical support.
[0061] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0062] Figure 1 This is a flowchart illustrating an embodiment of a SIM card self-service card writing pre-verification method combining multiple verification mechanisms according to the present invention.
[0063] Figure 2 This is a flowchart illustrating an embodiment of a SIM card self-service card writing pre-verification method combining multiple verification mechanisms according to the present invention. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0065] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0066] See Figure 1 and Figure 2 This embodiment provides a pre-verification method for SIM card self-service card writing that combines multiple verification mechanisms. The method includes the following steps:
[0067] Step S1: Before the service is launched, predefine the SIM card type, card status, and verification code generation rules.
[0068] Step S2: When purchasing a SIM card of a specified card type, simultaneously obtain the verification code corresponding to that SIM card;
[0069] Step S3: Before writing the card, the multi-verification mechanism 1 is automatically triggered. This mechanism automatically verifies the card type and card status of the SIM card in sequence. If the verification passes, the multi-verification mechanism 2 is started.
[0070] Step S4: In the multi-verification mechanism 2, the SIM card's ICCID is first displayed to the user for confirmation. If the user confirms, the number of times the verification code has been entered is read, and it is determined whether the SIM card is locked.
[0071] Step S5: If the SIM card is not locked, the system will pop up a verification code input interface, where the user will enter the obtained verification code.
[0072] In step S6, the SIM card parses and verifies the verification code entered by the user. If the verification passes, the self-service card writing process is initiated, and the SIM card status is updated to "used".
[0073] Therefore, this embodiment predefines card type, card status, and verification code generation rules. During the card manufacturing stage, the defined card type, card status, and pre-set card data such as ICCID and K1 are written into the card, and the ICCID is printed on the SIM card body. In the second step, after purchasing a SIM card of this type and obtaining the verification code, the user inserts the SIM card into the UE and powers it on. The SIM card then initiates multi-verification mechanism 1, automatically verifying the card type and card status sequentially. Multi-verification mechanism 1 effectively prevents unauthorized cards. After multi-verification mechanism 1 passes, multi-verification mechanism 2 is initiated to verify the user's operation. First, the ICCID is displayed to the user for confirmation. After successful confirmation, the number of verification code inputs is read to determine if the card is locked. If not locked, a verification code input interface pops up for the user to enter the verification code. The SIM card parses and verifies the verification code. If the verification passes, the self-service card writing process is initiated, and the card status is updated to "used." Multi-verification mechanism 2 effectively prevents unauthorized users. Therefore, through multi-verification mechanisms 1 and 2, an efficient and secure self-service SIM card writing method is achieved.
[0074] In this embodiment, the card type definition includes: the card type file name is a preset specific code, such as "XX" specifically being "2F00" or other specified codes, and the card type, such as "XX" specifically corresponding to "01", is a SIM card type combined with a multi-factor authentication mechanism; wherein, before the card writing operation is executed, the multi-factor authentication mechanism is automatically triggered to ensure the accuracy and security of the card writing process; the multi-factor authentication mechanism includes, but is not limited to, at least one of password verification, identity verification, and data integrity verification. Example: The card type file name is 2F00, and the card type is 01.
[0075] In this embodiment, the card status definition includes: the card status file name is a preset identification code, such as "XX" specifically "2F0A", and the card status includes unused status (default value), used status and locked status, which are represented by specific values, including the value "0" for unused status, the value "1" for locked status and the value "2" for used status. The definition and representation of card status facilitate the system to track and manage the usage of SIM cards, and the system can perform corresponding operations or restrictions according to different card statuses to ensure the safe use and efficient management of SIM cards.
[0076] In this embodiment, the verification code generation rules specifically include:
[0077] The verification code consists of 15 pure numbers, which is composed of the last 11 digits of the IMSI plus a 4-digit verification code.
[0078] The maximum number of times the verification code can be entered is a 2-digit positive integer, and the example defines the maximum number of times it can be entered as 2.
[0079] In this embodiment, the verification code generation algorithm includes:
[0080] The encrypted data item consists of the last 16 digits of the ICCID and a combined string consisting of the specific string "94600" and the last 11 digits of the IMSI.
[0081] The encryption key is K1, which is divided into two parts: the first 16 bits and the last 16 bits, which are used for single DES operations respectively.
[0082] The encryption and decryption algorithm uses the DES-ECB mode.
[0083] In this embodiment, the steps for calculating the verification code include:
[0084] Step 1: Use the first 16 bits of K1 as the key and the last 16 bits of ICCID as the encrypted data, perform DES-ECB encryption, and take the last 2 bits of the ciphertext.
[0085] Step 2: Using the last 16 bits of K1 as the key, combine the specific string "94600" with the last 11 bits of IMSI as the encrypted data, perform DES-ECB encryption, and take the last 2 bits of the ciphertext.
[0086] Step 3: Combine the last two digits obtained in Step 1 and Step 2 into a 4-digit verification code; if letters are generated during the combination process, divide the letter by 10 in alphabetical order and take the remainder to convert it into the corresponding number, forming a 4-digit verification code.
[0087] Step 4: Combine the last 11 digits of the IMSI with the 4-digit verification code obtained in Step 3 to obtain a 15-digit verification code.
[0088] Specifically, the business system generates a verification code based on the verification code generation rules, obtains the corresponding encrypted data items and encryption keys, and then provides it to the user.
[0089] Example of CAPTCHA calculation:
[0090] Encrypted data item: ICCID: 8986000012A9F0010768, IMSI: 460025484200768.
[0091] Encryption key: K1: D425F4BCCBAB8D2FCDFD0B0DA5EF21A4.
[0092] Step 1: Use the first 16 bits of K1 (D425F4BCCBAB8D2F) as the key, and the last 16 bits of ICCID (000012A9F0010768) as the encrypted data. Use the DES-ECB encryption algorithm to obtain the ciphertext (B368FB2D1CD766BF). Take the last 2 bits (BF) of the ciphertext.
[0093] Step 2: Use the last 16 bits of K1 (CDFD0B0DA5EF21A4) as the key, and "94600" + the last 11 bits of IMSI (9460025484200768) as the encrypted data. Use the DES-ECB encryption algorithm to obtain the ciphertext (67030AC8DBAC37C0). Take the last 2 bits of the ciphertext (C0).
[0094] Step 3: Combine the last two digits of Step 1 (BF) and the last two digits of Step 2 (C0) to form a 4-digit verification code (BFC0). In the verification code, the letters are divided by 10 and the remainder is 1 for B, 5 for F, and 2 for C, resulting in a 4-digit verification code (1520).
[0095] Step 4: Add the last 11 digits of the IMSI (25484200768) to the 4-digit check digit (1520), and you will get a 15-digit verification code (254842007681520).
[0096] In this embodiment, the specific process of the multi-verification mechanism includes the following steps:
[0097] When the SIM card is inserted into the UE and the device is powered on, the UE triggers the SIM card to read the 2F00 file (2F00 is predefined as a card type file).
[0098] If the 2F00 file read from the SIM card indicates that the card type is 01, meaning it is specified as a self-service card writing type, then the process continues; otherwise, the process ends.
[0099] The SIM card reads the 2F0A file (2F00 is predefined as the card status file), which is predefined as the card status file.
[0100] If the 2F0A file read from the SIM card indicates that the card status is 0, i.e., unused, the process continues; otherwise, the process ends.
[0101] The SIM card reads the ICCID and displays it to the user, prompting the user to verify that the ICCID matches the one printed on the card.
[0102] If the user confirms that the ICCID matches, the process continues; otherwise, the process ends and the user needs to replace the card with the correct one and start again.
[0103] Verification code reading steps: The SIM card reads and determines the number of times the verification code has been entered. If the number of times the verification code has been entered is less than 2, the process continues; if the number of times the verification code has been entered reaches or exceeds 2, the card is locked and the user is prompted to go to the service center to unlock it.
[0104] The user is shown the verification code input interface and enters a 15-digit verification code, which is verification code 1.
[0105] The SIM card records the number of times the verification code is entered and increments by 1, and parses whether the verification code 1 entered by the user conforms to the predefined verification code structure and rules;
[0106] If verification code 1 is parsed correctly, proceed to the next step; otherwise, if the verification code is incorrect, return to the verification code reading step.
[0107] The SIM card generates verification code 2 according to the predefined verification code generation rules, and performs a consistency check between verification code 2 and the verification code 1 entered by the user.
[0108] If verification code 1 and verification code 2 match, the verification passes and the process continues; otherwise, the verification code is incorrect, and the process returns to the verification code reading step.
[0109] After the verification in the multi-verification mechanism stage is passed, the SIM card update card status is 2, which means it is in use; the self-service card writing pre-verification process is completed, triggering the start of the subsequent self-service card writing process.
[0110] In this embodiment, the encryption / decryption algorithm adopts the DES-ECB mode, including:
[0111] Generate a valid DES key. The key length must be 64 bits. If the length of the input key string is less than 8 bytes, it is padded according to the standard ECB padding rules, that is, 0x01 is added for every 1 bit missing, 0x02 0x02 is added for every 2 bits missing, and so on.
[0112] The generated key is permuted according to a specified order or "table". The permuted key contains only the 56 valid bits of the original key.
[0113] The data to be encrypted is grouped into 64-bit blocks. If the last data block is less than 64 bits long, it is padded according to the standard ECB padding rules.
[0114] Each data block is encrypted. The encryption process includes generating a 32-bit block using a function f. This function f operates on two blocks: a 32-bit data block and a 48-bit key Kn. The calculation method of function f includes expanding the 32-bit data block to 48 bits, and then performing an S-box transformation and permutation P to obtain the final 32-bit output.
[0115] During the encryption process, it is iterated 16 times in a row. Each iteration uses a different subkey and combines the right 32 bits of the previous result with the left 32 bits of the current result using XOR addition. At the same time, the function f is used to process the right 32 bits of the current result with the left 32 bits of the previous result.
[0116] Each encrypted data block is combined sequentially to form the final ciphertext.
[0117] The decryption process is the reverse of the encryption process:
[0118] Use the same key and subkey order, but reverse the order in which the subkeys are applied;
[0119] The ciphertext is divided into blocks, and each block is decrypted. The decryption process also includes iterative calculations using the function f.
[0120] Each decrypted data block is combined sequentially to form the final plaintext, and padding bytes are removed.
[0121] In this embodiment, the DES-ECB encryption / decryption algorithm places particular emphasis on key security and data integrity. Strict key generation and preprocessing steps ensure key validity, while standard ECB padding rules ensure data block integrity and encryptability. During encryption, multiple iterations and complex calculations of the function f enhance encryption strength and security, making the ciphertext difficult to crack. During decryption, reversing the encryption steps and subkey order ensures the correctness and consistency of the decryption result.
[0122] In summary, this embodiment effectively improves the security and applicability of self-service card writing technology by introducing multiple verification mechanisms and a highly flexible design approach. This not only provides users with a safer and more convenient self-service experience, but also provides operators of self-service equipment with more reliable and efficient technical support.
[0123] Specifically, this embodiment introduces a multi-factor verification mechanism, including card type verification, card status verification, ICCID verification, and verification code verification, which greatly enhances the security of the self-service card writing process. This mechanism can comprehensively and meticulously verify the card information submitted by the user, ensuring that only legitimate and valid cards can pass verification and proceed with subsequent operations. For invalid or expired cards, the system can quickly identify and trigger a locking mechanism, effectively preventing unauthorized users from using the self-service equipment to perform risky operations such as card opening. This not only protects the legitimate rights and interests of users but also maintains the reputation and security of the self-service equipment.
[0124] Specifically, the multiple verification mechanisms in this embodiment are highly flexible and can be customized according to different application scenarios and user needs. Specifically, the system can define different card types and card states according to actual needs to meet the specific requirements of different business scenarios. At the same time, the verification code generation rules can also be flexibly adjusted according to actual needs to ensure the accuracy and effectiveness of the verification process. This flexibility makes the present invention widely applicable to various self-service scenarios; whether in finance, telecommunications, or other industries, a verification solution suitable for their business needs can be found.
[0125] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0126] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.
Claims
1. A pre-verification method for self-service SIM card writing combining multiple verification mechanisms, characterized in that, Includes the following steps: Before the service is launched, predefine the SIM card type, card status, and verification code generation rules; When purchasing a SIM card of a specified type, a verification code corresponding to that SIM card is obtained simultaneously. Before writing the card, the multi-verification mechanism 1 is automatically triggered. This mechanism automatically verifies the card type and card status of the SIM card in sequence. If the verification passes, the multi-verification mechanism 2 is activated. In the multi-verification mechanism 2, the SIM card's ICCID is first displayed to the user for confirmation. If the user confirms, the number of times the verification code has been entered is read, and it is determined whether the SIM card is locked. If the SIM card is not locked, the system will display a verification code input interface, where the user will enter the obtained verification code. The SIM card parses and verifies the verification code entered by the user. If the verification is successful, the self-service card writing process is initiated, and the SIM card status is updated to "used". The algorithm for generating the verification code includes: The encrypted data item consists of the last 16 digits of the ICCID and a combined string consisting of the specific string "94600" and the last 11 digits of the IMSI. The encryption key is K1, which is divided into two parts: the first 16 bits and the last 16 bits, which are used for single DES operations respectively. The encryption and decryption algorithm uses the DES-ECB mode. The steps for calculating the verification code include: Step 1: Use the first 16 bits of K1 as the key and the last 16 bits of ICCID as the encrypted data, perform DES-ECB encryption, and take the last 2 bits of the ciphertext. Step 2: Using the last 16 bits of K1 as the key, combine the specific string "94600" with the last 11 bits of IMSI as the encrypted data, perform DES-ECB encryption, and take the last 2 bits of the ciphertext. Step 3: Combine the last two digits obtained in Step 1 and Step 2 into a 4-digit verification code; if letters are generated during the combination process, divide the letter by 10 in alphabetical order and take the remainder to convert it into the corresponding number, forming a 4-digit verification code. Step 4: Combine the last 11 digits of the IMSI with the 4-digit verification code obtained in Step 3 to obtain a 15-digit verification code.
2. The method according to claim 1, characterized in that: The card type definition includes: the card type file name is a preset specific code, and the card type is a SIM card type that combines a multi-factor authentication mechanism; wherein, the multi-factor authentication mechanism is automatically triggered before the card writing operation is executed; The card status definition includes: the card status file name is a preset identification code, and the card status includes unused status, used status and locked status, which are represented by specific values, including the value "0" for unused status, the value "1" for locked status and the value "2" for used status.
3. The method according to claim 2, characterized in that: The verification code generation rules specifically include: The maximum number of times the verification code can be entered is a 2-digit positive integer, specifically defined as 2 times.
4. The method according to claim 1, characterized in that: The specific process of the multi-verification mechanism includes the following steps: When the SIM card is inserted into the UE and the device is powered on, the UE triggers the SIM card to read the 2F00 file, which is pre-defined as a card type file. If the 2F00 file read from the SIM card indicates that the card type is 01, meaning it is specified as a self-service card writing type, then the process continues; otherwise, the process ends. The SIM card reads the 2F0A file, which is pre-defined as a card status file; If the 2F0A file read from the SIM card indicates that the card status is 0, i.e., unused, the process continues; otherwise, the process ends. The SIM card reads the ICCID and displays it to the user, prompting the user to verify that the ICCID matches the one printed on the card. If the user confirms that the ICCID matches, the process continues; otherwise, the process ends and the user needs to replace the card with the correct one and start again. Verification code reading steps: The SIM card reads and determines the number of times the verification code has been entered. If the number of times the verification code has been entered is less than 2, the process continues; if the number of times the verification code has been entered reaches or exceeds 2, the card is locked and the user is prompted to go to the service center to unlock it.
5. The method according to claim 4, characterized in that: The user is shown the verification code input interface and enters a 15-digit verification code, which is verification code 1. The SIM card records the number of times the verification code is entered and increments by 1, and parses whether the verification code 1 entered by the user conforms to the predefined verification code structure and rules; If verification code 1 is parsed correctly, proceed to the next step; Otherwise, the verification code is incorrect, and you will be redirected to the verification code reading step. The SIM card generates verification code 2 according to the predefined verification code generation rules, and performs a consistency check between verification code 2 and the verification code 1 entered by the user. If verification code 1 and verification code 2 match, the verification passes and the process continues; Otherwise, the verification code is incorrect, and you will be redirected to the verification code reading step.
6. The method according to claim 5, characterized in that: After the verification in the multi-verification mechanism stage is passed, the SIM card update card status is 2, which means it is in use; the self-service card writing pre-verification process is completed, and the subsequent self-service card writing process is triggered.
7. The method according to any one of claims 1 to 6, characterized in that: The decryption process is the reverse of the encryption process: Use the same key and subkey order, but reverse the order in which the subkeys are applied; The ciphertext is divided into blocks, and each block is decrypted. The decryption process also includes iterative calculations using the function f. Each decrypted data block is combined sequentially to form the final plaintext, and padding bytes are removed.