時価総額: $2.1705T -3.06%
ボリューム(24時間): $70.2898B 49.54%
  • 時価総額: $2.1705T -3.06%
  • ボリューム(24時間): $70.2898B 49.54%
  • 恐怖と貪欲の指数:
  • 時価総額: $2.1705T -3.06%
暗号
トピック
暗号化
ニュース
暗号造園
動画
トップニュース
暗号
トピック
暗号化
ニュース
暗号造園
動画
bitcoin
bitcoin

$87959.907984 USD

1.34%

ethereum
ethereum

$2920.497338 USD

3.04%

tether
tether

$0.999775 USD

0.00%

xrp
xrp

$2.237324 USD

8.12%

bnb
bnb

$860.243768 USD

0.90%

solana
solana

$138.089498 USD

5.43%

usd-coin
usd-coin

$0.999807 USD

0.01%

tron
tron

$0.272801 USD

-1.53%

dogecoin
dogecoin

$0.150904 USD

2.96%

cardano
cardano

$0.421635 USD

1.97%

hyperliquid
hyperliquid

$32.152445 USD

2.23%

bitcoin-cash
bitcoin-cash

$533.301069 USD

-1.94%

chainlink
chainlink

$12.953417 USD

2.68%

unus-sed-leo
unus-sed-leo

$9.535951 USD

0.73%

zcash
zcash

$521.483386 USD

-2.87%

暗号通貨のニュース記事

OP_CAT を使用したマークル ツリーの構築と検証

2024/06/25 13:00

シリーズ #1 に続いて、OP_CAT を使用してマークル ツリーを構築および検証する方法を示します。ビットコインでは、マークル ツリーは、データの検証、同期、ブロックチェーンのトランザクションとブロックを効果的にリンクするためのデータ構造として利用されます。

OP_CAT を使用したマークル ツリーの構築と検証

This post was first published on Medium.

この投稿は最初に Medium で公開されました。

Following our series #1, we demonstrate how to construct and verify Merkle trees using OP_CAT.

シリーズ #1 に続いて、OP_CAT を使用してマークル ツリーを構築および検証する方法を示します。

In Bitcoin, Merkle trees are used as the data structure for verifying data, synchronizing the blockchain, and efficiently linking transactions and blocks together. The OP_CAT opcode, which allows for the concatenation of two stack variables, can be used with SHA256 hashes of public keys to streamline the Merkle tree verification process within Bitcoin Script. OP_CAT uniquely allows for the creation and opening of entries in Merkle trees, as the fundamental operation for building and verifying Merkle trees involves concatenating two values and then hashing them.

ビットコインでは、データの検証、ブロックチェーンの同期、トランザクションとブロックの効率的なリンクのためのデータ構造としてマークル ツリーが使用されます。 2 つのスタック変数の連結を可能にする OP_CAT オペコードは、公開鍵の SHA256 ハッシュとともに使用して、ビットコイン スクリプト内のマークル ツリー検証プロセスを効率化できます。 OP_CAT では、マークル ツリーの構築と検証の基本操作に 2 つの値の連結とハッシュ化が含まれるため、マークル ツリー内のエントリの作成とオープンが独自に可能になります。

There are many applications for Merkle trees. Here are a few prominent examples:

マークル ツリーには多くのアプリケーションがあります。以下にいくつかの顕著な例を示します。

Merkle proof

マークル証明

A Merkle proof is a cryptographic method used to verify that a particular transaction is included in a Merkle tree without having to download the entire blockchain. This is especially useful for lightweight clients and improving the efficiency of data verification.

マークル証明は、ブロックチェーン全体をダウンロードすることなく、特定のトランザクションがマークル ツリーに含まれていることを検証するために使用される暗号化手法です。これは、軽量クライアントとデータ検証の効率の向上に特に役立ちます。

Tree signature

木の署名

A tree signature is a cryptographic method that improves the security and efficiency of digital signatures using tree structures, especially Merkle trees. This approach is used to generate a more compact and private proof that a message or set of messages has been signed by a particular key, compared to regular Multisig.

ツリー署名は、ツリー構造、特にマークル ツリーを使用してデジタル署名のセキュリティと効率を向上させる暗号化方法です。このアプローチは、通常のマルチシグと比較して、メッセージまたはメッセージのセットが特定の鍵で署名されていることを示す、よりコンパクトでプライベートな証明を生成するために使用されます。

Zero-Knowledge Proof

ゼロ知識証明

STARK (Succinct Transparent Arguments of Knowledge) is a type of zero-knowledge proof system. STARKs are designed to allow a prover to prove the validity of a computation to a verifier without revealing any sensitive information about the computation itself. If OP_CAT were to be added to Bitcoin, it could potentially enable the implementation of a STARK verifier in Bitcoin Script, with work already underway on this. This would allow for secure and private transactions on the Bitcoin network. Compared to pairing-based proof systems like SNARK, STARK is considered to be more Bitcoin-friendly.

STARK (Succict Transparent Arguments of Knowledge) は、ゼロ知識証明システムの一種です。 STARK は、計算自体に関する機密情報を明らかにすることなく、証明者が検証者に計算の正当性を証明できるように設計されています。 OP_CAT がビットコインに追加された場合、ビットコイン スクリプトでの STARK 検証器の実装が可能になる可能性があり、その作業はすでに進行中です。これにより、ビットコインネットワーク上で安全かつプライベートなトランザクションが可能になります。 SNARK のようなペアリングベースの証明システムと比較して、STARK はよりビットコインに優しいと考えられています。

Implementation

実装

The implementation of the Merkle tree using sCrypt is straightforward. The following code calculates the root hash of a merkle tree, given a leaf and its merkle path, typically used in verifying a merkle proof.

sCrypt を使用したマークル ツリーの実装は簡単です。次のコードは、リーフとそのマークル パスを指定して、マークル ツリーのルート ハッシュを計算します。通常、マークル証明の検証に使用されます。

Full code is at https://github.com/sCrypt-Inc/scrypt-btc-merkle.

完全なコードは https://github.com/sCrypt-Inc/scrypt-btc-merkle にあります。

A single run results in the following transactions:

1 回の実行により、次のトランザクションが発生します。

Check the transaction on Mempool

Mempoolでトランザクションを確認する

Check the transaction on Mempool

Mempoolでトランザクションを確認する

Script versions

スクリプトのバージョン

There are alternative implementations in bare scripts, like the one below. One major benefit of using sCrypt for implementing merkle trees is its readability and maintainability. Scripts are often very difficult to read and work on.

以下のような、裸のスクリプトでの代替実装があります。マークル ツリーの実装に sCrypt を使用する主な利点の 1 つは、可読性と保守性です。多くの場合、スクリプトは読みにくく、作業するのが非常に困難です。

OP_EXISTS

OP_EXISTS

Plz tell me you had a compiler to generate that

それを生成するコンパイラがあったのか教えてください

— Jerry – Bitcoin Bay (@Lightswarm) March 1, 2024

— ジェリー – ビットコインベイ (@Lightswarm) 2024 年 3 月 1 日

Stay tuned for more OP_CAT use cases.

OP_CAT のさらなる使用例にご期待ください。

Watch: sCrypt Hackathon students realize there’s more to blockchain

見る: sCrypt ハッカソンの学生がブロックチェーンにはそれだけではないことに気づく

New to blockchain? Visit CoinGeek’s Blockchain for Beginners section, the ultimate resource guide to learn more about blockchain technology.

ブロックチェーンは初めてですか? CoinGeekの初心者向けブロックチェーンセクションにアクセスして、ブロックチェーンテクノロジーについて詳しく学ぶための究極のリソースガイドをご覧ください。

オリジナルソース:e20943a906f216b3f87cf7e51e5ffff1

免責事項:info@kdj.com

提供される情報は取引に関するアドバイスではありません。 kdj.com は、この記事で提供される情報に基づいて行われた投資に対して一切の責任を負いません。暗号通貨は変動性が高いため、十分な調査を行った上で慎重に投資することを強くお勧めします。

このウェブサイトで使用されているコンテンツが著作権を侵害していると思われる場合は、直ちに当社 (info@kdj.com) までご連絡ください。速やかに削除させていただきます。

2026年07月28日 に掲載されたその他の記事