CN111488618B - Block chain-based one-time pad encryption method, device and storage medium - Google Patents

Block chain-based one-time pad encryption method, device and storage medium Download PDF

Info

Publication number
CN111488618B
CN111488618B CN202010285295.7A CN202010285295A CN111488618B CN 111488618 B CN111488618 B CN 111488618B CN 202010285295 A CN202010285295 A CN 202010285295A CN 111488618 B CN111488618 B CN 111488618B
Authority
CN
China
Prior art keywords
block chain
time
receiver
time pad
sender
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.)
Expired - Fee Related
Application number
CN202010285295.7A
Other languages
Chinese (zh)
Other versions
CN111488618A (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.)
Shenzhen Institute of Information Technology
Original Assignee
Shenzhen Institute of Information Technology
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 Shenzhen Institute of Information Technology filed Critical Shenzhen Institute of Information Technology
Priority to CN202010285295.7A priority Critical patent/CN111488618B/en
Publication of CN111488618A publication Critical patent/CN111488618A/en
Application granted granted Critical
Publication of CN111488618B publication Critical patent/CN111488618B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Abstract

The invention provides a block chain-based one-time pad encryption method, which comprises the following steps: step one, a sender requests that a receiver is about to start communication, the receiver responds to confirmation, establishes a mutual trust mechanism of the two parties, and establishes a synchronization mechanism of the two parties based on a block chain; step two, the sender and the receiver simultaneously select the hash value of the latest block of the block chain as a random number seed, and a random number is generated by a random number generator to serve as a one-time key; step three, the sender encrypts the plaintext based on the one-time key, sends the ciphertext and destroys the one-time key; and step four, after receiving the ciphertext, the receiver decrypts the ciphertext based on the one-time key and destroys the one-time key. The invention also provides a block chain-based one-time pad cipher device. The invention also provides a storage medium. The invention has the beneficial effects that: the generation and distribution problems of large-scale keys are solved.

Description

Block chain-based one-time pad encryption method, device and storage medium
Technical Field
The present invention relates to a blockchain, and more particularly, to a method and an apparatus for one-time pad encryption based on a blockchain, and a storage medium.
Background
The Blockchain (Blockchain) is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. Block chaining can maintain continuously growing, non-tampered data records by maintaining a chained structure of data blocks. A blockchain is the underlying technology of digital currency systems such as Bitcoin (BTC), etherhouse (Ethereum), etc., and is essentially a decentralized database, which is a string of data blocks (blocks) associated using cryptography. Each block contains information of a batch of digital money network transactions for verifying the validity of the information and generating the next block. The common advantages of blockchains (such as bitcoin and ether house) are widely understood as not having any central authority or central server, and their network is a decentralized feature of peer-to-peer networks. By storing data across its decentralized network, the blockchain eliminates many of the risks associated with storing data centrally.
One-time pad was originally invented by Major Joseph Mauborgne and Gilbert Vernam of AT & T in 1917. Messages are encrypted using a random key that is as long as the message and has no duplication, and in addition, the key is used to encrypt and decrypt only one message and then discarded. Each new message requires a new key of equal length. This is a well-known one-time pad that is not breakable. It produces a random output that has no statistical relationship to the plaintext. Since the ciphertext does not contain any information in the plaintext, it cannot be hacked.
In theory, we no longer need to find other cryptographic methods, and the one-time pad provides complete security, but in practice, the one-time pad has two fundamental difficulties:
(1) problem of generation of key: there are practical difficulties in generating large scale random keys, and any frequently used system requires millions of random characters based on a certain rule, and providing random characters of such a size is a rather laborious task.
(2) Key distribution problem: each message to be sent requires a key of the same length as the sender and receiver, and therefore, there is a problem of enormous key distribution.
Because of these two difficulties, the one-time pad is rarely used in practice.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a block chain-based one-time pad encryption method, a block chain-based one-time pad encryption device and a storage medium.
The invention provides a block chain-based one-time pad encryption method, which comprises the following steps:
step one, a sender requests that a receiver is about to start communication, the receiver responds to confirmation, establishes a mutual trust mechanism of the two parties, and establishes a synchronization mechanism of the two parties based on a block chain;
step two, the sender and the receiver simultaneously select the hash value of the latest block of the block chain as a random number seed, and a random number is generated by a random number generator to serve as a one-time key;
step three, the sender encrypts the plaintext based on the one-time key, sends the ciphertext and destroys the one-time key;
and step four, after receiving the ciphertext, the receiver decrypts the ciphertext based on the one-time key and destroys the one-time key.
As a further improvement of the present invention, in the step one, the sender and the receiver adopt a request/response mode to establish a mutual trust mechanism between the two parties.
As a further improvement of the present invention, in the step one, the time interval for generating new blocks according to different blockchains is different, and the sender and the receiver determine in advance to select a blockchain meeting the conditions, such as: bitcoin system, etherhouse system, ledebut coin system, or other blockchain, etc.
As a further improvement of the present invention, in the first step, a two-party synchronization mechanism is established according to a block chain newly generated in the sender and the receiver.
As a further improvement of the present invention, in the second step, the random number generator, both the sending and the receiving, must be kept secret.
As a further improvement of the invention, in the first step, a new block is dynamically generated at intervals by the block chain, and each block contains information of a batch of digital currency network transactions.
As a further improvement of the present invention, blocks are constantly being maintained and constantly growing by miners, providing large-scale random characters through a blockchain, and are constantly being dynamically increased.
As a further improvement of the present invention, in the second step, the random number generators of the sending party and the receiving party are the same, and the same output is generated by inputting the same seed.
As a further improvement of the present invention, in the second step, based on plaintext with different lengths, the random number generator generates a one-time key with a corresponding length.
As a further improvement of the present invention, in the third step, the encryption algorithm may be a symmetric cipher algorithm, or may be a modulo operation, an exclusive or operation, and the like.
As a further improvement of the present invention, in the fourth step, the decryption algorithm may be a symmetric cryptographic algorithm, or may be a modulo operation, an exclusive or operation, etc., and the ciphertext may be restored to the plaintext.
The invention also provides a block chain-based one-time pad cipher device which comprises a computer network, a memory, a processor and a block chain-based one-time pad cipher processing program which is stored on the memory and can run on the processor, wherein when the block chain-based one-time pad cipher processing program is executed by the processor, the block chain-based one-time pad cipher method is realized.
The invention also provides a storage medium, wherein the storage medium is stored with a block chain-based one-time pad encryption processing program, and the block chain-based one-time pad encryption processing program realizes the block chain-based one-time pad encryption method when being executed by a processor.
The invention has the beneficial effects that:
(1) the problems of large-scale key generation and distribution are solved;
(2) can promote the popularization of the one-time pad cryptosystem.
Drawings
Fig. 1 is a block chain-based one-time pad cipher method according to the present invention.
FIG. 2 is a flowchart illustrating the operation of a blockchain-based one-time pad cipher method according to the present invention.
Detailed Description
The invention is further described with reference to the following description and embodiments in conjunction with the accompanying drawings.
As shown in fig. 1 and 2, a block chain-based one-time pad cipher method includes the following steps:
step one, a sender requests a receiver to start communication, and the receiver responds to confirmation and establishes a mutual communication mechanism of the two parties;
step two, the time intervals for generating new blocks according to different block chains are different, and the two parties can determine in advance to select a proper block chain, such as: bitcoin system, etherhouse system, ledebut coin system, or other blockchain, etc.;
step three, according to the block chain newly generated in the system of the sending party and the receiving party, establishing a synchronous mechanism of the two parties;
step four, the time intervals for generating new blocks according to different block chains are different, and the two parties can determine in advance to select a proper block chain, such as: bitcoin system, etherhouse system, or other blockchain, etc.;
step five, the sender and the receiver simultaneously select the hash value of the latest block of the block chain as a random number seed, and a random number is generated by a random number generator to serve as a one-time key;
step six, the sender encrypts the plaintext based on the one-time secret key, sends the ciphertext and destroys the one-time secret key;
and step seven, after receiving the ciphertext, the receiver decrypts the ciphertext based on the one-time key and destroys the one-time key.
The one-time secret key generated each time under the block chain mechanism is dynamically and randomly generated and has no statistical relationship with a plaintext, so that the safety of the one-time secret key system is ensured. On the other hand, because the block chain is a decentralized distributed synchronous system, a new block is dynamically and synchronously generated at intervals, and therefore the problem that a large-scale random key is generated in the traditional one-time pad cipher system and the problem of key distribution are solved.
The invention also provides a block chain-based one-time pad cipher device which comprises a computer network, a memory, a processor and a block chain-based one-time pad cipher processing program which is stored on the memory and can run on the processor, wherein when the block chain-based one-time pad cipher processing program is executed by the processor, the block chain-based one-time pad cipher method is realized.
The invention also provides a storage medium, wherein the storage medium is stored with a block chain-based one-time pad encryption processing program, and the block chain-based one-time pad encryption processing program realizes the block chain-based one-time pad encryption method when being executed by a processor.
The block chain-based one-time pad encryption method, the block chain-based one-time pad encryption device and the block chain-based one-time pad encryption storage medium can solve two basic difficulties existing in one-time pads. Firstly, a new block is dynamically and synchronously generated by the block chain at intervals, each block contains a batch of information of digital currency network transactions, and the blocks are maintained by miners and continuously increased, so that the block chain system can provide large-scale random characters and dynamically increase all the time, and the problem of generating large-scale random keys is solved; secondly, block chains in a sending party system and a receiving party system are synchronous, the two parties simultaneously select the hash value of the latest block of the block chains as a random number seed, the same random number is generated by the same random number generator of the two parties to serve as a one-time key, the parameter setting of the random number generator can be set according to the length of the message to output the one-time key with the length equal to the message, and therefore the key distribution problem is solved.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (5)

1. A block chain-based one-time pad encryption method is characterized by comprising the following steps:
step one, a sender requests that a receiver is about to start communication, the receiver responds to confirmation, establishes a mutual trust mechanism of the two parties, and establishes a synchronization mechanism of the two parties based on a block chain;
step two, the sender and the receiver simultaneously select the hash value of the latest block of the block chain as a random number seed, and a random number is generated by a random number generator to serve as a one-time key;
step three, the sender encrypts the plaintext based on the one-time key, sends the ciphertext and destroys the one-time key;
step four, after receiving the ciphertext, the receiver decrypts the ciphertext based on the one-time key and destroys the one-time key;
in the first step, a sender and a receiver adopt a request/response mode to establish a mutual trust mechanism of the two parties;
in the first step, the time intervals for generating new blocks are different according to different block chains, and a sender and a receiver determine in advance to select the block chains meeting the conditions;
in the first step, a synchronization mechanism of the two parties is established according to the latest generated blocks of the block chain in the sender and the receiver;
in the first step, a block chain dynamically and synchronously generates a new block at intervals, and each block contains a batch of information of digital currency network transactions;
blocks are constantly maintained and constantly growing by miners, providing large-scale random characters through block chains, and are constantly increasing dynamically.
2. The blockchain-based one-time pad cipher method of claim 1, wherein: in the second step, the random number generators of the sending party and the receiving party are the same, and the same output is generated by inputting the same seed.
3. The blockchain-based one-time pad cipher method of claim 1, wherein: in the second step, according to the plaintext with different lengths, the random number generator generates the disposable key with corresponding length.
4. A one-time pad cipher device based on block chain is characterized in that: comprising a computer network, a memory, a processor and a blockchain based one time pad cryptographic handler stored on the memory and executable on the processor, which when executed by the processor implements the blockchain based one time pad cryptographic method as claimed in any one of claims 1 to 3.
5. A storage medium, characterized by: the storage medium has stored thereon a blockchain-based one-time pad cryptographic processing program which, when executed by a processor, implements the blockchain-based one-time pad cryptographic method as recited in any one of claims 1 to 3.
CN202010285295.7A 2020-04-13 2020-04-13 Block chain-based one-time pad encryption method, device and storage medium Expired - Fee Related CN111488618B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010285295.7A CN111488618B (en) 2020-04-13 2020-04-13 Block chain-based one-time pad encryption method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010285295.7A CN111488618B (en) 2020-04-13 2020-04-13 Block chain-based one-time pad encryption method, device and storage medium

Publications (2)

Publication Number Publication Date
CN111488618A CN111488618A (en) 2020-08-04
CN111488618B true CN111488618B (en) 2021-05-18

Family

ID=71791577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010285295.7A Expired - Fee Related CN111488618B (en) 2020-04-13 2020-04-13 Block chain-based one-time pad encryption method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111488618B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112615824B (en) * 2020-12-03 2021-12-24 清华大学 Anti-leakage one-time pad communication method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845790A (en) * 2018-06-20 2018-11-20 胡晓东 A kind of application block chain generates the method and relevant apparatus of credible random number
CN109450629A (en) * 2018-12-21 2019-03-08 深圳区块大陆科技有限公司 Based on block chain random-number generating method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107276754B (en) * 2017-07-10 2020-05-05 北京云知科技有限公司 Method and device for generating a large number of private keys based on block chain
TWI760546B (en) * 2017-08-23 2022-04-11 安地卡及巴布達商區塊鏈控股有限公司 Computer-implemented system and method for highly secure, high speed encryption and transmission of data
CN107862782B (en) * 2017-10-27 2020-11-13 贝壳找房(北京)科技有限公司 Lottery drawing method and device based on Ether house block chain
CN109145641B (en) * 2018-08-06 2021-04-02 四川坤翔科技有限公司 Privacy information protection method and system
CN109961550A (en) * 2019-03-29 2019-07-02 北京金山安全软件有限公司 Method and device for determining random number in block chain, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845790A (en) * 2018-06-20 2018-11-20 胡晓东 A kind of application block chain generates the method and relevant apparatus of credible random number
CN109450629A (en) * 2018-12-21 2019-03-08 深圳区块大陆科技有限公司 Based on block chain random-number generating method

Also Published As

Publication number Publication date
CN111488618A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
US9246674B2 (en) Generation of cryptographic keys
US6125185A (en) System and method for encryption key generation
AU2010266760B2 (en) Method for generating an encryption/decryption key
CN113259329B (en) Method and device for data careless transmission, electronic equipment and storage medium
WO2023207014A1 (en) Encryption method and apparatus, decryption method and apparatus, and medium
JP6882705B2 (en) Key exchange system and key exchange method
US7894608B2 (en) Secure approach to send data from one system to another
US6640303B1 (en) System and method for encryption using transparent keys
EP4283922A2 (en) Computer-implemented system and method for highly secure, high speed encryption and transmission of data
JP2001211154A (en) Secret key generating method, ciphering method, and cipher communication method
CN109962924B (en) Group chat construction method, group message sending method, group message receiving method and system
JPH10107832A (en) Cipher multi-address mail system
CN111488618B (en) Block chain-based one-time pad encryption method, device and storage medium
CN114499857A (en) Method for realizing data correctness and consistency in big data quantum encryption and decryption
US20200169541A1 (en) Systems and methods for encryption
US7327845B1 (en) Transmission of encrypted messages between a transmitter and a receiver utilizing a one-time cryptographic pad
JPH09149025A (en) Cipher communication method and cipher communication system
CN115865335A (en) Information encryption method and decryption method
Zakir et al. A Survey on Various Encryption/Decryption Techniques Used in Mobile and Cloud Computing
CN117254919A (en) Public and private key pair encryption and decryption method based on Ed25519 algorithm of blockchain
CN116192427A (en) Secret session method and device
CN116502250A (en) Encryption and decryption method and device for computer
JP2005269587A (en) Key sharing system, encryption system and file authentication system

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210518