CN110943976B - 一种基于口令的用户签名私钥管理方法 - Google Patents

一种基于口令的用户签名私钥管理方法 Download PDF

Info

Publication number
CN110943976B
CN110943976B CN201911087511.0A CN201911087511A CN110943976B CN 110943976 B CN110943976 B CN 110943976B CN 201911087511 A CN201911087511 A CN 201911087511A CN 110943976 B CN110943976 B CN 110943976B
Authority
CN
China
Prior art keywords
private key
user
signature
password
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911087511.0A
Other languages
English (en)
Other versions
CN110943976A (zh
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.)
China Electronic Technology Cyber Security Co Ltd
Original Assignee
China Electronic Technology Cyber Security 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 China Electronic Technology Cyber Security Co Ltd filed Critical China Electronic Technology Cyber Security Co Ltd
Priority to CN201911087511.0A priority Critical patent/CN110943976B/zh
Publication of CN110943976A publication Critical patent/CN110943976A/zh
Application granted granted Critical
Publication of CN110943976B publication Critical patent/CN110943976B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • 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/3226Cryptographic 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 a predetermined code, e.g. password, passphrase or PIN
    • 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

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)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

本发明公开了一种基于口令的用户签名私钥管理方法,包括如下两个阶段:第一阶段、用户注册:用户在系统注册,获得身份标识、登陆密码、生成用于签名认证的公私钥对,并将私钥封装后和身份标识、登陆密码的哈希值以及公钥一起发送给服务器,服务器收到这些信息后存储在本地;第二阶段、进行签名:当用户需要签名时,先登陆系统获取私钥,然后使用私钥对需要签名的信息进行签名,并将签名发送给服务器,服务器验证签名的正确性。本发明的积极效果是:用户只需要记住登录的口令密码,而不需要记住公钥和私钥对,不容易丢失用户的公钥和私钥;用户将私钥进行封装存储,用户私钥的安全性得到了很好的保障,并且存储在服务端节省了用户的存储空间。

Description

一种基于口令的用户签名私钥管理方法
技术领域
本发明涉及一种基于口令的用户签名私钥管理方法。
背景技术
在传统的口令登录系统中,用户的口令只是用于认证用户身份的合法性,并且在系统的使用中,用户需要自己存储签名等所需要的公私钥,所以用户需要记住登录的口令和用于签名的公私钥等,这样对用户而言非常的不方便,并且可能导致用户私钥丢失或者被其他攻击者获得,因此将用户的私钥进行统一存储管理就非常有必要。
发明内容
为了克服现有技术的上述缺点,本发明提出了一种基于口令的用户签名私钥管理方法,针对注册系统中,用户用登录口令对签名密钥封装存储的问题,本发明采用对称加密技术,将用于签名的公钥和私钥封装后存储在服务器端,保证私钥的机密性。本发明要解决的技术问题为:如何保证用户私钥的机密性,用户如何通过登录口令恢复私钥。
本发明解决其技术问题所采用的技术方案是:一种基于口令的用户签名私钥管理方法,包括如下两个阶段:
第一阶段、用户注册:
用户在系统注册,获得身份标识、登陆密码、生成用于签名认证的公私钥对,并将私钥封装后和身份标识、登陆密码的哈希值以及公钥一起发送给服务器,服务器收到这些信息后存储在本地;
第二阶段、进行签名:
当用户需要签名时,先登陆系统获取私钥,然后使用私钥对需要签名的信息进行签名,并将签名发送给服务器,服务器验证签名的正确性。
与现有技术相比,本发明的积极效果是:
(1)用户只需要记住登录的口令密码,而不需要记住公钥和私钥对,不容易丢失用户的公钥和私钥。
(2)用户将私钥进行封装存储,用户私钥的安全性得到了很好的保障,并且存储在服务端节省了用户的存储空间。
附图说明
本发明将通过例子并参照附图的方式说明,其中:
图1为用户注册的流程图;
图2为获取私钥及签名的流程图。
具体实施方式
一、方案概述
该方案的目的是将用户的私钥用登录口令进行封装,然后和公钥一起存储在服务端用户身份对应的数据库中,这样用户就只需要记住登录口令,用于签名的密钥不容易丢失或被他人盗取。当用户需要用到私钥时,用户输入登录密码向服务器发送请求,服务器验证用户身份成功后,将封装的私钥和公钥一起发送给用户,用户解密即可获得私钥。该方案一共可以分为二个阶段:第一阶段,用户注册,用户通过注册获得身份标识、登陆密码、生成用于签名认证的公私钥对,并将私钥封装后和身份标识、登陆密码的哈希值以及公钥一起发送给服务器,服务器将这些信息进行存储。第二阶段,进行签名,当用户需要签名时,需要先从服务器获得私钥,再进行签名;用户登陆该系统,输入登录密码后,计算其哈希值,将该哈希值发送给服务器,服务器验证哈希是否与本地存储的哈希值相等,验证成功后,服务器将与私钥有关的数据发送给用户;用户解密获取私钥;用户使用私钥对需要签名的信息进行签名,服务器通过公钥验证签名的正确性。
二、方案符号
下表为方案中变量和变量在方案中的作用。
变量符号 意义
UID 用户的身份标识符
PW 用户登录的口令
(pk,sk) 用户的公钥和私钥对
H SM3哈希函数
PW<sub>1</sub> 对称加密的秘钥
h<sub>1</sub>,h<sub>2</sub> 哈希值
Enc,Dec 对称加解密算法
CRC 校验码
C 用户的私钥和其校验码加密的密文
msg 待签名的消息
三、具体方案
本发明中使用的签名算法为SM2签名算法(GM/T 0003),使用的对称加密算法为SM4对称加密算法(GM/T 0002),使用哈希算法为SM3哈希算法(GM/T0004)。
1、用户注册(如图1所示)
用户在系统注册个人信息,并将必要的信息存储在服务端的数据库中。其具体的流程如下:
1.1用户在注册界面输入用户名UID和口令PW。
1.2用户使用SM2签名算法生成用于签名的公私钥对(pk,sk),其中sk为私钥,pk为公钥。
1.3用户使用SM3哈希算法计算用户名和口令的哈希值,得到PW1=H(UID||PW),PW1计算SM4对称加密的密钥。
1.4用户使用SM3哈希算法计算口令的哈希值,得到h1=H(PW)。
1.5用户计算签名私钥sk的CRC校验码,得到crc=CRC(sk)。
1.6用户使用SM4对称加密算法对私钥sk和校验码crc加密,得到
Figure BDA0002265883110000041
其中PW1为1.3步骤中产生的对称加密密钥。
1.7用户将UID、pk、h1和C发送给服务器,服务器收到UID、pk、h1和C存储在本地。
2、私钥获取及签名(如图2所示)
2.1用户输入用户名UID和PW,利用SM3算法计算口令的哈希值,得到h2=H(PW)。
2.2用户将h2发送给服务器,请求获取私钥。
2.3服务器验证本地存储的h1是否等于h2,当h1=h2后,服务器将密文C和公钥pk发送给用户。
2.4用户使用SM4算法解密密文C,
Figure BDA0002265883110000042
得到明文M,并从明文M中恢复出私钥sk和校验码crc。
2.5用户使用校验码crc对私钥sk进行验证,验证成功即为用户的私钥。
2.6用户使用SM2算法对需要签名的信息msg进行签名,得到sig=Sigsk(msg),其中sk为签名私钥,最后将签名sig发送给服务器。
2.7服务器根据本地存储的公钥pk使用SM2验签算法验证sig是否有效。

Claims (6)

1.一种基于口令的用户签名私钥管理方法,其特征在于:包括如下两个阶段:
第一阶段、用户注册:
用户在系统注册,获得身份标识、登陆密码、生成用于签名认证的公私钥对,并将私钥封装后和身份标识、登陆密码的哈希值以及公钥一起发送给服务器,服务器收到这些信息后存储在本地;其中:
用户对私钥进行封装的方法为:
(1)用户使用SM3哈希算法计算身份标识UID和登陆密码PW的哈希值,得到PW1=H(UID||PW);
(2)用户计算私钥sk的CRC校验码,得到crc=CRC(sk);
(3)用户使用SM4对称加密算法对私钥sk和校验码crc加密,得到密文
Figure FDA0003269782730000011
第二阶段、进行签名:
当用户需要签名时,先登陆系统获取私钥,然后使用私钥对需要签名的信息进行签名,并将签名发送给服务器,服务器验证签名的正确性。
2.根据权利要求1所述的一种基于口令的用户签名私钥管理方法,其特征在于:用户使用SM2签名算法生成用于签名认证的公私钥对。
3.根据权利要求1所述的一种基于口令的用户签名私钥管理方法,其特征在于:用户登陆密码的哈希值h1采用SM3哈希算法计算得到:h1=H(PW)。
4.根据权利要求3所述的一种基于口令的用户签名私钥管理方法,其特征在于:用户签名时获取私钥的方法为:
(1)用户输入身份标识UID和登陆密码PW,利用SM3算法计算PW的哈希值,得到h2=H(PW);
(2)用户将h2发送给服务器,请求获取私钥;
(3)服务器验证本地存储的h1是否等于h2,若相等,则将本地存储的密文C和公钥pk发送给用户;
(4)用户使用SM4算法解密密文C,得到明文
Figure FDA0003269782730000021
并从明文M中恢复出私钥sk和校验码crc;
(5)用户使用校验码crc对私钥sk进行验证,验证成功即获得签名私钥sk。
5.根据权利要求4所述的一种基于口令的用户签名私钥管理方法,其特征在于:对信息进行签名的方法为:使用SM2算法对需要签名的信息msg进行签名,得到sig=Sigsk(msg)。
6.根据权利要求5所述的一种基于口令的用户签名私钥管理方法,其特征在于:验证签名的方法为:根据本地存储的公钥pk使用SM2验签算法验证sig是否有效。
CN201911087511.0A 2019-11-08 2019-11-08 一种基于口令的用户签名私钥管理方法 Active CN110943976B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911087511.0A CN110943976B (zh) 2019-11-08 2019-11-08 一种基于口令的用户签名私钥管理方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911087511.0A CN110943976B (zh) 2019-11-08 2019-11-08 一种基于口令的用户签名私钥管理方法

Publications (2)

Publication Number Publication Date
CN110943976A CN110943976A (zh) 2020-03-31
CN110943976B true CN110943976B (zh) 2022-01-18

Family

ID=69907389

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911087511.0A Active CN110943976B (zh) 2019-11-08 2019-11-08 一种基于口令的用户签名私钥管理方法

Country Status (1)

Country Link
CN (1) CN110943976B (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069547B (zh) * 2020-07-29 2023-12-08 北京农业信息技术研究中心 一种供应链责任主体身份认证方法及系统
CN112163918B (zh) * 2020-10-30 2024-05-28 重庆远见信息产业集团股份有限公司 一种有奖凭据管理系统及方法
CN112560015A (zh) 2020-12-17 2021-03-26 北京百度网讯科技有限公司 电子设备的密码更新方法、装置、设备以及存储介质
CN112688784B (zh) * 2020-12-23 2023-04-11 中科美络科技股份有限公司 一种数字签名、验证方法、装置及系统
CN113055161B (zh) * 2021-03-09 2021-11-26 武汉大学 一种基于sm2和sm9数字签名算法的移动终端认证方法与系统
CN112907247B (zh) * 2021-03-18 2024-01-26 上海零数众合信息科技有限公司 一种区块链授权计算控制方法
CN113114668B (zh) * 2021-04-09 2023-11-03 北京石头世纪科技股份有限公司 一种信息传输方法、移动终端、存储介质及电子设备
CN113347157B (zh) * 2021-05-13 2022-10-14 浪潮软件股份有限公司 一种基于SM系列加密算法的Web应用加密系统及方法
CN113556321A (zh) * 2021-06-22 2021-10-26 杭州安恒信息技术股份有限公司 口令认证方法、系统、电子装置和存储介质
CN113779634A (zh) * 2021-09-17 2021-12-10 江苏通付盾区块链科技有限公司 一种数据存储方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888938A (zh) * 2012-12-19 2014-06-25 深圳市华营数字商业有限公司 一种基于参数的动态生成密钥的pki私钥保护方法
CN109522698A (zh) * 2018-10-11 2019-03-26 平安科技(深圳)有限公司 基于区块链的用户认证方法及终端设备
CN110391900A (zh) * 2019-07-04 2019-10-29 晋商博创(北京)科技有限公司 基于sm2算法的私钥处理方法、终端及密钥中心

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618120B (zh) * 2015-03-04 2018-01-23 青岛微智慧信息有限公司 一种移动终端密钥托管数字签名方法
US9853813B2 (en) * 2016-03-17 2017-12-26 Crater Dog Technologies, LLC Method for securing a private key
TWI608361B (zh) * 2016-09-23 2017-12-11 群暉科技股份有限公司 電子裝置、伺服器、通訊系統及通訊方法
CN106656503B (zh) * 2016-10-13 2019-09-24 上海众人网络安全技术有限公司 密钥存储方法、数据加解密方法、电子签名方法及其装置
CN109150535A (zh) * 2017-06-19 2019-01-04 中国移动通信集团公司 一种身份认证方法、设备、计算机可读存储介质及装置
CN110035033B (zh) * 2018-01-11 2022-11-25 华为技术有限公司 密钥分发方法、装置及系统
CN108923910B (zh) * 2018-07-12 2021-06-25 南方电网科学研究院有限责任公司 一种移动应用apk防篡改的方法
CN109889518B (zh) * 2019-02-18 2022-02-15 天固信息安全系统(深圳)有限责任公司 一种加密存储方法
CN110046515B (zh) * 2019-04-18 2021-03-23 杭州尚尚签网络科技有限公司 一种基于短效数字证书的安全的电子签名方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888938A (zh) * 2012-12-19 2014-06-25 深圳市华营数字商业有限公司 一种基于参数的动态生成密钥的pki私钥保护方法
CN109522698A (zh) * 2018-10-11 2019-03-26 平安科技(深圳)有限公司 基于区块链的用户认证方法及终端设备
CN110391900A (zh) * 2019-07-04 2019-10-29 晋商博创(北京)科技有限公司 基于sm2算法的私钥处理方法、终端及密钥中心

Also Published As

Publication number Publication date
CN110943976A (zh) 2020-03-31

Similar Documents

Publication Publication Date Title
CN110943976B (zh) 一种基于口令的用户签名私钥管理方法
US11757662B2 (en) Confidential authentication and provisioning
CN109067524B (zh) 一种公私钥对生成方法及系统
US8130961B2 (en) Method and system for client-server mutual authentication using event-based OTP
CN109040067B (zh) 一种基于物理不可克隆技术puf的用户认证设备及认证方法
WO2020087805A1 (zh) 基于双密值和混沌加密的可信测控网络认证方法
CN111512608B (zh) 基于可信执行环境的认证协议
WO2019109097A1 (en) Identity verification document request handling utilizing a user certificate system and user identity document repository
CA2551113A1 (en) Authentication system for networked computer applications
KR101897715B1 (ko) 바이오정보를 이용한 패스워드 없는 전자서명 시스템
JP6167990B2 (ja) 署名検証システム、検証装置、及び署名検証方法
WO2015161689A1 (zh) 一种基于协商密钥的数据处理方法
CN103701787A (zh) 一种基于公开密钥算法实现的用户名口令认证方法
CN109951276B (zh) 基于tpm的嵌入式设备远程身份认证方法
KR20160013135A (ko) 공유 비밀을 암시하는 보안 데이터 채널 인증
CN114448641A (zh) 一种隐私加密方法、电子设备、存储介质以及芯片
CN109218251B (zh) 一种防重放的认证方法及系统
TWI593267B (zh) 具有時戳驗證的免憑證公開金鑰管理方法
CN108551391B (zh) 一种基于USB-key的认证方法
US20210044435A1 (en) Method for transmitting data from a motor vehicle and method for another vehicle to receive the data through a radio communication channel
CN113572612B (zh) 一种国密sm9算法私钥分发方法、用户终端和密钥生成中心
KR20130136119A (ko) 디바이스 인증 방법
EP3185504A1 (en) Security management system for securing a communication between a remote server and an electronic device
KR100917564B1 (ko) Id 기반 티켓인증방법
CN116248264A (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
GR01 Patent grant
GR01 Patent grant