Bitcoin Forum
May 09, 2024, 03:21:49 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Pre-image in relation to payment channels  (Read 533 times)
JackH (OP)
Sr. Member
****
Offline Offline

Activity: 381
Merit: 255


View Profile
January 31, 2017, 02:57:17 PM
 #1

A cornerstone of payment channels seems to be the idea of pre-images and their secret being communicated through the network. But when it comes to the definition of the pre-image itself, and its properties in terms of how it works within a technical system, such as payment channels, there is little information anywhere. The closest I came to information about pre-image was the mathematical description of it here: https://en.wikipedia.org/wiki/Image_%28mathematics%29#Inverse_image

When talking in terms of cryptography, anything I have been able to find was how pre-image is put together as a pre-image attack on hash functions, but not a description of how the pre-image itself, and its construction for being used as a secret in for example payment channels actually works.

Anyone care to chip in some info on pre-image and how it relates to the crypto/hash of payment channels in more details?

<helo> funny that this proposal grows the maximum block size to 8GB, and is seen as a compromise
<helo> oh, you don't like a 20x increase? well how about 8192x increase?
<JackH> lmao
1715268109
Hero Member
*
Offline Offline

Posts: 1715268109

View Profile Personal Message (Offline)

Ignore
1715268109
Reply with quote  #2

1715268109
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
belcher
Sr. Member
****
Offline Offline

Activity: 261
Merit: 521


View Profile
January 31, 2017, 06:25:13 PM
 #2

The pre-images used in payment channels refer to those of cryptographic hash functions.

See https://en.wikipedia.org/wiki/Cryptographic_hash_function#Properties

Quote
A cryptographic hash function must be able to withstand all known types of cryptanalytic attack. In theoretical cryptography, the security level of a cryptographic hash function has been defined using the following properties:

* Pre-image resistance
Given a hash value h it should be difficult to find any message m such that h = hash(m). This concept is related to that of one-way function. Functions that lack this property are vulnerable to preimage attacks.

* Second pre-image resistance
Given an input m1 it should be difficult to find different input m2 such that hash(m1) = hash(m2). Functions that lack this property are vulnerable to second-preimage attacks.

* Collision resistance
It should be difficult to find two different messages m1 and m2 such that hash(m1) = hash(m2). Such a pair is called a cryptographic hash collision. This property is sometimes referred to as strong collision resistance. It requires a hash value at least twice as long as that required for preimage-resistance; otherwise collisions may be found by a birthday attack.[2]

For understanding how hash values and preimages are actually used to build payment channels, I think this series of articles from bitcoinmagazine are pretty good: https://bitcoinmagazine.com/articles/understanding-the-lightning-network-part-building-a-bidirectional-payment-channel-1464710791/ Hopefully it answers your question.

1HZBd22eQLgbwxjwbCtSjhoPFWxQg8rBd9
JoinMarket - CoinJoin that people will actually use.
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!