Comments (2)
For a Pedersen hash defined over a generic elliptic curve, I think something like this might be possible, though you would need to account for the windowed encoding mechanism (it might be sufficient to just bit-shift by 3 bits instead of 1, but I haven't thought about it much).
However, pedersen_hash
is defined over Jubjub, which is a twisted Edwards curve with d
being a non-square. This means that addition is complete, and so there is no point at infinity.
(cc @daira because I've likely mis-explained something 😅)
from librustzcash.
The Pedersen hash is defined in terms of the Edwards curve, which as @str4d says has no point at infinity. The zero point has an affine representation (0, 1).
The output of the hash is the u-coordinate of the resulting Edwards point. This is 0 for the zero point, which is a possible output. (If you actually find an input that gives this output, you can also find collisions in the hash. Pedersen hashes are not the only kind of hash for which this is the case; for example if you find an input to SHA-256 that results in a zero output then you can also find collisions in SHA-256, although for a different reason.)
In the circuit, the hash is implemented in terms of both the Edwards curve and the birationally equivalent Montgomery curve. The use of the latter is carefully limited to avoid occurrence of the point at infinity and other exceptional cases; this is explained and justified in appendix A.3.3.9 of the protocol spec.
from librustzcash.
Related Issues (20)
- Ensure symmetry of transparent output handling between `put_blocks`, `store_decrypted_tx` and `store_sent_tx` HOT 2
- Don't create new `WalletDb` wrappers outside `WalletDb::transactionally`: take `&mut WalletDb<SqlTransaction<'_>, P>` as argument instead HOT 1
- Adding a second account with an older birthday height effectively changes height for existing account HOT 2
- zcash_address::kind::unified::address::Address::can_receive_memo does not account for whether Orchard is disabled HOT 1
- Handling of change memos imposes artificial constraints HOT 1
- `tokio 0.12` migration causes `UnknownIssuer` errors with `lightwallet` servers using Let's Encrypt HOT 4
- zcash_primitives 0.17.0, zcash_proofs 0.17.0
- `create_proposed_transactions` can incorrectly produce transactions HOT 4
- librustzcash fails to sync account with birthday set to sapling activation height HOT 4
- zcash_client_backend: Add gRPC-over-Tor support
- Precisely document same-UFVK errors on account creation and ensure they are per-component HOT 2
- Create `unstable-frost` feature
- Allow Orchard-only UFVK be created from an Orchard FVK
- Figure out what to do in librustzcash about the broken `GetTransaction` method of lightwalletd HOT 1
- [zcash_client_sqlite] Replace the `put_tx_meta` workaround in the test `send_multi_step_proposed_transfer`
- zcash_client_sqlite always enables the "orchard" feature of zcash_keys HOT 4
- Cache incoming viewing keys and detect IVK collisions when adding accounts
- zcash_client_backend: Faster failure detection for invalid sent transactions
- Correct the documentation for `zcash_client_sqlite::wallet::chain_tip_height`
- zcash_client_sqlite: Make it easy to write data-migration tests
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 librustzcash.