CN108053213B - A kind of method and credit card of the enhancing without card payment transactions safety - Google Patents

A kind of method and credit card of the enhancing without card payment transactions safety Download PDF

Info

Publication number
CN108053213B
CN108053213B CN201711486563.6A CN201711486563A CN108053213B CN 108053213 B CN108053213 B CN 108053213B CN 201711486563 A CN201711486563 A CN 201711486563A CN 108053213 B CN108053213 B CN 108053213B
Authority
CN
China
Prior art keywords
data
credit card
interrupt
real
default
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201711486563.6A
Other languages
Chinese (zh)
Other versions
CN108053213A (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
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 Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201711486563.6A priority Critical patent/CN108053213B/en
Publication of CN108053213A publication Critical patent/CN108053213A/en
Application granted granted Critical
Publication of CN108053213B publication Critical patent/CN108053213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3823Payment protocols; Details thereof insuring higher security of transaction combining multiple encryption tools for a transaction
    • 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/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/356Aspects of software for card payments
    • 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
    • G06Q20/401Transaction verification

Abstract

The invention discloses a kind of method and credit card of the enhancing without card payment transactions safety, which comprises step S1, credit card powers on, and carries out system initialization;Step S2, the described credit card suspend mode is waken up when detecting default interrupt, executes step S3;Step S3, the described credit card enters default interrupt processing process and executes default interrupt processing, when the default interrupt processing is completed, exits the default interrupt processing process, return step S2.The credit card includes: to power on module, initialization module, the first sleep block, first detection module, the first wake-up module and the first interruption processing module.The method have the advantage is capable of reducing by intercepting and capturing and storing a possibility that credit card security code implements fraud, enhance the safety without card payment transactions.

Description

A kind of method and credit card of the enhancing without card payment transactions safety
Technical field
The present invention relates to information security field more particularly to a kind of method and credit of the enhancing without card payment transactions safety Card.
Background technique
Credit card is most fast one of the financial business of Developing, is that one kind can substitute traditional cash flow in a certain range Logical electronic money.Credit card security code is a security code of the credit card when carrying out network or phone trading, usually quilt For confirming that requestee possesses the credit card in transaction, to prevent credit card fraud.However, in some websites overseas Shopping does not need password, as long as buyer provides account and credit card security code and can be completed transaction, the country also have businessman and Bank's signing only can complete phone with credit card safety code and draw account, but credit card security code without providing credit clip pin Three or 4-digit number of fixation on the credit card are usually printed, is easy to be obtained by other people to implement to cheat, leads to no card The security risk of payment transaction.
Summary of the invention
The purpose of the present invention is overcoming the deficiencies of existing technologies, a kind of method of the enhancing without card payment transactions safety is provided And credit card.
The present invention is achieved through the following technical solutions:
On the one hand, the present invention provides a kind of method of the enhancing without card payment transactions safety.
The described method includes:
Step S1, credit card powers on, and carries out system initialization;
Step S2, the described credit card suspend mode is waken up when detecting default interrupt, executes step S3;
Step S3, the described credit card enters default interrupt processing process and executes default interrupt processing, when the default interruption When processing is completed, the default interrupt processing process, return step S2 are exited;
The default interrupt processing includes:
Step a1, the dynamic security code factor is obtained, is generated according to the dynamic security code factor and card personalization data First data block;
Step a2, to first encryption of blocks of data, the first data block ciphertext is obtained;
Step a3, the first data block ciphertext is extracted, convert and sequence processing, by the default portion of processing result It is allocated as showing the currently active credit card security code for the currently active credit card security code.
Further, above-mentioned steps S2 and step S3 could alternatively be:
Step s2, the described credit card inspection presets whether interrupt identification is set, and is to reset the default interrupt identification, Default interrupt processing is executed, it is no to then follow the steps s3;
Step s3, the described credit card suspend mode is waken up when detecting default interrupt, will into default interrupt processing process Default interrupt identification set, exits the default interrupt processing process, return step s2.
On the other hand, the present invention provides a kind of credit card of the enhancing without card payment transactions safety.
The credit card includes:
Module is powered on, is powered on for the credit card;
Initialization module carries out system initialization after powering on for the credit card;
First sleep block exits pre- for suspend mode after credit card progress system initialization and the credit card If suspend mode after interrupt processing process;
First detection module when being used for the credit card suspend mode, detects default interrupt;
First wake-up module is waken up after detecting default interrupt for the credit card;
First interruption processing module enters default interrupt processing process and executes in default after being waken up for the credit card Disconnected processing exits the default interrupt processing process when the default interrupt processing is completed;
First interruption processing module includes:
Acquiring unit, for obtaining the dynamic security code factor;
Storage unit is used for memory card personal data;
Generation unit stores in the dynamic security code factor and the storage unit for being obtained according to the acquiring unit Card personalization data generate the first data block;
Encryption unit, the first encryption of blocks of data for generating to the generation unit, obtains the first data block ciphertext;
Processing unit, for the first data block ciphertext that the encryption unit obtains is extracted, is converted and sequence at Reason, using the predetermined fraction of processing result as the currently active credit card security code;
Display unit, for showing the currently active credit card security code.
Further, above-mentioned credit card can also include: inspection module, after carrying out system initialization for the credit card Check whether default interrupt identification is set and the credit card exits the default interruption mark of inspection after default interrupt processing process Whether will is set;
Correspondingly, first sleep block, the first detection module, in first wake-up module and described first Disconnected processing module is replaced respectively are as follows: the second sleep block, the second detection module, the second wake-up module and the second interrupt processing mould Block;
Second interruption processing module is checked for the credit card described in resetting when default interrupt identification is set Default interrupt identification executes default interrupt processing;
Second sleep block, for suspend mode after the completion of interruption processing module processing;
Second detection module when being used for the credit card suspend mode, detects default interrupt;
Second wake-up module is waken up, at default interruption when detecting default interrupt for the credit card Process is managed by default interrupt identification set, exits default interrupt processing process;
Second interruption processing module includes: the acquiring unit, the storage unit, the generation unit, described Encryption unit, the processing unit and the display unit.
The beneficial effects of the present invention are: it reduces by intercepting and capturing and storing a possibility that credit card security code implements fraud, Enhance the safety without card payment transactions.
Detailed description of the invention
Fig. 1 is the flow chart of keys interrupt processing in the embodiment of the present invention 2;
Fig. 2 is the flow chart of keys interrupt processing in the embodiment of the present invention 3;
Fig. 3 is the flow chart of RTC interrupt processing in the embodiment of the present invention 4;
Fig. 4 obtains the flow chart of the first data block ciphertext to the first encryption of blocks of data to be provided by the invention;
Fig. 5 is a kind of block diagram for credit card of enhancing without card payment transactions safety that the embodiment of the present invention 9 provides;
Fig. 6 is a kind of block diagram for credit card of enhancing without card payment transactions safety that the embodiment of the present invention 10 provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments;Not In contradictory situation, each embodiment can be combined with each other.Based on the embodiments of the present invention, those of ordinary skill in the art are not having Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
In the present invention, credit card built-in power has self-powered function.
Embodiment 1
The present embodiment provides a kind of method of the enhancing without card payment transactions safety, which comprises
Step S1, credit card powers on, and carries out system initialization;
Step S2, credit card suspend mode is waken up when detecting default interrupt, executes step S3;
Step S3, credit card enters the default default interrupt processing of interrupt processing process execution, when default interrupt processing is completed When, exit default interrupt processing process, return step S2;
Default interrupt processing includes:
Step a1, the dynamic security code factor is obtained, it is raw according to the dynamic security code factor and the card personalization data of Ka Nei At the first data block;
In the present embodiment, card personalization data include: primary account number, card Expiration Date and service code sequence;
It generates the first data block according to the dynamic security code factor and card personalization data to specifically include: with dynamic security code The factor replaces the data of the first preset length in primary account number, transformed primary account number is obtained, by transformed primary account number and card Expiration Date and service code sequence are sequentially connected, and are obtained clear data, are filled to obtain the first data block to clear data.
Step a2, to the first encryption of blocks of data, the first data block ciphertext is obtained;
Step a3, the first data block ciphertext extracted, converted and sequence processing, the predetermined fraction of processing result is made For the currently active credit card security code, the currently active credit card security code is shown.
In the present embodiment, the first data block ciphertext is extracted, convert and sequence processing, specifically include: from first number According to starting on the left of block ciphertext, extracts all first data in the first data block ciphertext and obtained to the number between the second data First extracts data, since on the left of the first data block ciphertext, extracts in the first data block ciphertext all third data to the Number between four data obtains the second extraction data;The each number second extracted in data replaces with the number and the The difference of five data, second after being converted extracts data;Second after extracting data by first and convert extracts data sequence Splicing, obtains processing result.
Embodiment 2
The present embodiment provides a kind of method of the enhancing without card payment transactions safety, which comprises
Step 101, credit card carry out system initialization after powering on.
Step 102, credit card suspend mode, it is to be checked to be waken up when measuring interruption, execute step 103.
Step 103, credit card enter interrupt processing process and execute interrupt processing, when interrupt processing is completed, exit interruption Process flow, return step 102.
Interruption described in the present embodiment specifically includes communication disruption and keys interrupt:
It is waken up when credit card detects communication disruption, executes communication disruption processing into communication disruption process flow, When communication disruption processing is completed, communication disruption process flow is exited;
Specifically, communication disruption processing includes: that credit card receives communication data, and is carried out according to the communication data received Card personalization;Further, carrying out card personalization according to the communication data received includes: according to the communication number received According to write-in card personalization data and initial key press number into card, wherein personal data includes but is not limited to primary account number, card Piece Expiration Date and service code sequence.
It is waken up when credit card detects keys interrupt, executes keys interrupt processing into keys interrupt process flow, When keys interrupt processing is completed, keys interrupt process flow is exited;
Specifically, as shown in Figure 1, keys interrupt processing includes:
Step 201, credit card update touch potential;
Step 202, credit card judge whether card personalization is completed, and are to then follow the steps 203, otherwise at keys interrupt Reason is completed;
Further, when credit card judges that card personalization does not complete, corresponding prompt information can be shown;The present embodiment In, credit card shows corresponding prompt information by display circuit.
Step 203, credit card obtain the current event factor;
In the present embodiment, credit card obtains current touch potential, if less than 8 numbers of current touch potential, current 0 filling to 8 numbers of the left side of touch potential, obtains the current event factor, if current touch potential is 8 numbers or is more than 8 numbers, then using current touch potential as the current event factor.
For example, current touch potential is 1234567, less than 8 numbers, in 0 filling to 8 of the left side of current touch potential A number obtains the current time factor 01234567.
Step 204, credit card generate the first data block according to the current event factor and card personalization data.
In the present embodiment, card personalization data are stored in card, including but not limited to primary account number, the card Expiration Date and Service code sequence;
Specifically, credit card replaces 4 bytes of high order end of primary account number with the current event factor, obtains transformed main account Number, transformed primary account number and card Expiration Date and service code sequence are sequentially connected, clear data is obtained, to plaintext number According to being filled to obtain the first data block.
For example, primary account number is 95 58 82 00 89 AB CD EF FE DC BA, the card Expiration Date is 987654, clothes Business code sequence is 3210;The current event factor is 01 23 45 67;Credit card replaces the height of primary account number with the current event factor 4, the end in position byte, obtains transformed 01 23 45 67 89 A B CD EF FE DC BA of primary account number, by transformed master Account is sequentially connected with card Expiration Date and service code sequence, obtains 01 23 45 67 89 AB CD EF of clear data FE DC BA 98 76 54 32 10。
In the present embodiment, being filled to obtain the first data block to clear data can be with specifically: by the length of clear data Degree and clear data splicing, if the length of splicing the data obtained less than 16 bytes, in the right side filler of splicing the data obtained According to 0, the first data block that length is 16 bytes is obtained, it, will splicing gained if the length of splicing the data obtained is equal to 16 bytes Data are splicing institute's total if the length of splicing the data obtained is greater than 16 bytes less than 32 bytes as the first data block According to right side fill data 0, obtain length be 32 bytes the first data block.
For example, clear data is 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10, plaintext number According to length be 16 bytes, be converted to hexadecimal be 10, splice the length of clear data and clear data to obtain 10 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10 fill data 0 on the right side of splicing the data obtained, obtain It is the 10 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10 of the first data block of 32 bytes to length 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00。
In the present embodiment, being filled to obtain the first data block to clear data can be with specifically: in clear data 64 bit datas of the length l of 1 bit-binary 1 of right side sequence filling, k bit-binary 0 and expression clear data, are grown Degree is the first data block of 512 bits, and wherein k is the smallest nonnegative integer for meeting l+1+k ≡ 448mod512.
For example, clear data is 10 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32, plaintext number According to length be 128 bits, clear data right side sequence fill 1 bit-binary 1,319 bit-binaries 0 and indicate it is bright 64 bit datas of 128 bit of length of literary data obtain the first data block 10 01 23 45 67 that length is 512 bits 89 AB CD EF FE DC BA 98 76 54 32 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80。
Step 205, credit card obtain the first data block ciphertext to the first encryption of blocks of data.
For example, the first data block is 10 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00, to the first encryption of blocks of data, obtain the first data block 99 9F E8 0F B9 of ciphertext, 95 88 44 72 AA DE of DA E2 8B, 95 63 25 87 C3 EB 24 57 83 41 E4 EB EA 39 09 D1 32 25。
Step 206, credit card extract the first data block ciphertext, converts and sequence processing, by the pre- of processing result If part is used as the currently active credit card security code, the currently active credit card security code is shown, keys interrupt processing is completed.
In the present embodiment, credit card extracts the first data block ciphertext, converts and sequence processing, by processing result Predetermined fraction is specifically included as the currently active credit card security code:
Step 206-1, credit card extracts in the first data block ciphertext and owns since on the left of the first data block ciphertext ' Number between 0 ' arrives ' 9 ', obtains the first extraction data;Since on the left of the first data block ciphertext, the first data block is extracted Own ' A ' in ciphertext to arrive the number between ' F ', obtains the second extraction data;
For example, the first data block ciphertext is 99 95 DA E2 8B of 9F E8 0F B9,88 44 72 AA DE 95 63 25 87 C3 EB, 24 57 83 41 E4 EB EA, 39 09 D1 32 25 takes out since on the left of the first data block ciphertext The number for owning in the first data block ciphertext and arriving between ' 9 ' ' 0 ' is taken, the first extraction data 99 98 09 95 28 88 44 are obtained 72 95 63 25 87 32 45 78 34 14 39 09 13 22 5, since on the left of the first data block ciphertext, extract the Own ' A ' in one data block ciphertext to arrive the number between ' F ', obtains the second extraction data FE FB DA EB AA DE CE BE EB EA D。
Step 206-2, credit card extracts its difference replacement with 10 of each of data number for second, after obtaining conversion Second extract data;
For example, second extracts data FE FB DA EB AA DE CE BE EB EA D, second is extracted every in data Its difference replacement with 10 of a number, second after being converted extracts data 54 51 30 41 00 34 24 14 41 40 3。
Step 206-3, second after credit card extracts first data and convert extracts data sequential concatenation, is handled As a result;
For example, the first extraction data are 99 98 09 95 28 88 44 72 95 63 25 87 32 45 78 34 14 39 09 13 22 5, after converting second extract data be 54 51 30 41 00 34 24 14 41 40 3, by first pumping Second after evidence of fetching and conversion extracts data sequential concatenation, obtains processing result 99 98 09 95 28 88 44 72 95 63 25 87 32 45 78 34 14 39 09 13 22 55 45 13 04 10 03 42 41 4 4 14 03。
Step 206-4, preceding 3 numbers of credit card intercepting process result, as the currently active credit card security code.
For example, processing result is 99 98 09 95 28 88 44 72 95 63 25 87 32 45 78 34 14 39 09 13 22 55 45 13 04 10 03 42 41 44 14 03, preceding 3 numbers of intercepting process result are currently had Imitate credit card security code 999.
Embodiment 3
The present embodiment provides a kind of method of the enhancing without card payment transactions safety, which comprises
Step 101, credit card carry out system initialization after powering on.
Step 102, credit card suspend mode, it is to be checked to be waken up when measuring interruption, execute step 103.
Step 103, credit card enter interrupt processing process and execute interrupt processing, when interrupt processing is completed, exit interruption Process flow, return step 102.
Interruption described in the present embodiment specifically includes communication disruption, RTC interruption and keys interrupt:
It is waken up when credit card detects communication disruption, executes communication disruption processing into communication disruption process flow, When communication disruption processing is completed, communication disruption process flow is exited;
Specifically, communication disruption processing includes: that credit card receives communication data, and is carried out according to the communication data received Card personalization;Further, carrying out card personalization according to the communication data received includes: according to the communication number received According to write-in card personalization data and time window value into card, wherein personal data includes but is not limited to primary account number, card Expiration Date and service code sequence.
It is waken up when credit card detects that RTC is interrupted, executes RTC interrupt processing into RTC interrupt processing process, when When RTC interrupt processing is completed, RTC interrupt processing process is exited;
Specifically, RTC interrupt processing includes: that credit card updates timing time.
It is waken up when credit card detects keys interrupt, executes keys interrupt processing into keys interrupt process flow, When keys interrupt processing is completed, keys interrupt process flow is exited;
Specifically, as shown in Fig. 2, keys interrupt processing includes:
Step 301, credit card judge whether card personalization is completed, and are to then follow the steps 302, otherwise at keys interrupt Reason is completed;
Further, when credit card judges that card personalization does not complete, corresponding prompt information can be shown;The present embodiment In, credit card shows corresponding prompt information by display circuit.
Step 302, credit card obtain the current time factor.
In the present embodiment, credit card obtains the present timing time, calculates present timing time and universal coordinated time apart Number of seconds the integer part of gained quotient is taken, if the integer part of gained quotient is not with resulting number of seconds is calculated divided by time window value 8 numbers of foot are then filled to 8 numbers with 0 in the left side of the integer part of gained quotient, the current time factor are obtained, if gained The integer part of quotient is more than 8 numbers, then the integer part of gained quotient left side intercept 8 numbers, obtain current time because Son.
For example, universal coordinated time is 0:00:00 on January 1st, 1970, time window value is 28800, what credit card obtained The present timing time is 3:24:58 on July 28th, 2017, and present timing time and the second of universal coordinated time apart is calculated Number is 1501212298, is 52125 with resulting number of seconds is calculated divided by the integer part of quotient obtained by time window value, gained quotient's Less than 8 numbers of integer part are filled to 8 numbers with 0 in the left side of the integer part of gained quotient, obtain the current time factor 00052125。
Step 303, credit card generate the first data block according to the current time factor and card personalization data.
In the present embodiment, card personalization data are stored in card, including but not limited to primary account number, the card Expiration Date and Service code sequence;
Specifically, credit card replaces 4 bytes of high order end of primary account number with the current time factor, obtains transformed main account Number, transformed primary account number and card Expiration Date and service code sequence are sequentially connected, clear data is obtained, to plaintext number According to being filled to obtain the first data block.
Step 304, credit card obtain the first data block ciphertext to the first encryption of blocks of data.
Step 305, credit card extract the first data block ciphertext, converts and sequence processing, by the pre- of processing result If part is used as the currently active credit card security code, the currently active credit card security code is shown, keys interrupt processing is completed.
In the present embodiment, the specific implementation of step 303-305 can refer to the step 204-206 in embodiment 2, herein no longer It repeats.
Embodiment 4
The present embodiment provides a kind of method of the enhancing without card payment transactions safety, which comprises
Step 101, credit card carry out system initialization after powering on.
Step 102, credit card suspend mode, are waken up when detecting interruption, execute step 103.
Step 103, credit card enter interrupt processing process and execute interrupt processing, when interrupt processing is completed, exit interruption Process flow, return step 102.
In the present embodiment, the interruption specifically includes communication disruption and RTC (real-time clock) is interrupted:
It is waken up when credit card detects communication disruption, executes communication disruption processing into communication disruption process flow, When communication disruption processing is completed, communication disruption process flow is exited;
Specifically, communication disruption processing includes: that credit card receives communication data, and is carried out according to the communication data received Card personalization;Further, carrying out card personalization according to the communication data received includes: according to the communication number received According to write-in card personalization data and time window value into card, wherein personal data includes but is not limited to primary account number, card Expiration Date and service code sequence.
It is waken up when credit card detects that RTC is interrupted, executes RTC interrupt processing into RTC interrupt processing process, when When RTC interrupt processing is completed, RTC interrupt processing process is exited;
Specifically, as shown in figure 3, RTC interrupt processing includes:
Step 401, credit card update timing time;
Step 402, credit card judge whether card personalization is completed, and are to then follow the steps 403, otherwise at RTC interruption Reason is completed;
Further, when credit card judges that card personalization does not complete, corresponding prompt information can be shown;The present embodiment In, credit card shows corresponding prompt information by display circuit.
Step 403, credit card determine whether to update credit card security code, are to then follow the steps 404, and otherwise RTC is interrupted Processing is completed;
Specifically, credit card judge timing time whether be the preset dynamic security code time cycle integral multiple, be then It needs to update credit card security code, does not otherwise need to update credit card security code;
For example, the preset dynamic security code time cycle is 60 seconds.
Step 404, credit card obtain the current time factor.
Step 405, credit card generate the first data block according to the current time factor and card personalization data.
Step 406, credit card obtain the first data block ciphertext to the first encryption of blocks of data.
Step 407, credit card extract the first data block ciphertext, converts and sequence processing, by the pre- of processing result If part is used as the currently active credit card security code, the currently active credit card security code is shown, RTC interrupt processing is completed.
In the present embodiment, the specific implementation of step 405-407 can refer to the step 204-206 in embodiment 2, herein no longer It repeats.
Embodiment 5
The present embodiment provides a kind of method of the enhancing without card payment transactions safety, which comprises
Step s1, credit card powers on, and carries out system initialization;
Step s2, credit card inspection presets whether interrupt identification is set, and is then to reset default interrupt identification, executes default Interrupt processing, it is no to then follow the steps s3;
Step s3, credit card suspend mode is waken up when detecting default interrupt, will preset into default interrupt processing process Default interrupt processing process, return step s2 are exited in interrupt identification set;
Default interrupt processing includes:
Step a1, the dynamic security code factor is obtained, it is raw according to the dynamic security code factor and the card personalization data of Ka Nei At the first data block;
In the present embodiment, card personalization data include: primary account number, card Expiration Date and service code sequence;
It generates the first data block according to the dynamic security code factor and card personalization data to specifically include: with dynamic security code The factor replaces the data of the first preset length in primary account number, transformed primary account number is obtained, by transformed primary account number and card Expiration Date and service code sequence are sequentially connected, and are obtained clear data, are filled to obtain the first data block to clear data.
Step a2, to the first encryption of blocks of data, the first data block ciphertext is obtained;
Step a3, the first data block ciphertext is extracted, converted and is sorted, using the predetermined fraction of processing result as working as Preceding effective credit card security code, shows the currently active credit card security code.
In the present embodiment, the first data block ciphertext is extracted, convert and sequence processing, specifically include: from first number According to starting on the left of block ciphertext, extracts all first data in the first data block ciphertext and obtained to the number between the second data First extracts data, since on the left of the first data block ciphertext, extracts in the first data block ciphertext all third data to the Number between four data obtains the second extraction data;The each number second extracted in data replaces with the number and the The difference of five data, second after being converted extracts data;Second after extracting data by first and convert extracts data sequence Splicing, obtains processing result.
Embodiment 6
The present embodiment provides a kind of method of the enhancing without card payment transactions safety, which comprises
The working method of the credit card includes:
Step 501, credit card carry out system initialization after powering on.
Step 502, credit card check whether interrupt identification is set, and are that then reset interrupt mark, execution interrupt processing are no Then follow the steps 503.
Interruption described in the present embodiment specifically includes communication disruption and keys interrupt, it is preferable that step 502 is specifically wrapped It includes:
Step 1, credit card check whether communication disruption mark is set, and are to reset communication disruption mark, execute communication Interrupt processing executes step 2, no to then follow the steps 2;
Step 2, credit card check whether keys interrupt mark is set, and are then reset key interrupt identifications, execute key Interrupt processing executes step 503, no to then follow the steps 503;
In the present embodiment, the content that communication disruption processing and keys interrupt processing include is in the same manner as in Example 2, herein not It repeats again.
Further, the present embodiment can also first check whether keys interrupt mark is set, and reexamine communication disruption mark Whether will is set.
Step 503, credit card suspend mode, are waken up when detecting interruption, set interrupt identification into interrupt processing process Position, exits interrupt processing process, return step 502.
Specifically, in the present embodiment, credit card is waken up when detecting communication disruption or keys interrupt;When credit card detects When being waken up to communication disruption, communication disruption flag set is exited into communication disruption processing stream into communication disruption process flow Journey;When credit card, which checks keys interrupt, to be waken up, keys interrupt flag set is moved back into keys interrupt process flow Keys interrupt process flow out.
Embodiment 7
The present embodiment provides a kind of method of the enhancing without card payment transactions safety, which comprises
Step 501, credit card carry out system initialization after powering on.
Step 502, credit card check whether interrupt identification is set, and are that then reset interrupt mark, execution interrupt processing are no Then follow the steps 503;
Interruption described in the present embodiment specifically includes communication disruption, RTC interruption and keys interrupt, it is preferable that step 502 tool Body includes:
Step 1, credit card check whether communication disruption mark is set, and are to reset communication disruption mark, execute communication Interrupt processing executes step 2, no to then follow the steps 2;
Step 2, credit card check whether keys interrupt mark is set, and are then reset key interrupt identifications, execute key Interrupt processing executes step 3, no to then follow the steps 3;
Step 3, credit card check whether RTC interrupt identification is set, and are to reset RTC interrupt identification, execute RTC and interrupt Processing executes step 503, no to then follow the steps 503;
In the content and embodiment 3 that communication disruption processing, RTC interrupt processing and keys interrupt processing include in the present embodiment Identical, details are not described herein.
Further, in this embodiment whether can also be set according to each interrupt identification of other sequential searches, herein It repeats no more.
Step 503, credit card suspend mode, are waken up when detecting interruption, set interrupt identification into interrupt processing process Position, exits interrupt processing process, return step 502.
Specifically, in the present embodiment, credit card detects to be waken up when communication disruption or keys interrupt or RTC interrupt;When When credit card detects that communication disruption is waken up, communication disruption flag set is exited into communication into communication disruption process flow Interrupt processing process;When credit card, which checks keys interrupt, to be waken up, into keys interrupt process flow, by keys interrupt mark Keys interrupt process flow is exited in will set;When credit card detects that RTC interruption is waken up, into RTC interrupt processing stream RTC interrupt identification set is exited RTC interrupt processing process by journey.
Embodiment 8
The present embodiment provides a kind of method of the enhancing without card payment transactions safety, which comprises
Step 501, credit card carry out system initialization after powering on.
Step 502, credit card check whether interrupt identification is set, and are that then reset interrupt mark, execution interrupt processing are no Then follow the steps 503;
Interruption described in the present embodiment specifically includes communication disruption and RTC is interrupted, it is preferable that step 502 specifically includes:
Step 1, credit card check whether communication disruption mark is set, and are to reset communication disruption mark, execute communication Interrupt processing executes step 2, no to then follow the steps 2;
Step 2, credit card check whether RTC interrupt identification is set, and are to reset RTC interrupt identification, execute RTC and interrupt Processing executes step 503, no to then follow the steps 503;
The content that communication disruption processing and RTC interrupt processing include in the present embodiment is in the same manner as in Example 4, herein no longer It repeats.
Further, the present embodiment can also first check whether RTC interrupt identification is set, and reexamine communication disruption mark Whether it is set.
Step 503, credit card suspend mode, are waken up when detecting interruption, and into interrupt processing process, interrupt identification is set Position, exits interrupt processing process, return step 502.
Specifically, in the present embodiment, credit card detects to be waken up when communication disruption or RTC are interrupted;When credit card detects When being waken up to communication disruption, communication disruption flag set is exited into communication disruption processing stream into communication disruption process flow Journey;When credit card, which checks RTC interruption, to be waken up, RTC interrupt identification set is exited into RTC interrupt processing process RTC interrupt processing process.
In the present invention, updating timing time can be specially to update timing time to add 1 second for its current value;Update key Number can be specially to update touch potential to add 1 time for its current value.
In the present invention, as shown in figure 4, the first encryption of blocks of data is obtained the first data block ciphertext, can be specifically included:
Step a, the first data block is grouped, obtains the first packet data and second packet data;
Preferably, the first data block is equally divided into two groups, obtains the first packet data and second packet data.
For example, the first data block is 10 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00, the first data block average packet is obtained into the first grouping Data X1 (00-03)={ 10 01 23 45,67 89 AB CD, EF FE DC BA, 98 76 54 32 } and second packet number According to X2 (00-03)={ 10 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00 }.
Step b, process key is obtained according to predetermined system parameter and predetermined encryption cipher key calculation;
Preferably, XOR operation is done to predetermined system parameter and predetermined encryption key and obtains process key.
For example, predetermined system parameter is FK (00-03)={ A3 B1 BA C6,56 AA 33 50,67 7D 91 97, B2 70 22 DC }, predetermined encryption key is MK (00-03)={ 01 23 45 67,89 AB CD EF, FE DC BA 98,76 54 32 10 }, predetermined system parameter and predetermined encryption key are done into XOR operation and obtains process key K (00-03)={ 92 FF of A2 A1,DF 01 FE BF,99 A1 2B 0F,C4 24 10 CC}。
Step c, round key is calculated according to process key and default preset parameter;
Preferably, operation is iterated according to process key and default preset parameter and obtains round key;Iteration includes every time XOR operation is done to corresponding process key and default preset parameter, acquired results are replaced, and result ring shift left will be replaced First preset value position obtains first circulation left shift date, and displacement the second preset value of result ring shift left position is obtained a second circulation left side Data are moved, XOR operation are done to displacement result, first circulation left shift date, second circulation left shift date, by acquired results and phase The process key exclusive or answered.Wherein, acquired results are replaced and is specially replaced acquired results input S box.
In the present embodiment, 32 interative computations are carried out according to process key and default preset parameter, the first preset value is 13, Second preset value is 23.1st interative computation, to process key K (01), K (02), K (03) and default preset parameter CK (00) XOR operation is done, acquired results are replaced, displacement result, displacement 13 the data obtaineds of result ring shift left, displacement are tied 23 the data obtaineds of fruit ring shift left carry out exclusive or and acquired results and process key K (00) exclusive or are obtained round key RK (00);2nd interative computation does XOR operation to process key K (02), K (03), K (04) and default preset parameter CK (01), Acquired results input S box is replaced, by displacement result, displacement 13 the data obtaineds of result ring shift left, displacement result circulation It moves to left 23 the data obtaineds progress exclusive or and acquired results and process key K (01) exclusive or is obtained into round key RK (01);Third Secondary interative computation does XOR operation, acquired results to process key K (03), K (04), K (05) and default preset parameter CK (02) Input S box is replaced, by displacement result, displacement 13 the data obtaineds of result ring shift left, displacement result ring shift left 23 The data obtained carries out exclusive or and acquired results and process key K (02) exclusive or is obtained round key RK (02), and so on, it obtains RK (00-31), wherein K (i+4)=RK (i), i=00,01....31.Wherein, acquired results are replaced institute specially Result input S box is obtained to be replaced.
For example, process key is K (00-03)={ A2 92 FF A1, DF 01 FE BF, 99 A1 2B 0F, C4 24 10 CC }, presetting preset parameter is CK (00-31)={ 23 31,38 3F of 2A of 00 07 0E 15,1C 46 4D, 54 5B 62 69,70 77 7E 85,8C 93 9A A1,A8 AF B6 BD,C4 CB D2 D9,E0 D7 EE F5,FC 03 0A 11,18 1F 26 2D,34 3B 42 49,50 57 5E 65,6C 73 7A 81,88 8F 96 9D,a4 AB B2 B9,C0 c7 CE D5,DC E3 EA F1,F8 FF 06 0D,14 1B 22 29,30 37 3E 45,4C 53 5A 61,68 6F 76 7D,84 8B 92 99,A0 A7 AE B5,BC C3 CA D1,D8 DF E6 ED,F4 FB 02 09,10 17 1E 25,2C 33 3A 41,48 4F 56 5D, 64 6B 72 79 }, round key is calculated: RK (00-31)={ F1 21 86 F9,41 66 2B 61,5A 6A B1 9A,7B A9 20 77,36 73 60 F4,77 6A 0C 61,B6 BB 89 B3,24 76 31 51,A5 20 30 7C,B7 58 4D BD,C3 07 53 ED,7E E5 5B 57,69 88 60 8C,30 D8 95 B7,44 BA 14 AF,10 44 95 A1,D1 20 B4 28,73 B5 5F A3,CC 87 49 66,92 24 44 39,E8 9E 64 1F,98 CA 01 5A,C7 15 90 60,99E1 FD 2E,B7 9B D8 0C,1D 21 15 B0,0E 22 8A EB,F1 78 0C 81,42 8D 36 54,62 29 34 96,01 CF 72 E5,91 24 A0 12}。
Step d, the first packet data is obtained respectively to the first packet data and second packet data encryption using round key Ciphertext and second packet data ciphertext;
It preferably, the use of round key include: to be carried out according to the first packet data and round key to the encryption of the first packet data Interative computation;Each iteration includes doing XOR operation to corresponding first packet data and round key, is set to acquired results It changes, displacement result ring shift left third preset value position is obtained into third ring shift left data, result ring shift left the 4th will be replaced Preset value position obtains the 4th ring shift left data, does to displacement result, third ring shift left data, the 4th ring shift left data different Or operation, by acquired results and corresponding first packet data exclusive or.Wherein, acquired results are replaced gained specially As a result input S box is replaced.
In the present embodiment, 32 interative computations are carried out according to the first packet data and round key, third preset value is 18, the Two preset values are 24.1st interative computation is the first packet data X1 (01), X1 (02), X1 (03) and round key RK (00) XOR operation, acquired results input S box are replaced, by displacement result, displacement 18 the data obtaineds of result ring shift left, displacement As a result 24 the data obtaineds of ring shift left carry out exclusive or and acquired results and first packet data X1 (00) exclusive or are obtained first Packet data ciphertext Y1 (00);2nd interative computation, to the first packet data X1 (02), X1 (03), X1 (04) and round key RK (01) XOR operation is done, acquired results input S box is replaced, by displacement result, displacement 18 institute's totals of result ring shift left It carries out exclusive or according to, 24 the data obtaineds of displacement result ring shift left and obtains acquired results and first packet data X1 (01) exclusive or To the first packet data ciphertext Y1 (01);3rd interative computation, to the first packet data X1 (03), X1 (04), X1 (05) and wheel Key RK (02) does XOR operation, and acquired results input S box is replaced, by displacement result, displacement result ring shift left 18 The data obtained, displacement 24 the data obtaineds of result ring shift left carry out exclusive or, by acquired results and the first packet data X1 (02) Exclusive or obtains the first packet data ciphertext Y1 (02), and so on, Y1 (00-31) is obtained, wherein X1 (i+4)=Y1 (i), i= 00,01....31.
For example, the first packet data be X1 (00-03)=10 01 23 45,67 89 ab cd, ef fe dc ba, 98 76 54 32 }, round key is RK (00-31)={ F1 21 86 F9,41 66 2B 61,5A 6A B1 9A, 7B A9 20 77,36 73 60F4,77 6A 0C 61,B6 BB 89 B3,24 76 31 51,A5 20 30 7C,B7 58 4D BD,C3 07 53 ED,7E E5 5B 57,69 88 60 8C,30 D8 95 B7,44 BA 14 AF,10 44 95 A1,D1 20 B4 28,73 B5 5F A3,CC 87 49 66,92 24 44 39,E8 9E 64 1F,98 CA 01 5A,C7 15 90 60,99 E1 FD 2E,B7 9B D8 0C,1D 21 15 B0,0E 22 8A EB,F1 78 0C 81,42 8D 36 54,62 29 34 96,01CF 72 E5,91 24 A0 12 }, it is calculated the first packet data ciphertext: Y1 (00-31)=53 2C of 5A A9, 36 CD 18 92,95 E4 CE E9,6C 11 A7 C2,72 B2 1C 04,14 0F 58 B7,1F 08 89 3D,C5 01 27 75,E4 C8 6D AE,6F 5D 7A 54,1F 1D B4 43,54 A8 47 90,2A C4 33 B1,53 1C 3D C1,37 E8 CD E5,62 98 39 AC,F6 62 80 72,52 4D 8D 33,3E A0 95 17,E5 75 8E 7B,05 67 B9 31,25 40 D4 1B,75 8B 4F 73,01 70 4C B9,2E 7E 7C EA,6F 00 B1 E6,25 E1 20 D1,C8 A6 EF 48,AA DE 95 63,8B 88 44 72,B9 95 DA E2,99 9F E8 0F}。
It preferably, the use of round key include: to be carried out according to second packet data and round key to second packet data encryption Interative computation;Each iteration includes doing XOR operation to corresponding second packet data and round key, is set to acquired results It changes, displacement result ring shift left third preset value position is obtained into third ring shift left data, result ring shift left the 4th will be replaced Preset value position obtains the 4th ring shift left data, does to displacement result, third ring shift left data, the 4th ring shift left data different Or operation, by acquired results and corresponding second packet data exclusive or.Wherein, acquired results are replaced gained specially As a result input S box is replaced.
In the present embodiment, 32 interative computations are carried out according to second packet data and round key, third preset value is 18, the Two preset values are 24.1st interative computation is second packet data X2 (01), X2 (02), X2 (03) and round key RK (00) XOR operation, acquired results input S box are replaced, by displacement result, displacement 18 the data obtaineds of result ring shift left, displacement As a result 24 the data obtaineds of ring shift left carry out exclusive or and acquired results and second packet data X2 (00) exclusive or are obtained second Packet data ciphertext Y2 (00);2nd interative computation, to second packet data X2 (02), X2 (03), X2 (04) and round key RK (01) XOR operation is done, acquired results input S box is replaced, by displacement result, displacement 18 institute's totals of result ring shift left It carries out exclusive or according to, 24 the data obtaineds of displacement result ring shift left and obtains acquired results and second packet data X2 (01) exclusive or To second packet data ciphertext Y2 (01);3rd interative computation, to second packet data X2 (03), X2 (04), X2 (05) and wheel Key RK (02) does XOR operation, and acquired results input S box is replaced, by displacement result, displacement result ring shift left 18 The data obtained, displacement 24 the data obtaineds of result ring shift left carry out exclusive or, by acquired results and second packet data X2 (02) Exclusive or obtains second packet data ciphertext Y2 (02), and so on, Y2 (00-31) is obtained, wherein X2 (i+4)=Y2 (i), i= 00,01....31.
For example, second packet data are X2 (00-03)={ 10 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00 }, round key is RK (00-31)={ F1 21 86 F9,41 66 2B 61,5A 6A B1 9A, 7B A9 20 77,36 73 60 F4,77 6A 0C 61,B6 BB 89 B3,24 76 31 51,A5 20 30 7C,B7 58 4D BD,C3 07 53 ED,7E E5 5B 57,69 88 60 8C,30 D8 95 B7,44 BA 14 AF,10 44 95 A1,D1 20 B4 28,73 B5 5F A3,CC 87 49 66,92 24 44 39,E8 9E 64 1F,98 CA 01 5A,C7 15 90 60,99 E1 FD 2E,B7 9B D8 0C,1D 21 15 B0,0E 22 8A EB,F1 78 0C 81,42 8D 36 54,62 29 34 96,01 CF 72 E5,91 24 A0 12 }, it is calculated second packet data ciphertext: Y2 (00-31)=24 E2 E3 A4, A3 2A 02 D8,2D F0 63 DE,3A 68 F6 A5,E3 B3 5C 65,CE ED 9D B7,52 63 01 8D,D6 2C 42 83,98 FB 6F 31,C6 2F 6B 88,4B 1E 9C 3D,48 95 35 DE,E2 DD 26 D5,A6 1E D8 8B,72 05 AD 7C,B9 14 D8 B2,82 CE 20 09,A1 D9 3E D3,6B AA 12 29,34 67 F4 12,C8 C5 98 1E,E8 CF 1B 03,8E BB E5 DE,FB 41 82 03,ED 76 B5 7E,F4 30 0C 81,4F 4E A6 61,0A 1B 1C 5B,09 D1 32 25,E4 EB EA 39,24 57 83 41,25 87 C3 EB}。
Step e, the first data block ciphertext is obtained according to the first packet data ciphertext and second packet data ciphertext.
Preferably, the partial data of the partial data to the first packet data ciphertext and second packet data ciphertext is arranged Column and splicing, obtain the first data block ciphertext.
In the present embodiment, 16 byte of end of the first packet data ciphertext is rearranged, the first data are obtained, it is right 16 byte of end of second packet data ciphertext is rearranged, and the second data, the first data of sequential concatenation and second are obtained Data obtain the first data block ciphertext.
For example, the first packet data ciphertext is Y1 (00-31)={ 18 92,95 E4 CE of 5A A9 53 2C, 36 CD E9,6C 11 A7 C2,72 B2 1C 04,14 0F 58 B7,1F 08 89 3D,C5 01 27 75,E4 C8 6D AE,6F 5D 7A 54,1F 1D B4 43,54 A8 47 90,2A C4 33 B1,53 1C 3D C1,37 E8 CD E5,62 98 39 AC,F6 62 80 72,52 4D 8D 33,3E A0 95 17,E5 75 8E 7B,05 67 B9 31,25 40 D4 1B,75 8B 4F 73,01 70 4C B9,2E 7E 7C EA,6F 00 B1 E6,25 E1 20 D1,C8 A6 EF 48,AA DE 95 63,8B 88 44 72, B9 95 DA E2,99 9F E8 0F }, second packet data ciphertext is Y2 (00-31)={ 24 E2 E3 A4,A3 2A 02 D8,2D F0 63 DE,3A 68 F6 A5,E3 B3 5C 65,CE ED 9D B7,52 63 01 8D,D6 2C 42 83,98FB 6F 31,C6 2F 6B 88,4B 1E 9C 3D,48 95 35 DE,E2 DD 26 D5,A6 1E D8 8B,72 05 AD 7C,B9 14 D8 B2,82 CE 20 09,A1 D9 3E D3,6B AA 12 29,34 67 F4 12,C8 C5 98 1E,E8 CF 1B 03,8E BB E5 DE,FB 41 82 03,ED 76 B5 7E,F4 30 0C 81,4F 39,24 57 83 41,25 87 C3 EB of 4E A6 61,0A 1B 1C 5B, 09 D1 32 25, E4 EB EA }, first point 16 byte of end of group data ciphertext is Y1 (28-31)={ 95 DA E2,99 9F of AA DE 95 63,8B 88 44 72, B9 E8 0F }, it is rearranged according to the sequence of Y1 (31), Y1 (30), Y1 (29), Y1 (28), obtains the first data 99 95 DA E2 8B of 9F E8 0F B9,88 44 72 AA DE 95 63,16 byte of end of second packet data ciphertext are Y2 (28-31)={ 39,24 57 83 41,25 87C3EB of 09 D1 32 25, E4 EB EA }, by it according to Y2 (31), Y2 (30), Y2 (29), Y2 (28) sequence rearranged, obtain 25 87 C3 EB of the second data, 24 57 83 41 E4 39 09 D1 32 25 of EB EA, the first data of sequential concatenation and the second data obtain 99 9F E8 0F of the first data block ciphertext B9 95 DA E2 8B 88 44 72 AA DE 95 63 25 87 C3 EB 24 57 83 41 E4 EB EA 39 09 D1 32 25。
In the present invention, to the first encryption of blocks of data, the first data block ciphertext is obtained, can also be specifically included:
Step a', the first data block is extended, obtains the first growth data;
Preferably, growth data is calculated according to the first data block, the first data block and growth data is spliced, obtain first Growth data.
In the present embodiment, the first data block is averagely divided into 16 word W [00-15], carry out 52 times and be calculated include The growth data W [16-67] of 52 words splices the first data block and growth data, obtains the first extension comprising 68 words Data W [00-67];Calculating every time includes carrying out XOR operation according to corresponding word, and replace to acquired results, further according to It replaces result and corresponding word carries out XOR operation.1st calculating 15 does XOR operation to W [00], W [07] and W [13] < < <, By to acquired results, acquired results < < < 15 and acquired results < < < 23 do XOR operation and realize displacement to acquired results, then XOR operation is done to displacement result, W [03] < < < 7 and W [10], obtains W [16];2nd calculating, to W [01], W [08] and W [14] < < < 15 does XOR operation, by acquired results, acquired results < < < 15 and acquired results < < < 23 do XOR operation reality Now to the displacement of acquired results, then XOR operation is done to displacement result, W [04] < < < 7 and W [11], obtains W [17];No. the 3rd meter Calculate, 15 XOR operation done to W [02], W [09] and W [15] < < <, as to acquired results, acquired results < < < 15 and obtained by knot Fruit < < < 23 does XOR operation and realizes displacement to acquired results, then do exclusive or fortune to displacement result, W [05] < < < 7 and W [12] It calculates, obtains W [18], and so on, obtain W [16-67];
For example, the first data block is 10 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80, the first data block is put down Be divided into 16 word W [00-15]=10 01 23 45,67 89 AB CD, EF FE DC BA, 98 76 54 32,80 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 80 }, extension is calculated Data W [16-67] { 18 01 B2 98,54 DC DC 9C, DC 94 74 0B, 74 03 E5 83, CC 0E 7A 5C, E8 3D F1 3F,37 39 91 24,59 6F B3 3F,91 38 B3 20,F2 7A 6D 1A,EC 9E 6D 6E,38 B0 8D 34,64 C9 2B 93,2C FB 52 FA,14 95 94 C8,EB 01 62 5D,63 E6 C6 8C,F9 F1 01 56,DB 76 77 60,18 1A E9 CE,DA AB B0 3B,10 4C 3C FB,3F AB A1 53,97 3B C5 94,66 6B 24 29,86 3B 2E 3F,11 8E C3 C9,BF 5C 40 5D,F4 03 1D 00,C5 A4 78 4C,CF 40 11 08,BC 00 9F 14,81 80 5C C2,33 3E 5B C1,EC FC 8D 37,E1 71 D2 5B,52 ED 1D 05,82 55 E7 23,486F 72 23,69 38 D5 61,5D B9 B0 3F,50 6F 8E D5,94 BF 33 E5,C3 7C 9A 9C,1F E7 FA 2E,FB 21 41 BD,C3 85 6A D5,34 37 4F 2A,47 8D FD 2F,F5 6C 89 7A,DE 63 7C 99,DA B8 FB 6C}。
Step b', the second growth data is calculated according to the first growth data;
Preferably, the second growth data is obtained according to the word exclusive or in the first growth data.
In the present embodiment, 64 XOR operation are carried out according to the word in the first growth data, obtain the comprising 64 words Two growth data W'[00-63];Each XOR operation is specially to carry out XOR operation to the corresponding word in the first growth data;The 1 XOR operation does XOR operation to W [00] and W [04], obtains W'[00];2nd XOR operation, to W [01] and W [05] XOR operation is done, W'[01 is obtained];3rd XOR operation does XOR operation to W [02] and W [06], obtains W'[02], with this Analogize, obtain W'[00-63];
For example, the first growth data W [16-67] be 10 01 23 45,67 89 AB CD, EF FE DC BA, 98 76 54 32,80 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 80,18 01 B2 98,54 DC DC 9C,DC 94 74 0B,74 03 E5 83,CC 0E 7A 5C,E8 3D F1 3F,37 39 91 24,59 6F B3 3F,91 38 B3 20,F2 7A 6D 1A,EC 9E 6D 6E,38 B0 8D 34,64 C9 2B 93,2C FB 52 FA,14 95 94 C8,EB 01 62 5D,63 E6 C6 8C,F9 F1 01 56,DB 76 77 60,18 1A E9 CE,DA AB B0 3B,10 4C 3C FB,3F AB A1 53,97 3B C5 94,66 6B 24 29,86 3B 2E 3F,11 8E C3 C9,BF 5C 40 5D,F4 03 1D 00,C5 A4 78 4C,CF 40 11 08,BC 00 9F 14,81 80 5C C2,33 3E 5B C1,EC FC 8D 37,E1 71 D2 5B,52 ED 1D 05,82 55 E7 23,48 6F 72 23,69 38 D5 61,5D B9 B0 3F,50 6F 8E D5,94BF 33 E5,C3 7C 9A 9C,1F E7 FA 2E,FB 21 41 BD, C3 85 6A D5,34 37 4F 2A, 47 8D FD 2F, F5 6C 89 7A, DE 63 7C 99, DA B8 FB 6C }, The second growth data W'[00-63 is calculated] be 90 01 23 45,67 89 AB CD, EF FE DC BA, 9,876 54 32,80 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 00,00 00 00 80,18 01 B2 98,54 DC DC 9C,DC 94 74 0B,74 03 E5 03,D4 0F C8 C4,BC E1 2D A3,EB AD E5 2F,2D 6C 56 BC,5D 36 C9 7C,1A 47 9C 25,DB A7 FC 4A,61 DF 3E 0B,F5 F1 98 B3,DE 81 3F E0,F8 0B F9 A6,D3 B1 EF 69,07 2F ED 1F,D5 0A 53 AC,CF E3 E3 A8,F31B 8B 93,B9 4D 76 B7,E9 BD 3D AD,E4 DD D6 33,8F 21 2C 5A,BC C0 94 12,96 77 12 C4,2E 25 62 9A,28 67 85 C9,92 68 39 29,43 9F 56 73,DE CE D2 C1,03 5C DF 49,75 83 41C2,F6 9A 23 8D,23 BC 9C 3F,5D 71 4D 4F,D3 6D 41 C7,B1 6B BC E2,A4 93 FF 14,88 49 07 3A,0F 54 AD 3A,D2 3A 69 F6,DC D0 41 C6,AA 44 4F FD,42 5E 4A 11,AB 4E CF 68,57 3A 59 30,F7 4B D5 B6,58 6A 07 01,0E 4D C8 C7,1D E6 16 4C,EE 8F B446}。
Step c', word register is initialized;
Specifically, word register is written into preset initial value.
In the present embodiment, 8 word registers are set, preset initial value is 8 groups of data, and 8 groups of data are respectively written into 8 Word register.
For example, 8 groups of data are respectively { 73 80 16 6F, 49 14 B2 B9,17 24 42 D7, DA 8A 06 00, A9 6F 30 BC, 16 31 38 AA, E3 8D EE 4D, B0 FB 0E 4E }, enable data in 8 word registers distinguish a, b, c, D, e, f, g, h, after 8 groups of data are respectively written into 8 word registers: a=73 80 16 6F, b=49 14 B2 B9, c=17 24 42 D7, d=DA 8A 06 00, e=A9 6F 30 BC, f=16 31 38 AA, g=E3 8D EE 4D, h=B0 FB 0E 4E。
Step d', compaction algorithms are carried out according to the data in the first growth data, the second growth data and word register, made The data in word register are updated with operation result;
In the present embodiment, step d' include: according in corresponding word register data and corresponding constant carry out plus operation, institute It obtains the corresponding digit of result ring shift left and obtains the first intermediate data, according in first intermediate data and corresponding word register Data carry out XOR operation obtain the second intermediate data, according in corresponding word register data, second intermediate data and Corresponding word in second growth data carries out plus operation obtains the 4th intermediate data, according to the number in corresponding word register It is carried out according to the corresponding word in, first intermediate data and first growth data plus operation obtains the 6th intermediate data, root It is updated in each word register according to the data in the 4th intermediate data, the 6th intermediate data and corresponding word register Data.
Specifically, 64 are carried out according to the data in the first growth data, the second growth data and word register in step d' Second compression operation after each compaction algorithms, updates the data in word register with operation result;Each compaction algorithms specifically: It is carried out adding operation according to a, e and corresponding constant, acquired results ring shift left presetting digit capacity obtains the first intermediate data, according to first Intermediate data and a carry out XOR operation and obtain the second intermediate data, according to a, b and c be calculated third intermediate data (the 1st~ XOR operation is carried out to a, b, c in 16 second compression operations, by the 17th~64 second compression operation, by two two-phase of a, b, c with to phase With the obtained progress of 3 results or operation), according in third intermediate data, d, the second intermediate data and the second growth data Corresponding word carries out plus operation obtains the 4th intermediate data, and the 5th intermediate data (the 1st~16 second compression is calculated according to e, f and g XOR operation is carried out to e, f, g in operation, by the 17th~64 second compression operation, by e and f phase with, by the non-sum g phase of e with it is right 2 phases are carried out with result or operation), according to corresponding in the 5th intermediate data, h, the first intermediate data and the first growth data Word carries out plus operation obtains the 6th intermediate data;After each compaction algorithms, the data in word register are updated with operation result and are had Body are as follows: h is replaced with g, g will be replaced after the corresponding digit of f ring shift left, replaces f with e, e will be replaced after the displacement of the 6th intermediate data, D is replaced with c, c will be replaced after the corresponding digit of b ring shift left, replaces b with a, replaces a with the 4th intermediate data;
For example, corresponding constant T [the 00]-T [15] in the 1st~16 second compression operation is 79CC 4519,17~64 pressures Corresponding constant T [16]-T [63] in contracting operation is 87 9D 8A of 7A;1st second compression operation, the first intermediate variable SS1= ((a < < < 12)+e+T [00]) < < < 7, the second intermediate variable Third intermediate variable4th intermediate variable TT1=FF [00]+d+SS2+W'[00], the 5th intermediate variable6th intermediate variable TT2=GG [00]+h+SS1+W [00];17th second compression operation, among first Variable SS1=((a < < < 12)+e+ (T [16] < < < 16)) < < < 7, the second intermediate variableThe Three intermediate variable FF [16]=(a^b) ˇ (a^c) ˇ (b^c), the 4th intermediate variable TT1=FF [16]+d+SS2+W'[16], the 5th Intermediate variable 6th intermediate variable TT2=GG [16]+h+SS1+W [16].
Step e', the data sequential concatenation in word register is obtained into the first data block ciphertext.
For example, after using operation result to update the data in word register in step d', a=AD BF E2 99, b=ED FC A4 F1, c=BE 4B 6F 87, d=72 12 A7 9E, e=56 55 1B 07, f=44 02 37 B5, g=7B F7 Data sequential concatenation in word register is obtained the first data block ciphertext AD BF E2 99 by 78 94, h=E8 11 98 01 ED FC A4 F1 BE 4B 6F 87 72 12 A7 9E 56 55 1B 07 44 02 37 B5 7B F7 78 94 E8 11 98 01。
Embodiment 9
The present embodiment provides a kind of credit card of the enhancing without card payment transactions safety, as shown in figure 5, the credit card packet It includes:
Module 601 is powered on, is powered on for credit card;
Initialization module 602 carries out system initialization after powering on for credit card;
First sleep block 603, for suspend mode after credit card progress system initialization;
First detection module 604 when being used for credit card suspend mode, detects default interrupt;
First wake-up module 605 is waken up after detecting default interrupt for credit card;
First interruption processing module 606 enters default interrupt processing process and executes in default after being waken up for credit card Disconnected processing exits default interrupt processing process when default interrupt processing is completed;
First sleep block 603 is also used to credit card and exits suspend mode after default interrupt processing process.
Wherein, the first interruption processing module 606 specifically includes:
Acquiring unit, for obtaining the dynamic security code factor;
Storage unit is used for memory card personal data;
Generation unit, the card stored in the dynamic security code factor and storage unit for being obtained according to acquiring unit Peopleization data generate the first data block;
Encryption unit, the first encryption of blocks of data for generating to generation unit, obtains the first data block ciphertext;
Processing unit, for the first data block ciphertext that encryption unit obtains is extracted, is converted and sequence processing, will The predetermined fraction of processing result is as the currently active credit card security code;
Display unit, for showing the currently active credit card security code.
In the present embodiment, first detection module 604 when being specifically used for credit card suspend mode, detects real-time clock interrupt;
Correspondingly, the first wake-up module 605 is waken up after detecting real-time clock interrupt specifically for credit card;First Interruption processing module 606 enters real-time clock interrupt process flow and executes in real-time clock after being waken up specifically for credit card Disconnected processing exits real-time clock interrupt process flow when real-time clock interrupt processing is completed.
Further, the first interruption processing module 606 can also include updating unit and judging unit:
Updating unit, for updating timing time;
Judging unit updates credit card security code for determining whether to;
Correspondingly, acquiring unit, according to timing time when updating credit card security code specifically for judging unit judgement Obtain the current time factor.
Alternatively, in the present embodiment, first detection module 604 when being specifically used for credit card suspend mode, detects keys interrupt;
Correspondingly, the first wake-up module 605 is waken up after detecting keys interrupt specifically for credit card;First interrupts Processing module 606 enters keys interrupt process flow and executes keys interrupt processing, works as key after being waken up specifically for credit card When interrupt processing is completed, keys interrupt process flow is exited.
Further, the first interruption processing module 606 can also include updating unit:
Updating unit, for updating touch potential;
Correspondingly, acquiring unit is specifically used for obtaining the current event factor according to touch potential.
Or in the present embodiment, first detection module 604, be specifically used for credit card suspend mode when, detection keys interrupt and Real-time clock interrupt, correspondingly:
First wake-up module 605, is waken up after detecting keys interrupt or real-time clock interrupt specifically for credit card;
First interruption processing module 606 detects specifically for credit card and enters in key when being waken up after keys interrupt Disconnected process flow executes keys interrupt processing, when keys interrupt processing is completed, exits keys interrupt process flow and credit Block and enters the execution real-time clock interrupt processing of real-time clock interrupt process flow when being waken up after detecting real-time clock interrupt, when When real-time clock interrupt processing is completed, real-time clock interrupt process flow is exited;
First interruption processing module 606 further include: real-time clock interrupt processing unit, for updating timing time;
Correspondingly, acquiring unit is specifically used for obtaining the current time factor according to timing time.
In the present embodiment, first detection module 604 when being also used to credit card suspend mode, detects communication disruption, correspondingly:
First wake-up module 605 is also used to be waken up after credit card detects communication disruption;
First interruption processing module 606 is also used to credit card and detects enter communication disruption when being waken up after communication disruption Process flow executes communication disruption processing, when communication disruption processing is completed, exits communication disruption process flow;
First interruption processing module 606 further includes communication disruption processing unit and judging unit;Wherein, communication disruption is handled Unit carries out card personalization for receiving communication data, and according to the communication data received;Judging unit, for judging Whether card personalization is completed.Correspondingly, acquiring unit, specifically for judging that card personalization is completed when judging unit When, obtain the dynamic security code factor.
Further, communication disruption processing unit can be specifically used for receiving communication data, and according to the communication received Card personalization data are written into storage unit for data.
Further, communication disruption processing unit can be specifically used for receiving communication data, and logical according to what is received Primary account number, card Expiration Date and service code sequence are written into storage unit for letter data;
Correspondingly, generation unit is replaced in storage unit specifically for the dynamic security code factor obtained with acquiring unit The data of first preset length in the primary account number of storage, obtain transformed primary account number, and transformed primary account number and card are lost Effect date and service code sequence are sequentially connected, and are obtained clear data, are filled to clear data, obtain the first data block.
In the present embodiment, processing unit can be specifically used for the left side of the first data block ciphertext obtained from encryption unit Start, extracts all first data in the first data block ciphertext and obtain the first extraction data to the number between the second data, from Start on the left of first data block ciphertext, extracts in the first data block ciphertext all third data to the number between the 4th data Word obtains the second extraction data;The difference that each number in data replaces with the number Yu the 5th data is extracted by second, is obtained Second after conversion extracts data;Second after first extraction data and the conversion is extracted into data sequential concatenation, is obtained everywhere Manage result.
In the present embodiment, encryption unit is specifically included:
Grouping subelement is obtained for being grouped according to default block length to the first data block that generation unit generates To the first packet data and second packet data;
First computation subunit, for obtaining process key according to predetermined system parameter and predetermined encryption cipher key calculation;
Second computation subunit, process key and default preset parameter for being obtained according to the first computation subunit calculate Obtain round key;
Encryption sub-unit operable, round key for being obtained using the second computation subunit first point that grouping subelement is obtained Group data encryption obtains the first packet data ciphertext, and single to grouping using the round key that the second computation subunit obtains The second packet data encryption that member obtains obtains second packet data ciphertext;
Obtain subelement, the first packet data ciphertext and second packet data ciphertext for obtaining according to encryption sub-unit operable Obtain the first data block ciphertext;
Further, the first computation subunit, specifically for doing exclusive or fortune to predetermined system parameter and predetermined encryption key Calculation obtains process key;
Second computation subunit, specifically for the process key and default preset parameter obtained according to the first computation subunit It is iterated operation and obtains round key;Each iteration includes doing XOR operation to corresponding process key and default preset parameter, Acquired results are replaced, displacement the first preset value of result ring shift left position is obtained into first circulation left shift date, will be replaced As a result the second preset value of ring shift left position obtains second circulation left shift date, to displacement result, first circulation left shift date, second Ring shift left data do XOR operation, by acquired results and corresponding process key exclusive or;
Encryption sub-unit operable, grouping subelement is obtained specifically for the round key that is obtained according to the second computation subunit the One packet data is iterated operation, obtains the first packet data ciphertext;Each iteration includes to corresponding first packet data XOR operation is done with round key, acquired results are replaced, displacement result ring shift left third preset value position is obtained into third Displacement the 4th preset value position of result ring shift left is obtained the 4th ring shift left data, to displacement result, the by ring shift left data Three ring shift left data, the 4th ring shift left data do XOR operation, by acquired results and corresponding first packet data exclusive or; The second packet data that round key for being obtained according to the second computation subunit obtains grouping subelement are iterated budget, Obtain second packet data ciphertext;Each iteration includes doing XOR operation to corresponding second packet data and round key, to institute It obtains result to be replaced, displacement result ring shift left third preset value position is obtained into the 5th ring shift left data, result will be replaced The 4th preset value position of ring shift left obtains the 6th ring shift left data, to displacement result, the 5th ring shift left data, the 6th circulation Left shift date does XOR operation, by acquired results and corresponding second packet data exclusive or;
Subelement is obtained, specifically for the partial data and encryption of the first packet data ciphertext obtained to encryption sub-unit operable The partial data for the second packet data ciphertext that subelement obtains is arranged and is spliced, and the first data block ciphertext is obtained.
Alternatively, encryption unit specifically includes in the present embodiment:
First extension subelement obtains the first spreading number for being extended to the first data block that generation unit generates According to;
Second extension subelement, the word exclusive or in the first growth data for being obtained according to the first extension subelement Obtain the second growth data;
Subelement is initialized, for initializing word register;
Subelement is compressed, the first growth data, the second extension subelement for obtaining according to the first extension subelement obtain To the second growth data and word register in data carry out compaction algorithms, use operation result update word register in number According to;
Splice subelement, for the data sequential concatenation in word register to be obtained the first data block ciphertext;
Further, the first extension subelement is specifically used for: calculating extension according to the first data block that generation unit generates First data block and growth data are spliced, obtain the first growth data by data;
Compression subelement is specifically used for: according in corresponding word register data and corresponding constant carry out plus operation, gained As a result ring shift left presetting digit capacity obtains the first intermediate data, according to the data in the first intermediate data and corresponding word register into Row XOR operation obtains the second intermediate data, according to data, the second intermediate data and the second extension in corresponding word register The corresponding word in the second growth data that unit obtains carries out plus operation obtains the 4th intermediate data, according in corresponding word register Data, the corresponding word in the first intermediate data and the first obtained the first growth data of extension subelement carries out plus operation obtains 6th intermediate data updates each word according to the data in the 4th intermediate data, the 6th intermediate data and corresponding word register Data in register.For example, presetting digit capacity is 7.
Embodiment 10
The present embodiment provides a kind of credit card of the enhancing without card payment transactions safety, as shown in fig. 6, the credit card packet It includes:
Module 701 is powered on, is powered on for credit card;
Initialization module 702 carries out system initialization after powering on for credit card;
It checks module 703, checks whether default interrupt identification is set after carrying out system initialization for the credit card;
Second interruption processing module 704 checks for credit card and resets default interrupt when default interrupt identification is set Mark executes default interrupt processing;
Second sleep block 705, for suspend mode after the completion of the processing of the second interruption processing module 704;
Second detection module 706 when being used for credit card suspend mode, detects default interrupt;
Second wake-up module 707 is waken up, into default interrupt processing process when detecting default interrupt for credit card By default interrupt identification set, default interrupt processing process is exited;
It checks module 703, is also used to check whether default interrupt identification is set after credit card exits interrupt processing process;
Wherein, the second interruption processing module 704 specifically includes:
Acquiring unit, for obtaining the dynamic security code factor;
Storage unit is used for memory card personal data;
Generation unit, the card stored in the dynamic security code factor and storage unit for being obtained according to acquiring unit Peopleization data generate the first data block;
Encryption unit, the first encryption of blocks of data for generating to generation unit, obtains the first data block ciphertext;
Processing unit, for the first data block ciphertext that encryption unit obtains is extracted, is converted and sequence processing, will The predetermined fraction of processing result is as the currently active credit card security code;
Display unit, for showing the currently active credit card security code.
In the present embodiment, module 703 is checked, check real-time clock interrupt after carrying out system initialization specifically for credit card Whether mark is set and credit card will check real-time clock interrupt mark after interrupt identification set;
Correspondingly, the second interruption processing module 704 checks real-time clock interrupt mark specifically for credit card and is set Shi Fuwei real-time clock interrupt mark executes real-time clock interrupt processing;Second detection module 706, stops specifically for credit card When dormancy, real-time clock interrupt is detected;Second wake-up module 707 is detected specifically for credit card and is called out when real-time clock interrupt It wakes up, into real-time clock interrupt process flow by real-time clock interrupt flag set, exits real-time clock interrupt process flow.
Further, interruption processing module can also include updating unit and judging unit:
The updating unit, for updating timing time;
The judging unit updates credit card security code for determining whether to;
Correspondingly, acquiring unit, according to timing time when updating credit card security code specifically for judging unit judgement Obtain the current time factor.
Alternatively, checking module 703 in the present embodiment, it is specifically used for checking in key after credit card carries out system initialization Whether disconnected mark is set and credit card will check keys interrupt mark after interrupt identification set;
Correspondingly, the second interruption processing module 704 is checked specifically for credit card and is answered when keys interrupt mark is set Position keys interrupt mark executes keys interrupt processing;Second detection module 706 when being specifically used for credit card suspend mode, detects key It interrupts;Second wake-up module 707, is waken up when detecting keys interrupt specifically for credit card, into keys interrupt processing stream Keys interrupt flag set is exited keys interrupt process flow by journey.
Further, the second interruption processing module 704 can also include updating unit:
Updating unit, for updating touch potential;
Correspondingly, acquiring unit is specifically used for obtaining the current event factor according to the touch potential.
Or in the present embodiment, module 703 is checked, check key after carrying out system initialization specifically for credit card Whether interrupt identification and real-time clock interrupt mark are set and credit card will check keys interrupt mark after interrupt identification set Whether will and real-time clock interrupt mark are set;
Correspondingly, the second interruption processing module 704 is checked specifically for credit card and is answered when keys interrupt mark is set Position keys interrupt mark, executes keys interrupt processing and credit card checks reset when real-time clock interrupt mark is set Real-time clock interrupt mark executes real-time clock interrupt processing;Second detection module 706, when being specifically used for credit card suspend mode, inspection Survey keys interrupt and real-time clock interrupt;Second wake-up module 707 is detected specifically for credit card and is called out when keys interrupt It wakes up, into keys interrupt process flow by keys interrupt flag set, exits keys interrupt process flow and credit card detection It is waken up when to real-time clock interrupt, into real-time clock interrupt process flow by real-time clock interrupt flag set, exits reality Shi Shizhong interrupt processing process;
Second interruption processing module 704 further include: real-time clock interrupt processing unit, for updating timing time;
Correspondingly, acquiring unit is specifically used for obtaining the current time factor according to timing time.
In the present embodiment, module 703 is checked, be also used to check that communication disruption mark is after credit card carries out system initialization It is no be set and credit card will after interrupt identification set check communication disruption mark whether be set, correspondingly:
Second interruption processing module 704 is also used to credit card and checks when communication disruption mark is set in reset communication Disconnected mark executes communication disruption processing;
Second detection module 706 when being also used to credit card suspend mode, detects communication disruption;
Second wake-up module 707 is also used to be waken up when credit card detects communication disruption, into communication disruption processing stream Communication disruption flag set is exited communication disruption process flow by journey;
Second interruption processing module 704 further includes communication disruption processing unit and judging unit;Wherein, communication disruption is handled Unit carries out card personalization for receiving communication data, and according to the communication data received;Judging unit, for judging Whether card personalization is completed.Correspondingly, acquiring unit, specifically for judging that card personalization is completed when judging unit When, obtain the dynamic security code factor.
Further, the processing unit in communication can be specifically used for receiving communication data, and according to the communication received Card personalization data are written into storage unit for data.
Further, communication disruption processing unit can be specifically used for receiving communication data, and logical according to what is received Primary account number, card Expiration Date and service code sequence are written into storage unit for letter data;
Correspondingly, generation unit is replaced in storage unit specifically for the dynamic security code factor obtained with acquiring unit The data of first preset length in the primary account number of storage, obtain transformed primary account number, and transformed primary account number and card are lost Effect date and service code sequence are sequentially connected, and are obtained clear data, are filled to clear data, obtain the first data block.
In the present embodiment, processing unit can be specifically used for the left side of the first data block ciphertext obtained from encryption unit Start, extracts all first data in the first data block ciphertext and obtain the first extraction data to the number between the second data, from Start on the left of first data block ciphertext, extracts in the first data block ciphertext all third data to the number between the 4th data Word obtains the second extraction data;The difference that each number in data replaces with the number Yu the 5th data is extracted by second, is obtained Second after conversion extracts data;Second after first extraction data and the conversion is extracted into data sequential concatenation, is obtained everywhere Manage result.
In the present embodiment, encryption unit is specifically included:
Grouping subelement is obtained for being grouped according to default block length to the first data block that generation unit generates To the first packet data and second packet data;
First computation subunit, for obtaining process key according to predetermined system parameter and predetermined encryption cipher key calculation;
Second computation subunit, process key and default preset parameter for being obtained according to the first computation subunit calculate Obtain round key;
Encryption sub-unit operable, round key for being obtained using the second computation subunit first point that grouping subelement is obtained Group data encryption obtains the first packet data ciphertext, and single to grouping using the round key that the second computation subunit obtains The second packet data encryption that member obtains obtains second packet data ciphertext;
Obtain subelement, the first packet data ciphertext and second packet data ciphertext for obtaining according to encryption sub-unit operable Obtain the first data block ciphertext;
Further, the first computation subunit, it is different specifically for being done to default predetermined system parameter and predetermined encryption key Or operation obtains process key;
Second computation subunit, specifically for the process key and default preset parameter obtained according to the first computation subunit It is iterated operation and obtains round key;Each iteration includes doing XOR operation to corresponding process key and default preset parameter, Acquired results are replaced, displacement the first preset value of result ring shift left position is obtained into first circulation left shift date, will be replaced As a result the second preset value of ring shift left position obtains second circulation left shift date, to displacement result, first circulation left shift date, second Ring shift left data do XOR operation, by acquired results and corresponding process key exclusive or;
Encryption sub-unit operable, grouping subelement is obtained specifically for the round key that is obtained according to the second computation subunit the One packet data is iterated operation, obtains the first packet data ciphertext;Each iteration includes to corresponding first packet data XOR operation is done with round key, acquired results are replaced, displacement result ring shift left third preset value position is obtained into third Displacement the 4th preset value position of result ring shift left is obtained the 4th ring shift left data, to displacement result, the by ring shift left data Three ring shift left data, the 4th ring shift left data do XOR operation, by acquired results and corresponding first packet data exclusive or; The second packet data that round key for being obtained according to the second computation subunit obtains grouping subelement are iterated budget, Obtain second packet data ciphertext;Each iteration includes doing XOR operation to corresponding second packet data and round key, to institute It obtains result to be replaced, displacement result ring shift left third preset value position is obtained into the 5th ring shift left data, result will be replaced The 4th preset value position of ring shift left obtains the 6th ring shift left data, to displacement result, the 5th ring shift left data, the 6th circulation Left shift date does XOR operation, by acquired results and corresponding second packet data exclusive or;
Subelement is obtained, specifically for the partial data and encryption of the first packet data ciphertext obtained to encryption sub-unit operable The partial data for the second packet data ciphertext that subelement obtains is arranged and is spliced, and the first data block ciphertext is obtained.
Alternatively, encryption unit specifically includes in the present embodiment:
First extension subelement obtains the first spreading number for being extended to the first data block that generation unit generates According to;
Second extension subelement, the word exclusive or in the first growth data for being obtained according to the first extension subelement Obtain the second growth data;
Subelement is initialized, for initializing word register;
Subelement is compressed, the first growth data, the second extension subelement for obtaining according to the first extension subelement obtain To the second growth data and word register in data carry out compaction algorithms, use operation result update word register in number According to;
Splice subelement, for the data sequential concatenation in word register to be obtained the first data block ciphertext;
Further, the first extension subelement is specifically used for: calculating extension according to the first data block that generation unit generates First data block and growth data are spliced, obtain the first growth data by data;
Compression subelement is specifically used for: according in corresponding word register data and corresponding constant carry out plus operation, gained As a result ring shift left presetting digit capacity obtains the first intermediate data, according to the data in the first intermediate data and corresponding word register into Row XOR operation obtains the second intermediate data, according to data, the second intermediate data and the second extension in corresponding word register The corresponding word in the second growth data that unit obtains carries out plus operation obtains the 4th intermediate data, according in corresponding word register Data, the corresponding word in the first intermediate data and the first obtained the first growth data of extension subelement carries out plus operation obtains 6th intermediate data updates each word according to the data in the 4th intermediate data, the 6th intermediate data and corresponding word register Data in register.For example, presetting digit capacity is 7.
The above, more preferably specific embodiment only of the invention, but protection scope of the present invention is not limited to This, anyone skilled in the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention answers the protection model with claim Subject to enclosing.

Claims (48)

1. a kind of method of the enhancing without card payment transactions safety characterized by comprising
Step S1, credit card powers on, and carries out system initialization;
Step S2, the described credit card suspend mode is waken up when detecting default interrupt, executes step S3;
Step S3, the described credit card enters default interrupt processing process and executes default interrupt processing, when the default interrupt processing When completion, the default interrupt processing process, return step S2 are exited;
The default interrupt processing includes:
Step a1, the dynamic security code factor is obtained, generates first according to the dynamic security code factor and card personalization data Data block;
Step a2, to first encryption of blocks of data, the first data block ciphertext is obtained;
Step a3, the first data block ciphertext extracted, converted and sequence processing, the predetermined fraction of processing result is made For the currently active credit card security code, the currently active credit card security code is shown;
It is described the first data block ciphertext is extracted, convert and sequence processing, specifically include: from first data block Start on the left of ciphertext, extracts all first data in the first data block ciphertext and obtained to the number between the second data First extracts data, since on the left of the first data block ciphertext, extracts all thirds in the first data block ciphertext Data obtain the second extraction data to the number between the 4th data;The number replacement of each of data is extracted by described second Data are extracted for the difference of the number and the 5th data, second after being converted;Data and the conversion are extracted by described first Second afterwards extracts data sequential concatenation, obtains processing result.
2. the method as described in claim 1, which is characterized in that default interrupt is real-time clock interrupt;It is described it is default in Disconnected processing is that real-time clock interrupt is handled;The default interrupt processing process is real-time clock interrupt process flow.
3. the method as described in claim 1, which is characterized in that default interrupt is keys interrupt;At the default interruption Reason is that keys interrupt is handled;The default interrupt processing process is keys interrupt process flow.
4. method as claimed in claim 3, which is characterized in that in the step S2 further include: when detecting in real-time clock It is waken up when disconnected, executes step S4;
The step S4 is specifically included: the credit card enters real-time clock interrupt process flow, executes at real-time clock interrupt Reason exits the real-time clock interrupt process flow, return step S2 when real-time clock interrupt processing is completed;
The real-time clock interrupt processing includes: that the credit card updates timing time;
The acquisition dynamic security code factor specifically: the current time factor is obtained according to the timing time.
5. the method as described in claim 1, which is characterized in that in the step S2 further include: when the credit card detects It is waken up when communication disruption, executes step S5;
The step S5 is specifically included: the credit card enters communication disruption process flow, communication disruption processing is executed, when described When communication disruption processing is completed, the communication disruption process flow is exited;
The communication disruption processing includes: the credit card reception communication data, and according to the communication data card received Piece is individualized;
In the default interrupt processing further include: step a0, judge whether card personalization is completed, be, execute the step A1, otherwise the default interrupt processing is completed.
6. the method as described in claim 1, which is characterized in that the step S2 and step S3 replacement are as follows:
Step s2, the described credit card inspection presets whether interrupt identification is set, and is to reset the default interrupt identification, executes Default interrupt processing, it is no to then follow the steps s3;
Step s3, the described credit card suspend mode is waken up when detecting default interrupt, will preset into default interrupt processing process The default interrupt processing process, return step s2 are exited in interrupt identification set.
7. method as claimed in claim 6, which is characterized in that default interrupt is real-time clock interrupt;It is described it is default in Disconnected mark is real-time clock interrupt mark;The default interrupt processing is real-time clock interrupt processing;The default interrupt processing Process is real-time clock interrupt process flow.
8. the method as described in claim 2 or 7, which is characterized in that the real-time clock interrupt processing further include: update timing Time determines whether to update credit card security code, is to execute the step a1, otherwise the real-time clock interrupt has been handled At;
The acquisition dynamic code factor of safety specifically: the current time factor is obtained according to the timing time.
9. method as claimed in claim 6, which is characterized in that default interrupt is keys interrupt;The default interruption mark Will is keys interrupt mark;The default interrupt processing is keys interrupt processing;The default interrupt processing process is in key Disconnected process flow.
10. the method as described in claim 3 or 9, which is characterized in that the keys interrupt processing further include: update key Number;
The acquisition dynamic security code factor specifically: the current event factor is obtained according to the touch potential.
11. method as claimed in claim 9, which is characterized in that in the step s2 further include: the credit card checks real-time Whether clock interrupt mark is set and when the real-time clock interrupt mark is set, resets the real-time clock interrupt Mark executes real-time clock interrupt processing;
The real-time clock interrupt processing includes: that the credit card updates timing time;
The acquisition dynamic security code factor specifically: the current time factor is obtained according to the timing time;
In the step s3 further include: be waken up when detecting real-time clock interrupt, into real-time clock interrupt process flow By real-time clock interrupt flag set, the real-time clock interrupt process flow, return step s2 are exited.
12. method as claimed in claim 6, which is characterized in that in the step s2 further include: the credit card inspection communication Whether interrupt identification is set and when the communication disruption mark is set, and resets the communication disruption mark, executes logical Believe interrupt processing;
The communication disruption processing includes: the credit card reception communication data, and according to the communication data card received Piece is individualized;
In the default interrupt processing further include: step a0, judge whether card personalization is completed, be, execute the step A1, otherwise the default interrupt processing is completed;
In the step s3 further include: it is waken up when detecting communication disruption, it will be in communication into communication disruption process flow Disconnected flag set, exits the communication disruption process flow, return step s2.
13. the method as described in claim 5 or 12, which is characterized in that the communication data that the basis receives carries out card It is individualized to specifically include: card personalization data are written into card according to the communication data received.
14. method as claimed in claim 13, which is characterized in that the card personalization data include: primary account number, card mistake Imitate date and service code sequence;
It is described to be specifically included according to the dynamic security code factor and the first data block of card personalization data generation: to be moved with described The state safety code factor replaces the data of the first preset length in the primary account number, obtains transformed primary account number, by the transformation Primary account number afterwards is sequentially connected with the card Expiration Date and the service code sequence, obtains clear data, to being stated clearly Literary data are filled to obtain the first data block.
15. method as described in claim 1 or 6, which is characterized in that it is described to first encryption of blocks of data, obtain first Data block ciphertext specifically includes:
Step a, first data block is grouped, obtains the first packet data and second packet data;
Step b, process key is obtained according to predetermined system parameter and predetermined encryption cipher key calculation;
Step c, round key is calculated according to the process key and default preset parameter;
Step d, first packet data is encrypted using the round key, the first packet data ciphertext is obtained, using described Round key obtains second packet data ciphertext to the second packet data encryption;
Step e, the first data block ciphertext is obtained according to the first packet data ciphertext and the second packet data ciphertext.
16. according to the method for claim 15, which is characterized in that the step b is specifically included: joining to the predetermined system Several and predetermined encryption key does XOR operation and obtains process key.
17. according to the method for claim 15, which is characterized in that the step c is specifically included: according to process key and in advance If preset parameter is iterated operation and obtains round key;Each iteration includes doing to corresponding process key and default preset parameter XOR operation replaces acquired results, and displacement the first preset value of result ring shift left position is obtained first circulation and moves to left number According to displacement the second preset value of result ring shift left position is obtained second circulation left shift date, is moved to left to displacement result, first circulation Data, second circulation left shift date do XOR operation, by acquired results and corresponding process key exclusive or.
18. according to the method for claim 15, which is characterized in that described to use the round key to first packet count It is specifically included according to encryption: operation is iterated according to the first packet data and round key;Each iteration includes to corresponding first Packet data and round key do XOR operation, replace to acquired results, will replace result ring shift left third preset value position Third ring shift left data are obtained, displacement the 4th preset value position of result ring shift left is obtained into the 4th ring shift left data, it is opposed It changes result, third ring shift left data, the 4th ring shift left data and does XOR operation, by acquired results and corresponding first grouping Data exclusive or.
19. according to the method for claim 15, which is characterized in that described to use the round key to the second packet number It is specifically included according to encryption: being iterated operation according to second packet data and round key;Each iteration includes to corresponding second Packet data and round key do XOR operation, replace to acquired results, will replace result ring shift left third preset value position Third ring shift left data are obtained, displacement the 4th preset value position of result ring shift left is obtained into the 4th ring shift left data, it is opposed It changes result, third ring shift left data, the 4th ring shift left data and does XOR operation, by acquired results and corresponding second packet Data exclusive or.
20. according to the method for claim 15, which is characterized in that the step e is specifically included: close to the first packet data The partial data of text and the partial data of second packet data ciphertext are arranged and are spliced, and the first data block ciphertext is obtained.
21. method as described in claim 1 or 6, which is characterized in that it is described to first encryption of blocks of data, obtain first Data block ciphertext specifically includes:
Step a', first data block is extended, obtains the first growth data;
Step b', the second growth data is obtained according to the word exclusive or in first growth data;
Step c', word register is initialized;
Step d', compression fortune is carried out according to the data in first growth data, second growth data and word register It calculates, updates the data in word register using operation result;
Step e', the data sequential concatenation in word register is obtained into the first data block ciphertext.
22. method as claimed in claim 21, which is characterized in that the step a' is specifically included: according to first data Block calculates growth data, and first data block and the growth data are spliced, the first growth data is obtained.
23. method as claimed in claim 21, which is characterized in that the step d' includes: according in corresponding word register Data and corresponding constant carry out plus operation, and acquired results ring shift left presetting digit capacity obtains the first intermediate data, according to described the Data in one intermediate data and corresponding word register carry out XOR operation and obtain the second intermediate data, according to corresponding word register In data, the corresponding word in second intermediate data and second growth data carries out plus operation obtains the 4th mediant According to according to the corresponding word progress in data, first intermediate data and first growth data in corresponding word register Operation is added to obtain the 6th intermediate data, according to the 4th intermediate data, the 6th intermediate data and corresponding word register In data update the data in each word register.
24. a kind of credit card of the enhancing without card payment transactions safety characterized by comprising
Module is powered on, is powered on for the credit card;
Initialization module carries out system initialization after powering on for the credit card;
First sleep block exits in default for suspend mode after credit card progress system initialization and the credit card Suspend mode after disconnected process flow;
First detection module when being used for the credit card suspend mode, detects default interrupt;
First wake-up module is waken up after detecting default interrupt for the credit card;
First interruption processing module enters default interrupt processing process and executes at default interruption after being waken up for the credit card Reason exits the default interrupt processing process when the default interrupt processing is completed;
First interruption processing module includes:
Acquiring unit, for obtaining the dynamic security code factor;
Storage unit is used for memory card personal data;
Generation unit, the dynamic security code factor and card stored in the storage unit for being obtained according to the acquiring unit Piece personal data generates the first data block;
Encryption unit, the first encryption of blocks of data for generating to the generation unit, obtains the first data block ciphertext;
Processing unit, for the first data block ciphertext that the encryption unit obtains is extracted, is converted and sequence processing, will The predetermined fraction of processing result is as the currently active credit card security code;
Display unit, for showing the currently active credit card security code;
The processing unit extracts institute specifically on the left of the first data block ciphertext for obtaining since the encryption unit It states all first data in the first data block ciphertext and obtains the first extraction data to the number between the second data, from described Start on the left of one data block ciphertext, extracts in the first data block ciphertext all third data to the number between the 4th data Word obtains the second extraction data;Each number in the second extraction data is replaced with to the difference of the number Yu the 5th data, Second after being converted extracts data;Second after the first extraction data and the conversion is extracted data sequence to spell It connects, obtains processing result.
25. credit card as claimed in claim 24, which is characterized in that the first detection module is specifically used for the credit When card suspend mode, real-time clock interrupt is detected;
First wake-up module, is waken up after detecting real-time clock interrupt specifically for the credit card;
First interruption processing module enters real-time clock interrupt process flow and holds after being waken up specifically for the credit card The processing of row real-time clock interrupt exits the real-time clock interrupt process flow when real-time clock interrupt processing is completed.
26. credit card as claimed in claim 25, which is characterized in that first interruption processing module further include: update single Member and judging unit;
The updating unit, for updating timing time;
The judging unit updates credit card security code for determining whether to;
The acquiring unit is specifically used for, according to the timing time when judging unit judgement will update credit card security code Obtain the current time factor.
27. credit card as claimed in claim 24, which is characterized in that the first detection module is specifically used for the credit When card suspend mode, keys interrupt is detected;
First wake-up module, is waken up after detecting keys interrupt specifically for the credit card;
First interruption processing module, after being waken up specifically for the credit card enter keys interrupt process flow execute by Key interrupt processing exits the keys interrupt process flow when keys interrupt processing is completed.
28. credit card as claimed in claim 27, which is characterized in that first interruption processing module further includes updating list Member;
The updating unit, for updating touch potential;
The acquiring unit is specifically used for obtaining the current event factor according to the touch potential.
29. credit card as claimed in claim 27, which is characterized in that the first detection module is also used to the credit card When suspend mode, real-time clock interrupt is detected;
First wake-up module is also used to be waken up after the credit card detects real-time clock interrupt;
First interruption processing module, be also used to the credit card detect enter when being waken up after real-time clock interrupt it is real-time Clock interrupt process flow executes real-time clock interrupt processing, when real-time clock interrupt processing is completed, exits the reality Shi Shizhong interrupt processing process;
First interruption processing module further includes real-time clock interrupt processing unit;
The real-time clock interrupt processing unit, for updating timing time;
The acquiring unit is specifically used for obtaining the current time factor according to the timing time.
30. credit card as claimed in claim 24, which is characterized in that the first detection module is also used to the credit card When suspend mode, communication disruption is detected;
First wake-up module is also used to be waken up after the credit card detects communication disruption;
First interruption processing module is also used to the credit card and detects enter communication disruption when being waken up after communication disruption Process flow executes communication disruption processing, when communication disruption processing is completed, exits the communication disruption process flow;
First interruption processing module further includes communication disruption processing unit and judging unit;
The communication disruption processing unit carries out card individual for receiving communication data, and according to the communication data received Change;
The judging unit, for judging whether card personalization is completed;
The acquiring unit, specifically for obtaining dynamic security code when the judging unit judges that card personalization is completed The factor.
31. credit card as claimed in claim 24, which is characterized in that further include: it checks module, is carried out for the credit card Checked after system initialization default interrupt identification whether be set and the credit card exit default interrupt processing process after examine Look into whether default interrupt identification is set;
First sleep block, the first detection module, first wake-up module and first interruption processing module It replaces respectively are as follows: the second sleep block, the second detection module, the second wake-up module and the second interruption processing module;
Second interruption processing module checks for the credit card and resets described preset when default interrupt identification is set Interrupt identification executes default interrupt processing;
Second sleep block, for suspend mode after the completion of interruption processing module processing;
Second detection module when being used for the credit card suspend mode, detects default interrupt;
Second wake-up module is waken up, into default interrupt processing stream when detecting default interrupt for the credit card Default interrupt identification set is exited default interrupt processing process by journey;
Second interruption processing module includes: the acquiring unit, the storage unit, the generation unit, the encryption Unit, the processing unit and the display unit.
32. credit card as claimed in claim 31, which is characterized in that the inspection module is sticked into specifically for the credit Check whether real-time clock interrupt mark is set and the credit card will be examined after interrupt identification set after row system initialization Look into real-time clock interrupt identification;
Second interruption processing module checks execution when real-time clock interrupt mark is set specifically for the credit card Real-time clock interrupt processing;
Second detection module when being specifically used for the credit card suspend mode, detects real-time clock interrupt;
Second wake-up module, is waken up when detecting real-time clock interrupt specifically for the credit card, into it is real-time when Real-time clock interrupt flag set is exited real-time clock interrupt process flow by clock interrupt processing process.
33. credit card as claimed in claim 32, which is characterized in that second interruption processing module further include: update single Member and judging unit;
The updating unit, for updating timing time;
The judging unit updates credit card security code for determining whether to;
The acquiring unit is specifically used for, according to the timing time when judging unit judgement will update credit card security code Obtain the current time factor.
34. credit card as claimed in claim 31, which is characterized in that the inspection module is sticked into specifically for the credit Check whether keys interrupt mark is set and the credit card will be checked after interrupt identification set and be pressed after row system initialization Key interrupt identification;
Second interruption processing module checks when keys interrupt mark is set specifically for the credit card and executes key Interrupt processing;
Second detection module when being specifically used for the credit card suspend mode, detects keys interrupt;
Second wake-up module, is waken up, at keys interrupt when detecting keys interrupt specifically for the credit card Process is managed by keys interrupt flag set, exits keys interrupt process flow.
35. credit card as claimed in claim 34, which is characterized in that second interruption processing module further includes updating list Member;
The updating unit, for updating touch potential;
The acquiring unit is specifically used for obtaining the current event factor according to the touch potential.
36. credit card as claimed in claim 34, which is characterized in that the inspection module is also used to the credit card and carries out Check whether real-time clock interrupt mark is set and the credit card will check after interrupt identification set after system initialization Whether real-time clock interrupt mark is set;
Second interruption processing module is also used to the credit card and checks when real-time clock interrupt mark is set reset institute Real-time clock interrupt mark is stated, real-time clock interrupt processing is executed;
Second detection module when being also used to the credit card suspend mode, detects real-time clock interrupt;
Second wake-up module is also used to be waken up when the credit card detects real-time clock interrupt, into real-time clock Real-time clock interrupt flag set is exited real-time clock interrupt process flow by interrupt processing process;
Second interruption processing module further include: real-time clock interrupt processing unit, for updating timing time;
The acquiring unit is specifically used for obtaining the current time factor according to the timing time.
37. credit card as claimed in claim 31, which is characterized in that the inspection module is also used to the credit card and carries out Check whether communication disruption mark is set and the credit card will be checked after interrupt identification set and be communicated after system initialization Whether interrupt identification is set;
Second interruption processing module, be also used to the credit card check resetted when communication disruption mark is set it is described logical Believe interrupt identification, executes communication disruption processing;
Second detection module when being also used to the credit card suspend mode, detects communication disruption;
Second wake-up module is also used to be waken up when the credit card detects communication disruption, into communication disruption processing Communication disruption flag set is exited communication disruption process flow by process;
Second interruption processing module further includes communication disruption processing unit and judging unit;
The communication disruption processing unit carries out card individual for receiving communication data, and according to the communication data received Change;
The judging unit, for judging whether card personalization is completed;
The acquiring unit, specifically for obtaining dynamic security code when the judging unit judges that card personalization is completed The factor.
38. the credit card as described in claim 30 or 37, which is characterized in that the communication disruption processing unit is specifically used for Communication data is received, and card personalization data are written into the storage unit according to the communication data received.
39. credit card as claimed in claim 38, which is characterized in that the communication disruption processing unit is specifically used for receiving Communication data, and primary account number, card Expiration Date and service are written into the storage unit according to the communication data received Code sequence;
The generation unit is replaced in the storage unit specifically for the dynamic security code factor obtained with the acquiring unit The data of first preset length in the primary account number of storage, obtain transformed primary account number, by the transformed primary account number and institute It states the card Expiration Date and the service code sequence is sequentially connected, obtain clear data, the clear data is filled Obtain the first data block.
40. the credit card as described in claim 24 or 31, which is characterized in that the encryption unit specifically includes:
It is grouped subelement and obtains the first packet data and second for being grouped to the first data block that generation unit generates Packet data;
First computation subunit, for obtaining process key according to predetermined system parameter and predetermined encryption cipher key calculation;
Second computation subunit, process key and default preset parameter for being obtained according to first computation subunit calculate Obtain round key;
Encryption sub-unit operable, round key for being obtained using second computation subunit grouping subelement is obtained the The encryption of one packet data, obtains the first packet data ciphertext, and the round key pair obtained using second computation subunit The second packet data encryption that the grouping subelement obtains, obtains second packet data ciphertext;
Obtain subelement, the first packet data ciphertext and second packet data ciphertext for obtaining according to the encryption sub-unit operable Obtain the first data block ciphertext.
41. credit card as claimed in claim 40, which is characterized in that first computation subunit is specifically used for default System parameter and predetermined encryption key do XOR operation and obtain process key.
42. credit card as claimed in claim 40, which is characterized in that second computation subunit is specifically used for according to institute It states process key that the first computation subunit obtains and default preset parameter is iterated operation and obtains round key;Each iteration packet It includes and XOR operation is done to corresponding process key and default preset parameter, acquired results are replaced, by displacement result circulation It moves to left the first preset value position and obtains first circulation left shift date, displacement the second preset value of result ring shift left position is obtained second and is followed Ring left shift date does XOR operation to displacement result, first circulation left shift date, second circulation left shift date, by acquired results With corresponding process key exclusive or.
43. credit card according to claim 40, which is characterized in that the encryption sub-unit operable is specifically used for according to The first packet data that the round key that second computation subunit obtains obtains the grouping subelement is iterated operation, obtains First packet data ciphertext;Each iteration includes doing XOR operation to corresponding first packet data and round key, to gained knot Fruit is replaced, and displacement result ring shift left third preset value position is obtained third ring shift left data, by displacement result circulation It moves to left the 4th preset value position and obtains the 4th ring shift left data, to displacement result, third ring shift left data, the 4th ring shift left Data do XOR operation, by acquired results and corresponding first packet data exclusive or.
44. credit card according to claim 40, which is characterized in that the encryption sub-unit operable is specifically used for according to The second packet data that the round key that second computation subunit obtains obtains the grouping subelement are iterated operation, obtain Second packet data ciphertext;Each iteration includes doing XOR operation to corresponding second packet data and round key, to gained knot Fruit is replaced, and displacement result ring shift left third preset value position is obtained the 5th ring shift left data, by displacement result circulation It moves to left the 4th preset value position and obtains the 6th ring shift left data, to displacement result, the 5th ring shift left data, the 6th ring shift left Data do XOR operation, by acquired results and corresponding second packet data exclusive or.
45. credit card according to claim 40, which is characterized in that the acquisition subelement is specifically used for adding to described The second packet data that the partial data for the first packet data ciphertext that close subelement obtains and the encryption sub-unit operable obtain are close The partial data of text is arranged and is spliced, and the first data block ciphertext is obtained.
46. the credit card as described in claim 24 or 30, which is characterized in that the encryption unit specifically includes:
First extension subelement obtains the first growth data for being extended to the first data block that generation unit generates;
Second extension subelement, the word exclusive or in the first growth data for being obtained according to the first extension subelement obtain Second growth data;
Subelement is initialized, for initializing word register;
Subelement is compressed, the first growth data, the second extension for obtaining according to the first extension subelement are single Data in the second growth data and word register that member obtains carry out compaction algorithms, are updated in word register using operation result Data;
Splice subelement, for the data sequential concatenation in word register to be obtained the first data block ciphertext.
47. credit card as claimed in claim 46, which is characterized in that the first extension subelement is specifically used for: according to life Calculate growth data at the first data block that unit generates, will first data block and growth data splicing, obtain the One growth data.
48. credit card as claimed in claim 46, which is characterized in that the compression subelement is specifically used for: according to corresponding word Data and corresponding constant in register carry out plus operation, and acquired results ring shift left presetting digit capacity obtains the first intermediate data, XOR operation is carried out according to the data in first intermediate data and corresponding word register and obtains the second intermediate data, according to phase In the second growth data for answering the data in word register, second intermediate data and the second extension subelement to obtain Corresponding word carries out plus operation obtains the 4th intermediate data, according in corresponding word register data, first intermediate data and The corresponding word in the first growth data that the first extension subelement obtains carries out plus operation obtains the 6th intermediate data, according to Data in 4th intermediate data, the 6th intermediate data and corresponding word register update in each word register Data.
CN201711486563.6A 2017-12-29 2017-12-29 A kind of method and credit card of the enhancing without card payment transactions safety Active CN108053213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711486563.6A CN108053213B (en) 2017-12-29 2017-12-29 A kind of method and credit card of the enhancing without card payment transactions safety

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711486563.6A CN108053213B (en) 2017-12-29 2017-12-29 A kind of method and credit card of the enhancing without card payment transactions safety

Publications (2)

Publication Number Publication Date
CN108053213A CN108053213A (en) 2018-05-18
CN108053213B true CN108053213B (en) 2019-04-12

Family

ID=62129709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711486563.6A Active CN108053213B (en) 2017-12-29 2017-12-29 A kind of method and credit card of the enhancing without card payment transactions safety

Country Status (1)

Country Link
CN (1) CN108053213B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110768784B (en) * 2019-10-22 2023-07-18 广州酷旅旅行社有限公司 Password transmission method, device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188079A (en) * 2011-12-29 2013-07-03 智慧光科技股份有限公司 Dynamic safety code authentication method and intelligent card device thereof
CN103312517A (en) * 2013-06-28 2013-09-18 飞天诚信科技股份有限公司 Implementation method for sharing display screens and keys in dual-purpose equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761374B2 (en) * 2003-08-18 2010-07-20 Visa International Service Association Method and system for generating a dynamic verification value
US9251637B2 (en) * 2006-11-15 2016-02-02 Bank Of America Corporation Method and apparatus for using at least a portion of a one-time password as a dynamic card verification value

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188079A (en) * 2011-12-29 2013-07-03 智慧光科技股份有限公司 Dynamic safety code authentication method and intelligent card device thereof
CN103312517A (en) * 2013-06-28 2013-09-18 飞天诚信科技股份有限公司 Implementation method for sharing display screens and keys in dual-purpose equipment

Also Published As

Publication number Publication date
CN108053213A (en) 2018-05-18

Similar Documents

Publication Publication Date Title
CN101632086B (en) Authentication device and method
US8511547B2 (en) Methods and systems for two-factor authentication using contactless chip cards or devices and mobile devices or dedicated personal readers
CN100492966C (en) Identity certifying system based on intelligent card and dynamic coding
EP0904581B1 (en) System and method of cryptographically protecting communications
CN101123454B (en) Data transmission method and system for mobile phone bank union card based on Bluetooth technology
CN106411506A (en) Key derivation method and device applicable to digital currency
CN104488219B (en) Method and system for being securely communicated between RFID tag and reading equipment
CN106411498B (en) A method of realizing national secret algorithm
CN103201758A (en) Method of performing a financial transaction via unsecured public telecommunication infrastructure and an apparatus for same
CN107181797A (en) The block compression method and system of a kind of block chain
BRPI0813326B1 (en) METHOD FOR DAMAGING AN ACCOUNT IDENTIFIER, MEDIA READABLE BY COMPUTER, SMART CARD, METHOD FOR DECRYPTING A DAMNED ACCOUNT IDENTIFIER, AND, SERVER COMPUTER
CN106972918B (en) Electronic coding data generation method, device and verification method
CN104504567B (en) A kind of recharge method and device of small amount payment card
CN109450640A (en) Two side&#39;s endorsement methods and system based on SM2
CN108053213B (en) A kind of method and credit card of the enhancing without card payment transactions safety
CN110288477A (en) A kind of block chain transaction data processing method and relevant device
CN104715365A (en) Method for achieving E-wallet load credit over air based on Bluetooth transmission channel
CA2864494A1 (en) Matrix obtaining method, character display device and system and electronic signature tool
CN102739406B (en) Method for securely transmitting equipment information
EP1297501B1 (en) Access control to data processing means
CN107527084A (en) Electronic card processing method and processing device
CN108234110B (en) Credit card and its working method
CN103345683A (en) Off-line recharging method and system based on electronic wallet
CN112104449B (en) SDK for Hash algorithm
CN103747158A (en) Recharging method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant