WO2023005689A1 - 数字钱包设备及其双离线交易方法 - Google Patents

数字钱包设备及其双离线交易方法 Download PDF

Info

Publication number
WO2023005689A1
WO2023005689A1 PCT/CN2022/105960 CN2022105960W WO2023005689A1 WO 2023005689 A1 WO2023005689 A1 WO 2023005689A1 CN 2022105960 W CN2022105960 W CN 2022105960W WO 2023005689 A1 WO2023005689 A1 WO 2023005689A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
digital wallet
identification
wallet device
ledger
Prior art date
Application number
PCT/CN2022/105960
Other languages
English (en)
French (fr)
Inventor
聂明
Original Assignee
聂明
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 聂明 filed Critical 聂明
Priority to EP22848294.9A priority Critical patent/EP4379631A1/en
Publication of WO2023005689A1 publication Critical patent/WO2023005689A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists

Definitions

  • the invention relates to digital currency and digital wallet technology, a digital wallet device based on an identification ledger and an off-line transaction method realized by the digital wallet device.
  • the present invention provides a digital wallet device, characterized in that it includes:
  • the communication module is used for short-distance communication with other digital wallet devices, and may include one or more of a Bluetooth module, an NFC module, an infrared communication module, and a wireless local area network module;
  • the security chip further includes an identification book system and an encryption and decryption module, the identification book system includes at least one identification book, and each of the identification books is used to store and update the transaction records of the digital wallet device; the security chip according to The transaction records calculate the balance of each of the identified ledgers;
  • the security chip saves the unique ID of the digital wallet device; the encryption and decryption module completes the calculation of obtaining the public key in the security chip based on the unique ID of the digital wallet device through a mapping algorithm.
  • the encryption and decryption module is also used to store and manage local keys, and use the keys to encrypt and decrypt communication instructions and transaction information, and to verify signatures;
  • Each of the identified ledgers includes an identified ledger and an identified ledger body
  • the identification ledger includes the unique identifier IAN of the issuer and the total amount CV issued by the issuer to the digital wallet device;
  • the main body of the identification ledger includes several transaction records arranged in chronological order; each transaction record further includes the transaction amount, the unique number SAN of the account of the source of the transaction, the unique number TAN of the account of the target party of the transaction, and the account of the source of the transaction. Signature SSD, and the signature TSD of the transaction target party.
  • the identification ledger also includes the issuer's unique identifier ISN for the ledger, the timestamp TS generated by the ledger, and the encrypted hash value calculated using the IAN, ISN, TS, and CV.
  • the source of the first transaction record in the identification book body is the issuer in the identification account header, and the transaction record includes the hash value of the identification account header;
  • the transaction record in the identified ledger body further includes a hash value of the previous transaction, a transaction serial number value, and a transaction timestamp.
  • the latest transaction record of each identification ledger is the transaction record of the local digital wallet device as the transaction source or transaction target.
  • the difference between the transaction amount of the last transaction record as the transaction target party in each identification ledger and the total transaction amount of all transaction records with the terminal device as the transaction source party after the transaction record is the difference between the identification account book for the terminal device available amount.
  • the digital wallet device may also include an input module and a display module;
  • the input module is used to input transaction information such as transaction amount, which can be a keyboard or a touch screen;
  • the display module is used to display transaction information.
  • the present invention further provides a dual offline transaction method for a digital wallet device, characterized in that the method includes:
  • Step 1 Digital wallet device A and digital wallet device B complete mutual authentication through identity-based two-way authentication;
  • Step 2 Digital wallet A sends an instruction for transaction preparation to the internal security chip, and the security chip of digital wallet device A judges the number of identification books required for this transaction according to the required payment amount and the balance of the local identification book; if If the total amount of this payment is less than the highest value available for a single identification ledger, only one identification ledger will be selected to be used, otherwise multiple identification ledgers will be selected in turn for transactions;
  • Step 3 the security chip adds a new piece of transaction preparation data information at the end of one of the identification books L0 selected in the step 2 as the current last transaction record, obtains the new identification book L1 and sends it to the digital wallet device B; Wallet B conducts further verification; the transaction preparation data includes the transaction amount of the transaction, the account identification of the source party and the target party, and digital wallet A's signature on the transaction;
  • Step 4 The digital wallet device A receives the transaction confirmation data information with the signature of the digital wallet device B.
  • the transaction confirmation data information includes the transaction preparation data information of this transaction, the signature of the digital wallet device A and the signature of the digital wallet device B.
  • Signature digital wallet device A verifies the signature of digital wallet device B and the transaction confirmation data information, and then adds the signature of digital wallet device B to the last transaction record of the identification ledger L1, and saves it as the identification ledger L2, as a follow-up The identification ledger of the transaction;
  • Step 5 The security chip of the digital wallet device A determines whether to complete the transaction of all identification ledgers in this transaction according to the transaction information. If not, select the next identification ledger participating in the transaction and repeat steps 3-5 until all the identification ledgers in this transaction are completed. The transaction of the identification ledger is completed.
  • the transaction preparation data information further includes a hash value of a previous transaction, a transaction serial number value, and a transaction timestamp.
  • Step 3-1 Digital wallet device B receives the identification ledger L1 and transaction-related information sent by A, verifies the signature of A and verifies the authenticity and legality of the transaction, including calculating the available amount of the identification ledger L0 for A and the transaction amount Compare to determine whether the transaction is legal;
  • Step 3-2 The digital wallet device B signs the transaction preparation data record of the identification ledger L1 and forms a transaction confirmation data, saves the signed identification ledger record as a new identification ledger L2 available to B, and sends the transaction confirmation data to A.
  • the two-way authentication process described in step 1 may include:
  • Step 1-1 Digital wallet device A generates an 8-byte random number R1, obtains its own CCKS identification ID1, and calculates the signature C1 S1 for R1, and sends it to digital wallet device B through authentication and key exchange instructions.
  • the necessary parameters are ID1, R1, C1, S1;
  • Step 1-2 After digital wallet device B receives the authentication and key exchange instructions, it first authenticates the legality of ID1 through the blacklist (or whitelist) and (or) ID rules, and then obtains digital wallet device A through ID1 calculation The public key PUB1 of the signature value C1 S1 is verified. If the verification is passed, the digital wallet device A is legal, and the following steps can be performed; the digital wallet device B generates a random number R2, and obtains the process key through the XOR of R1 and R2. Then digital wallet device B obtains its own CCKS identification ID2, and uses the public key PUB1 to encrypt R2 to obtain ENC2, and then signs ENC2 to obtain C2 S2. After the above calculation is completed, digital wallet device B ends the authentication and key exchange instructions Processing process, and return the following data to digital wallet device A: ID2, ENC2, C2, S2 and response code;
  • Step 1-3 After digital wallet device A receives the return, it first authenticates the legality of ID2 through the blacklist (or whitelist) and (or) ID rules, and then obtains the public key PUB2 of digital wallet device A through ID2 calculation; Digital wallet device A uses PUB2 to verify the signature of C2 S2. If the verification is successful, it means that digital wallet device B is legal and can carry out the following process; digital wallet device A’s private key decrypts ENC2 with its own private key, obtains random number R2, and passes R1 Exclusive OR with R2 to obtain a process key K; the process key K is used for encrypted communication in subsequent steps.
  • the identification authentication technology is used to assign a unique identity to each device, and then the identification ledger system is established based on the identification authentication technology, and the transaction records are recorded through the identification ledger, and in the transaction process. Signature exchange between parties to achieve safe and reliable peer-to-peer offline transactions.
  • the identity ID of the digital wallet device has a strong binding relationship with the hardware, and establishes a strong association relationship with the corresponding public key through the public key mapping algorithm, allowing digital wallet devices to complete mutual authentication directly through the exchange of identification IDs Identity verification, to ensure point-to-point dual offline authentication between digital wallet devices.
  • each transaction record in each identification book saves the hash of the previous transaction record to establish the association between transaction records.
  • Each transaction contains the signature ID of both parties to the transaction, allowing the digital wallet device to locally The signature of any transaction is verified to ensure that past transaction records can be verified locally, and to solve the problem of counterfeiting and double spending in dual offline transactions.
  • Transactions are recorded by identifying the ledger and the transaction records in the identified ledger to ensure that each transaction can be traced back and prevent denial after the transaction is completed. After each transaction is completed, both parties to the transaction can immediately use the new identification ledger to conduct transactions again. There is no transaction cooling period and no need to settle with the background immediately, truly realizing real-time and continuous transactions that can be dual offline.
  • Identify the available amount of the device by identifying the ledger and the transaction records in the ledger, replace the traditional balance record, and ensure the legitimacy of the transaction amount during the transaction process. It can be verified locally and ensure the authenticity of the transaction amount in the transaction record, preventing the balance from being or Falsification of transaction amount.
  • the digital wallet device and its dual offline transaction method provided by the present invention, through the combination of identification authentication technology and identification ledger, truly realize the safe and credible value transfer of digital currency, achieve point-to-point dual offline transactions and continuous transactions, each Transactions can be verified and traced to prevent counterfeiting, tampering, theft, double spending, etc., and promote the safe, convenient and reliable circulation of digital currency in different scenarios.
  • Fig. 1 is a schematic structural diagram of a digital wallet device according to an embodiment of the present invention.
  • Fig. 2 is a schematic diagram of the identification ledger structure of an embodiment of the present invention.
  • Fig. 3 is a schematic structural diagram of a single transaction record according to an embodiment of the present invention.
  • Fig. 4 is a data structure diagram of a single transaction record of a preferred embodiment of the present invention.
  • Fig. 5 is a schematic structural diagram of multiple transaction records in a preferred embodiment of the present invention.
  • Fig. 6 is a schematic flow diagram of offline transaction based on the digital wallet device of the present invention.
  • FIG. 1 is a schematic structural diagram of a digital wallet device 1 based on an identification ledger according to the present invention.
  • the form of the digital wallet device can be a separate hardware or a trusted execution environment TEE (Trusted Execution Environment).
  • the digital wallet device 1 includes an SE (Secure Element) security chip 11 , a communication module 12 , an encryption and decryption module 13 and an identification ledger system 14 , wherein the encryption and decryption module 13 and the identification ledger system 14 are both stored in the SE security chip 11 .
  • SE Secure Element
  • the digital wallet device 1 can also include an input module 15 and a display module 16 .
  • the SE security chip 11 stores the unique device account number (device account number DAN) of the digital wallet device 1, and the corresponding transaction private key is allocated by the encryption and decryption module 13, which has secure computing and secure storage functions.
  • the secure computing can support asymmetric encryption algorithms, and can resist side-channel attacks and analysis on the computing process; the secure storage means that the content of the storage device cannot be directly obtained outside the chip.
  • Each SE security chip 11 is recorded with a version number and a batch number.
  • the identification encryption technology of the present invention supports calculating the public key directly through the ID, namely:
  • Pubkey is the public key
  • Pub() is the public key mapping function, and the public key value can be calculated through the ID
  • ID is the device account ID.
  • the communication module 12 is mainly used for short-distance communication, and the communication methods that can be used include one or more of short-distance communication methods such as Bluetooth, NFC, infrared communication module, and wireless local area network module.
  • short-distance communication methods such as Bluetooth, NFC, infrared communication module, and wireless local area network module.
  • the encryption and decryption module 13 is integrated in the SE security chip 11, and is used to store and manage local keys, and perform operations such as encryption and decryption of identification ledger data and transaction process data, and signature verification.
  • a strong binding relationship is achieved through the mapping algorithm of the encryption and decryption module and the public key of the digital wallet device. Because there is a strong binding relationship between the public key and the unique identity ID of the digital wallet device, it can be directly calculated in the security chip according to the unique identity ID, so it can avoid the risk of counterfeiting such as man-in-the-middle attacks, and does not require a third-party certificate to prove .
  • the identification authentication technology used in the present invention is CCKS technology, which has the characteristics of supporting a large key capacity in a single domain and supporting offline point-to-point authentication, and can provide support for offline transactions and verification of identification ledgers.
  • the identification account book system 14 of the present invention is made up of a plurality of identification account books 141-14n, and the storage structure of each identification account book is further made up of identification account book head and identification account body, as shown in Figure 2, taking identification account book 141 as an example to show its specific structure . It includes an identification account book header 141A for recording account amount information, and an identification account body 141B for sequentially recording multiple transaction records TR1-TRN in the identification account book.
  • the identification account book header 141A is generated by the issuer, and is mainly used to indicate the total amount of the account book. It may include the unique identifier of the issuer's issuing account IAN (issuer account number) and the total amount CV (currency value) issued by the issuer to the digital wallet device.
  • Figure 3 it is a schematic diagram of an identification account book according to an embodiment of the present invention, wherein "01" in the identification account book header indicates the unique identification of the issuing account of the issuer, and "100" indicates the amount issued to the digital wallet device by the issuer for 100.
  • the issuer can be an institution that is legally qualified to issue digital currency in various countries or regions around the world, such as the People's Bank of China, etc., and the unit of the amount can be yuan, US dollars, euros, etc.
  • identifying the account book header can further include the issuer's unique identification of the account book (ISN, issue serial number); the timestamp generated by the account book (TS, timestamp); and the encryption and decryption module 13 using IAN, ISN, TS, CV Calculated cryptographic hash (HH, header hash).
  • ISN issuer's unique identification of the account book
  • TS timestamp generated by the account book
  • HH header hash
  • the cryptographic hash algorithm can use the current general algorithm, such as: SHA2, SHA3, SM3, etc., and the SHA3 algorithm can be used; the asymmetric algorithm signature (ISD, issuer signature data) calculated using the private key corresponding to IAN, where the signature data ISD can be based on the Secp256R1 Elliptic Curve ECDSA signature algorithm, which is obtained by calculating and signing the HH using the private key ⁇ Key ⁇ _IAN corresponding to the issuing account. Its structure can be shown in Figure 4.
  • the identification ledger body 141B includes several transaction records TR1-TRn arranged in chronological order.
  • Each transaction record can include the transaction amount TA, the unique number SAN of the transaction source account, the unique number TAN of the transaction target account, and the signature SSD (source signature data) of the transaction source by the transaction source.
  • the signature algorithm can be determined by the corresponding SAN
  • the private key is calculated, the algorithm is the same as ISD, it is the ECDSA signature algorithm based on the Secp256R1 elliptic curve, and the transaction target party’s signature TSD (target signature data) for the transaction can be calculated by the private key corresponding to TAN, the algorithm Ditto.
  • the above encryption and signature processes are all encrypted and decrypted by the encryption and decryption module 13 .
  • 100 means the first transaction amount is 100
  • the mark I means that the source of the transaction is the account ID of the issuer
  • the mark A marks the target party of the transaction as the digital wallet device ID whose device account number is A, where Si and Sa are the issuing account I and Sa respectively.
  • the second transaction amount is 50
  • the source account is the digital wallet A account ID
  • the target account is the digital wallet B account ID
  • Sa and Sb are digital wallet A and digital wallet B respectively.
  • the signature of the transaction is 50
  • the source account is the digital wallet A account ID
  • the target account is the digital wallet B account ID
  • Sa and Sb are digital wallet A and digital wallet B respectively.
  • the transaction record information may also include the hash value PH of the previous transaction, the serial number value TN of this transaction, the transaction timestamp TS, and the transaction hash value TH.
  • FIG. 4 it is a schematic diagram of the data structure of the preferred identification ledger subject in the present invention.
  • the source of the first transaction record in the identification ledger is the corresponding issuer. Therefore, the transaction record does not include the hash value of the previous transaction, but includes the hash value of the identification ledger.
  • the previous transaction hash (PH, previous hash) is calculated from the data recorded in the previous transaction using an encrypted hash algorithm
  • the previous transaction hash of the first transaction is the identification of the ledger calculated from the data.
  • the encrypted hash algorithm of the present invention adopts the SHA3 algorithm.
  • the above-mentioned hash encryption process is encrypted and decrypted by the encryption and decryption module 13 .
  • serial number (TN, transaction number) of this transaction is generated in sequence by the digital wallet of the transaction source.
  • the latest transaction record of each identification account book should be the transaction record of the digital wallet device as the payer or payee;
  • the balance calculation rule of each identification account book in the present invention is that the digital wallet in each identification account book
  • the difference between the transaction amount of the last transaction record of the device as the transaction target party and the total transaction amount of all transaction records of the terminal device as the transaction source party after the transaction record is the available amount of the identification ledger for the terminal device.
  • the maximum amount that the payer can pay for each transaction record is the amount available to the payer in the identification ledger before the transaction record is generated. Transactions exceeding this amount cannot be signed.
  • a transaction record that identifies the ledger may be incomplete and may not include the signature of a party in the transaction.
  • Such a transaction record is illegal, so the transaction amount involved in this transaction record is not Payment transactions can be made, but they will also be locked and cannot be used in addition to the account reconciliation with the background.
  • the digital wallet device for identifying ledgers may also include an input module and a display module.
  • the input module may be a small input device integrated on the device such as a touch screen or a keyboard, and is used to input transaction information such as transaction amount and transaction confirmation information.
  • the display module can be a display device integrated outside the device, such as an electronic display screen, for displaying transaction information, which can include information that needs to be confirmed during the transaction, transaction success information, wallet balance, and the like.
  • the digital wallet device based on the identification ledger may or may not include an Internet communication module according to actual usage requirements.
  • a digital wallet device that does not include an Internet communication module needs to communicate with the network background, it establishes communication with other smart terminals through short-distance communication, and conducts Internet communication through the smart terminal.
  • Fig. 6 is a schematic flow diagram of dual offline transactions based on the identification book-based digital wallet device provided by the present invention.
  • the transaction user first uses the digital wallet device to initialize the transaction; for the convenience of illustration, as shown in Figure 6, the transaction user can be a user of digital wallet device A and a user of digital wallet device B;
  • the method of establishing short-distance communication can be, for example, triggering NFC communication by close contact first, and then exchanging the bluetooth address of the payee to establish bluetooth communication;
  • Step a) the digital wallet device A user and the digital wallet device B user participating in the transaction complete the two-way authentication through the exchange of their respective device identification IDs and signatures;
  • the instructions in the above process can all use symmetric encryption algorithms and process key K, and the instructions Data is encrypted in its entirety.
  • the encryption algorithm can be SM4, AES, Blowfish, DES, Triple DES, Serpent, Twofish and other well-known algorithms. Since then, digital wallet device A and digital wallet device B have completed the authentication of both parties, and obtained the process key K, which can carry out subsequent encrypted communication;
  • One of the transaction source (payer) digital wallet device A user or the transaction target (payee) digital wallet device B user inputs the transaction amount and other information through the input module on the corresponding digital wallet device to generate a transaction instruction; what needs to be explained Yes, if the transaction target party makes the input, the transaction instruction needs to be sent to the digital wallet device of the transaction source party; here, it is assumed that the transaction source party is digital wallet device A, and the transaction target party is digital wallet device B;
  • Step b) digital wallet device A sends a transaction preparation instruction to the internal security chip, and the security chip internally adds a new transaction preparation data at the end of its original identification ledger L0, such as "50 - A - B - Sa - _", wherein the transaction preparation data includes, "50” is the transaction amount, "A” and “B” are the account identifiers of the source party and the target party respectively, and "Sa” is the digital wallet A's signature on the transaction , since the data has not been provided to the target party of the transaction, the signature of the target party of the transaction is empty (_);
  • the security chip determines the total transaction amount information and related information of this transaction according to the transaction instruction, and retrieves the locally stored identification ledger according to the total transaction amount;
  • the transaction preparation data information may further include a hash value of a previous transaction, a transaction serial number value, and a transaction timestamp.
  • Step c) digital wallet A sends the identification ledger L1 containing the new transaction preparation data to digital wallet B;
  • Step d) digital wallet device B verifies the signature in the transaction record, and verifies the authenticity and legality of the transaction information
  • it includes verifying the identification IDs of both parties to the transaction and whether the transaction amount of the identification book is less than or equal to the available amount of the identification book for the transaction source party; after the transaction target party completes the verification and verification of the transaction records, if they pass, then Sign the hash of the transaction information and write it into the new transaction record to make the transaction record complete; if the digital wallet device B fails the verification, the transaction will be rejected, and the transaction will end;
  • Step e) the digital wallet device B of the transaction target party performs the corresponding transaction results, specifically, signs the transaction preparation data record of the identification ledger L1, saves the signed identification ledger record as a new identification ledger L2 available to B, and Send the transaction confirmation data information, such as "50 - A - B - Sa -Sb" to A.
  • the transaction confirmation data information includes the transaction preparation data information of this transaction and the digital wallet device B's sign;
  • Step f) after the digital wallet device A of the transaction source receives the transaction confirmation data information signed by the digital wallet device B, it verifies the signature of the digital wallet device B and the transaction confirmation data information.
  • the signature of the digital wallet device B is added to the corresponding transaction record, and saved as the identification ledger L2, which is used as the identification ledger for subsequent transactions.
  • steps b) to f) are only specifically explained for the processing of a single identification ledger. If the transaction source party needs to send multiple identification ledgers to the transaction target party, the transaction source party repeats the steps for the identification ledger b)-f), until the transaction of all ledgers in this transaction is completed.
  • any step if the signature verification or verification of transaction information fails, it is necessary to obtain the corresponding identification ledger from the other party's device to overwrite the identification ledger that failed the verification. If the corresponding identification ledger cannot be obtained again, the party whose verification fails holds the identification ledger with incomplete transaction records, and the transaction amount involved in the incomplete transaction records in the identification ledger cannot participate in the transaction.
  • the two-way authentication in step 1 is to exchange IDs and signatures after the two parties establish short-distance communication. Only one interaction is required to verify whether the identities of both parties are legal, and to complete mutual identity authentication and process key negotiation. . Specific methods include:
  • Step 1-1 Digital wallet device A generates an 8-byte random number R1, obtains its own CCKS identification ID1, and calculates the signature C1 S1 for R1, and sends it to digital wallet device B through authentication and key exchange instructions.
  • the necessary parameters for are ID1, R1, C1, S1.
  • Step 1-2 After digital wallet device B receives the authentication and key exchange instructions, it first authenticates the legality of ID1 through the blacklist (or whitelist) and (or) ID rules, and then obtains digital wallet device A through ID1 calculation The public key PUB1 of the signature value C1 S1 is verified. If the verification is passed, the digital wallet device A is legal, and the following steps can be performed; the digital wallet device B generates a random number R2, and obtains the process key through the XOR of R1 and R2. Then digital wallet device B obtains its own CCKS identification ID2, and uses the public key PUB1 to encrypt R2 to obtain ENC2, and then signs ENC2 to obtain C2 S2. After the above calculation is completed, digital wallet device B ends the authentication and key exchange instructions Processing process, and return the following data to digital wallet device A: ID2, ENC2, C2, S2 and response code.
  • Step 1-3 After digital wallet device A receives the return, it first authenticates the legality of ID2 through the blacklist (or whitelist) and (or) ID rules, and then obtains the public key PUB2 of digital wallet device A through ID2 calculation; Digital wallet device A uses PUB2 to verify the signature of C2 S2, and if the verification is successful, it means that digital wallet device B is legal and can perform the following process; digital wallet device A’s private key decrypts ENC2 with its own private key, obtains random number R2, and passes R1 Exclusive OR with R2 obtains the process key K. Since then, digital wallet device A and digital wallet device B have completed the authentication of both parties, and obtained the process key K, which can carry out subsequent encrypted communication.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

一种基于标识账本的数字钱包设备(1)及其双离线交易方法,数字钱包设备(1)包括安全芯片(11)、通信模块(12);通信模块(12)用于与其他数字钱包设备(1)进行近距离通信,可以包括蓝牙模块、NFC模块、红外通信模块、无线局域网模块中的一种或多种;安全芯片(11)进一步包括标识账本***(14)和加解密模块(13),标识账本***(14)包括至少一个标识账本(141),每个标识账本(141)用于存储并更新数字钱包设备(1)的交易记录;安全芯片(11)根据交易记录计算每个标识账本(141)的余额;安全芯片(11)保存数字钱包设备(1)的唯一身份标识ID;加解密模块(13)通过映射算法完成基于数字钱包设备(1)的唯一身份标识ID在安全芯片(11)内得到公钥的计算。

Description

数字钱包设备及其双离线交易方法 技术领域
本发明涉及数字货币与数字钱包技术,一种基于标识账本的数字钱包设备及通过数字钱包设备实现的离线交易方法。
背景技术
近年来,随着信息技术的进一步发展以及智能设备的加快普及,电子支付已经在市民生活中扮演着重要的角色。在这种情况下,在支付乃至金融领域如何更深入地实现数字化成为了人们关注的新课题,数字货币与数字钱包的概念也随着区块链技术的发展以及关联应用的推广越来越火热。自2019年以来,央行数字货币的课题在全球多个国家都被关注和着力研究,相关的技术与管理模式也在不断发展。
但是,现有的电子支付手段严重依赖中心化的互联网与PKI***,设备之间的交易实质上是存储一些对于交易的记录和凭证,真正将这些交易的记录转换为价值的是与后台之间进行的清结算。因此,即使是一些所谓的离线交易方法,其交易后的资产也无法在保证安全性的情况下及时使用与流通。基于互联网和PKI***的传统技术无法突破对中心的依赖,也就无法真实地实现数字货币价值流通的功能,无法让数字货币在流通过程中自证价值。要想打破这种桎梏,需要全新的点对点安全技术以及赋予本地交易记录真正记录价值的能力,实现设备之间点对点的可信认证与交易,并且有足够的防止伪冒、篡改、窃取、双花行为的安全能力。
技术问题
基于此,有必要针对数字货币的使用提供安全可信、便捷易用的设备以及和传统现金类似的高效双离线交易方法。
技术解决方案
本发明提供一种数字钱包设备,其特征在于,包括:
安全芯片、通信模块;
所述通信模块用于与其他所述数字钱包设备进行近距离通信,可以包括蓝牙模块、NFC模块、红外通信模块、无线局域网模块中的一种或多种;
所述安全芯片进一步包括标识账本***和加解密模块,所述标识账本***包括至少一个标识账本,每个所述标识账本用于存储并更新所述数字钱包设备的交易记录;所述安全芯片根据所述交易记录计算每个所述标识账本的余额;
所述安全芯片保存数字钱包设备的唯一身份标识ID;所述加解密模块通过映射算法完成基于所述数字钱包设备的唯一身份标识ID在安全芯片内得到公钥的计算。
其中,
所述加解密模块还用于保存和管理本地密钥,以及使用所述密钥对于通讯指令和交易信息进行加解密、以及签名验签;
每个所述标识账本包括标识账本头和标识账本主体;
所述标识账本头包括发行方唯一标识IAN以及发行方发放到该数字钱包设备的总金额CV;
所述标识账本主体包括若干条依时间次序排列的交易记录;每一条交易记录进一步包括交易金额、交易来源方账户的唯一编号SAN、交易目标方账户的唯一编号TAN、交易来源方对该交易的签名SSD、以及交易目标方对该交易的签名TSD。
其中,
所述标识账本头还包括发行方对该账本的唯一标识ISN、账本生成的时间戳TS、以及使用所述IAN、ISN、TS、CV计算的加密哈希值。
其中,
标识账本主体中第一条交易记录中来源方为标识账本头中的发行方,交易记录中包括标识账本头的哈希值;
所述标识账本主体中的交易记录进一步包括前一笔交易的哈希值、交易序号值、交易时间戳。
其中,
每一个标识账本的最新一条交易记录为本地数字钱包设备作为交易来源方或者交易目标方的交易记录。
其中,
每个所述标识账本内的最后一次作为交易目标方的交易记录的交易金额与该交易记录之后所有该终端设备作为交易来源方的交易记录的总交易金额之差为该标识账本对于该终端设备的可用额。
其中,
所述数字钱包设备还可以包括输入模块和显示模块;
所述输入模块用于输入交易金额等交易信息,可以是键盘或者触屏;
所述显示模块用于显示交易信息。
本发明进一步提供一种的数字钱包设备的双离线交易方法,其特征在于,所述方法包括:
步骤1、数字钱包设备A与数字钱包设备B通过基于标识的双向认证,完成互相之间的认证;
步骤2、数字钱包A向内部的安全芯片发出交易准备的指令,数字钱包设备A的安全芯片根据所需支付金额以及所述本地标识账本的余额判断此次交易所需的标识账本个数;如果本次支付的总金额小于单一标识账本可用额的最高值,则只选择使用一个标识账本,否则依次选择多个标识账本进行交易;
步骤3、安全芯片在所述步骤2中选择的其中一个标识账本L0的末尾添加新的一条交易准备数据信息作为当前最后一笔交易记录,得到新标识账本L1并发送给数字钱包设备B;数字钱包B进行进一步验证;所述交易准备数据包括该笔交易的交易金额、来源方和目标方的账户标识、以及数字钱包A对该交易的签名;
步骤4、数字钱包设备A收到带有数字钱包设备B签名的交易确认数据信息,所述交易确认数据信息包括本次交易的交易准备数据信息、数字钱包设备A的签名和数字钱包设备B的签名;数字钱包设备A验证数字钱包设备B的签名及交易确认数据信息,通过后则在标识账本L1的最后一条交易记录中添加数字钱包设备B的签名,并保存作为标识账本L2,作为进行后续交易的标识账本;
步骤5、数字钱包设备A的安全芯片根据交易信息确定是否完成本次交易中全部标识账本的交易,如果没有,则选取下一个参与交易的标识账本重复步骤3-5,直到本次交易中全部标识账本的交易完成。
其中,
所述交易准备数据信息进一步包括前一笔交易的哈希值、交易序号值、交易时间戳。
其中,
在步骤3的数字钱包设备B进一步验证步骤包括:
步骤3-1、数字钱包设备B收到A发送的标识账本L1及交易相关信息,验证A的签名并核验交易的真实性与合法性,包括计算标识账本L0对于A的可用金额,与交易金额对比确定交易是否合法;
步骤3-2、数字钱包设备B对标识账本L1的交易准备数据记录进行签名并形成一条交易确认数据,将签名后的标识账本记录作为B可用的新标识账本L2保存,并将交易确认数据发送给A。
其中,
步骤1所述的双向认证过程可以包括:
步骤1-1、数字钱包设备A生成一个8字节随机数R1,获取自己的CCKS标识ID1,并计算出对R1的签名C1 S1,通过认证与密钥交换指令发送给数字钱包设备B,指令的必要参数为ID1、R1、C1、S1;
步骤1-2、数字钱包设备B接收到认证与密钥交换指令后,先通过黑名单(或白名单)和(或)ID规则认证ID1的合法性,通过后经由ID1计算获得数字钱包设备A的公钥PUB1,对签名值C1 S1进行验签,验签通过则说明数字钱包设备A合法,可以进行下述步骤;数字钱包设备B生成随机数R2,通过R1与R2的异或获得过程密钥K,然后数字钱包设备B获取自己的CCKS标识ID2,并使用公钥PUB1对R2加密获得ENC2,再对ENC2签名获得C2 S2,完成上述计算后,数字钱包设备B结束认证与密钥交换指令处理过程,并返回如下数据给数字钱包设备A:ID2、ENC2、C2、S2和响应码;
步骤1-3、数字钱包设备A收到返回后,先通过黑名单(或白名单)和(或)ID规则认证ID2的合法性,通过后经由ID2计算获得数字钱包设备A的公钥PUB2;数字钱包设备A使用PUB2对C2 S2进行验签,验签通过则说明数字钱包设备B合法,可以进行下述过程;数字钱包设备A私钥自己的私钥解密ENC2,获取随机数R2,通过R1与R2的异或获得过程密钥K;所述过程密钥K用于进行后续的步骤的加密通讯。
有益效果
本发明至少可以实现以下有益效果:
通过本发明的数字钱包设备及其离线交易方法,采用标识认证技术对每一个设备分配唯一身份标识,进而基于标识认证技术建立标识账本***,通过标识账本记录交易记录,并在交易过程中于交易方之间签名交换,实现安全可信的点对点可离线交易。
基于标识认证技术,数字钱包设备的身份标识ID与硬件实现强绑定关系,并且与对应公钥通过公钥映射算法建立强关联关系,允许数字钱包设备之间直接通过标识ID的交换完成互相的身份验证,保证数字钱包设备之间可以实现点对点的可双离线认证。
通过安全芯片与标识认证技术的结合,防止本地设备对交易记录进行篡改和删除。同时通过每个标识账本内的每笔交易记录对前一笔交易记录哈希的保存建立交易记录之间的关联,每一笔交易包含交易双方的签名的标识ID,允许数字钱包设备在本地对任何一笔交易的签名进行验证,保证过往交易记录在本地即可验证,解决双离线交易中的伪冒与双花问题。
通过标识账本与标识账本中的交易记录来记录交易,确保每一笔交易都可以追溯,防止交易完成后的抵赖行为。每笔交易完成以后,交易双方可以立即使用新的标识账本再次进行交易,没有交易冷却期也不需要立即与后台进行结算,真正实现可双离线的即时、连续交易。
通过标识账本与标识账本中的交易记录来标识设备的可用金额,取代传统的余额记录,保证交易过程中交易金额的合法性可以在本地验证并保证交易记录内的交易金额真实性,防止余额或者交易金额的造假。
本发明提供的数字钱包设备及其双离线交易方法,通过标识认证技术与标识账本的结合,真正实现数字货币安全、可信的价值转移,做到点对点的双离线交易并可以连续交易,每一笔交易可验证、可追溯,防止伪冒、篡改、窃取、双花等行为,促进数字货币安全、便捷、可靠地在不同场景中流通。
附图说明
图1为本发明的一个实施例的数字钱包设备结构示意图;
图2为本发明的一个实施例的标识账本结构示意图;
图3为本发明的一个实施例的单笔交易记录的结构示意图;
图4为本发明的一个优选实施例的单笔交易记录的数据结构图;
图5为本发明的一个优选实施例的多笔交易记录的结构示意图;
图6为基于本发明的数字钱包设备进行离线交易的流程示意图。
本发明的最佳实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1所示为根据本发明的基于标识账本的数字钱包设备1的结构示意图。所述的数字钱包设备形式可以是一种单独的硬件或者一种可信执行环境TEE(Trusted Execution Environment)。其中,数字钱包设备1包括SE(Secure Element)安全芯片11、通信模块12、加解密模块13和标识账本***14,其中加解密模块13和标识账本***14均存储在SE安全芯片11中。
优选地,数字钱包设备1还可以包括输入模块15和显示模块16。
其中,SE安全芯片11存有数字钱包设备1的唯一的设备账户编号(device account number DAN),并由加解密模块13分配对应的交易私钥,其具有安全计算和安全存储功能。所述安全计算可以为支持非对称加密算法,并能抵御对计算过程的旁路攻击和分析;所述安全存储指其存储设备的内容无法被芯片外部直接获取。每个SE安全芯片11记录有版本号、批次号。
本发明的标识加密技术支持直接通过ID计算出公钥,即:
Figure dest_path_image002
其中:Pubkey 为公钥;Pub()为公钥映射函数,可以通过ID计算得出公钥值;ID为设备账户标识。
通信模块12主要用于近距离通信,可以采用的通信方式包括蓝牙和NFC、红外通信模块、无线局域网模块等近距离通信方式中的一种或几种。
加解密模块13集成在SE安全芯片11内,用于保存和管理本地密钥,以及进行对标识账本数据、交易过程数据进行加解密、签名验签等操作。通过加解密模块的映射算法与数字钱包设备的公钥实现强绑定关系。因为公钥和数字钱包设备的唯一身份标识ID之间有强绑定关系,可以根据唯一身份标识ID在安全芯片中直接计算,因此可以避免中间人攻击等仿冒危险,不需要第三方的证书来证明。本发明中采用的标识认证技术是CCKS技术,具有支持单域超大的密钥容量和支持离线点对点认证的特点,可以为标识账本的离线交易和验证提供支持。
本发明的标识账本***14由多个标识账本141-14n构成,各标识账本的存储结构进一步由标识账本头和标识账本体组成,如图2所示以标识账本141为例示出了其具体结构。其中包括标识账本头141A,用于记录账本金额信息,标识账本体141B用于顺序记录该标识账本中的多笔交易记录TR1-TRN。
其中,标识账本头141A由发行方生成,主要用于表示该账本的总金额账本。其可以包括发行方的发行账户唯一标识IAN(issuer account number)以及发行方发放到该数字钱包设备的总金额CV(currency value)。例如如图3所示为根据本发明一个实施例的标识账本示意图,其中标识账本头中的“01”表示发行方的发行账户唯一标识,“100”表示发行方发放到该数字钱包设备的金额为100。可以理解的是,发行方可以是世界各国或地区具有合法发行数字货币资质的机构,例如中国人民银行等,其金额的单位可以是元,也可以是美元、欧元等。
优选地,标识账本头还可以进一步包括发行方对该账本的唯一标识(ISN,issue serial number);账本生成的时间戳(TS,timestamp);以及加解密模块13使用IAN,ISN、TS、CV计算的加密哈希(HH,header hash)。其中,加密哈希算法可以采用目前通用的算法,例如:SHA2、SHA3、SM3等,可以采用SHA3算法;使用IAN对应的私钥计算的非对称算法签名(ISD,issuer signture data),其中签名数据ISD可以是基于Secp256R1·椭圆曲线的ECDSA签名算法,使用发行账户对应的私钥〖Key〗_IAN对HH计算签名获得。其结构可以如图4所示。
其中,标识账本主体141B包括若干条依时间次序排列的交易记录TR1-TRn。每一条交易记录可以包括交易金额TA、交易来源方账户的唯一编号SAN、交易目标方账户的唯一编号TAN、交易来源方对该交易的签名SSD(source signture data),签名算法可以由SAN对应的私钥计算得出,算法与ISD相同,为基于Secp256R1•椭圆曲线的ECDSA签名算法,以及交易目标方对该交易的签名TSD(target signture data),可以由TAN对应的私钥计算得出,算法同上。
上述加密和签名过程均通过加解密模块13加密和解密。
依旧参考如图3所示,其中账本标识头下部的标识账本主体记录两笔交易记录。
其中100表示第一笔交易金额100,标识I表示交易来源方为发行方账户ID,标识A标识交易目标方为设备账户编号为A的数字钱包设备ID,其中Si和Sa分别为发行账户I和数字钱包设备A对该交易的签名;
以此类推,第二笔交易金额为50,来源方账户为数字钱包A账号标识ID,目标方账户为数字钱包B账号标识ID,其中Sa和Sb分别为数字钱包A和数字钱包B对该笔交易的签名。
优选地,交易记录信息还可以包括前一笔交易的哈希值PH、本次交易序号值TN、交易时间戳TS、交易哈希值TH。如图4所示,为本发明优选的标识账本主体数据结构示意图。
需要注意的是,标识账本主体中第一条交易记录中来源方为相应发行方,因此,交易记录中不包括前一笔交易的哈希值,但是包括标识账本头的哈希值。
其中,前一笔交易哈希(PH,previous hash),是使用加密哈希算法对前一笔交易记录的数据计算得出,其中第一笔交易的前一笔交易哈希是对标识账本头的数据计算得出。本发明的加密哈希算法采用SHA3算法。上述哈希加密过程均通过加解密模块13进行加密和解密。
其中,本次交易的序号(TN,transaction number),由交易来源方的数字钱包按顺序产生。
需要说明的是,每个标识账本的最新一条交易记录应当为数字钱包设备作为付款方或者收款方的交易记录;本发明每一个标识账本的余额计算规则为,每一个标识账本内该数字钱包设备最后一次作为交易目标方的交易记录的交易金额与该交易记录之后所有该终端设备作为交易来源方的交易记录的总交易金额之差为该标识账本对于该终端设备的可用额。例如如图5所示标识账本中,此时针对数字钱包A的余额为22 = 30–5-3,这是因为按照上述规则,数字钱包A作为目标方的交易记录分别为TR1和TR4,取最后一笔交易TR4的交易金额30,减去数字钱包为作为来源方的交易记录TR5和TR6的交易金额计算得出。
每一笔交易记录的付款方可支付的最大金额为该交易记录生成前的标识账本对于付款方的可用额,超过该可用额的交易无法签名。
在交易过程中出现交易异常时,标识账本的一条交易记录可能是不完整的,可能不包括交易中某一方的签名,这样的交易记录是不合法的,因此这条交易记录涉及的交易金额不可以进行支付交易,也将被锁定,在与后台对账前无法另外使用。
进一步地,标识账本的数字钱包设备还可以包括输入模块和显示模块。输入模块可以是触屏或者键盘等集成在设备上的小型输入设备,用于输入交易金额、交易确认信息等交易信息。显示模块可以是电子显示屏等集成在设备外部的显示设备,用于显示交易信息,可以包括交易时需要确认的信息、交易成功信息、钱包余额等。
基于标识账本的数字钱包设备根据实际使用需求可以包括或者不包括互联网通信模块。不包括互联网通信模块的数字钱包设备需要与网络后台通信时,通过近距离通信方式与其他智能终端建立通信,通过该智能终端进行互联网通信。
图6是基于本发明提供的基于标识账本的数字钱包设备进行双离线交易的流程示意图。
在使用本发明提供的基于标识账本的数字钱包设备进行双离线交易时,具体步骤如下:
首先,交易用户首先使用数字钱包设备进行交易初始化;为方便说明,如图6所示,交易用户可以是数字钱包设备A用户和数字钱包设备B用户;
然后,参与交易的数字钱包设备A和数字钱包设备B建立近距离通信;建立近距离通信的方式可以例如是先近距离接触触发NFC通信,随后交换收款方蓝牙地址,建立蓝牙通信;
然后进入离线交易步骤:
步骤a)、参与交易的数字钱包设备A用户和数字钱包设备B用户通过各自的设备标识ID和签名的交换完成双向认证;上述过程的指令可以均使用对称加密算法和过程密钥K,对指令数据进行整体加密。加密算法可以是SM4、AES、Blowfish、DES、Triple DES、Serpent、Twofish等公知算法。自此,数字钱包设备A和数字钱包设备B完成了双方的认证,并获得了过程密钥K,可以进行后续的加密通讯;
交易来源方(付款方)数字钱包设备A用户或者交易目标方(收款方)数字钱包设备B用户中的一方在相应数字钱包设备上通过输入模块输入交易金额等信息生成交易指令;需要说明的是,如果是交易目标方进行输入,则需要将交易指令发送给交易来源方数字钱包设备;这里假设交易来源方为数字钱包设备A,交易目标方为数字钱包设备B;
步骤b)、数字钱包设备A向内部的安全芯片发出交易准备的指令,安全芯片内部在其原始标识账本L0末尾添加新的一条交易准备数据,例如如图所示的“ 50 – A – B – Sa - _”,其中所述交易准备数据包括,“50”是交易金额,“A”和“B”分别是来源方和目标方的账户标识,“Sa”是数字钱包A对该交易的签名,由于数据尚未提供给交易的目标方,交易的目标方签名为空(_);
安全芯片根据交易指令确定本次交易的交易总金额信息及相关信息,根据交易总金额检索本地保存的标识账本;
如果存在一个标识账本对交易来源方的数字钱包设备的可用金额是大于或等于交易总金额的,选择该标识账本参与交易;如果每个标识账本对交易来源方的数字钱包设备的可用金额都小于交易总金额,则选择多个标识账本进行交易,并将交易总金额分配给各个标识账本,保证每个标识账本的交易金额小于或等于该标识账本对交易来源方数字钱包设备的可用金额;
因此,如果数字钱包设备A需要向数字钱包设备B转入金额为60元,而如上所述,如图5所示标识账本中,此时针对数字钱包A的余额为22 = 30–5-3,即不足以支付金额为60元,则数字钱包设备A需要向数字钱包设备B同时发送两个或两个以上的标识账本,例如可以同时发送如图3所示的余额为50元的标识账本;
其中,所述交易准备数据信息可以进一步包括前一笔交易的哈希值、交易序号值、交易时间戳。
步骤c)、数字钱包A将包含新的交易准备数据的标识账本L1发送给数字钱包B;
步骤d)、数字钱包设备B验证交易记录中的签名,并核验交易信息的真实性与合法性;
其中具体包括校验交易双方的标识ID和该标识账本的交易金额是否小于等于该标识账本对交易来源方的可用金额等;交易目标方完成交易记录的验证和校验以后,如果均通过,则对交易信息的哈希进行签名,写入新交易记录中使该交易记录完整;如果数字钱包设备B验证不通过则拒绝交易,此次交易结束;
步骤e)、交易目标方的数字钱包设备B进行交易结果相应,具体地,对标识账本L1的交易准备数据记录进行签名,将签名后的标识账本记录作为B可用的新标识账本L2保存,并将交易确认数据信息,例如“50 – A – B – Sa –Sb”发送给A,可以理解的是,此时所述交易确认数据信息包括本次交易的交易准备数据信息和数字钱包设备B的签名;
步骤f)、交易来源方的数字钱包设备A收到带有数字钱包设备B签名的交易确认数据信息后,验证数字钱包设备B的签名及交易确认数据信息,验证通过后则在标识账本L1的相应交易记录中添加数字钱包设备B的签名,并保存作为标识账本L2,作为进行后续交易的标识账本。
需要说明的是,步骤b)-步骤f)仅针对单个标识账本的处理过程进行了具体说明,如果交易来源方需要向交易目标方发送多个标识账本,则交易来源方对该标识账本重复步骤b)-f),直至本次交易中全部标识账本的交易完成。
任何步骤中如果出现验证签名或者校验交易信息未通过的情况,则需要重新向对方设备获取相应标识账本覆盖校验未通过的标识账本。如果无法重新获取相应标识账本,则校验失败的一方持有含不完整交易记录的标识账本,该标识账本中不完整交易记录所涉及的交易金额无法另外参与交易。
步骤1中的双向认证是交易双方建立近距离通信以后通过交换ID与签名的方式,只需要通过一次的交互就可认证双方的身份是否合法,完成互相之间的身份认证以及过程密钥的协商。具体方法包括:
步骤1-1、数字钱包设备A生成一个8字节随机数R1,获取自己的CCKS标识ID1,并计算出对R1的签名C1 S1,通过认证与密钥交换指令发送给数字钱包设备B,指令的必要参数为ID1、R1、C1、S1。
步骤1-2、数字钱包设备B接收到认证与密钥交换指令后,先通过黑名单(或白名单)和(或)ID规则认证ID1的合法性,通过后经由ID1计算获得数字钱包设备A的公钥PUB1,对签名值C1 S1进行验签,验签通过则说明数字钱包设备A合法,可以进行下述步骤;数字钱包设备B生成随机数R2,通过R1与R2的异或获得过程密钥K,然后数字钱包设备B获取自己的CCKS标识ID2,并使用公钥PUB1对R2加密获得ENC2,再对ENC2签名获得C2 S2,完成上述计算后,数字钱包设备B结束认证与密钥交换指令处理过程,并返回如下数据给数字钱包设备A:ID2、ENC2、C2、S2和响应码。
步骤1-3、数字钱包设备A收到返回后,先通过黑名单(或白名单)和(或)ID规则认证ID2的合法性,通过后经由ID2计算获得数字钱包设备A的公钥PUB2;数字钱包设备A使用PUB2对C2 S2进行验签,验签通过则说明数字钱包设备B合法,可以进行下述过程;数字钱包设备A私钥自己的私钥解密ENC2,获取随机数R2,通过R1与R2的异或获得过程密钥K。自此,数字钱包设备A和数字钱包设备B完成了双方的认证,并获得了过程密钥K,可以进行后续的加密通讯。
以上所述的仅是本发明的优选实施方式,本发明不限于以上实施例。可以理解,本领域技术人员在不脱离本发明的精神和构思的前提下直接导出或联想到的其他改进和变化,均应认为包含在本发明的保护范围之内。
本发明的实施方式
在此处键入本发明的实施方式描述段落。
工业实用性
在此处键入工业实用性描述段落。
序列表自由内容
在此处键入序列表自由内容描述段落。

Claims (11)

  1. 一种数字钱包设备,其特征在于,包括:
    安全芯片、通信模块;
    所述通信模块用于与其他所述数字钱包设备进行近距离通信,可以包括蓝牙模块、NFC模块、红外通信模块、无线局域网模块中的一种或多种;
    所述安全芯片进一步包括标识账本***和加解密模块,所述标识账本***包括至少一个标识账本,每个所述标识账本用于存储并更新所述数字钱包设备的交易记录;所述安全芯片根据所述交易记录计算每个所述标识账本的余额;
    所述安全芯片保存数字钱包设备的唯一身份标识ID;所述加解密模块通过映射算法完成基于所述数字钱包设备的唯一身份标识ID在安全芯片内得到公钥的计算。
  2. 根据权利要求1所述的设备,其特征在于:
    所述加解密模块还用于保存和管理本地密钥,以及使用所述密钥对于通讯指令和交易信息进行加解密、以及签名验签;
    每个所述标识账本包括标识账本头和标识账本主体;
    所述标识账本头包括发行方唯一标识IAN以及发行方发放到该数字钱包设备的总金额CV;
    所述标识账本主体包括若干条依时间次序排列的交易记录;每一条交易记录进一步包括交易金额、交易来源方账户的唯一编号SAN、交易目标方账户的唯一编号TAN、交易来源方对该交易的签名SSD、以及交易目标方对该交易的签名TSD。
  3. 根据权利要求2所述的设备,其特征在于:
    所述标识账本头还包括发行方对该账本的唯一标识ISN、账本生成的时间戳TS、以及使用所述IAN、ISN、TS、CV计算的加密哈希值。
  4. 根据权利要求2所述的设备,其特征在于:
    标识账本主体中第一条交易记录中来源方为标识账本头中的发行方,交易记录中包括标识账本头的哈希值;
    所述标识账本主体中的交易记录进一步包括前一笔交易的哈希值、交易序号值、交易时间戳。
  5. 根据权利要求1所述的设备,其特征在于:
    每一个标识账本的最新一条交易记录为本地数字钱包设备作为交易来源方或者交易目标方的交易记录。
  6. 根据权利要求1所述的设备,其特征在于:
    每个所述标识账本内的最后一次作为交易目标方的交易记录的交易金额与该交易记录之后所有该终端设备作为交易来源方的交易记录的总交易金额之差为该标识账本对于该终端设备的可用额。
  7. 根据权利要求1所述的设备,其特征在于:
    所述数字钱包设备还可以包括输入模块和显示模块;
    所述输入模块用于输入交易信息,可以是键盘或者触屏;
    所述显示模块用于显示交易信息。
  8. 一种如权利要求1-7任一项的数字钱包设备的双离线交易方法,其特征在于,所述方法包括:
    步骤1、数字钱包设备A与数字钱包设备B通过基于标识的双向认证,完成互相之间的认证;
    步骤2、数字钱包A向内部的安全芯片发出交易准备的指令,数字钱包设备A的安全芯片根据所需支付金额以及所述本地标识账本的余额判断此次交易所需的标识账本个数;如果本次支付的总金额小于单一标识账本可用额的最高值,则只选择使用一个标识账本,否则依次选择多个标识账本进行交易;
    步骤3、安全芯片在所述步骤2中选择的其中一个标识账本L0的末尾添加新的一条交易准备数据信息作为当前最后一笔交易记录,得到新标识账本L1并发送给数字钱包设备B;数字钱包B进行进一步验证;所述交易准备数据包括该笔交易的交易金额、来源方和目标方的账户标识、以及数字钱包A对该交易的签名;
    步骤4、数字钱包设备A收到带有数字钱包设备B签名的交易确认数据信息,所述交易确认数据信息包括本次交易的交易准备数据信息、数字钱包设备A的签名和数字钱包设备B的签名;数字钱包设备A验证数字钱包设备B的签名及交易确认数据信息,通过后则在标识账本L1的最后一条交易记录中添加数字钱包设备B的签名,并保存作为标识账本L2,作为进行后续交易的标识账本;
    步骤5、数字钱包设备A的安全芯片根据交易信息确定是否完成本次交易中全部标识账本的交易,如果没有,则选取下一个参与交易的标识账本重复步骤3-5,直到本次交易中全部标识账本的交易完成。
  9. 根据权利要求8所述的方法,其特征在于:
    所述交易准备数据信息进一步包括前一笔交易的哈希值、交易序号值、交易时间戳。
  10. 根据权利要求8所述的方法,其特征在于:
    在步骤3的数字钱包设备B进一步验证步骤包括:
    步骤3-1、数字钱包设备B收到A发送的标识账本L1及交易相关信息,验证A的签名并核验交易的真实性与合法性,包括计算标识账本L0对于A的可用金额,与交易金额对比确定交易是否合法;
    步骤3-2、数字钱包设备B对标识账本L1的交易准备数据记录进行签名并形成一条交易确认数据,将签名后的标识账本记录作为B可用的新标识账本L2保存,并将交易确认数据发送给A。
  11. 步骤1所述的双向认证过程可以包括:
    步骤1-1、数字钱包设备A生成一个8字节随机数R1,获取自己的CCKS标识ID1,并计算出对R1的签名C1 S1,通过认证与密钥交换指令发送给数字钱包设备B,指令的必要参数为ID1、R1、C1、S1;
    步骤1-2、数字钱包设备B接收到认证与密钥交换指令后,先通过黑名单(或白名单)和(或)ID规则认证ID1的合法性,通过后经由ID1计算获得数字钱包设备A的公钥PUB1,对签名值C1 S1进行验签,验签通过则说明数字钱包设备A合法,可以进行下述步骤;数字钱包设备B生成随机数R2,通过R1与R2的异或获得过程密钥K,然后数字钱包设备B获取自己的CCKS标识ID2,并使用公钥PUB1对R2加密获得ENC2,再对ENC2签名获得C2 S2,完成上述计算后,数字钱包设备B结束认证与密钥交换指令处理过程,并返回如下数据给数字钱包设备A:ID2、ENC2、C2、S2和响应码;
    步骤1-3、数字钱包设备A收到返回后,先通过黑名单(或白名单)和(或)ID规则认证ID2的合法性,通过后经由ID2计算获得数字钱包设备A的公钥PUB2;数字钱包设备A使用PUB2对C2 S2进行验签,验签通过则说明数字钱包设备B合法,可以进行下述过程;数字钱包设备A私钥自己的私钥解密ENC2,获取随机数R2,通过R1与R2的异或获得过程密钥K;所述过程密钥K用于进行后续步骤的加密通讯。
PCT/CN2022/105960 2021-07-28 2022-07-15 数字钱包设备及其双离线交易方法 WO2023005689A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP22848294.9A EP4379631A1 (en) 2021-07-28 2022-07-15 Digital wallet device and dual offline transaction method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110860218.4A CN115689559A (zh) 2021-07-28 2021-07-28 数字钱包设备及其双离线交易方法
CN202110860218.4 2021-07-28

Publications (1)

Publication Number Publication Date
WO2023005689A1 true WO2023005689A1 (zh) 2023-02-02

Family

ID=85057805

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/105960 WO2023005689A1 (zh) 2021-07-28 2022-07-15 数字钱包设备及其双离线交易方法

Country Status (3)

Country Link
EP (1) EP4379631A1 (zh)
CN (1) CN115689559A (zh)
WO (1) WO2023005689A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1518726A (zh) * 2001-07-09 2004-08-04 ASK�ɷ����޹�˾ 电子钱包的电子帐单***
CN106372942A (zh) * 2016-08-31 2017-02-01 中城智慧科技有限公司 一种基于安全认证机制的支付方法及支付***
US20180068293A1 (en) * 2016-09-07 2018-03-08 Mastercard International Incorporated Method and system for allowing offline peer-2-peer transactions using exchangeable provisioned tokens
CN110766383A (zh) * 2018-07-27 2020-02-07 中城智慧科技有限公司 一种支持匿名或实名的离线交易的数字钱包及使用方法
CN111144862A (zh) * 2019-12-31 2020-05-12 深圳四方精创资讯股份有限公司 数字货币双离线支付的实现方法、装置、设备、存储介质
CN111373429A (zh) * 2017-09-26 2020-07-03 贝宝公司 使用数字令牌和安全账本数据库的安全离线交易***
WO2021005269A1 (en) * 2019-07-11 2021-01-14 Northcrypto Oy Blockchain-based transaction from offline wallet

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1518726A (zh) * 2001-07-09 2004-08-04 ASK�ɷ����޹�˾ 电子钱包的电子帐单***
CN106372942A (zh) * 2016-08-31 2017-02-01 中城智慧科技有限公司 一种基于安全认证机制的支付方法及支付***
US20180068293A1 (en) * 2016-09-07 2018-03-08 Mastercard International Incorporated Method and system for allowing offline peer-2-peer transactions using exchangeable provisioned tokens
CN111373429A (zh) * 2017-09-26 2020-07-03 贝宝公司 使用数字令牌和安全账本数据库的安全离线交易***
CN110766383A (zh) * 2018-07-27 2020-02-07 中城智慧科技有限公司 一种支持匿名或实名的离线交易的数字钱包及使用方法
WO2021005269A1 (en) * 2019-07-11 2021-01-14 Northcrypto Oy Blockchain-based transaction from offline wallet
CN111144862A (zh) * 2019-12-31 2020-05-12 深圳四方精创资讯股份有限公司 数字货币双离线支付的实现方法、装置、设备、存储介质

Also Published As

Publication number Publication date
CN115689559A (zh) 2023-02-03
EP4379631A1 (en) 2024-06-05

Similar Documents

Publication Publication Date Title
TWI706275B (zh) 用於資訊保護的系統和方法
US11687924B2 (en) Cryptocurrency infrastructure system
US11323457B2 (en) Network topology
JP7121810B2 (ja) 安全なブロックチェーントランザクションおよびサブネットワークのためのシステム、方法、デバイス及び端末
CN111008836B (zh) 一种隐私安全转账支付方法、装置、***及存储介质
CN108418680B (zh) 一种基于安全多方计算技术的区块链密钥恢复方法、介质
RU2710897C2 (ru) Способы безопасного генерирования криптограмм
CN106664206B (zh) 用于已认证的通信的高效方法
AU2014290143B2 (en) Secure remote payment transaction processing
WO2021008453A1 (zh) 一种基于标识认证的区块链离线交易方法和***
US20190295069A1 (en) Systems and methods for integrating cryptocurrency wallet identifiers with digital certificates
CN110612547A (zh) 一种用于信息保护的***和方法
CN105900375A (zh) 用于在认证交易中保护身份的高效方法
CN107358440B (zh) 数字货币定制追踪的方法和***
CN109617699A (zh) 一种密钥生成方法、区块链网络服务平台及存储介质
JPH10240848A (ja) ユーザ端末間での資金または電子コインの振り替え方法
WO2007092577A2 (en) A point-of-sale terminal transactions using mutating identifiers
GB2549118A (en) Electronic payment system using identity-based public key cryptography
CN112991045B (zh) 基于区块链的医疗健康消费融资方法、装置、设备及介质
CN114341908A (zh) 具有要约和接受的区块链交易的***和方法
US10657523B2 (en) Reconciling electronic transactions
Zhang et al. A third-party e-payment protocol based on quantum group blind signature
Hwang et al. Securing on-line credit card payments without disclosing privacy information
CN113516462A (zh) 一种基于区块链的量子现金结算***及方法
US20240013170A1 (en) Method for secure, traceable and privacy-preserving digital currency transfer with anonymity revocation on a distributed ledger

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22848294

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022848294

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2022848294

Country of ref document: EP

Effective date: 20240228