CN110830260B - 一种基于区块链的数字签名的时间戳生成方法 - Google Patents

一种基于区块链的数字签名的时间戳生成方法 Download PDF

Info

Publication number
CN110830260B
CN110830260B CN201910929365.5A CN201910929365A CN110830260B CN 110830260 B CN110830260 B CN 110830260B CN 201910929365 A CN201910929365 A CN 201910929365A CN 110830260 B CN110830260 B CN 110830260B
Authority
CN
China
Prior art keywords
signature
block chain
block
hash value
transaction
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
CN201910929365.5A
Other languages
English (en)
Other versions
CN110830260A (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.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201910929365.5A priority Critical patent/CN110830260B/zh
Publication of CN110830260A publication Critical patent/CN110830260A/zh
Priority to US17/032,041 priority patent/US11936799B2/en
Application granted granted Critical
Publication of CN110830260B publication Critical patent/CN110830260B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/083Key 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) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]
    • 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
    • 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/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
    • H04L9/3239Cryptographic 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 involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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
    • H04L9/3242Cryptographic 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 involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
    • 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
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/80Wireless
    • H04L2209/805Lightweight hardware, e.g. radio-frequency identification [RFID] or sensor
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种基于区块链的数字签名的时间戳生成方法,主要包含三个阶段:系统参数建立阶段,签名阶段,验证阶段。其中,在签名阶段,签名者获取区块链中n个最新确认的区块的哈希值,并将这n个哈希值与待签名的消息M绑定在一起记为M’,对M’进行签名得到签名T,签名者计算M’||T的哈希值h,并将h通过交易Tx上传到区块链上。验证方在完成签名T的验证之后,取第n个哈希值所在区块的生成时间之后,交易Tx所在区块的生成时间之前的时间范围作为签名T的时间戳,是一种去中心化的为数字签名打时间戳的精确方法。

Description

一种基于区块链的数字签名的时间戳生成方法
技术领域
本发明属于数据保护技术,具体涉及一种为数字签名打时间戳的方法。
背景技术
时间戳是数字文件创建于某个时间的证明,是保护数字信息证据价值的必不可少的工具。1990年,Stuart Haber等人在CRYPTO 90上提出了一个为数字文件打时间戳的方案,该方案通过一个可信中心为数字文件的哈希值和当前时间进行签名来实现时间戳的不可伪造性。后续工作提出了大量的改进方案,但是现有方案均依赖可信第三方,并不能解决单点失效的问题。
发明内容
本发明所要解决的技术问题是,提供一种基于区块链技术为数字签名打时间戳的实现方法。
本发明为解决上述技术问题所采用的技术方案是,一种基于区块链的数字签名的时间戳生成方法,主要包含三个阶段:系统参数建立阶段,签名阶段,验证阶段。
系统参数建立阶段:区块链生成区块并记录每个区块的生成时间,系统产生安全的哈希函数、签名算法以及相应的验证算法;
签名阶段:签名者获取区块链中n个最新确认的区块的哈希值,并将这n个哈希值与待签名的消息M绑定在一起记为M’,对M’进行签名得到签名T,签名者计算M’||T的哈希值h,并将h通过交易Tx上传到区块链上;
验证阶段:验证方在签名T的验证通过之后,取第n个哈希值所在区块的生成时间之后,交易Tx所在区块的生成时间之前的时间范围作为签名T的时间戳。
区块链是一个去中心化的分布式帐本,通过哈希值将链上的区块连接起来,保证了区块的时序性,并且区块链的每个区块中包含了该区块的产生时间。
本发明的有益效果是,基于区块链技术解决了单点失效的问题,是一种去中心化的为数字签名打时间戳的精确方法。
具体实施方式
Blockchain为一个公有区块链,对于系统中任意用户生成的数字签名,系统中其他任意用户均可通过Blockchain对该数据签名进行验证并产生精确的,具有一致性的时间戳。以下以签名者A、验证者B为例进行说明。
一、系统参数建立阶段:
设Blockchain中一个区块后链接有n个区块则可以确认该区块在Blockchain上。系统生成安全的哈希函数H(.)、签名算法SigA(.)以及相应的验证算法VerA(.),下标A表示签名者A。T=SigA(M)表示签名者A对消息M签名,得到签名T。VerA(M,T)表示验证者验证签名者A对消息M的签名T的有效性,有效则返回true,无效则返回false。||表示连接符号。签名算法Sig可以为任意签名算法。
二、签名阶段:
签名者A需要对消息M签名时,执行以下操作:
1.获取目前Blockchain上最新确认的n个区块的哈希值h1,h2,...,hn(按照区块高度由低到高排列);优选的,在以太坊中n≥12,在比特币中n≥6;
2.将这n个哈希值与待签名的消息M绑定在一起的方式为:计算哈希值hBlock=H(h1||h2||...||hn),再M||hBlock记为M’;
3.对M’进行签名T=SigA(M||hBlock),得到签名T;
4.计算哈希值hA=H(M||h1||h2||...||hn||T);
5.生成一笔包含hA的区块链交易,并将这笔交易发送到Blockchain上,并确保Blockchain对这笔交易进行记录(交易Tx记录在Blockchain中的位置L上);
6.签名者A记录该笔交易在Blockchain上的位置L,并将消息M、哈希值h1,h2,...,hn、签名T和位置L发送给验证者B。
三、验证阶段:
验证者B收到消息M、哈希值h1,h2,...,hn、签名T和位置L后,需要验证签名和确认数字签名的时间戳。验证者B执行以下操作:
1.验证哈希值h1,h2,...,hn是否是Blockchain上连续的n个区块的哈希值,若不是,退出;若是,继续执行下一步;
2.利用位置信息L在Blockchain中找到签名者A的交易,并获取哈希值hA,验证者B验证等式hA=H(M||h1||h2||...||hn||T)是否成立。若等式不成立,退出;若等式成立,继续执行下一步;
3.计算哈希值hBlock=H(h1||h2||...||hn);
4.执行验证算法VerA((M||hBlock),T),若返回false,则签名无效,并退出;若返回true,则签名有效,验证者B获取交易Tx所在区块的生成时间t,记Blockchain上哈希值是hn的区块的生成时间为t’;验证者B确认签名T产生的时间在t之前,并且在t’之后,将时间间隔[t’,t]作为数字签名T的时间戳。

Claims (3)

1.一种基于区块链的数字签名的时间戳生成方法,其特征在于,包括步骤:
1)系统参数建立阶段:
区块链生成区块并记录每个区块的生成时间,系统产生安全的哈希函数H(.)、签名算法Sig(.)以及相应的验证算法Ver(.);
2)签名阶段:
2-1)签名者获取区块链中最近生成的n个连续区块的哈希值h1,h2,...,hn,再计算哈希值hBlock=H(h1||h2||...||hn),利用签名算法对消息M和哈希值hBlock进行签名处理得到签名T=Sig(M||hBlock),再计算哈希值h=H(M||h1||h2||...||hn||T),最后生成一笔包含哈希值h的区块链交易Tx发送至区块链;
2-2)区块链对交易Tx进行记录,其中交易Tx记录在区块链中的位置L;
2-3)签名者记录交易Tx所在的区块链中的位置L,将消息M、哈希值h1,h2,...,hn、签名T和位置L发送给验证者;
3)验证阶段,验证者收到消息M、哈希值h1,h2,..,hn、签名T和位置L后,对签名进行验证并生成数字签名的时间戳:
3-1)验证者验证哈希值h1,h2,...,hn是否是区块链上连续的n个区块的哈希值,若不是,退出;若是,继续执行下一步;
3-2)根据位置L在区块链中找到签名者的交易Tx,并获取哈希值h,验证者验证等式h=H(M||h1||h2||...||hn||T)是否成立,若等式不成立,退出;若等式成立,继续执行下一步;
3-3)计算哈希值hBlock=H(h1||h2||...||hn),再执行签名的验证算法Ver((M||hBlock),T),若验证失败,则签名无效并退出;若验证通过,则签名有效,验证者在区块链上获取记录该交易Tx的区块的生成时间t以及哈希值为hn的区块的生成时间t’,验证者确认签名T的时间戳为[t’,t]。
2.如权利要求1所述方法,其特征在于,如区块链为以太坊区块链,设置n≥12。
3.如权利要求1所述方法,其特征在于,如区块链为比特币区块链,设置n≥6。
CN201910929365.5A 2019-09-27 2019-09-27 一种基于区块链的数字签名的时间戳生成方法 Active CN110830260B (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910929365.5A CN110830260B (zh) 2019-09-27 2019-09-27 一种基于区块链的数字签名的时间戳生成方法
US17/032,041 US11936799B2 (en) 2019-09-27 2020-09-25 Blockchain-based time stamping method for digital signature

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910929365.5A CN110830260B (zh) 2019-09-27 2019-09-27 一种基于区块链的数字签名的时间戳生成方法

Publications (2)

Publication Number Publication Date
CN110830260A CN110830260A (zh) 2020-02-21
CN110830260B true CN110830260B (zh) 2021-09-24

Family

ID=69548370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910929365.5A Active CN110830260B (zh) 2019-09-27 2019-09-27 一种基于区块链的数字签名的时间戳生成方法

Country Status (2)

Country Link
US (1) US11936799B2 (zh)
CN (1) CN110830260B (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3989479B1 (en) * 2020-10-23 2023-07-19 Nokia Technologies Oy Methods and devices in a blockchain network
CN114422137B (zh) * 2021-12-10 2024-04-30 清华大学 安全分布式时间管理方法、系统
CN114598494B (zh) * 2022-01-18 2023-02-28 电子科技大学 基于区块链的数据定时传输方法
CN114726536A (zh) * 2022-03-31 2022-07-08 南方电网科学研究院有限责任公司 一种时间戳生成方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108566398A (zh) * 2018-04-23 2018-09-21 北京奇虎科技有限公司 基于时间戳的区块链攻击事件感知方法及装置
CN109034805A (zh) * 2018-08-09 2018-12-18 江苏先安科技有限公司 一种适用于区块链和嵌入式领域的新型时间戳签名验证方法
CN109508984A (zh) * 2018-11-26 2019-03-22 中国科学院软件研究所 一种基于确定性共识与可信时间戳的区块链电子存证方法
CN110061843A (zh) * 2019-01-31 2019-07-26 阿里巴巴集团控股有限公司 一种链式账本中的块高创建方法、装置及设备
US20190278921A1 (en) * 2013-07-06 2019-09-12 NewVoiceMedia Ltd. System and methods for tamper proof interaction recording and timestamping

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004260664A (ja) * 2003-02-27 2004-09-16 Nec Corp タイムスタンプ付与機能をもつxml署名生成システム,装置,方法およびプログラム
US10402792B2 (en) * 2015-08-13 2019-09-03 The Toronto-Dominion Bank Systems and method for tracking enterprise events using hybrid public-private blockchain ledgers
EP3563553B1 (en) * 2017-02-24 2022-02-16 NEC Corporation Method for signing a new block in a decentralized blockchain consensus network
CN110445619B (zh) * 2017-03-30 2020-10-16 腾讯科技(深圳)有限公司 区块链系统、消息处理方法及存储介质
US20180293557A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. Method of charging electronic currency automatically based on blockchain and system thereof
US11102244B1 (en) * 2017-06-07 2021-08-24 Agari Data, Inc. Automated intelligence gathering
EP3679683A4 (en) * 2017-09-08 2021-08-25 Uledger, Inc. SYSTEMS AND PROCEDURES FOR PROVIDING IMMUTABLE RECORDINGS
US11080691B2 (en) * 2018-04-09 2021-08-03 Storecoin Inc. Fork-tolerant consensus protocol
US11728995B2 (en) * 2018-04-09 2023-08-15 American Express Travel Related Services Company, Inc. Reward point transfers using blockchain
US20210097532A1 (en) * 2018-04-19 2021-04-01 Sak Mahasuverachai Systems and methods for recording assets and transactions thereof in blockchains
EP3605944B1 (en) * 2018-07-31 2023-08-30 Siemens Healthcare GmbH Documenting timestamps within a blockchain
JP2020021186A (ja) * 2018-07-31 2020-02-06 富士通株式会社 トランザクション制御装置、トランザクション制御プログラムおよびトランザクション制御方法
US20200117733A1 (en) * 2018-10-11 2020-04-16 Sap Se Blockchain integration layer
US10929816B2 (en) * 2018-10-29 2021-02-23 Advanced Messaging Technologies, Inc. Systems and methods for message transmission and retrieval using blockchain
CN109784005A (zh) * 2018-12-28 2019-05-21 国网雄安金融科技有限公司 电子协议管理平台及电子协议管理方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190278921A1 (en) * 2013-07-06 2019-09-12 NewVoiceMedia Ltd. System and methods for tamper proof interaction recording and timestamping
CN108566398A (zh) * 2018-04-23 2018-09-21 北京奇虎科技有限公司 基于时间戳的区块链攻击事件感知方法及装置
CN109034805A (zh) * 2018-08-09 2018-12-18 江苏先安科技有限公司 一种适用于区块链和嵌入式领域的新型时间戳签名验证方法
CN109508984A (zh) * 2018-11-26 2019-03-22 中国科学院软件研究所 一种基于确定性共识与可信时间戳的区块链电子存证方法
CN110061843A (zh) * 2019-01-31 2019-07-26 阿里巴巴集团控股有限公司 一种链式账本中的块高创建方法、装置及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于区块链的投票系统的设计与开发》;胡浩;《中国优秀硕士学位论文全文数据库》;20190115;全文 *

Also Published As

Publication number Publication date
CN110830260A (zh) 2020-02-21
US20210099315A1 (en) 2021-04-01
US11936799B2 (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN110830260B (zh) 一种基于区块链的数字签名的时间戳生成方法
CN108667626B (zh) 安全的两方协作sm2签名方法
US8971528B2 (en) Modified elliptic curve signature algorithm for message recovery
US8533482B2 (en) Method for generating a key pair and transmitting a public key or request file of a certificate in security
CN106972931B (zh) 一种pki中证书透明化的方法
EP2951949B1 (en) Modified sm2 elliptic curve signature algorithm supporting message recovery
CN107948143B (zh) 一种云存储中基于身份的隐私保护完整性检测方法和系统
US8122245B2 (en) Anonymity revocation
CN108551392B (zh) 一种基于sm9数字签名的盲签名生成方法及系统
WO2019228557A3 (en) System and method for decentralized-identifier authentication
CN112202558B (zh) 一种基于区块链的可信数字签名方法及装置
CN101931631B (zh) 一种能与手写签名建立可靠对应的数字签名方法
CN101127107A (zh) 电子文档自动签名系统及方法
CN106713336B (zh) 基于双重非对称加密技术的电子数据保管系统及方法
CA2317775A1 (en) Hybrid signature scheme
CN107835082B (zh) 一种基于身份的可追踪环签名认证协议
TWI608722B (zh) Public key certificate method
CN102739626A (zh) 时间同步方法和装置、时间戳设备以及可信时间服务器
CN104392185A (zh) 在云环境日志取证中实现数据完整性验证的方法
CN101917273A (zh) 一种基于ecc证书的ads-b数据认证方法
CA2669472C (en) Compressed ecdsa signatures
CN111654366B (zh) 一种安全的pki与ibc之间的双向异构强指定验证者签名方法
CN112152807A (zh) 一种基于sm2算法的两方协同数字签名方法
CN104917615A (zh) 一种基于环签名的可信计算平台属性验证方法
CN116865970A (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