Comments (7)
Jan: the second option is not a good idea, because one could choose a hash that is too short, and then the VRF is not secure (to the same bit level as the curve). For instance, you could have a 384-bit curve but then someone could decide to use the SHA-256 hash. Not good.
from nsec5-draft.
Nice catch. So how we are gonna write this down? I'm not sure how to express the bit length of the curve as I failed to find it in SEC1 which we use to refer to for EC definitions. In Section 5 of the draft, we already have 2n = ceil(log2(q)/8)
which tells something similar. But I'm not sure if we are happy with this formula. Anyway, the number of high bits to clear in Hash output should be hLen - ceil(log2(q))
. Right? Does it make sense?
Another options is to keep this up to the particular instantiation of EC VRF. We just provide Hash to be a fixed parameter in the general definition. The instantiation then says what Hash is. So for example with EC-VRF-P256-SHA256, Hash is said to be SHA-256. If someone wants a different instantiation with a curve that has a length less than 256 bits, Hash can be defined as "truncated" SHA-256.
from nsec5-draft.
I agree. So the first option it is. Are you comfortable with me updating the draft using the syntax I've used?
from nsec5-draft.
Jan, you wrote: "Anyway, the number of high bits to clear in Hash output should be hLen - ceil(log2(q))." Note quite, because it's not q, but the size of the field over which the curve is defined. If you don't mind, I will try to update the draft, since I've already spent some time thinking how to do it.
from nsec5-draft.
Sure. Go ahead.
from nsec5-draft.
So, after discussion with Leo we decide that all the curves we specify now (or ever will specify ie P256, Ed25519, Ed448) are over finite fields F where the bitlength of field elements in F are divisible by 16. This made things easier because we now don't need to clear anything in the hash output. So I made this change in 5ceb74d
which also specifies that the output length of Hash is 2n octets, which is also the octet length of field elements in F.
from nsec5-draft.
Looks good.
from nsec5-draft.
Related Issues (20)
- vrf hash_to_curve won't end up in G when cofactor > 1 HOT 2
- "Constraints on options" text in VRF draft HOT 1
- ECVRF_hash_to_curve1 not usable when input must be kept secret? HOT 3
- ECVRF verifying if curve has cofactor > 1 HOT 2
- need to define wire format for VRF PKs HOT 5
- Getting full uniqueness HOT 5
- Request RR Types HOT 5
- do we want to keep xC2xyC in VRF draft? HOT 3
- EC_hash_to_curve2 as the only option HOT 3
- VRF terminology HOT 2
- OS2ECP failed state HOT 1
- the additional pseudorandomness property HOT 1
- remove "where X denotes Y" from algorithms
- Add discussion of RFC8020 and RFC 8198
- Adaption of Trevor Perrin "synthetic nonce" to VRF. HOT 1
- Explain that this is just Montgomery curve equation
- Explain these using conditional move (cmov) HOT 1
- Explain this by showing which bits go where
- Suite names in test vectors don't match the specification HOT 1
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 nsec5-draft.