« first day (3585 days earlier)      last day (1096 days later) » 

2:41 AM
1
Q: secp256k1: is it theoretically possible to generate same signature with different key, message hash and k?

YaroslavFor a given private key $d$, random $k$ and message hash $h$ is it possible that there exists a different set of $d$, $k$ and $h$ which produces the same signature using $\text{secp256k1}$ curve?

 
 
11 hours later…
1:19 PM
3
Q: Is this pairing-based signature scheme secure?

user82867There are a number of signature schemes on small domains based on bilinear pairings which do not use random oracles. Examples are the Boneh-Boyen schemes and an interesting one from Okamoto which allows for blind, and partially blind signatures. However all of them use some variant of the Strong ...

 
 
4 hours later…
4:54 PM
How can I generate a unique unpredictable 10 decimal digit id?
similar to Your ID there
(once the keyspace is used up, it would fail obviously which is ok)
 
5:38 PM
Unpredictable? Why unpredictable? Use a random key. Keep it secret. then encrypt 1,2,3,4,5,6,7.... All unique and up to some point they are unpredictable.
@fgrieu now you can use the LFSR library to draw easily :)
 
@kelalaka wdym?
 
@JBis Isn't clear? AES is a family of permutations like any block cipher. With a key, you select a permutation from the family. Now for each encryption, you have a unique 128-bit. Since breaking AES is not possible then predicting the next is not possible, unless you encrypt so much value and the observer stores them, then the unpredictability decreases.
The problem the 128-bit may not fit to your 10 digit.
@JBis and probably they use getrandom() syscall and check their database, if exist call getrandom() again..., otherwise use the random.
 
6:18 PM
@kelalaka eventually that would take too long
@kelalaka yeah it won't
 
ngn
@JBis how many users do you expect?
due to the birthday paradox you can expect a collision relatively soon (on the order of 10^5)
 
@JBis it will not take too long. A single AES encryption and the current counter value.
 
@ngn yes, this is the problem with just doing straight random
@kelalaka AES idea is interesting. I will take a looks. But straight random would take too long eventually.
 
ngn
6:38 PM
@JBis i think you need more digits/bits in the id. with 128 the likelyhood of collision is negligible, and you could also reserve some bits for a counter - that would guarantee no collisions
 
@JBis databases are quite fast for such queries.
 
ngn
@ngn for comparison: 10 decimal digits is the equivalent of only 33-34 bits
 
That should be enough
This is for an id, 1 per device per session (id can be reused after session). I don't expect to have more than 10^10 devices at one time.
 
ngn
@JBis but if you use random ids, you're likely to get a collision much sooner, around sqrt(size of id space)
 
Yes. We are on the same page about that.
im saying 10 digits is enough, just needs to be unique and not be sequential
 
ngn
6:49 PM
@JBis another idea: choose a prime p near 10^10, choose a generator g for its multiplicative group (it's easier than it sounds) and use g^i (mod p) for the i-th id
 
If g is known, then that's predictable
 
ngn
true
 
@ngn I keep on seeing "generator for a multiplicative group" across cryptography. Still don't know what it means lol
But yeah I was thinking, a custom encryption algorithm that produces 10 digit numbers from 10 digit numbers.
 
ngn
@JBis it means that if you raise it to all powers 0..p-2, it will give all numbers 1..p-1 in some order
iirc, g being coprime with p-1, i.e. gcd(g,p-1)=1 guarantees that
 
Thank you. I'll do some more reading. Don't really know all those terms yet.
 

« first day (3585 days earlier)      last day (1096 days later) »