[go: up one dir, main page]

CN109905395A - A kind of believable method of verifying client and relevant apparatus - Google Patents

A kind of believable method of verifying client and relevant apparatus Download PDF

Info

Publication number
CN109905395A
CN109905395A CN201910172875.2A CN201910172875A CN109905395A CN 109905395 A CN109905395 A CN 109905395A CN 201910172875 A CN201910172875 A CN 201910172875A CN 109905395 A CN109905395 A CN 109905395A
Authority
CN
China
Prior art keywords
client
verifying
platform server
live streaming
streaming platform
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.)
Granted
Application number
CN201910172875.2A
Other languages
Chinese (zh)
Other versions
CN109905395B (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201910172875.2A priority Critical patent/CN109905395B/en
Publication of CN109905395A publication Critical patent/CN109905395A/en
Application granted granted Critical
Publication of CN109905395B publication Critical patent/CN109905395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The embodiment of the present application discloses a kind of believable method of verifying client and relevant apparatus, for improving the verification efficiency of server.The embodiment of the present application method includes: that live streaming Platform Server is instructed to client transmission verifying, verifying instruction is used to indicate the verifying requirement that the calculated result that the length of client generation is M need to meet, verifying instruction includes the random data that length is N, length is the current time stamp of the live streaming Platform Server of (M-N), the location information of anchor point, the numerical value P of anchor point floats numerical value Q a little;Platform Server is broadcast live and receives the auth response that client is sent;Platform Server is broadcast live, encryption KEY is generated according to Predistribution Algorithm and user information;When judging that calculated result satisfaction verifying requires, live streaming Platform Server, which splices random data and calculating timestamp, is verified data;Platform Server is broadcast live according to encryption KEY encrypted authentication data, is verified value;If validation value is consistent with calculated result, it is determined that client is believable client.

Description

A kind of believable method of verifying client and relevant apparatus
Technical field
This application involves live streaming platform field more particularly to a kind of believable method of verifying client and relevant apparatus.
Background technique
With the continuous universal and development of network, live streaming becomes more and more popular with users on line.Platform Server is broadcast live Need to verify different clients, with the computing capability of each client of determination, such as client H5, Android, IOS, Pc client etc..
However, client may be simultaneously present new and old edition, therefore Platform Server is broadcast live with the continuous upgrading of algorithm Need the verifying logic of compatible new and old edition.Meanwhile user watch live streaming when, due to each user watch duration it is different, Live streaming Platform Server also needs to consider user personality when being verified.Especially when platform, which is broadcast live, large-scale game, simultaneously Online user can increase on foot, then the load pressure of live streaming Platform Server can increase on foot, therefore, how to allow and Platform Server is broadcast live Verification process it is more efficient, be a current problem urgently to be solved to alleviate the load pressure of live streaming Platform Server.
Summary of the invention
The embodiment of the present application provides a kind of believable method of verifying client and relevant apparatus, for increasing live streaming platform The verification efficiency of server, and the load pressure of live streaming Platform Server is effectively relieved.
The first aspect of the embodiment of the present application provides a kind of believable method of verifying client, comprising: live streaming platform clothes Device be engaged in client transmission verifying instruction, the verifying instruction is used to indicate the calculating knot that the length of the client generation is M The verifying requirement that fruit need to meet, the verifying instruction include the current time for the live streaming Platform Server that length is (M-N) Stamp, random data of the length for N, the location information of anchor point, the numerical value P of anchor point float numerical value Q a little, and the anchor point is described The value of the specified location of calculated result be the P, the designated position be the anchor point location information, the drift point for It include the Q in the calculated result, the M is greater than the N;The live streaming Platform Server receives what the client was sent Auth response, the auth response include at least following information: meeting the calculated result and the visitor that the verifying requires The calculating timestamp that family end uses when calculating;The live streaming Platform Server generates institute according to Predistribution Algorithm and the user information Encryption KEY is stated, the Predistribution Algorithm is that the client and the live streaming Platform Server are negotiated to determine;When live streaming platform service Device judges that the calculated result meets the verifying when requiring, and the live streaming Platform Server is by the random data and the meter Evaluation time stamp splicing is verified data;The live streaming Platform Server encrypts the verify data according to the encryption KEY, obtains To validation value;If the validation value is consistent with the calculated result, the live streaming Platform Server determines that the client is Believable client.
In a kind of possible embodiment, the live streaming Platform Server encrypts the verifying number according to the encryption KEY According to being verified value includes: that the live streaming Platform Server by following Encryption Algorithm obtains the validation value: Blowfish_ Encrypt(&ctx,input);Char input [M]=randdata+Timestamp2;Wherein, the Blowfish_ Encrypt () is the encryption interface of Blowfish Encryption Algorithm, and the output valve of the encryption interface is the validation value, the & Ctx is the context environmental variable of the Blowfish Encryption Algorithm, and the input is the verify data, described Randdata is the random data, and the Timestamp2 is the calculating timestamp.
The second aspect of the embodiment of the present application provides the verifying believable method of client, comprising: client receives live streaming The verifying instruction that Platform Server is sent, the verifying instruction are used to indicate the calculating knot that the length that the client generates is M The verifying requirement that fruit need to meet, the verifying instruction include the current time for the live streaming Platform Server that length is (M-N) Stamp, random data of the length for N, the location information of anchor point, the numerical value P of anchor point float numerical value Q a little, and the anchor point is described The value of the specified location of calculated result be the P, the designated position be the anchor point location information, the drift point for It include the Q in the calculated result, the M is greater than the N;Based on Predistribution Algorithm, the client is raw according to user information At encryption KEY, the Predistribution Algorithm is that the client and the live streaming Platform Server are negotiated to determine, the user information packet User identity information, equipment identification information and room identification information are included, the length of the current time stamp of the client is M-N; The client splices the current time stamp of the random data and the client, obtains the encryption number that length is M According to;The client generates the calculated result for meeting the verifying and requiring according to the encryption data and the encryption KEY, And send the auth response in response to the verifying instruction to the live streaming Platform Server, the auth response include at least with Lower information: the calculated result, the client generate the encryption number of the calculated result, and the client uses when calculating Calculating timestamp, the client generates the calculating duration of the calculated result and the identification information of the client so that It is whether credible according to the auth response verifying client to obtain the live streaming Platform Server.
In a kind of possible embodiment, the client is generated according to the encryption data and the encryption KEY to be met The calculated result that the verifying requires includes: that the client adds the encryption data by following Encryption Algorithm It is close, obtain encrypted result: Blowfish_Encrypt (&ctx, input);Char input [M]=randdata+ Timestamp3;
Wherein, the Blowfish_Encrypt () is the encryption interface of Blowfish Encryption Algorithm, the encryption interface Output valve be the encrypted result, Suo Shu &ctx be the Blowfish Encryption Algorithm context environmental variable, it is described Input is the encryption data, and the randdata is the random data, and the Timestamp3 is working as the client Preceding timestamp;The client judges whether the encrypted result meets the verifying requirement;If the encrypted result is unsatisfactory for The verifying requirement, then the client is by calling while function loops to encrypt the encryption data, until the encryption is tied Fruit meets the verifying requirement, described to meet the encrypted result that verifying requires for the calculated result, wherein described The current time stamp of Timestamp3 client when being every time circulation.
In a kind of possible embodiment, the client judges whether the encrypted result meets the verifying and require packet It includes:
The client judges whether the encrypted result in the value of the specified location is the P;If described specified Value at position is not the P, then the client determines that the encrypted result is unsatisfactory for the verifying requirement;If described specified Value at position is the P, then whether the client judges in the encrypted result comprising the Q;If the designated position The value at place is comprising the Q in the P and the encrypted result, then the client determines that the encrypted result is tested described in meeting Card requires;If not including the Q in the encrypted result, the client determines that the encrypted result is unsatisfactory for the verifying It is required that.
The third aspect of the embodiment of the present application provides a kind of live streaming Platform Server, comprising: Transmit-Receive Unit is used for visitor Family end sends verifying instruction, and the verifying instruction is used to indicate the calculated result that the length that the client generates is M and needs to meet Verifying requirement, the verifying instruction includes the current time stamp for the live streaming Platform Server that length is (M-N), and length is The random data of N, the location information of anchor point, the numerical value P of anchor point float numerical value Q a little, and the anchor point is in the calculated result The value of specified location is the P, and the designated position is the location information of the anchor point, and the drift point is to tie in the calculating It include the Q in fruit, the M is greater than the N;The auth response that the client is sent is received, the auth response is at least wrapped Include following information: the calculating timestamp used when meeting the calculated result and client calculating that the verifying requires; Generation unit, for generating the encryption KEY according to the Predistribution Algorithm and user information, the Predistribution Algorithm is the client Negotiate to determine with the live streaming Platform Server in end;When live streaming Platform Server judges that the calculated result meets the verifying and wants When asking, the random data and calculating timestamp splicing are verified data;Encryption unit, for according to the encryption KEY encrypts the verify data, is verified value;Determination unit, if consistent with the calculated result for the validation value, Determine that the client is believable client.
The fourth aspect of the embodiment of the present application provides a kind of client, comprising: Transmit-Receive Unit, for receiving live streaming platform The verifying instruction that server is sent, the verifying instruction are used to indicate the calculated result that the length that the client generates is M and need The verifying requirement of satisfaction, the verifying instruction includes the current time stamp for the live streaming Platform Server that length is (M-N), long Random data of the degree for N, the location information of anchor point, the numerical value P of anchor point float numerical value Q a little, and the anchor point is to tie in the calculating The value of the specified location of fruit is the P, and the designated position is the location information of the anchor point, and the drift point is in the meter Calculating includes the Q in result, and the M is greater than the N;Generation unit generates according to user information and adds for being based on Predistribution Algorithm Close KEY, the Predistribution Algorithm are that the client and the live streaming Platform Server are negotiated to determine, the user information includes using Family identification information, equipment identification information and room identification information, the length of the current time stamp of the client are M-N;By institute The current time stamp for stating random data and the client is spliced, and the encryption data that length is M is obtained;According to the encryption Data and the encryption KEY, which are generated, meets the calculated result that the verifying requires, and sends and instruct in response to the verifying Auth response to the live streaming Platform Server, the auth response includes at least following information: the calculated result, described Client generates the encryption number of the calculated result, the calculating timestamp that the client uses when calculating, the client Generate the calculating duration of the calculated result and the identification information of the client so that the live streaming Platform Server according to Whether the client is verified in the auth response credible.
The 5th aspect of the application provides a kind of electronic equipment, including memory, processor, which is characterized in that the place It is realized as described in above-mentioned first aspect any one when reason device is for executing the computer management class method stored in memory The step of verifying client believable method.
The 6th aspect of the application provides a kind of computer readable storage medium, in the computer readable storage medium It is stored with instruction, when run on a computer, so that computer executes method described in above-mentioned various aspects.
The 7th aspect of the application provides a kind of computer program product comprising instruction, when it runs on computers When, so that computer executes method described in above-mentioned various aspects.
As can be seen from the above technical solutions, the embodiment of the present application has the advantage that live streaming Platform Server to client End sends verifying instruction, and the verifying instruction, which is used to indicate the calculated result that the length that the client generates is M, to be met Verifying requires, and the verifying instruction includes the current time stamp for the live streaming Platform Server that length is (M-N), length N Random data, the location information of anchor point, the numerical value P of anchor point floats numerical value Q a little, and the anchor point is in the calculated result The value of specified location is the P, and the designated position is the location information of the anchor point, and the drift point is to tie in the calculating It include the Q in fruit, the M is greater than the N;The live streaming Platform Server receives the auth response that the client is sent, The auth response includes at least following information: when meeting the calculated result and client calculating that the verifying requires The calculating timestamp used;The live streaming Platform Server generates the encryption according to the Predistribution Algorithm and the user information KEY, the Predistribution Algorithm are that the client and the live streaming Platform Server are negotiated to determine;When live streaming Platform Server judgement The calculated result meets the verifying when requiring, and the live streaming Platform Server is by the random data and the calculating time Stamp splicing is verified data;The live streaming Platform Server encrypts the verify data according to the encryption KEY, is verified Value;If the validation value is consistent with the calculated result, the live streaming Platform Server determines that the client is believable Client.In the embodiment of the present application, live streaming Platform Server only needs simply to calculate the confidence level that verifying client can be realized, The verification efficiency of live streaming Platform Server is increased, and the load pressure of live streaming Platform Server has been effectively relieved.
Detailed description of the invention
Fig. 1 is a kind of flow chart for verifying the believable method of client provided by the embodiments of the present application;
Fig. 2 a is the structural schematic diagram of the possible live streaming Platform Server of one kind provided by the embodiments of the present application;
Fig. 2 b is a kind of structural schematic diagram of possible client provided by the embodiments of the present application;
Fig. 3 a is a kind of hardware structural diagram of possible electronic equipment provided by the embodiments of the present application;
Fig. 3 b is the hardware structural diagram of another possible electronic equipment provided by the embodiments of the present application
Fig. 4 a is a kind of hardware structural diagram of possible computer readable storage medium provided by the embodiments of the present application;
Fig. 4 b is the hardware structural diagram of another possible computer readable storage medium provided by the embodiments of the present application.
Specific embodiment
The embodiment of the present application provides a kind of believable method of verifying client and relevant apparatus, for increasing live streaming platform The verification efficiency of server, and the load pressure of live streaming Platform Server is effectively relieved.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, those skilled in the art's every other implementation obtained without making creative work Example, shall fall in the protection scope of this application.
Referring to Fig. 1, for the flow chart of the possible verifying believable method of client of one kind provided by the embodiments of the present application, It specifically includes:
101, Platform Server is broadcast live and client negotiates indentification protocol;
It is understood that needing each client to live streaming platform all to carry out asymmetric calculation in the embodiment of the present application The verifying of method, in practical application, client specifically includes H5 client, Android, IOS, pc client, therefore for convenient for straight It broadcasts Platform Server to verify different clients, needs to be identified the type of client in indentification protocol, i.e., it is different Client type its corresponding ident value must be different.It specifically, can be by creating enumerated variable in the embodiment of the present application It enumerates all client types, is accomplished by
Enum eClientType{
EClientType_H5=0,
EClientType_Android=1,
EClientType_Ios=2,
EClientType_PC=3,
}
That is, being then the client type of h5 when the value of eClientType is 0;When the value of eClientType is 1, it is then The client type of Android;It is then the client type of IOS when the value of eClientType is 2;The value of eClientType It is then the client type of PC when being 3.It should be noted that in practical application, identify the type of client mode have it is more Kind, uint32_t type (32 integers) can be used for example to indicate the type of client, or by letter with Number in conjunction with mode identify the type etc. of client, specifically herein without limitation.
It is understood that the verifying language for the client that different platforms is taken is different, i.e., each platform Conversed analysis cost for hacker is different, for example, for H5 then relative to hacker for can be easier, for PC and Android then can be more complex, then hacker deliberately distorts client type parameter and more simple around use in order to prevent Verification algorithm, for example, client type is deliberately passed to parameter from legal 1 setting using the client of Android by hacker It is 0, i.e. eClientType=0, so that the client that live streaming Platform Server is currently a h5 is cheated, so that verification algorithm It is more easily reverse and crack.In view of this, in the embodiment of the present application, quotient's indentification protocol of live streaming Platform Server and client association In then need in addition it is independent increase a client type hiding field.Specifically, one is increased in indentification protocol The hiding field uint32_t encryptType of encryption passes through block encryption algorithm (tiny in a kind of possible embodiment Encryption algorithm, TEA) original client type is encrypted, specific function representation is as follows:
EncryptType=Tea.encrypt (type, KEY);
Wherein Tea.encrypt is used to indicate the encryption interface of TEA algorithm;Type is for indicating original client class Type;KEY is used for the key for indicating to use when encryption, wherein live streaming Platform Server and client negotiate to use same key It is encrypted and decrypted, encryptType is for indicating encrypted client type.Therefore client can be by original type It is contained in indentification protocol with encrypted encryptType and is all reported to live streaming Platform Server together.
Therefore, in the embodiment of the present application, live streaming Platform Server and client negotiate indentification protocol, so that live streaming platform Server verifies true client type according to the indentification protocol, and then determines that whether preliminary the client is credible.Specifically, In the embodiment of the present application, indentification protocol can specifically include following information:
Type@=VerifyReq/client@=type2/data@=encryptType
Wherein, type@=VerifyReq is for indicating that the information is indentification protocol;Client@=type is for indicating former The client type of beginning;Data@=encryptType is for indicating encrypted client type.
Therefore Platform Server is broadcast live after the indentification protocol for receiving client transmission, can according to type and EncryptType 2 verifies whether client is forged.Accordingly, live streaming Platform Server by TEA enciphering and deciphering algorithm into Row decryption, specific implementation function are as follows:
Type2=Tea.decrypt (encryptType, KEY);
Wherein, encryptType is for indicating encrypted client type;KEY is for indicating live streaming Platform Server The key used when the encryption and decryption negotiated with client;Type2 is used to indicate the client type after decryption.It is after decryption, then right It is whether more consistent with the value of type than type2, it is verified if consistent, illustrates that client has carried out puppet if inconsistent It makes, so that Platform Server is broadcast live can go out the client that client is a forgery with Direct Recognition.
Optionally, in practical application, as subsequent continuous iteration updates, algorithm can be updated, with patching bugs And improve the safety of algorithm.And for the client of mobile terminal, since some users do not timely update, so in the presence of The case where early version and new version client exist simultaneously, then live streaming Platform Server then needs the different editions to client Do compatible processing.Therefore in the embodiment of the present application, a version number field can also be increased in indentification protocol, so that live streaming is flat Platform server can determine the corresponding indentification protocol version of client according to the version number field.In practical application, it can be used 32 integer variables of one uint32_t indicate version number that indentification protocol uses, such as Uint32_t nVersion =1 indicates first version, and version number 1, nVersion=2 is defined if subsequent upgrade version indicates second version. Specifically, indentification protocol can specifically include following information in the embodiment of the present application:
Type@=VerifyReq/version@=nVersion/;
Wherein, type@=VerifyReq is for indicating that the information is indentification protocol;Version@=nVersion is used for Indicate the corresponding indentification protocol version of client.
Therefore, hacker is verified by distorting new client using old indentification protocol in order to prevent, and live streaming is flat The table that a client release corresponds to agreement can be generated in platform server, corresponding so as to inquire each client release The version of indentification protocol illustrates to be tampered if mismatching, and directly assert that client is an illegal client.Tool Body is accomplished by using the map container of normal data library template (standard template library, STL) and stores visitor The corresponding relationship of family end type, client release and indentification protocol version specifically defines a map array to distinguish difference Client type if any 4 kinds of clients, then define Map wherein there is several client types then to define corresponding array size <int, int>mapVer [4], wherein mapVer [0] is used to store the information of client H5, and mapVer [1] is for storing client The information of Android is held, mapVer [2] is used to store the information of client IOS, and mapVer [3] is for storing client rs PC Information.In order to allow live streaming Platform Server to determine the client release and each client release pair of each client publication The indentification protocol version answered, therefore such configuration information, specific function table can be initialized when Platform Server starting is broadcast live Up to can be such that
mapVer[int].insert(pair<int,int>(x,y));
Wherein mapVer [int] is used to indicate the type of client, and x is used to indicate the version number of client, and y is for indicating Corresponding indentification protocol version number, for ease of understanding, below will for example, for example, mapVer [1] .insert (pair < int,int>(12,1));For indicating the client type of one Android of insertion, wherein the client of corresponding Android Version is 12, and corresponding indentification protocol version is 1;Similar, mapVer [2] .insert (pair<int, int>(13, 2));For indicating the client type of one IOS of insertion, the client release of corresponding IOS is 13, corresponding verifying Protocol version is 2.It is understood that if subsequent also add other kinds of client or client publication new version, it can To increase client and the corresponding version number of agreement referring to similar mode.
Therefore, when reporting client current authentication protocol version in indentification protocol when client, platform service is broadcast live Device then can inquiring client terminal reported data it is whether legal, specifically, live streaming Platform Server judged by writing an interface The legitimacy of client reported data, for example, Boo CheckVerifyVersion (uint32_t type, uint32_t appver,uint32_tver);Wherein, CheckVerifyVersion is used for the judgement interface for indicating to write;uint32_t Type is for indicating corresponding client type;Uint32_t appver is used to indicate the version number of client;uint32_t Ver is for indicating the indentification protocol version number that client reports.If judging the indentification protocol version that interface judges that client reports When number indentification protocol corresponding with the version number of the client type stored and client in map container version number's difference, then say Bright client is forged, so that Platform Server is broadcast live can go out the client that client is a forgery with Direct Recognition.
To sum up live streaming Platform Server determines the content in indentification protocol by negotiating indentification protocol with client, can be with Whether preliminary identification client is believable client.
102, live streaming Platform Server sends verifying instruction to client;
In order to further verify the confidence level of client, in the embodiment of the present application, live streaming Platform Server also passes through verifying The calculation power probe value of client verifies whether client is credible, i.e., live streaming Platform Server can be set according to the calculation power of client It counts different topics and is issued to client and calculated.It, can be to the problem that live streaming Platform Server issues for client It carries out that calculated result is calculated and is reported to live streaming Platform Server.It is to be understood that platform is broadcast live in the embodiment of the present application All topics that server issues all are that the data of the position M issued to live streaming Platform Server encrypt, and obtain encrypted result Or one M encrypted result data, i.e. calculated result.2 arts are devised in complexity the embodiment of the present application of topic Language, one is anchor, and one is drift.In the calculated result for the position M that wherein meaning of anchor refers to, designated position be must satisfy directly Broadcast the numerical requirements of Platform Server.Such as length is in 32 calculated results for being, it is then the definition of anchor that the 1st, which must be 3,. And the definition floated is then that must satisfy 4 this numerical value in M calculated result to occur, and does not need to specify special position.By It is many in the complexity that the complexity of anchor is apparently higher than drift, at the same in order to enhance the difficulty in computation of verification result can specify it is multiple Anchor, and carry out subtle adjustment then if necessary and drift can be used to carry out, therefore can have more by using such mode The big ranged space determines that live streaming Platform Server issues the complexity of topic.For ease of understanding, the topic for simple difficulty 1 of illustrating Mesh is as follows: a data must be 5 in the calculated result at live streaming Platform Server given client end;The topic of difficulty 2 is as follows: It must be 5 that a data in the calculated result at Platform Server given client end, which is broadcast live, and must have a number in result Word is 4;More more highly difficult topic then can be such that first in the calculated result at live streaming Platform Server given client end It must be 9 that position data, which must be the 5, and the 2nd bit value,.Same live streaming Platform Server also can specify the number of multiple drifts According to.Therefore in the embodiment of the present application, the topic of various difficulty can be designed, and drift can be used to finely tune difficulty in topic Degree.
Therefore live streaming Platform Server sends verifying instruction to client, wherein verifying instruction is used to indicate client generation Length is the verifying requirement that the calculated result of M need to meet, and verifying instruction includes the live streaming Platform Server that length is (M-N) Current time stamp, random data of the length for N, the location information of anchor point, the numerical value P of anchor point float numerical value Q a little, wherein anchor point To be P in the value of the specified location of calculated result, designated position is the location information of anchor point, and drift point is to wrap in calculated result Q is included, and M is greater than N.For ease of understanding, in the embodiment of the present application, live streaming Platform Server sends the tool of verifying instruction to client The realization of body function can be such that
Type@=VerifyReq/Timestamp@=1540132018/RandData@= @=4/ a12bcd980763acddeab879/anchor1pos@=1/anchor1value@=5/drift1;
Wherein, type@=VerifyReq then indicates that this instruction is the association that the verifying topic that Platform Server issues is broadcast live Discuss content;@=1540132018 item Timestamp indicate the current time stamp information of live streaming Platform Server, and the length is 10 Bit length;RandData@=a12bcd980763acddeab879 then indicates the random data that live streaming Platform Server generates, length Degree is 22 bit lengths;Anchor1pos=1 item indicates that the location information of first anchor point is first numerical value;anchor1value@ The occurrence of the numerical value of first anchor point of=5 expressions must be 5;@=4 item drift1 indicate that drift value is 4, i.e., finally calculate It is 4 that result data, which must have a value,.In this example, only one anchor value and a drift value, in practical application, there may be more A anchor value such as ancho r2pos, anchor2value etc. or multiple drift value such as drift2, drift3 etc. are not done specifically herein It limits.
103, client generates encryption KEY according to user information;
104, client splices the current time stamp of random data and client, obtains the encryption number that length is M According to;
105, client generates the calculated result for meeting verifying and requiring according to encryption data and encryption KEY;
In the embodiment of the present application, after client receives verifying instruction, i.e., the length that live streaming Platform Server issues is N's Random data and length are the current time stamp of the live streaming Platform Server of (M-N), i.e., after one section M data to client, Client encrypts data, and is constantly iterated encryption to the result of encryption, and every encryption once can all be sentenced Whether the data of disconnected encrypted result meet the requirement result of live streaming Platform Server.Client carries out the data of the position M of input What is obtained after encryption is also one 32 encrypted results.It must be very fast and encryption data to meet calculating primary encryption Length will not change, therefore in the embodiment of the present application, can choose and use blowfish algorithm as the calculation for calculating power verifying Method.
To obtain calculated result, client first needs to calculate an encryption KEY according to user information, implements Function can be such that
KEY=SHA512.Create (Timestamp+UserId+DeviceID+RoomId);
Wherein, SHA512.Create is the calculating interface of HASH algorithm SHA512, and Timestamp is for indicating client Current time stamp, for UserID for indicating user identity information, DeviceID is used to indicate the equipment identification information of client, For RoomID for indicating room identification information, encryption KEY is the key data for being used in subsequent Encryption Algorithm blowfish.It connects down The iterative cryptographic of blowfish can be carried out to the data that server issues by carrying out client, be put down until encrypted result can satisfy live streaming Until the topic requirements of platform server.
Firstly the need of an initial time is defined, it is used on the calculating time loss of subsequent entire algorithm, specifically, is used System function Time obtains current time, realizes that function can be Uint64_t nStartTime=Time ();It re-defines The number of blowfish encryption, is initialized as 0, realizes that function can be Uint64_t nTimes=0.Next definition needs The input data of encryption, wherein input data is then the current time that the Platform Server random data issued and client is broadcast live Stamp is spliced together, and obtained length is the encryption data of M, and in the embodiment of the present application, the value of M can be 32, implements letter Number can be such as: Char input [32]=randdata+nStartTime;Wherein, randdata is for indicating in verifying instruction Random data, nStartTime be used for indicates acquisition client current time stamp.
Client passes through the context environmental that function BLOWFISH_CTX ctx defines a blowfish Encryption Algorithm again Then variable is initialized by function Blowfish_Init, wherein function Blowfish_Init is in initialization Environmental variance interface hereafter, and the key key of meeting assignment encryption, into environmental variance, function realization can be such that Blowfish_Init(&ctx,key,sizeof(key)).After the completion of initialization operation, writes a while circulation and come constantly Carry out encrypt, until encrypted result reaches requirement.In while circulation, 1 is increased to calculation times first, then adjust Data are encrypted with the encryption interface of blowfish Encryption Algorithm, after the completion of encryption, encrypted result storage is arrived In input.Specific function is accomplished by
While(true){
NTimes=nTimes+1;
Blowfish_Encrypt(&ctx,input);
Wherein, nTimes indicates calculation times, and Blowfish_Encrypt is used to indicate adding for blowfish Encryption Algorithm Touch the context environmental variable of mouth , &ctx expression blowfish Encryption Algorithm, input indicates be-encrypted data.It is encrypted Judge whether encrypted result meets the verifying requirement that live streaming Platform Server issues after result afterwards.Hypothesis verification requires The occurrence of the numerical value of first anchor point must be 5, and the value of drift is 4, then first determine whether anchor, i.e. whether first data are equal to 5, that is, judge input [1]==5;If not being then unsatisfactory for requiring, if it is further judge either with or without others The judgement that anchor does not judge whether there is other drifts then, and floated.In the embodiment of the present application, can by For circulation come pair Drift is judged, specific as follows:
For (int i=0;i<32;i++){
If (input [i]==4)
}
If having 4 in the result of encryption, illustrates to have and float this data, to meet the verifying of live streaming Platform Server It is required that.
After obtaining meeting the encrypted result that verifying requires, according to function Uint64_t nCurrentTime=Time () Current time is then obtained, by current time with the time difference that before starts to obtain the time for entirely calculating consumption, i.e., It calculates how long client consumption obtains meeting the encrypted result that verifying requires, i.e. calculating data, it is as follows to embody function:
Uint64_t Elapse=nCurrentTime-nStartTime;
Wherein, Elapse is used to indicate that client to generate the calculating duration of calculated result, and nCurrentTime is for indicating The time of calculated result is generated, nStartTime is used to indicate to start the time of encryption.
Optionally, if encrypted result is unsatisfactory for verifying when requiring, the calculating of next round is re-started.Specific packet It includes: current time stamp being obtained by function Uint64_t nCurrentTime=Time (), by the original of secondary encryption The top N data and current time stamp of data come together to be encrypted, i.e., the length in be-encrypted data is all replaced in encryption every time For the time stamp data of the position (M-N).Be exactly in M-bit data top N will not be replaced, and the last position (M-N) data are then Current time stamp, current time stamp can be all substituted for every time by calculating.For example, when it is 22 that M, which is 32, N, the acquisition of be-encrypted data Mode can be as follows, wherein the data that be-encrypted data is as encrypted next time:
Input [32]=randdata [0-21]+nCurrentTime;
Wherein, input [32] is be-encrypted data, and randdata [0-21] is 22 random data not, NCurrentTime is timestamp when starting to encrypt for second.
Similar, the verifying requirement that live streaming Platform Server issues is reached by constantly calculating, can be disappeared during being somebody's turn to do The cpu resource of client is consumed, the duration of consumption is then that the difficulty of topic is issued by server to determine.
106, client sends the auth response in response to verifying instruction to Platform Server is broadcast live;
After client generates the encrypted result, that is, verification result for meeting verifying requirement, response is sent to live streaming Platform Server In the auth response of verifying instruction.Wherein, which includes: calculated result, and client generates the encryption time of calculated result Number, the calculating timestamp that client uses when calculating, client generate the calculating duration of calculated result and the mark letter of client Breath.It is as follows to implement function:
Type@=VerifyRes/ResultData@=596abbccdd78a12bcd9807463acddeab/Times@ =1000/Elapse@=3000/TimeStamp@=1540133335/DeviceId@=aabbccdd;
Wherein type@=VerifyRes is then the type of message for the indentification protocol that client replies live streaming Platform Server; ResultData@=596abbccdd78a12bcd9807463acddeab is then the calculated result of client, data length For 32 bit lengths;Times@=1000 indicates that client calculates the number of encryption;@=3000 item Elapse indicate that client calculates Time millisecond number consumed by entire result;@=1540133335 item TimeStamp are the timestamps used when calculating; DeviceId@=aabbccdd is then the identification information of client, i.e. the unique ID of equipment.
107, live streaming Platform Server generates encryption KEY according to Predistribution Algorithm and user information;
108, when live streaming Platform Server judges that calculated result satisfaction verifying requires, Platform Server is broadcast live by random number Data are verified according to calculating timestamp splicing;
109, live streaming Platform Server is verified value according to encryption KEY encrypted authentication data;
If 110, validation value is consistent with calculated result, Platform Server is broadcast live and determines that client is believable client.
After live streaming Platform Server receives the auth response of client transmission, the reported data verifying to client is needed Its true and false.Wherein, the calculation that Platform Server is broadcast live is then more simpler than client, so that a large amount of live streamings will not be consumed The resource of Platform Server.Live streaming Platform Server generates encryption KEY according to Predistribution Algorithm and user information first, this encryption KEY is calculated such as client as when using, and is implemented as follows:
KEY=SHA512.Create (Timestamp 1+UserId+DeviceID+RoomId);
Wherein, SHA512.Create is the calculating interface of HASH algorithm SHA512, and Timestamp1 is for indicating that live streaming is flat The current time stamp of platform server, UserID are used to indicate that user identity information, DeviceID to be used to indicate equipment identification information, RoomID is for indicating room identification information.After live streaming Platform Server obtains encryption KEY, according to encryption KEY decryption verification Response, to be verified the information in response included.After the information for including in being verified response, live streaming Platform Server is first First judge whether the calculated result that client reports is the value for meeting anchor and drift that Platform Server requirement is broadcast live, if be unsatisfactory for Then it is considered that the data forged, i.e. client are insincere;Sentence if it is satisfied, live streaming Platform Server carries out primary encryption calculating again Whether disconnected client is calculating that the data that are issued by live streaming Platform Server carry out.Firstly, live streaming Platform Server will be random Data and calculating timestamp splicing are verified data, and specific implementation function is as follows:
Char input [32]=randdata+Timestamp;
Wherein randdata is then the random data that Platform Server is broadcast live and issues, and Timestamp is what client reported Calculate the calculating timestamp met when verifying requires, the verify data that input [32] is 32;Platform Server root again is broadcast live According to encryption KEY encrypted authentication data, it is verified value, specific implementation function is as follows:
Blowfish_Encrypt(&ctx,input);
Wherein, it is blowfish encryption that Blowfish_Encrypt, which is the encryption interface , &ctx of bowfish encryption and decryption function, The context environmental variable of algorithm, input are verify data, and the value obtained after encryption is validation value.Platform Server is broadcast live Judge whether validation value consistent with the calculated result that client reports again, the data that client reports are illustrated if consistent It is correctly, to judge that the client is a genuine and believable client.
In the embodiment of the present application, live streaming Platform Server, which only needs simply to calculate, can be realized the credible of verifying client Degree, increases the verification efficiency of live streaming Platform Server, and the load pressure of live streaming Platform Server has been effectively relieved.
The embodiment of the present application is described from the angle of the verifying believable method of client above, it is flat from live streaming below The embodiment of the present application is described in the angle of platform server and client side.
Fig. 2 a is please referred to, Fig. 2 a is that the implementation of the possible live streaming Platform Server of one kind provided by the embodiments of the present application illustrates It is intended to, wherein the live streaming Platform Server specifically includes:
Transmit-Receive Unit 201, for sending verifying instruction to client, it is raw that the verifying instruction is used to indicate the client At length be M the verifying requirement that need to meet of calculated result, the verifying instruction includes working as the live streaming Platform Server Preceding timestamp, random data of the length for N, the location information of anchor point, the numerical value P of anchor point float numerical value Q a little, and the anchor point is It is the P in the value of the specified location of the calculated result, the designated position is the location information of the anchor point, the drift Point is includes the Q in the calculated result, and the M is greater than the N;Receive the auth response that the client is sent, institute Auth response is stated including at least following information: being made when meeting the calculated result and client calculating that the verifying requires Calculating timestamp;
Generation unit 202, for generating the encryption KEY, the preset calculation according to Predistribution Algorithm and the user information Method is that the client and the live streaming Platform Server are negotiated to determine;When live streaming Platform Server judges that the calculated result is full When the foot verifying requires, the random data and calculating timestamp splicing are verified data;
Encryption unit 203 is verified value for encrypting the verify data according to the encryption KEY;
Determination unit 204, if consistent with the calculated result for the validation value, it is determined that the client is credible Client.
Fig. 2 b is please referred to, Fig. 2 b is a kind of embodiment schematic diagram of possible client provided by the embodiments of the present application, In, which specifically includes:
Transmit-Receive Unit 210, the verifying instruction sent for receiving live streaming Platform Server, the verifying instruction are used to indicate The length that the client generates is the verifying requirement that the calculated result of M need to meet, and the verifying instruction includes that the live streaming is flat The current time stamp of platform server, random data of the length for N, the location information of anchor point, the numerical value P of anchor point float numerical value a little Q, for the anchor point to be the P in the value of the specified location of the calculated result, the designated position is the position of the anchor point Confidence breath, the drift point are to be greater than the N including the Q, the M in the calculated result;
Generation unit 220 generates encryption KEY according to user information, the Predistribution Algorithm is institute for being based on Predistribution Algorithm It states client and the live streaming Platform Server is negotiated to determine, the user information includes user identity information, device identification letter Breath and room identification information, the length of the current time stamp of the client are M-N;By the random data and the client Current time stamp spliced, obtain length be M encryption data;It is generated according to the encryption data and the encryption KEY Meet the calculated result that the verifying requires, and it is flat to the live streaming to send the auth response instructed in response to the verifying Platform server, the auth response include at least following information: the calculated result, and the client generates the calculated result Encryption number, the calculating timestamp that the uses when client calculates, the client generates the calculating of the calculated result The identification information of duration and the client, so that the live streaming Platform Server verifies the visitor according to the auth response Whether family end is credible.
Fig. 3 a is please referred to, Fig. 3 a is the embodiment schematic diagram of electronic equipment provided by the embodiments of the present application.
As shown in Figure 3a, the embodiment of the present application provides a kind of electronic equipment, including memory 310, processor 320 and deposits The computer program 311 that can be run on memory 320 and on the processor 320 is stored up, processor 320 executes computer program It is performed the steps of when 311 to client and sends verifying instruction, the verifying instruction is used to indicate the length that the client generates Degree is the verifying requirement that the calculated result of M need to meet, and the verifying instruction includes the current time of the live streaming Platform Server Stamp, random data of the length for N, the location information of anchor point, the numerical value P of anchor point float numerical value Q a little, and the anchor point is described The value of the specified location of calculated result be the P, the designated position be the anchor point location information, the drift point for It include the Q in the calculated result, the M is greater than the N;Receive the auth response that the client is sent, the verifying Response includes at least following information: the meter used when meeting the calculated result and client calculating that the verifying requires Evaluation time stamp;The encryption KEY is generated according to the Predistribution Algorithm and the user information, the Predistribution Algorithm is the client Negotiate to determine with the live streaming Platform Server in end;When live streaming Platform Server judges that the calculated result meets the verifying and wants When asking, the random data and calculating timestamp splicing are verified data;It is tested according to encryption KEY encryption Data are demonstrate,proved, value is verified;If the validation value is consistent with the calculated result, described in the live streaming Platform Server determination Client is believable client.
As shown in Figure 3b, the embodiment of the present application provides a kind of electronic equipment, including memory 330, processor 340 and deposits The computer program 331 that can be run on memory 340 and on processor 340 is stored up, processor 340 executes computer program It is performed the steps of when 331 and receives the verifying instruction that live streaming Platform Server is sent, the verifying instruction is used to indicate the visitor The length that family end generates is the verifying requirement that the calculated result of M need to meet, and the verifying instruction includes the live streaming platform service The current time stamp of device, length are the random data of N, and the location information of anchor point, the numerical value P of anchor point floats numerical value Q a little, described For anchor point to be the P in the value of the specified location of the calculated result, the designated position is the location information of the anchor point, The drift point is to be greater than the N including the Q, the M in the calculated result;Based on Predistribution Algorithm, according to user information Encryption KEY is generated, the Predistribution Algorithm is that the client and the live streaming Platform Server are negotiated to determine, the user information Including user identity information, equipment identification information and room identification information, the length of the current time stamp of the client are M- N;The current time stamp of the random data and the client is spliced, the encryption data that length is M is obtained;According to institute It states encryption data and the encryption KEY is generated and met the calculated result that the verifying requires, and send and tested in response to described The auth response of instruction is demonstrate,proved to the live streaming Platform Server, the auth response includes at least following information: the calculating knot Fruit, the client generate the encryption number of the calculated result, and the calculating timestamp that the client uses when calculating is described Client generates the calculating duration of the calculated result and the identification information of the client, so that the live streaming platform service Whether device is credible according to the auth response verifying client.
The electronic equipment introduced by the present embodiment for implement in the embodiment of the present application a kind of live streaming Platform Server or Equipment used by person's client, so based on method described in the embodiment of the present application, those skilled in the art's energy The specific embodiment and its various change form of the electronic equipment of solution the present embodiment much of that, so being set herein for the electronics It is standby how to realize that the method in the embodiment of the present application is no longer discussed in detail, as long as those skilled in the art implement the application reality Equipment used by the method in example is applied, the range to be protected of the application is belonged to.
Fig. 4 a is please referred to, Fig. 4 a is a kind of embodiment signal of computer readable storage medium provided by the embodiments of the present application Figure.
As shown in fig. 4 a, a kind of computer readable storage medium 400 is present embodiments provided, computer journey is stored thereon with Sequence 411, the computer program 411 realize following steps when being executed by processor: sending verifying instruction, the verifying to client Instruction is used to indicate the verifying requirement that the calculated result that the length that the client generates is M need to meet, the verifying instruction packet The current time stamp of the live streaming Platform Server is included, length is the random data of N, the location information of anchor point, the numerical value of anchor point P floats numerical value Q a little, and the anchor point is the P for the value of the specified location in the calculated result, and the designated position is The location information of the anchor point, the drift point are to be greater than the N including the Q, the M in the calculated result;Receive institute The auth response of client transmission is stated, the auth response includes at least following information: meeting the meter that the verifying requires Calculate the calculating timestamp used when result and client calculating;Described add is generated according to Predistribution Algorithm and the user information Close KEY, the Predistribution Algorithm are that the client and the live streaming Platform Server are negotiated to determine;When live streaming Platform Server is sentenced The calculated result of breaking meets the verifying when requiring, and the random data and the calculatings timestamp are spliced and are verified number According to;The verify data is encrypted according to the encryption KEY, is verified value;If the validation value is consistent with the calculated result, Then the live streaming Platform Server determines that the client is believable client.
Fig. 4 b is please referred to, Fig. 4 b is a kind of embodiment signal of computer readable storage medium provided by the embodiments of the present application Figure.
As shown in Figure 4 b, a kind of computer readable storage medium 420 is present embodiments provided, computer journey is stored thereon with Sequence 431, the computer program 431 realize following steps when being executed by processor: receiving the verifying that live streaming Platform Server is sent Instruction, the verifying instruction are used to indicate the verifying requirement that the calculated result that the length that the client generates is M need to meet, institute The current time stamp that verifying instruction includes the live streaming Platform Server is stated, length is the random data of N, the position letter of anchor point Breath, the numerical value P of anchor point float numerical value Q a little, and the anchor point is the P, institute for the value of the specified location in the calculated result The location information that designated position is the anchor point is stated, the drift point is to be greater than in the calculated result including the Q, the M The N;Based on Predistribution Algorithm, encryption KEY is generated according to user information, the Predistribution Algorithm is the client and the live streaming Platform Server negotiates determination, and the user information includes user identity information, equipment identification information and room identification information, institute The length for stating the current time stamp of client is M-N;The current time stamp of the random data and the client is spelled It connects, obtains the encryption data that length is M;It is generated according to the encryption data and the encryption KEY and meets what the verifying required The calculated result, and send in response to the auth response for verifying instruction to the live streaming Platform Server, the verifying Response includes at least following information: the calculated result, the client generate the encryption number of the calculated result, the visitor The calculating timestamp that uses when family end calculates, the client generate the calculating duration and the client of the calculated result Identification information, so that whether the live streaming Platform Server is credible according to the auth response verifying client.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that each process in flowchart and/or the block diagram can be realized by computer program instructions And/or the combination of the process and/or box in box and flowchart and/or the block diagram.It can provide these computer programs to refer to Enable the processor of general purpose computer, special purpose computer, embedded computer or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic Concept, then additional changes and modifications may be made to these embodiments.So it includes preferred that the following claims are intended to be interpreted as Embodiment and all change and modification for falling into the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies Within, then the application is also intended to including these modification and variations.

Claims (10)

1. a kind of believable method of verifying client characterized by comprising
Platform Server is broadcast live and sends verifying instruction to client, the verifying instruction is used to indicate the length that the client generates Degree is the verifying requirement that the calculated result of M need to meet, and the verifying instruction includes the random data that length is N, and length is (M-N) The live streaming Platform Server current time stamp, the location information of anchor point, the numerical value P of anchor point floats numerical value Q a little, described For anchor point to be the P in the value of the specified location of the calculated result, the designated position is the location information of the anchor point, The drift point is in the calculated result including the Q;
The live streaming Platform Server receives the auth response that the client is sent, and the auth response includes at least following letter Breath: the calculating timestamp used when meeting the calculated result and client calculating that the verifying requires;
The live streaming Platform Server generates the encryption KEY, the Predistribution Algorithm according to Predistribution Algorithm and the user information Negotiate to determine for the client and the live streaming Platform Server;
When be broadcast live Platform Server judge the calculated result meet it is described verify require when, the live streaming Platform Server is by institute It states random data and calculating timestamp splicing is verified data;
The live streaming Platform Server encrypts the verify data according to the encryption KEY, is verified value;
If the validation value is consistent with the calculated result, the live streaming Platform Server determines that the client is believable Client.
2. the method according to claim 1, wherein the live streaming Platform Server according to the Predistribution Algorithm and The user information generates the encryption KEY
The live streaming Platform Server calculates the encryption KEY in the following manner:
KEY=SA512.Creat (Timestamp1+UserID+DeviceID+RoomID);
Wherein, the SHA512.Create is the calculating interface of Hash HASH algorithm SHA512, and the Timestamp1 is used for table Show the current time stamp of the live streaming Platform Server, the UserID is described for indicating the user identity information DeviceID is for indicating the equipment identification information, and the RoomID is for indicating the room identification information.
3. the method according to claim 1, wherein the live streaming Platform Server adds according to the encryption KEY The close verify data, being verified value includes:
The live streaming Platform Server obtains the validation value by following Encryption Algorithm:
Blowfish_Encrypt(&ctx,input);
Char input [M]=randdata+Timestamp2;
Wherein, the Blowfish_Encrypt () is the encryption interface of Blowfish Encryption Algorithm, described to encrypt the defeated of interface Value is the validation value out, and Suo Shu &ctx is the context environmental variable of the Blowfish Encryption Algorithm, and the input is institute Verify data is stated, the randdata is the random data, and the Timestamp2 is the calculating timestamp.
4. a kind of believable method of verifying client characterized by comprising
Client receives the verifying instruction that live streaming Platform Server is sent, and the verifying instruction is used to indicate the client and generates Length be M the verifying requirement that need to meet of calculated result, the verifying instruction includes the random data that length is N, and length is (M-N) current time stamp of the live streaming Platform Server, the location information of anchor point, the numerical value P of anchor point float numerical value Q a little, For the anchor point to be the P in the value of the specified location of the calculated result, the designated position is the position of the anchor point Information, the drift point are in the calculated result including the Q;
Based on Predistribution Algorithm, the client according to user information generate encryption KEY, the Predistribution Algorithm be the client with The live streaming Platform Server negotiates determination, and the user information includes user identity information, equipment identification information and room mark Know information, the length of the current time stamp of the client is M-N;
The client splices the current time stamp of the random data and the client, and obtaining length is adding for M Ciphertext data;
The client generates the calculating knot for meeting the verifying and requiring according to the encryption data and the encryption KEY Fruit, and the auth response in response to the verifying instruction is sent to the live streaming Platform Server, the auth response is at least wrapped Include following information: the calculated result, the client generates the encryption number of the calculated result, when the client calculates The calculating timestamp used, the client generate the calculating duration of the calculated result and the identification information of the client, So that whether the live streaming Platform Server is credible according to the auth response verifying client.
5. according to the method described in claim 4, it is characterized in that, the client is according to the encryption data and the encryption KEY generation meets the calculated result that the verifying requires
The client encrypts the encryption data by following Encryption Algorithm, obtains encrypted result:
Blowfish_Encrypt(&ctx,input);
Char input [M]=randdata+Timestamp3;
Wherein, the Blowfish_Encrypt () is the encryption interface of Blowfish Encryption Algorithm, described to encrypt the defeated of interface Value is the encrypted result out, and Suo Shu &ctx is the context environmental variable of the Blowfish Encryption Algorithm, and the input is The encryption data, the randdata are the random data, and the Timestamp3 is the current time of the client Stamp;
The client judges whether the encrypted result meets the verifying requirement;
If the encrypted result is unsatisfactory for the verifying requirement, the client is by calling while function loops to encrypt institute Encryption data is stated, until the encrypted result meets the verifying requirement, the encrypted result for meeting verifying requirement is described Calculated result, wherein the current time stamp of Timestamp3 client when being every time circulation.
6. according to the method described in claim 5, it is characterized in that, the client judges whether the encrypted result meets institute Verifying is stated to require to include:
The client judges whether the encrypted result in the value of the specified location is the P;
If the value of the specified location is not the P, the client determines that the encrypted result is unsatisfactory for the verifying It is required that;
If the value of the specified location is the P, whether the client judges in the encrypted result comprising the Q;
If it includes the Q in the P and the encrypted result that the value of the specified location, which is, described in the client determination Encrypted result meets the verifying requirement;
If not including the Q in the encrypted result, the client determines that the encrypted result is unsatisfactory for the verifying and wants It asks.
7. a kind of live streaming Platform Server characterized by comprising
Transmit-Receive Unit, for sending verifying instruction to client, the verifying instruction is used to indicate the length that the client generates Degree is the verifying requirement that the calculated result of M need to meet, and the verifying instruction includes the random data that length is N, and length is (M-N) The live streaming Platform Server current time stamp, the location information of anchor point, the numerical value P of anchor point floats numerical value Q a little, described For anchor point to be the P in the value of the specified location of the calculated result, the designated position is the location information of the anchor point, The drift point is in the calculated result including the Q;Receive the auth response that the client is sent, the auth response Including at least following information: when the calculating used when meeting the calculated result and client calculating that the verifying requires Between stab;
Generation unit, for generating the encryption KEY according to Predistribution Algorithm and the user information, the Predistribution Algorithm is described Client and the live streaming Platform Server are negotiated to determine;When live streaming Platform Server judges that the calculated result is tested described in meeting When card requires, the random data and calculating timestamp splicing are verified data;
Encryption unit is verified value for encrypting the verify data according to the encryption KEY;
Determination unit, if consistent with the calculated result for the validation value, it is determined that the client is believable client End.
8. a kind of client characterized by comprising
Transmit-Receive Unit, the verifying instruction sent for receiving live streaming Platform Server, the verifying instruction are used to indicate the visitor The length that family end generates is the verifying requirement that the calculated result of M need to meet, and the verifying instruction includes the random number that length is N According to length is the current time stamp of the live streaming Platform Server of (M-N), the location information of anchor point, the numerical value P of anchor point, drift The numerical value Q of point, the anchor point are the P for the value of the specified location in the calculated result, and the designated position is described The location information of anchor point, the drift point are to be greater than the N including the Q, the M in the calculated result;
Generation unit generates encryption KEY according to user information, the Predistribution Algorithm is the client for being based on Predistribution Algorithm Determination is negotiated with the live streaming Platform Server in end, and the user information includes user identity information, equipment identification information and room Between identification information, the length of the current time stamp of the client is M-N;By the current of the random data and the client Timestamp is spliced, and the encryption data that length is M is obtained;Meet institute according to the encryption data and encryption KEY generation The calculated result that verifying requires is stated, and is sent in response to the auth response for verifying instruction to the live streaming platform service Device, the auth response include at least following information: the calculated result, the client generate the encryption of the calculated result Number, the calculating timestamp that the uses when client calculates, the client generate the calculated result calculating duration and The identification information of the client, so that the live streaming Platform Server is according to the auth response verifying client It is no credible.
9. a kind of computer readable storage medium, including instruction, when run on a computer, so that computer is executed as weighed Benefit requires method described in 1-6 any one.
10. a kind of computer program product comprising instruction, when run on a computer, so that computer executes such as right It is required that method described in 1-6 any one.
CN201910172875.2A 2019-03-07 2019-03-07 Method and related device for verifying credibility of client Active CN109905395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910172875.2A CN109905395B (en) 2019-03-07 2019-03-07 Method and related device for verifying credibility of client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910172875.2A CN109905395B (en) 2019-03-07 2019-03-07 Method and related device for verifying credibility of client

Publications (2)

Publication Number Publication Date
CN109905395A true CN109905395A (en) 2019-06-18
CN109905395B CN109905395B (en) 2021-09-07

Family

ID=66946581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910172875.2A Active CN109905395B (en) 2019-03-07 2019-03-07 Method and related device for verifying credibility of client

Country Status (1)

Country Link
CN (1) CN109905395B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124447A (en) * 2019-11-29 2020-05-08 山东英信计算机技术有限公司 Platform management method, system, equipment and computer readable storage medium
CN113553125A (en) * 2020-04-26 2021-10-26 中移(成都)信息通信科技有限公司 Calling method, device and equipment of trusted application program and computer storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107528854A (en) * 2017-09-20 2017-12-29 江苏通付盾科技有限公司 Connection method, system, client and server based on proof of work
CN107688733A (en) * 2017-07-25 2018-02-13 上海壹账通金融科技有限公司 Business interface call method, device, user terminal and readable storage medium storing program for executing
CN107786553A (en) * 2017-10-23 2018-03-09 江苏通付盾科技有限公司 Identity identifying method, server and system based on proof of work
US20180198632A1 (en) * 2016-04-01 2018-07-12 NEC Laboratories Europe GmbH Method for providing a space puzzle
CN108366057A (en) * 2018-02-06 2018-08-03 武汉斗鱼网络科技有限公司 A kind of data processing method, client and electronic equipment
US10116693B1 (en) * 2016-06-28 2018-10-30 EMC IP Holding Company LLC Server using proof-of-work technique for hardening against denial of service attacks
CN108964901A (en) * 2018-07-06 2018-12-07 武汉斗鱼网络科技有限公司 Information Authentication method, system, device
CN109376115A (en) * 2018-08-31 2019-02-22 北京智云芯科技有限公司 A kind of computing device and calculation method based on proof of work

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180198632A1 (en) * 2016-04-01 2018-07-12 NEC Laboratories Europe GmbH Method for providing a space puzzle
US10116693B1 (en) * 2016-06-28 2018-10-30 EMC IP Holding Company LLC Server using proof-of-work technique for hardening against denial of service attacks
CN107688733A (en) * 2017-07-25 2018-02-13 上海壹账通金融科技有限公司 Business interface call method, device, user terminal and readable storage medium storing program for executing
CN107528854A (en) * 2017-09-20 2017-12-29 江苏通付盾科技有限公司 Connection method, system, client and server based on proof of work
CN107786553A (en) * 2017-10-23 2018-03-09 江苏通付盾科技有限公司 Identity identifying method, server and system based on proof of work
CN108366057A (en) * 2018-02-06 2018-08-03 武汉斗鱼网络科技有限公司 A kind of data processing method, client and electronic equipment
CN108964901A (en) * 2018-07-06 2018-12-07 武汉斗鱼网络科技有限公司 Information Authentication method, system, device
CN109376115A (en) * 2018-08-31 2019-02-22 北京智云芯科技有限公司 A kind of computing device and calculation method based on proof of work

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124447A (en) * 2019-11-29 2020-05-08 山东英信计算机技术有限公司 Platform management method, system, equipment and computer readable storage medium
CN113553125A (en) * 2020-04-26 2021-10-26 中移(成都)信息通信科技有限公司 Calling method, device and equipment of trusted application program and computer storage medium
CN113553125B (en) * 2020-04-26 2024-03-19 中移(成都)信息通信科技有限公司 Method, device and equipment for calling trusted application program and computer storage medium

Also Published As

Publication number Publication date
CN109905395B (en) 2021-09-07

Similar Documents

Publication Publication Date Title
US11258792B2 (en) Method, device, system for authenticating an accessing terminal by server, server and computer readable storage medium
US6516413B1 (en) Apparatus and method for user authentication
CN105706048B (en) Media Client Device Authentication Using Hardware Root of Trust
US20080083039A1 (en) Method for integrity attestation of a computing platform hiding its configuration information
CN109347625B (en) Password operation method, work key creation method, password service platform and equipment
US11556630B2 (en) Private password constraint validation
CN108848058A (en) Intelligent contract processing method and block catenary system
US20150358321A1 (en) Storage device, information processing apparatus, and information processing method
CN109447631B (en) Client, server, blockchain-based transaction method and storage medium
CN109586920A (en) A kind of trust authentication method and device
CN106060078A (en) User information encryption method, user registration method and user validation method applied to cloud platform
CN113722683A (en) Model protection method, device, equipment, system and storage medium
CN116361833A (en) Verification method and device and terminal equipment
CN110011950A (en) A kind of method for authenticating and device of video flowing address
CN117240625B (en) Tamper-resistant data processing method and device and electronic equipment
CN108846671B (en) Online secure transaction method and system based on block chain
CN109905395A (en) A kind of believable method of verifying client and relevant apparatus
CN113127844A (en) Variable access method, device, system, equipment and medium
JP2016129403A (en) System and method for obfuscated initial value of encryption protocol
CN110515640A (en) Firmware upgrading method, device, equipment and storage medium of security chip
CN111193741A (en) Information sending method, information obtaining method, device and equipment
CN117850846B (en) Upgrading method, device, equipment and storage medium of target electronic control unit
CN104392153A (en) Software protection method and system
CN114048506A (en) Application control method, device, equipment and storage medium
CN113326499A (en) Legal version verification method of electronic equipment, server side, equipment side and user side

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