Comments (3)
s = SHA256(SHA256("LNPBP-1") || SHA256("LNPBP-1") || SHA256(msg))
The hashing of msg
seems unnecessary here, s
commits to every bit of msg
either way. This step is also not included in the tagged hashes proposed in bip-schnorr.
I think we can get by just using s = H(H(tag) | H(tag) | msg))
and generate the tweak simply as H(s)
instead of HMAC
without having to worry about length extension attacks. In this case a length extension attack would need
H'(H(s), attack) = H(s | attack) === H(H(H(tag) | H(tag) | msg'))
for some msg' != msg
However, since s
is a hash, each bit depends on every bit of the input msg
. This attack is therefore not a length extension attack, but a collision attack of finding h(m) = h(m')
for m != m'
. SHA256 provides 128bit* security against this, which is the upper bound for security in this case since collision attacks are always possible regardless of the hashing scheme.
*probably >128bit since there are constraints on both m
and m'
from lnpbps.
ยง5.4.2 in Schneier's Cryptography Engineering provides a good discussion on the topic.
https://www.schneier.com/books/cryptography_engineering/
from lnpbps.
During LNPBPCon 0 in Milano in December a new version of LNPBP-1 was designed, which still have to be written as a standard (WIP)
from lnpbps.
Related Issues (20)
- Make data type constants part fo the standard HOT 1
- Upgrade LNPBP-4 with merke trees
- LNPBP-2 references to an outdated stage of commitment procedure of LNPBP-1 HOT 2
- LNPBP-1 lacks standardization of public key serialization format HOT 6
- Cover multiple instances of the same pubkey in LNPBP-1 and 2 standards
- Allow bulletproof implementation upgradability in RGB schema HOT 1
- LNPBP-31: ElGamal on Secp256k1
- Write Tapret commitments standard HOT 4
- Test vectors HOT 1
- Write specification for opret-based RGB in BOLT lightning
- ticker doesn't allow numbers HOT 2
- decide future of current RGB21 implementation HOT 1
- Add contract media global state HOT 2
- RGB: Use i64 instead of i32 for Timestamps in interface standards HOT 6
- RGB-21 Schema: What should be the limit of the length of the name field? HOT 2
- RGB-21 Schema: Custom token data formatting HOT 2
- LNPBP-2: Miniscript determinism can't be used for key tweaks HOT 1
- LNPBP-2: Upgrade miniscript version requirement to v5.0.0 tagged commit
- LNPBP-38: Add support for Bifrost
- RGBv2: Reduce anchor entropy bit size by merging with txid data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lnpbps.