Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (0 / 6) |
Uptime: | 43:17:50 |
Calls: | 422 |
Calls today: | 1 |
Files: | 1,024 |
Messages: | 90,181 |
On 08/03/2025 09:22, Stefan Claas wrote:
Well, the mouse coordinates are not the only entropy source.
Indeed.
Similarly, you can go to the trouble of travelling a hundred miles to
the coast to spit in the ocean to make it deeper.
But if you don't bother, fear not because the ocean has other sources of water.
Well, the mouse coordinates are not the only entropy source.
Richard Heathfield wrote:
On 08/03/2025 09:22, Stefan Claas wrote:
Well, the mouse coordinates are not the only entropy source.
Indeed.
Similarly, you can go to the trouble of travelling a hundred miles to
the coast to spit in the ocean to make it deeper.
But if you don't bother, fear not because the ocean has other sources of
water.
Well, as another solution ... Have you checked out my latest thread:
Subject: lun - Lucky Number? Maybe this is something for you, or others,
who prefer the command line, without using your mouse. It generates only strings of 20 random digits, but it's entropy should be good enough too.
On 08/03/2025 10:27, Stefan Claas wrote:
Richard Heathfield wrote:
On 08/03/2025 09:22, Stefan Claas wrote:
Well, the mouse coordinates are not the only entropy source.
Indeed.
Similarly, you can go to the trouble of travelling a hundred miles to
the coast to spit in the ocean to make it deeper.
But if you don't bother, fear not because the ocean has other sources of water.
Well, as another solution ... Have you checked out my latest thread:
I saw it.
Subject: lun - Lucky Number? Maybe this is something for you, or others, who prefer the command line, without using your mouse. It generates only strings of 20 random digits, but it's entropy should be good enough too.
I'm curious. Presumably you think that the entropy from /dev/random is
*not* good enough? So in what specific ways are your bits an
improvement?
Quidquid dixeris, mate.
Hi all,
just for fun, or maybe for real usage. ;-)
A small Windows .exe
https://github.com/706f6c6c7578/mouse_entropy
Stefan Claas <fgrsna.pynnf@vagrearg.eh> wrote:
Hi all,
just for fun, or maybe for real usage. ;-)
A small Windows .exe
https://github.com/706f6c6c7578/mouse_entropy
Not likely as "random" as one would think. Better than nothing as
well.
Rich wrote:
Stefan Claas <fgrsna.pynnf@vagrearg.eh> wrote:
Hi all,
just for fun, or maybe for real usage. ;-)
A small Windows .exe
https://github.com/706f6c6c7578/mouse_entropy
Not likely as "random" as one would think. Better than nothing as
well.
Well, why not as random? I think you can't generate the same mouse
movement twice, right?
And how could we call that?
On 06/03/2025 08:51, Stefan Claas wrote:
Rich wrote:
Stefan Claas <fgrsna.pynnf@vagrearg.eh> wrote:
Hi all,
just for fun, or maybe for real usage. ;-)
A small Windows .exe
https://github.com/706f6c6c7578/mouse_entropy
Not likely as "random" as one would think. Better than nothing as
well.
Well, why not as random? I think you can't generate the same mouse
movement twice, right?
Depends on the mouse, I'm afraid.
And how could we call that?
A good start, but you'll want to mix in some bits from somewhere else.
On 06/03/2025 13:16, Stefan Claas wrote:
You may check out the additional Linux code.
Well, okay, I did.
I asked for 1 character, which took me maybe 2 or 3 seconds (should be command line args, by the way), and then I got a character back pretty
much immediately, as one would expect.
Then I ran it again, this time asking for 2 characters. For over 3
minutes I jiggled the mouse like crazy, to no avail. In the end I hit
^C.
Here's my output. Note the position of the interrupt at the end of the "Progress" line.
rjh@hero:~/alldata/dev/crypto/stefanclaas/entropy/mouse$ time ./scmouse
Enter desired number of hex bytes (default is 16, max 256): 2
Generate character-based password instead of hex? (1=yes, 0=no): 1
Using 2 bytes for entropy collection
Please move your mouse to collect entropy...
Take your time, each mouse movement is being recorded.
Progress: 50% [##########----------]^C
Entropy collection completed!
Random Password: Za
SHA256: ccb4d4846d431717f5bad8aabbad7d2b7e07f1611f506964c5c0c1af8f9a07dd
real 3m3.799s
user 0m0.834s
sys 0m2.252s
At 90+ seconds per byte, I can get entropy faster from my 20d16 --- 80
bits per chuck, at as fast a speed as I can type them in.
Why is it so slow?
You may check out the additional Linux code.
Richard Heathfield in sci.crypt:
On 06/03/2025 13:16, Stefan Claas wrote:
Random Password: Za
SHA256: ccb4d4846d431717f5bad8aabbad7d2b7e07f1611f506964c5c0c1af8f9a07dd
| user15@o15:/tmp$ printf '%s' 'Za' | sha256sum
| 31b18bdf7a9ca945b76bacb2636b786af81cdc6fb226f9e6e804593e153eeddc -
| user15@o15:/tmp$ printf '%s\n' 'Za' | sha256sum
| a8d13f1b8e53d68ce35f119317881ed3b7ebf2569f1d50a909a455d072087bee -
| user15@o15:/tmp$ printf '%s\r\n' 'Za' | sha256sum
| cef67327fe1665c5d52b96977353607cfffd53ce5a6901a933f179926f75b59c -
On 06/03/2025 13:16, Stefan Claas wrote:
Entropy collection completed!
Random Password: Za
SHA256: ccb4d4846d431717f5bad8aabbad7d2b7e07f1611f506964c5c0c1af8f9a07dd
Richard Heathfield in sci.crypt:
On 06/03/2025 13:16, Stefan Claas wrote:
[...]
Entropy collection completed!
Random Password: Za
SHA256: ccb4d4846d431717f5bad8aabbad7d2b7e07f1611f506964c5c0c1af8f9a07dd
| user15@o15:/tmp$ printf '%s' 'Za' | sha256sum
| 31b18bdf7a9ca945b76bacb2636b786af81cdc6fb226f9e6e804593e153eeddc -
| user15@o15:/tmp$ printf '%s\n' 'Za' | sha256sum
| a8d13f1b8e53d68ce35f119317881ed3b7ebf2569f1d50a909a455d072087bee -
| user15@o15:/tmp$ printf '%s\r\n' 'Za' | sha256sum
| cef67327fe1665c5d52b96977353607cfffd53ce5a6901a933f179926f75b59c -
(?)
Richard Heathfield in sci.crypt:
On 06/03/2025 13:16, Stefan Claas wrote:
[...]
Entropy collection completed!
Random Password: Za
SHA256: ccb4d4846d431717f5bad8aabbad7d2b7e07f1611f506964c5c0c1af8f9a07dd
| user15@o15:/tmp$ printf '%s' 'Za' | sha256sum
| 31b18bdf7a9ca945b76bacb2636b786af81cdc6fb226f9e6e804593e153eeddc -
| user15@o15:/tmp$ printf '%s\n' 'Za' | sha256sum
| a8d13f1b8e53d68ce35f119317881ed3b7ebf2569f1d50a909a455d072087bee -
| user15@o15:/tmp$ printf '%s\r\n' 'Za' | sha256sum
| cef67327fe1665c5d52b96977353607cfffd53ce5a6901a933f179926f75b59c -
(?)
I wouldn't read too much into that; the program was interrupted,
after all, so there's no reason to assume that it didn't catch
the interrupt while in the process of moving from one consistent
state to another.
I have tested it also under Linux (Ubuntu Mate) with my little GPD MicroPC and it only takes milliseconds, with your example. I must admit I do not
know why it is so slow on your side.
Richard Heathfield in sci.crypt:
[...]
I wouldn't read too much into that; the program was interrupted,
ACK
after all, so there's no reason to assume that it didn't catch
the interrupt while in the process of moving from one consistent
state to another.
OK, that is an argument.
I'm also having the same issues as Marcel after a COMPLETED run.
I see that you are using a 32-byte array, so I hashed G~, G~\0, and:
47 7e 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
and none of them came to >6249e6faa58831154f6df352c843a316a98c6b1eb57baa61a8bf4401e3726988
Sorry.
Richard Heathfield in sci.crypt:
[...]
I'm also having the same issues as Marcel after a COMPLETED run.
I see that you are using a 32-byte array, so I hashed G~, G~\0, and:
47 7e 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
and none of them came to 6249e6faa58831154f6df352c843a316a98c6b1eb57baa61a8bf4401e3726988
Sorry.
The problem is solvable. :-)
Sure, it only needs a slight change in the C code, but I do not want
to have the shasum of a password and prefer the shasum of the entropy,
so that the shasum can be used for a password as well! :-)
Stefan Claas in sci.crypt:
Sure, it only needs a slight change in the C code, but I do not want
to have the shasum of a password and prefer the shasum of the entropy,
so that the shasum can be used for a password as well! :-)
One question I ask myself:
Aren't you losing entropy when you use the modulo operation
in the "bytes_to_chars" function? I wonder.
Marcel
Stefan Claas in sci.crypt:
Sure, it only needs a slight change in the C code, but I do not want
to have the shasum of a password and prefer the shasum of the entropy,
so that the shasum can be used for a password as well! :-)
One question I ask myself:
Aren't you losing entropy when you use the modulo operation
in the "bytes_to_chars" function? I wonder.
Marcel Logen wrote:
One question I ask myself:
Aren't you losing entropy when you use the modulo operation
in the "bytes_to_chars" function? I wonder.
Yes, but this can be fixed by doubling the entropy
On 06/03/2025 19:28, Stefan Claas wrote:
Marcel Logen wrote:
<snip>
One question I ask myself:
Aren't you losing entropy when you use the modulo operation
in the "bytes_to_chars" function? I wonder.
Yes, but this can be fixed by doubling the entropy
Not all of us are prepared to wait that long.
Richard Heathfield wrote:
On 06/03/2025 19:28, Stefan Claas wrote:
Marcel Logen wrote:
<snip>
One question I ask myself:
Aren't you losing entropy when you use the modulo operation
in the "bytes_to_chars" function? I wonder.
Yes, but this can be fixed by doubling the entropy
Not all of us are prepared to wait that long.
Well, and old saying of mine: "privacy cost time and money" ... ;-)
On 06/03/2025 20:09, Stefan Claas wrote:
Richard Heathfield wrote:
On 06/03/2025 19:28, Stefan Claas wrote:
Marcel Logen wrote:
<snip>
One question I ask myself:
Aren't you losing entropy when you use the modulo operation
in the "bytes_to_chars" function? I wonder.
Yes, but this can be fixed by doubling the entropy
Not all of us are prepared to wait that long.
Well, and old saying of mine: "privacy cost time and money" ... ;-)
I can get quicker bits with dice.
I can see no reason why it takes so long on my system, which generally
trots along like Concorde on steroids. I've profiled your code to no
avail, and so, for me at least, it's simply not a practical proposition.
https://github.com/706f6c6c7578/mouse_entropy
Stefan Claas wrote:
https://github.com/706f6c6c7578/mouse_entropy
Impeccable (Y)
Entropy collection completed!
Random Password: Za
SHA256:
ccb4d4846d431717f5bad8aabbad7d2b7e07f1611f506964c5c0c1af8f9a07dd
Rich wrote:
Stefan Claas <fgrsna.pynnf@vagrearg.eh> wrote:
Hi all,
just for fun, or maybe for real usage. ;-)
A small Windows .exe
https://github.com/706f6c6c7578/mouse_entropy
Not likely as "random" as one would think. Better than nothing as
well.
Well, why not as random?
I think you can't generate the same mouse movement twice, right? And
how could we call that?
Richard Heathfield wrote:
On 06/03/2025 08:51, Stefan Claas wrote:
Rich wrote:
Stefan Claas <fgrsna.pynnf@vagrearg.eh> wrote:
Hi all,
just for fun, or maybe for real usage. ;-)
A small Windows .exe
https://github.com/706f6c6c7578/mouse_entropy
Not likely as "random" as one would think. Better than nothing as
well.
Well, why not as random? I think you can't generate the same mouse
movement twice, right?
Depends on the mouse, I'm afraid.
And how could we call that?
A good start, but you'll want to mix in some bits from somewhere else.
Thanks. Done. You may check out the additional Linux code.
why not as random?
On 3/6/25 2:51 AM, Stefan Claas wrote:
why not as random?
The numbers are somewhat predictable.
If your mouse is at coordinates 5,5 then chances are much better that
the next coordinates are somewhere close to 5,5 than not; e.g.
[4-6],[4-6]. It is extremely unlikely that your next coordinate will
jump to 0,0, 9,0, 9,9, 0,9. Hence the predictability.
Yes, the numbers are better than nothing. But they aren't nearly as
random as we want.
Not only is it eminently peccable, but it has already been thoroughly pecced.
Richard Heathfield wrote:
Not only is it eminently peccable, but it has already been
thoroughly pecced.
L’anglais, qu’il soit américain ou australien, est une langue morte.