IP Library Granted Patent US 12705619
Granted Patent B2
US 12705619 · App. 18/902,796 · Granted Aug 11, 2026

Random number generation in a blockchain

Inventors: Ying Chan (Cambridge, GB); Dean Kramer (London, GB)
Assignee: NCHAIN LICENSING AG
G06Q20/401G06F16/2379G06Q10/10G06Q20/065G06Q20/0658G06Q20/3674G06Q20/3827H04L9/0637H04L9/0643H04L9/0662H04L9/3247G06Q2220/00H04L9/50
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12705619
App. No.
18/902,796
Granted
Aug 11, 2026
Kind
B2
Abstract

The invention relates to distributed ledge technologies such as consensus-based blockchains. Computer-implemented methods for a secure random number generation within blockchain scripts are described. The invention is implemented using a blockchain network, which may be, for example, a Bitcoin blockchain. A third transaction is validated. The third transaction is associated with a third digital asset and includes a first and second puzzle in a locking script. The first puzzle is included, in a first transaction, in a first locking script that encumbers transfer of control of a first digital. The second puzzle is included, in a second transaction, in a second locking script that encumbers transfer of control of a second digital asset. A pseudorandom number is generated based at least in part on solutions to the first and second puzzles. Control of the third digital asset is transferred based at least in part on the pseudorandom number.

Claims (40)

1 . A computer-implemented method comprising:

obtaining a first puzzle and a second puzzle from a respective first commitment transaction and a second commitment transaction;

combining the first and second puzzles and incorporating them into a locking script of a pseudorandom number generator (PRNG) blockchain transaction wherein the locking script comprises a PRNG;

committing the PRNG blockchain transaction to a blockchain;

obtaining a solution to the first puzzle and a solution to the second puzzle;

incorporating the first and second solutions into an unlocking script of a seed transaction to convert the solutions to a seed value for input to the PRNG blockchain transaction;

executing the locking script of the PRNG blockchain transaction and the unlocking script of the seed transaction, wherein the executing further comprises generating a pseudorandom number based on the seed value; and

imposing a constraint to the PRNG blockchain transaction based on the pseudorandom number.

2 . The computer-implemented method according to claim 1 , wherein:

the first commitment transaction is created by a first party; and

the second commitment transaction is created by a second party different from the first party.

3 . The computer-implemented method according to claim 2 , wherein the first party has access to the solution to the first puzzle prior to creation of the first commitment transaction.

4 . The computer-implemented method according to claim 1 , wherein the locking script of the PRNG blockchain transaction includes a time constraint.

5 . The computer-implemented method according to claim 4 , wherein the time constraint is unfulfilled, validation of a penalty transaction causes a refund of a first digital asset associated with the PRNG blockchain transaction.

6 . The computer-implemented method according to claim 4 , wherein the time constraint is that the solution to the first and second puzzles is revealed before a time limit is exceeded.

7 . The computer-implemented method according to claim 1 , wherein the first puzzle is a cryptographic hash puzzle.

8 . The computer-implemented method according to claim 1 , wherein:

the first puzzle is a set of operation codes in a locking script of the first commitment transaction; and

execution of the set of operation codes evaluates to true as a result of receiving the solution to the first puzzle as input.

9 . The computer-implemented method according to claim 1 , further comprising validating the seed transaction that includes the solution to the first puzzle and the solution to the second puzzle.

10 . The computer-implemented method according to claim 1 , wherein transferring control of a third digital asset is constrained in some manner based on the pseudorandom number.

11 . A system, comprising:

a processor; and

memory including executable instructions that, as a result of execution by the processor,

causes the system to perform a method, the method comprising:

obtaining a first puzzle and a second puzzle from a respective first commitment transaction and a second commitment transaction;

combining the first and second puzzles and incorporating them into a locking script of a pseudorandom number generator (PRNG) blockchain transaction wherein the locking script comprises a PRNG;

committing the PRNG blockchain transaction to a blockchain;

obtaining a solution to the first puzzle and a solution to the second puzzle;

incorporating the first and second solutions into an unlocking script of a seed transaction to convert the solutions to a seed value for input to the PRNG blockchain transaction;

executing the locking script of the PRNG blockchain transaction and the unlocking script of the seed transaction, wherein the executing further comprises generating a pseudorandom number based on the seed value; and

imposing a constraint to the PRNG blockchain transaction based on the pseudorandom number.

12 . A non-transitory computer-readable storage medium having stored thereon executable instructions that, as a result of being executed by a processor of a computer system, cause the computer system to at least perform a method, the method comprising:

obtaining a first puzzle and a second puzzle from a respective first commitment transaction and a second commitment transaction;

combining the first and second puzzles and incorporating them into a locking script of a pseudorandom number generator (PRNG) blockchain transaction wherein the locking script comprises a PRNG;

committing the PRNG blockchain transaction to a blockchain;

obtaining a solution to the first puzzle and a solution to the second puzzle;

incorporating the first and second solutions into an unlocking script of a seed transaction to convert the solutions to a seed value for input to the PRNG blockchain transaction;

executing the locking script of the PRNG blockchain transaction and the unlocking script of the seed transaction, wherein the executing further comprises generating a pseudorandom number based on the seed value; and

imposing a constraint to the PRNG blockchain transaction based on the pseudorandom number.