CN106571923A - 带时效的用户数据签名校验方法 - Google Patents

带时效的用户数据签名校验方法 Download PDF

Info

Publication number
CN106571923A
CN106571923A CN201610919867.6A CN201610919867A CN106571923A CN 106571923 A CN106571923 A CN 106571923A CN 201610919867 A CN201610919867 A CN 201610919867A CN 106571923 A CN106571923 A CN 106571923A
Authority
CN
China
Prior art keywords
parameter
user
user data
server
sent
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
Application number
CN201610919867.6A
Other languages
English (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.)
Tianjin Mass Information Technology Ltd By Share Ltd
Original Assignee
Tianjin Mass Information Technology Ltd By Share 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 Tianjin Mass Information Technology Ltd By Share Ltd filed Critical Tianjin Mass Information Technology Ltd By Share Ltd
Priority to CN201610919867.6A priority Critical patent/CN106571923A/zh
Publication of CN106571923A publication Critical patent/CN106571923A/zh
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

一种带时效的用户数据签名校验方法,校验方法如下:1、客户端发出HTTP请求,其中请求的参数格式为<key>=<value>,其中包括用户发送参数字段、当前时间字段和固定私钥字段,多个字段之间使用&号进行连接;2、用户在发送构成的字符串参数时,需要在请求参数后增加一个名称为sign的参数,参数的内容为根据用户发送的字符串计算出的一个哈希数值,然后将新形成的参数发送到服务器;3、服务器接收到参数后,服务器根据用户的输入,计算一个sign值,如果该值与用户传入的sign值相同,则允许访问,否则拒绝访问。在校验用户参数的同时,引入了固定的私钥信息和变化的私钥信息。使基于网络接口访问的请求可以根据服务器的时间,得到有效的验证和控制,提升的数据安全性。

Description

带时效的用户数据签名校验方法
技术领域
本发明属于互联网的一种校验方法技术领域,尤其涉及一种带时效的用户数据签名校验方法。
背景技术
随着互联网的兴起,通过互联网服务器进行数据交互已经成为了一个普遍的业务需求,互联网的用户也会出现多样性,随机性和不可控性,对于一个互联网服务器的设计来说,如果确定用户发送的数据没有经过篡改,对于用户的身份安全和数据安全是非常重要的。
发明内容
本发明提供一种带时效的用户数据签名校验方法,以解决上述背景技术中提出的问题。
本发明所解决的技术问题采用以下技术方案来实现:本发明提供一种带时效的用户数据签名校验方法,校验方法如下:
第一步:客户端发出HTTP请求,其中请求的参数格式为<key>=<value>,其中包括用户发送参数字段、当前时间字段和固定私钥字段,多个字段之间使用&号进行连接;
第二步:用户在发送构成的字符串参数时,需要在请求参数后增加一个名称为sign的参数,参数的内容为根据用户发送的字符串计算出的一个哈希数值,然后将新形成的参数发送到服务器;
第三步:服务器接收到参数后,服务器根据用户的输入,计算一个sign值,如果该值与用户传入的sign值相同,则允许访问,否则拒绝访问。
所述的Sign字段的内容计算分为3个部分,用户数据,固定私钥和可变私钥三个部分;同时采用不可逆的算法。
所述的哈希值计算的时候首先会对用户的参数进行首字母排序,然后在字符串末尾拼接字符串HYLANDA作为固定密钥,然后,在拼接一个可变的当前日期格式,YYYY-MM-DD,最后,整体字符串计算md5值作为哈希值。
本发明的有益效果为:在校验用户参数的同时,引入了固定的私钥信息和变化的私钥信息。使基于网络接口访问的请求可以根据服务器的时间,得到有效的验证和控制,提升的数据安全性。
附图说明
图1是本发明系统工作流程图。
图2为实施例1的流程图。
具体实施方式
实施例1、以下结合附图对本发明做进一步描述:一种带时效的用户数据签名校验方法,校验方法如下:
第一步:客户端发出HTTP请求,其中请求的参数格式为<key>=<value>,其中包括用户发送参数字段、当前时间字段和固定私钥字段,多个字段之间使用&号进行连接;
第二步:用户在发送构成的字符串参数时,需要在请求参数后增加一个名称为sign的参数,参数的内容为根据用户发送的字符串计算出的一个哈希数值,然后将新形成的参数发送到服务器;
第三步:服务器接收到参数后,服务器根据用户的输入,计算一个sign值,如果该值与用户传入的sign值相同,则允许访问,否则拒绝访问。
所述的Sign字段的内容计算分为3个部分,用户数据,固定私钥和可变私钥三个部分;同时采用不可逆的算法。
所述的哈希值计算的时候首先会对用户的参数进行首字母排序,然后在字符串末尾拼接字符串HYLANDA作为固定密钥,然后,在拼接一个可变的当前日期格式,YYYY-MM-DD,最后,整体字符串计算md5值作为哈希值。
实施例2、校验方法如下:以a1=1&a2=2&sign=31231为例
第一步:获取发送的数据,结果:a1=1、a2=2、b1=3
第二步:对数据进行排序,并使用&连接,结果:a1=1&a2=2&b1=3
第三步:拼接固定私钥,结果:a1=1&a2=2&b1=3HYLANDA
第四步:拼接可变私钥,内容为当前日期,格式为yyyymmdd:结果:
a1=1&a2=2&b1=3HYLANDA20160913
第五步:计算sign值,使用公开的md5函数,结果:md5
(a1=1&a2=2&b1=3HYLANDA20160913)转换为
90d7e6263fb76214a47b592c6186151d
第六步:构成发送的字符串,结果:90d7e6263fb76214a47b592c6186151d
第七步:将字符串发送到服务器,并将结果与服务器对比,如果该结果与用户传入的sign值相同,则允许访问,否则拒绝访问。
在校验用户参数的同时,引入了固定的私钥信息和变化的私钥信息。使基于网络接口访问的请求可以根据服务器的时间,得到有效的验证和控制,提升的数据安全性。
最后说明的是,选取上述实施例并对其进行了详细的说明和描述是为了更好的说明本发明专利的技术方案,并不是想要局限于所示的细节。本领域的技术人员对本发明的技术方案进行修改或同等替换,而不脱离本发明技术方案的宗旨和范围的,均应涵盖在本发明的权利要求范围当中。

Claims (3)

1.一种带时效的用户数据签名校验方法,其特征在于:校验方法如下:
第一步:客户端发出HTTP请求,其中请求的参数格式为<key>=<value>,其中包括用户发送参数字段、当前时间字段和固定私钥字段,多个字段之间使用&号进行连接;
第二步:用户在发送构成的字符串参数时,需要在请求参数后增加一个名称为sign的参数,参数的内容为根据用户发送的字符串计算出的一个哈希数值,然后将新形成的参数发送到服务器;
第三步:服务器接收到参数后,服务器根据用户的输入,计算一个sign值,如果该值与用户传入的sign值相同,则允许访问,否则拒绝访问。
2.根据权利要求1所述的一种带时效的用户数据签名校验方法,其特征在于:所述的Sign字段的内容计算分为3个部分,用户数据,固定私钥和可变私钥三个部分;同时采用不可逆的算法。
3.根据权利要求1所述的一种带时效的用户数据签名校验方法,其特征在于:所述的哈希值计算的时候首先会对用户的参数进行首字母排序,然后在字符串末尾拼接字符串HYLANDA作为固定密钥,然后,在拼接一个可变的当前日期格式,YYYY-MM-DD,最后,整体字符串计算md5值作为哈希值。
CN201610919867.6A 2016-10-21 2016-10-21 带时效的用户数据签名校验方法 Pending CN106571923A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610919867.6A CN106571923A (zh) 2016-10-21 2016-10-21 带时效的用户数据签名校验方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610919867.6A CN106571923A (zh) 2016-10-21 2016-10-21 带时效的用户数据签名校验方法

Publications (1)

Publication Number Publication Date
CN106571923A true CN106571923A (zh) 2017-04-19

Family

ID=58534089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610919867.6A Pending CN106571923A (zh) 2016-10-21 2016-10-21 带时效的用户数据签名校验方法

Country Status (1)

Country Link
CN (1) CN106571923A (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107911219A (zh) * 2017-11-09 2018-04-13 成都知道创宇信息技术有限公司 一种基于密钥签名的api防cc方法
CN108400979A (zh) * 2018-02-06 2018-08-14 武汉斗鱼网络科技有限公司 应用于客户端和服务器的通信方法及电子设备
CN109698806A (zh) * 2017-10-20 2019-04-30 福建省天奕网络科技有限公司 一种用户数据校验方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973695A (zh) * 2014-05-16 2014-08-06 浪潮电子信息产业股份有限公司 一种与服务器验证的签名算法
CN104683102A (zh) * 2013-11-29 2015-06-03 上海复旦微电子集团股份有限公司 一种sm2签名计算方法和装置
CN105072125A (zh) * 2015-08-26 2015-11-18 北京京东尚科信息技术有限公司 一种http通信系统及方法
CN105100073A (zh) * 2015-06-30 2015-11-25 北京奇虎科技有限公司 一种数据校验方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683102A (zh) * 2013-11-29 2015-06-03 上海复旦微电子集团股份有限公司 一种sm2签名计算方法和装置
CN103973695A (zh) * 2014-05-16 2014-08-06 浪潮电子信息产业股份有限公司 一种与服务器验证的签名算法
CN105100073A (zh) * 2015-06-30 2015-11-25 北京奇虎科技有限公司 一种数据校验方法和装置
CN105072125A (zh) * 2015-08-26 2015-11-18 北京京东尚科信息技术有限公司 一种http通信系统及方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109698806A (zh) * 2017-10-20 2019-04-30 福建省天奕网络科技有限公司 一种用户数据校验方法及系统
CN109698806B (zh) * 2017-10-20 2021-12-28 福建省天奕网络科技有限公司 一种用户数据校验方法及系统
CN107911219A (zh) * 2017-11-09 2018-04-13 成都知道创宇信息技术有限公司 一种基于密钥签名的api防cc方法
CN108400979A (zh) * 2018-02-06 2018-08-14 武汉斗鱼网络科技有限公司 应用于客户端和服务器的通信方法及电子设备
CN108400979B (zh) * 2018-02-06 2021-07-30 武汉斗鱼网络科技有限公司 应用于客户端和服务器的通信方法及电子设备

Similar Documents

Publication Publication Date Title
CN111771354A (zh) 使用区块链的单点登录方案
US9858626B2 (en) Social sharing of security information in a group
CN103067156B (zh) 移动互联网用户资源访问的url加密、验证方法和装置
CN103973695A (zh) 一种与服务器验证的签名算法
CN110224999A (zh) 信息交互方法、装置及存储介质
CN105827582B (zh) 一种通信加密方法、装置和系统
CN110912877B (zh) 变电站内基于iec61850模型的数据发送、接收方法及装置
CN104144161B (zh) 一种客户端与web服务端的交互方法及系统
CN106571923A (zh) 带时效的用户数据签名校验方法
CN110224984A (zh) 一种基于区块链技术的多方授权方法及装置
CN114567643B (zh) 跨区块链的数据流转方法、装置及相关设备
US10860726B2 (en) Peer-to-peer confidential document exchange
CN110071937A (zh) 基于区块链的登录方法、系统及存储介质
CN109379179B (zh) 用于更新数字证书的方法和装置
CN111212026A (zh) 基于区块链的数据处理方法、装置及计算机设备
US20160156610A1 (en) Message Pushing System And Method
CN109886011A (zh) 一种安全防护方法和装置
CN109698974A (zh) 一种显示进度的方法、装置、电子设备及介质
CN110247878A (zh) 一种数据传输加密方法
Mashima et al. Enhancing demand response signal verification in automated demand response systems
JP2005301576A (ja) データ通信システムの制御方法、データ通信システム、及び情報処理装置
CN102710416A (zh) 一种社交网站用的密码加密方法
Chen et al. Accountability as a Service for the Cloud: From Concept to Implementation with BPEL
CN107465510A (zh) 一种业务安全复用的处理方法及处理系统
CN113158218A (zh) 数据加密方法、装置及数据解密方法、装置

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170419

WD01 Invention patent application deemed withdrawn after publication