CN110348860A - Anti-counterfeiting authentication method and device for two-dimensional code of ephedrine drugs - Google Patents
Anti-counterfeiting authentication method and device for two-dimensional code of ephedrine drugs Download PDFInfo
- Publication number
- CN110348860A CN110348860A CN201910527405.3A CN201910527405A CN110348860A CN 110348860 A CN110348860 A CN 110348860A CN 201910527405 A CN201910527405 A CN 201910527405A CN 110348860 A CN110348860 A CN 110348860A
- Authority
- CN
- China
- Prior art keywords
- dimension code
- code label
- dimensional code
- random number
- label
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 239000003814 drug Substances 0.000 title claims abstract description 55
- 229940079593 drug Drugs 0.000 title claims abstract description 52
- KWGRBVOPPLSCSI-WPRPVWTQSA-N (-)-ephedrine Chemical compound CN[C@@H](C)[C@H](O)C1=CC=CC=C1 KWGRBVOPPLSCSI-WPRPVWTQSA-N 0.000 title abstract 4
- KWGRBVOPPLSCSI-UHFFFAOYSA-N d-ephedrine Natural products CNC(C)C(O)C1=CC=CC=C1 KWGRBVOPPLSCSI-UHFFFAOYSA-N 0.000 title abstract 2
- 229960002179 ephedrine Drugs 0.000 title abstract 2
- 238000004364 calculation method Methods 0.000 claims abstract 2
- 239000000835 fiber Substances 0.000 claims description 31
- 238000013475 authorization Methods 0.000 claims description 25
- 230000015654 memory Effects 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 8
- 230000005540 biological transmission Effects 0.000 claims description 5
- 229910002056 binary alloy Inorganic materials 0.000 claims description 3
- 238000007493 shaping process Methods 0.000 claims description 3
- 238000000151 deposition Methods 0.000 claims 1
- 230000000506 psychotropic effect Effects 0.000 abstract description 3
- 230000007547 defect Effects 0.000 abstract description 2
- 230000003533 narcotic effect Effects 0.000 abstract 2
- 230000006870 function Effects 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000004081 narcotic agent Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001671 psychotherapy Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/06009—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
- G06K19/06037—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
- G06K7/1417—2D bar codes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q30/00—Commerce
- G06Q30/018—Certifying business or products
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Accounting & Taxation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Electromagnetism (AREA)
- Toxicology (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Finance (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a two-dimensional code anti-counterfeiting authentication method and a device for a ephedrine drug, aiming at the defects of the two-dimensional code label anti-counterfeiting authentication method in the prior art, a database of a back-end server of the authentication method stores the related information of the two-dimensional code label; the two-dimensional code decoder is provided with a pseudo-random number generator PRNG and can perform Hash calculation and exclusive OR (XOR) logic operation. The legal label is prevented from being reused in the circulation process, the legality of the medicine can be completely guaranteed, the prescription management of narcotic medicines and psychotropic medicines of medical institutions is enhanced, the normal medical requirements of patients are guaranteed, the narcotic medicines and the psychotropic medicines are prevented from flowing into illegal channels, the medicine tracing can be realized in the logistics, storage and prescription issuing processes, and the anti-counterfeiting tracing of the medicines or the prescription can be realized.
Description
Technical field
The invention belongs to medical information field of anti-counterfeit technology, be related to a kind of smart similar drug two-dimension code anti-counterfeit authentication method of fiber crops and
Device.
Background technique
HIS system (carrying out the computer application system of information management and on-line operation in hospital management and curative activity)
In, in central pharmacy system or other relevant system modules by scanning the two dimensional code on prescription, when, it is written on label
Medicine mark represents the proof of identification of drug, by utilizing the way such as internet, mobile radio communication, telecommunications network after list entries number
Diameter and anti-fake central database store information comparison, to judge authenticity of medicament.For digital code anti-false, identity sequence number is can
The problem of seeing, and being reused there is legitimate tag results in the safety of sequence number on two dimensional code can not in this way
Guarantee, in product, these anti-counterfeiting technology means can not all be made and timely respond when something goes wrong, and there is also identification authentication efficiencies
Low problem.Requirement of the recognition of two-dimensional bar code mark label to environment is very high, and be unfavorable for legal drug in this way has information collection,
And one-to-one reading manner, reading efficiency is too low, to drug is traced to the source and identifies that for certification be fatal defect.
Summary of the invention
To solve the above problems, the disclosure provides a kind of smart similar drug two-dimension code anti-counterfeit authentication method of fiber crops and device, for
The shortcoming of the anti-fake certificate authentication method of two-dimension code label present in existing method, the back-end server of authentication method
The relevant information of database purchase two-dimension code label;Enable two-dimensional code decoder that there is a pseudorandom number generator PRNG, and energy
It executes Hash to calculate, ⊕ exclusive or (XOR) logical operation.Assuming that wired connection between two-dimensional code decoder and back-end data base, leads to
Letter be it is safe, the system or device that method is related to include but is not limited to two-dimension code label, database, two-dimensional code decoder.
To achieve the goals above, according to the one side of the disclosure, a kind of smart similar drug two-dimension code anti-counterfeit certification of fiber crops is provided
Method the described method comprises the following steps:
Step 1, two-dimension code label is initialized in the database;
Step 2, two-dimensional code decoder generates random number;
Step 3, two-dimension code label is read by random number and sends query messages certification request to database;
Step 4, authorization access message and two-dimension code label relevant information are transferred to two dimensional code decoding after certification request passes through
Device;
Step 5, two-dimensional code decoder according to authorization access message and two-dimension code label relevant information to two-dimension code label into
Row verifying.
Further, in step 1, method two-dimension code label initialized in the database are as follows: in database
The two-dimension code label relevant information for being stored with each two-dimension code label is [oldIDi,oldTIDi,newIDi,newTIDi], initially
In the case of distribute to oldIDiWith oldTIDiInitial value, and newIDiAnd newTIDiValue be sky, and with each legal two
It ties up code label and shares a key k, two-dimension code label Ti(Tag) TID is stored ini=hk(IDi), the vacation as two-dimension code label
Name, wherein oldIDi、oldTIDi、newIDi、newTIDiFor character string forms or the unique number of shaping.
Further, in step 2, the method that two-dimensional code decoder generates random number are as follows: two-dimensional code decoder is according to right
Two dimensional code is decoded TiGenerate 16bit binary system random number Rt, generate and calculate random number
By random number M1,Rt, RrIt is sent to database.
Further, in step 3, two-dimension code label is read by random number and sends query messages certification to database
The method of request are as follows: [oldID of the database from storagei,oldTIDi,newIDi,newTIDi] in select oldTIDi, calculateJudge M1==M', it is such as equal, then it identifies and authenticates Ti;If without matched, from
NewTID is selected in memory spacei, calculateStill judge M1==M ", it is equal, it authenticates
Success continues next step, if differed, sends authentication failure message to R, and terminate session.
Further, in step 4, authorization access message and the transmission of two-dimension code label relevant information after certification request passes through
To the method for two-dimensional code decoder are as follows:
Database calculatesOrSend authorization access message and two-dimension code label
Relevant information is to two-dimensional code decoder, and by M2It is sent to two-dimensional code decoder through R, then authenticates successful oldID with thisi
(or newIDi) and oldTIDi(or newTIDi) value covering oldIDiAnd oldTIDi, then calculate
Covered newIDi, calculate hk=(newIDi) covering newTIDi。
Further, in steps of 5, two-dimensional code decoder is according to authorization access message and two-dimension code label relevant information pair
The method that two-dimension code label is verified are as follows: two-dimensional code decoder is by M2It is sent to Ti, TiBy M2With RtXOR logic operation is carried out,
Obtain IDi', and judge hk(IDi')==TIDi, identical, then two-dimension code label certification R success willIt covers
Cover TIDi;If not identical, then authentication failed, two-dimension code label keep current TIDiIt is worth constant.
Wherein, each parameter and symbolic interpretation being related to are as follows:
Query: the certification request that two-dimensional code decoder is sent to two-dimension code label.
Rr: the random number for the 16bit that two-dimensional code decoder generates.
Rt: the 16bit random number being had in two-dimension code label.
IDi: server is the binary number of the 64bit of each two-dimension code label distribution, is uniquely marked as two-dimension code label
Know symbol.
TIDi: IDiHash value, the assumed name as two-dimension code label.
oldIDi: the specified ID of last time certificationiValue.
Whether==: compares the two equal.
The present invention also provides a kind of smart similar drug two-dimension code anti-counterfeit authentication device of fiber crops, described device includes: memory, place
The computer program managing device and storage in the memory and can running on the processor, the processor execute institute
Computer program is stated to operate in the unit of following device:
Two dimensional code initialization unit, for initializing two-dimension code label in the database;
Random number generation unit generates random number for two-dimensional code decoder;
Two-dimension code label reading unit, for reading two-dimension code label by random number and sending query messages to database
Certification request;
Authorization message transmission unit, authorization access message and two-dimension code label relevant information pass after passing through for certification request
It is defeated to arrive two-dimensional code decoder;
Two dimensional code decodes authentication unit, for two-dimensional code decoder according to authorization access message letter related to two-dimension code label
Breath verifies two-dimension code label.
The disclosure has the beneficial effect that the present invention provides a kind of smart similar drug two-dimension code anti-counterfeit authentication method of fiber crops and device,
For HIS system after the two dimensional code for reading prescription, authorization is carried out after access control method judges could obtain numb smart similar drug
Permission, system will record the status information of drug, even if criminal got after drug is taken away legitimate tag also without
Drug can be completely secured so preventing legitimate tag to be reused in the circulation process by the anti-fake certificate of system in method
Legitimacy, add Liao Qiang medical institutions narcotics, prescriptions of psychotherapy management, ensure that patient's normal medical demand, resist
Narcotics, psychotropic substances flow into illegal channels, and encryption is accompanied on drug or prescription list by reading equipment reading
Information comparison, which has been stored, with database after the two-dimensional bar code acquisition drug of information or the identity information of prescription list differentiates drug or place
The true and false of Fang Dan, at the same logistics, store in a warehouse, write a prescription during drug may be implemented trace to the source, drug or prescription list may be implemented
Anti-fake trace to the source.
Detailed description of the invention
By the way that the embodiment in conjunction with shown by attached drawing is described in detail, above-mentioned and other features of the disclosure will
More obvious, identical reference label indicates the same or similar element in disclosure attached drawing, it should be apparent that, it is described below
Attached drawing be only some embodiments of the present disclosure, for those of ordinary skill in the art, do not making the creative labor
Under the premise of, it is also possible to obtain other drawings based on these drawings, in the accompanying drawings:
Fig. 1 show a kind of the step of fiber crops essence similar drug two-dimension code anti-counterfeit authentication method figure;
Fig. 2 show a kind of flow chart of smart similar drug two-dimension code anti-counterfeit authentication method of fiber crops;
Fig. 3 show a kind of smart similar drug two-dimension code anti-counterfeit authentication device figure of fiber crops.
Specific embodiment
It is carried out below with reference to technical effect of the embodiment and attached drawing to the design of the disclosure, specific structure and generation clear
Chu, complete description, to be completely understood by the purpose, scheme and effect of the disclosure.It should be noted that the case where not conflicting
Under, the features in the embodiments and the embodiments of the present application can be combined with each other.
As shown in Figure 1 to be schemed according to a kind of the step of fiber crops essence similar drug two-dimension code anti-counterfeit authentication method of the disclosure, Fig. 2 institute
It is shown as a kind of flow chart of smart similar drug two-dimension code anti-counterfeit authentication method of fiber crops, is illustrated below with reference to Fig. 1 and Fig. 2 according to the disclosure
Embodiment a kind of smart similar drug two-dimension code anti-counterfeit authentication method of fiber crops.
The disclosure proposes a kind of smart similar drug two-dimension code anti-counterfeit authentication method of fiber crops, specifically includes the following steps:
Step 1, two-dimension code label is initialized in the database;
Step 2, two-dimensional code decoder generates random number;
Step 3, two-dimension code label is read by random number and sends query messages certification request to database;
Step 4, authorization access message and two-dimension code label relevant information are transferred to two dimensional code decoding after certification request passes through
Device;
Step 5, two-dimensional code decoder according to authorization access message and two-dimension code label relevant information to two-dimension code label into
Row verifying.
Further, in step 1, method two-dimension code label initialized in the database are as follows: in database
The two-dimension code label relevant information for being stored with each two-dimension code label is [oldIDi,oldTIDi,newIDi,newTIDi], initially
In the case of distribute to oldIDiWith oldTIDiInitial value, and newIDiAnd newTIDiValue be sky, and with each legal two
It ties up code label and shares a key k, two-dimension code label Ti(Tag) TID is stored ini=hk(IDi), the vacation as two-dimension code label
Name, wherein oldIDi、oldTIDi、newIDi、newTIDiFor character string forms or the unique number of shaping.
Further, in step 2, the method that two-dimensional code decoder generates random number are as follows: two-dimensional code decoder is according to right
Two dimensional code is decoded TiGenerate 16bit binary system random number Rt, generate and calculate random number
By random number M1,Rt, RrIt is sent to database.
Further, in step 3, two-dimension code label is read by random number and sends query messages certification to database
The method of request are as follows: [oldID of the database from storagei,oldTIDi,newIDi,newTIDi] in select oldTIDi, calculateJudge M1==M', it is such as equal, then it identifies and authenticates Ti;If without matched, from
NewTID is selected in memory spacei, calculateStill judge M1==M ", it is equal, it authenticates
Success continues next step, if differed, sends authentication failure message to R, and terminate session.
Further, in step 4, authorization access message and the transmission of two-dimension code label relevant information after certification request passes through
To the method for two-dimensional code decoder are as follows:
Database calculatesOrSend authorization access message and two-dimension code label
Relevant information is to two-dimensional code decoder, and by M2It is sent to two-dimensional code decoder through R, then authenticates successful oldID with thisi
(or newIDi) and oldTIDi(or newTIDi) value covering oldIDiAnd oldTIDi, then calculateCovered newIDi, calculate hk=(newIDi) covering newTIDi。
Further, in steps of 5, two-dimensional code decoder is according to authorization access message and two-dimension code label relevant information pair
The method that two-dimension code label is verified are as follows: two-dimensional code decoder is by M2It is sent to Ti, TiBy M2With RtXOR logic operation is carried out,
Obtain IDi', and judge hk(IDi')==TIDi, identical, then two-dimension code label certification R success willIt covers
Cover TIDi;If not identical, then authentication failed, two-dimension code label keep current TIDiIt is worth constant.
Each parameter and symbolic interpretation being directed to are as follows:
Query: the certification request that two-dimensional code decoder is sent to two-dimension code label.
Rr: the random number for the 16bit that two-dimensional code decoder generates.
Rt: the 16bit random number being had in two-dimension code label.
IDi: server is the binary number of the 64bit of each two-dimension code label distribution, is uniquely marked as two-dimension code label
Know symbol.
TIDi: IDiHash value, the assumed name as two-dimension code label.
oldIDi: the specified ID of last time certificationiValue.
Whether==: compares the two equal.
In the embodiment of the present invention verification process, two-dimension code label is considered as main body A, reader is with background server
B.Due in authentication method, IDiFor the unique identifier of each two-dimension code label, so, in DRHA Verification System, TIDi
It is considered as the authentication book of main body A, IDiBased on B authentication book.
When carrying out BAN formalization of logic, key is generated and authentication process itself part is omitted and abstract, only retain with
The directly related logical gate of safety analysis, the formalization representation of authentication method are as follows:
Message 1:A → B:Na,Nb,{Na,Nb,TIDi}k
Message 2:B → A:{ Na,IDi}k
Security target:
(1)B|≡TIDi;(2)A|≡IDi;
Original hypothesis:
P1:P2:P3:B | ≡ # (Nb);P4:A | ≡ # (Na);
P5:P6:
The BAN logic analysis step of authentication method:
WhenNb, { Na,Nb,TIDi}kWhen, by original hypothesis P1 and message meaning rule:(wherein S be k), can reasoning obtain: B | ≡ A | → TIDi。
By original hypothesis P3:B | ≡ # (Nb) and the fresh rule of messageCan obtain: B | ≡ # (TIDi)。
By random number verification ruleCan obtain: B | ≡ A | ≡ # (TIDi)。
By original hypothesisIt is regular with administration:It can derive conclusion: B |
≡TIDi。
WhenWhen, similarly, can release: A | ≡ IDi。
By carrying out the analysis of BAN formalization of logic to authentication method proposed in this paper above, the peace to be realized can be derived
Full target B | ≡ TIDiAnd A | ≡ IDi, therefore, BAN logic analysis the results show that authentication method authentication section, can be effective
Realize the security target of the two-way legal identity certification between two-dimensional code decoder and two-dimension code label.
It should be noted that this example of BAN formalization of logic analysis herein is to help those skilled in the art preferably
Understand the embodiment of the present invention, and the range of the embodiment of the present invention have to be limited.Those skilled in the art patrol according to given BAN
Collect the example of formalization analysis, it is clear that the modification or variation of various equivalences can be carried out, such modification or variation also fall into this
Invention is implemented.
Wherein, BAN logic includes three kinds of process objects, main body, key, sentence.P and Q indicates that main body variable, A and B indicate
General subject, S indicate that shared secret variable, X indicate sentence variable, NaAnd NbIndicate nonce.
In the range of example.BAN logical expression is described as follows:
P | ≡ X:P judges that X is true.
P received the information comprising X.
P | → X: main body P, at the past a certain moment, was once transmitted across the information comprising X.
The permission of P is higher than X, and can directly administer X.
# (X): X is new sentence variable.
Pass through the shared secret information of key S between P and Q.
{X}S: X is encrypted by key S.
BAN logic has a plurality of logic rules, wherein the logic rules that the present invention uses are as follows:
(1) message meaning rule:
(2) random number verification rule:
(3) administration rule:
(4) the fresh rule of message:
The smart similar drug two-dimension code anti-counterfeit authentication device of a kind of fiber crops that embodiment of the disclosure provides, is illustrated in figure 3 this public affairs
The smart similar drug two-dimension code anti-counterfeit authentication device figure of a kind of fiber crops opened, a kind of smart similar drug two-dimension code anti-counterfeit certification of fiber crops of the embodiment
Device include: processor, memory and storage in the memory and the computer journey that can run on the processor
Sequence, the processor realize that a kind of above-mentioned smart similar drug two-dimension code anti-counterfeit authentication device of fiber crops is implemented when executing the computer program
Step in example.
Described device includes: memory, processor and storage in the memory and can transport on the processor
Capable computer program, the processor execute the computer program and operate in the unit of following device:
Two dimensional code initialization unit, for initializing two-dimension code label in the database;
Random number generation unit generates random number for two-dimensional code decoder;
Two-dimension code label reading unit, for reading two-dimension code label by random number and sending query messages to database
Certification request;
Authorization message transmission unit, authorization access message and two-dimension code label relevant information pass after passing through for certification request
It is defeated to arrive two-dimensional code decoder;
Two dimensional code decodes authentication unit, for two-dimensional code decoder according to authorization access message letter related to two-dimension code label
Breath verifies two-dimension code label.
The smart similar drug two-dimension code anti-counterfeit authentication device of a kind of fiber crops can run on desktop PC, notebook, the palm
Upper computer and cloud server etc. calculate in equipment.The smart similar drug two-dimension code anti-counterfeit authentication device of a kind of fiber crops, can run
Device may include, but be not limited only to, processor, memory.It will be understood by those skilled in the art that the example is only one kind
The example of numb essence similar drug two-dimension code anti-counterfeit authentication device is not constituted to a kind of smart similar drug two-dimension code anti-counterfeit authentication device of fiber crops
Restriction, may include component more more or fewer than example, perhaps combine certain components or different components, such as institute
Stating a kind of smart similar drug two-dimension code anti-counterfeit authentication device of fiber crops can also include input-output equipment, network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
It is a kind of control centre of the smart similar drug two-dimension code anti-counterfeit authentication device running gear of fiber crops Deng, the processor, using each
Kind of interface and a kind of entire smart similar drug two-dimension code anti-counterfeit authentication device of fiber crops of connection can running gear various pieces.
The memory can be used for storing the computer program and/or module, and the processor is by operation or executes
Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization
A kind of various functions of the smart similar drug two-dimension code anti-counterfeit authentication device of fiber crops.The memory can mainly include storing program area and deposit
Store up data field, wherein storing program area can application program needed for storage program area, at least one function (for example sound is broadcast
Playing function, image player function etc.) etc.;Storage data area, which can be stored, uses created data (such as audio according to mobile phone
Data, phone directory etc.) etc..In addition, memory may include high-speed random access memory, it can also include non-volatile memories
Device, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other volatibility are solid
State memory device.
Although the description of the disclosure is quite detailed and especially several embodiments are described, it is not
Any of these details or embodiment or any specific embodiments are intended to be limited to, but should be considered as is by reference to appended
A possibility that claim provides broad sense in view of the prior art for these claims explanation, to effectively cover the disclosure
Preset range.In addition, the disclosure is described with inventor's foreseeable embodiment above, its purpose is to be provided with
Description, and those equivalent modifications that the disclosure can be still represented to the unsubstantiality change of the disclosure still unforeseen at present.
Claims (7)
1. a kind of smart similar drug two-dimension code anti-counterfeit authentication method of fiber crops, which is characterized in that the described method comprises the following steps:
Step 1, two-dimension code label is initialized in the database;
Step 2, two-dimensional code decoder generates random number;
Step 3, two-dimension code label is read by random number and sends query messages certification request to database;
Step 4, authorization access message and two-dimension code label relevant information are transferred to two-dimensional code decoder after certification request passes through;
Step 5, two-dimensional code decoder tests two-dimension code label according to authorization access message and two-dimension code label relevant information
Card.
2. the smart similar drug two-dimension code anti-counterfeit authentication method of a kind of fiber crops according to claim 1, which is characterized in that in step 1
In, method that two-dimension code label is initialized in the database are as follows: the two of each two-dimension code label are stored in database
Dimension code label relevant information is [oldIDi,oldTIDi,newIDi,newTIDi], oldID is distributed under initial situationiWith
oldTIDiInitial value, and newIDiAnd newTIDiValue be sky, and with each legal two-dimension code label share a key
K, two-dimension code label Ti(Tag) TID is stored ini=hk(IDi), the assumed name as two-dimension code label, wherein oldIDi、
oldTIDi、newIDi、newTIDiFor character string forms or the unique number of shaping.
3. the smart similar drug two-dimension code anti-counterfeit authentication method of a kind of fiber crops according to claim 2, which is characterized in that in step 2
In, the method for two-dimensional code decoder generation random number are as follows: two-dimensional code decoder is decoded T according to two dimensional codeiGenerate 16bit
Binary system random number Rt, generate and calculate random numberBy random number M1,Rt, RrIt is sent to data
Library.
4. the smart similar drug two-dimension code anti-counterfeit authentication method of a kind of fiber crops according to claim 3, which is characterized in that in step 3
In, two-dimension code label is read by random number and sends method from query messages certification request to database are as follows: database is from depositing
[the oldID of storagei,oldTIDi,newIDi,newTIDi] in select oldTIDi, calculateSentence
Disconnected M1==M', it is such as equal, then it identifies and authenticates Ti;If selecting newTID from memory space without matchedi, calculateStill judge M1==M ", it is equal, success is authenticated, next step is continued, if differed,
Authentication failure message is sent to R, and terminates session.
5. the smart similar drug two-dimension code anti-counterfeit authentication method of a kind of fiber crops according to claim 4, which is characterized in that in step 4
In, authorization accesses the method that message and two-dimension code label relevant information are transferred to two-dimensional code decoder after certification request passes through are as follows:
Database calculatesOrSend authorization access message letter related to two-dimension code label
It ceases to two-dimensional code decoder, and by M2It is sent to two-dimensional code decoder through R, then authenticates successful oldID with thisi(or
newIDi) and oldTIDi(or newTIDi) value covering oldIDiAnd oldTIDi, then calculateIt will
It covers newIDi, calculate hk=(newIDi) covering newTIDi。
6. the smart similar drug two-dimension code anti-counterfeit authentication method of a kind of fiber crops according to claim 5, which is characterized in that in step 5
In, two-dimensional code decoder accesses the method that message and two-dimension code label relevant information verify two-dimension code label according to authorization
Are as follows: two-dimensional code decoder is by M2It is sent to Ti, TiBy M2With RtXOR logic operation is carried out, ID is obtainedi', and judge hk(IDi')=
=TIDi, identical, then two-dimension code label certification R success willCover TIDi;If not identical, then mistake is verified
It loses, two-dimension code label keeps current TIDiIt is worth constant.
7. a kind of smart similar drug two-dimension code anti-counterfeit authentication device of fiber crops, which is characterized in that described device includes: memory, processor
And the computer program that can be run in the memory and on the processor is stored, the processor executes the meter
Calculation machine program operates in the unit of following device:
Two dimensional code initialization unit, for initializing two-dimension code label in the database;
Random number generation unit generates random number for two-dimensional code decoder;
Two-dimension code label reading unit, for reading two-dimension code label by random number and sending query messages certification to database
Request;
Authorization message transmission unit, authorization access message and two-dimension code label relevant information are transferred to after passing through for certification request
Two-dimensional code decoder;
Two dimensional code decodes authentication unit, for two-dimensional code decoder according to authorization access message and two-dimension code label relevant information pair
Two-dimension code label is verified.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910527405.3A CN110348860A (en) | 2019-06-18 | 2019-06-18 | Anti-counterfeiting authentication method and device for two-dimensional code of ephedrine drugs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910527405.3A CN110348860A (en) | 2019-06-18 | 2019-06-18 | Anti-counterfeiting authentication method and device for two-dimensional code of ephedrine drugs |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110348860A true CN110348860A (en) | 2019-10-18 |
Family
ID=68182271
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910527405.3A Pending CN110348860A (en) | 2019-06-18 | 2019-06-18 | Anti-counterfeiting authentication method and device for two-dimensional code of ephedrine drugs |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110348860A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106209768A (en) * | 2016-06-20 | 2016-12-07 | 广东工业大学 | A kind of extendible RFID mutual authentication method |
CN107316073A (en) * | 2017-07-18 | 2017-11-03 | 安徽安普信息技术有限公司 | A kind of application process of variable two-dimension code in anti-drug counterfeiting is traced to the source |
-
2019
- 2019-06-18 CN CN201910527405.3A patent/CN110348860A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106209768A (en) * | 2016-06-20 | 2016-12-07 | 广东工业大学 | A kind of extendible RFID mutual authentication method |
CN107316073A (en) * | 2017-07-18 | 2017-11-03 | 安徽安普信息技术有限公司 | A kind of application process of variable two-dimension code in anti-drug counterfeiting is traced to the source |
Non-Patent Citations (1)
Title |
---|
张素智等: ""基于动态更新ID的RFID安全认证协议研究"", 《郑州轻工业学院学报(自然科学版)》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11645632B2 (en) | System and method for a decentralized portable information container supporting privacy protected digital information credentialing, remote administration, local validation, access control and remote instruction signaling utilizing blockchain distributed ledger and container wallet technologies | |
KR101226651B1 (en) | User authentication method based on the utilization of biometric identification techniques and related architecture | |
CN101488856B (en) | System and method for digital signatures and authentication | |
US20060101047A1 (en) | Method and system for fortifying software | |
US20070286465A1 (en) | Method, system and program for authenticating a user by biometric information | |
US20080214312A1 (en) | Security System For Authenticating Gaming Chips | |
CN108134791A (en) | A kind of data center's total management system login validation method | |
KR101182086B1 (en) | Electronic prescription control management system, hospital device and method thereof | |
US20220405765A1 (en) | Know your customer (kyc) and anti-money laundering (aml) verification in a multi-decentralized private blockchains network | |
WO2022020384A1 (en) | Secure storage techniques utilizing consortium distributed ledgers | |
CN109067706A (en) | Lightweight RFID method for secret protection, wireless communication system under scenes of internet of things | |
CN1655505A (en) | Bank cashier safety system and method | |
EP4285545A1 (en) | Authenticated modification of blockchain-based data | |
Ajao et al. | Application of crypto-blockchain technology for securing electronic voting systems | |
CN101655893B (en) | Manufacture method of intelligent blog lock, Blog access control method and system thereof | |
JP2005293490A (en) | Biometrics system | |
JP4612951B2 (en) | Method and apparatus for securely distributing authentication credentials to roaming users | |
CN110348860A (en) | Anti-counterfeiting authentication method and device for two-dimensional code of ephedrine drugs | |
Srinivas et al. | Lightweight security protocols for blockchain technology | |
Zhao et al. | Feasibility of deploying biometric encryption in mobile cloud computing | |
WO2023036143A1 (en) | Decentralized zero-trust identity verification and authentication system and method | |
Quincozes et al. | A secure architecture based on ubiquitous computing for medical records retrieval | |
CN114049970A (en) | Medication management method and system based on multi-terminal data sharing | |
Kotian et al. | Covid-19 Verification and Supply Chain Management | |
CN110364237A (en) | Electronic prescription tamper-proof 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191018 |