#include <stdio.h>
int main(void) {
static void *ptr;
if (ptr != NULL) puts("OOPS");
if (ptr != 0) puts("OOPS");
}
must not print "OOPS".
Keith Thompson wrote:
presentation of a null pointer.ÿ This:
#include <stdio.h>
int main(void) {
ÿÿÿÿ static void *ptr;
ÿÿÿÿ if (ptr != NULL) puts("OOPS");
ÿÿÿÿ if (ptr != 0)ÿÿÿ puts("OOPS");
}
must not print "OOPS".
What you've done here is not good. I can't imagine you came away from
this not feeling soiled. Here's a card for a local church where you can confess what you wrote.
ÿ GracePoint
Community Church
You Are Welcome Here!
JOIN US THIS SUNDAY
Keith Thompson wrote:
presentation of a null pointer. This:
#include <stdio.h>
int main(void) {
static void *ptr;
if (ptr != NULL) puts("OOPS");
if (ptr != 0) puts("OOPS");
}
must not print "OOPS".
What you've done here is not good. I can't imagine you came away from
this not feeling soiled. Here's a card for a local church where you can confess what you wrote.
ÿÿÿÿ static void *ptr;
ÿÿÿÿ if (ptr != NULL) puts("OOPS");
ÿÿÿÿ if (ptr != 0)ÿÿÿ puts("OOPS");
I'm more concerned that if this is compiled on a machine where ptr fits
in a register, and that register happens to contain zero by chance, what >happens to Keith's sense of correctness?
On 2026-09-09 09:54, Lane W wrote:
Keith Thompson wrote:
presentation of a null pointer. This:
#include <stdio.h>
int main(void) {
static void *ptr;
if (ptr != NULL) puts("OOPS");
if (ptr != 0) puts("OOPS");
}
must not print "OOPS".
What you've done here is not good. I can't imagine you came away from
this not feeling soiled. Here's a card for a local church where you can
confess what you wrote.
What is your objection to what he wrote? What he said is guaranteed to
be true for any conforming implementation of C.
bart <bc@freeuk.com> wrote:...
..., So what sorts of things need a 64-bit [int] range?
3) Cryptography. 32-bit cryptographic keys are deemed inadequate
for most purposes. So, minimal reasonably safe cryptography needs
64-bits. And with spead of radio controlled devices (like garage
doors) there is increasing need for cryptography.
On Thu, 27 Aug 2026 13:39:24 -0000 (UTC), antispam@fricas.org (Waldek Hebisch) wrote:
bart <bc@freeuk.com> wrote:...
..., So what sorts of things need a 64-bit [int] range?
3) Cryptography. 32-bit cryptographic keys are deemed inadequateNot keys. 64-bit key was _barely_ adequate back when DES was
for most purposes. So, minimal reasonably safe cryptography needs
64-bits. And with spead of radio controlled devices (like garage
doors) there is increasing need for cryptography.
standardized, and has been unacceptable since the 1990s.
But crypto does NOT operate on the whole key as a unit. Most
algorithms operate on either 32-bit or 64-bit chunks of data and the
same or sometimes less of the key.
On Thu, 27 Aug 2026 13:39:24 -0000 (UTC), antispam@fricas.org (Waldek Hebisch) wrote:
bart <bc@freeuk.com> wrote:...
..., So what sorts of things need a 64-bit [int] range?
3) Cryptography. 32-bit cryptographic keys are deemed inadequateNot keys. 64-bit key was _barely_ adequate back when DES was
for most purposes. So, minimal reasonably safe cryptography needs
64-bits. And with spead of radio controlled devices (like garage
doors) there is increasing need for cryptography.
standardized, and has been unacceptable since the 1990s. (32-bit was
_never_ safe; during the 'crypto wars' period in the 1980s and 1990s,
when US and Europe tried to prevent spread of decent crypto,
the 'export' options in e.g. SSL used 40-bit _because_ "we can break
that".) Since 2010 at latest 128-bit is minimum,and now that people
are worried that quantum breaking will become practical, 256-bit is
more and more required.
But crypto does NOT operate on the whole key as a unit. Most
algorithms operate on either 32-bit or 64-bit chunks of data and the
same or sometimes less of the key.
On 16/09/2026 03:22, dave_thompson_2@comcast.net wrote:
On Thu, 27 Aug 2026 13:39:24 -0000 (UTC), antispam@fricas.org (Waldek
Hebisch) wrote:
bart <bc@freeuk.com> wrote:...
..., So what sorts of things need a 64-bit [int] range?
3) Cryptography.ÿ 32-bit cryptographic keys are deemed inadequateNot keys. 64-bit key was _barely_ adequate back when DES was
for most purposes.ÿ So, minimal reasonably safe cryptography needs
64-bits.ÿ And with spead of radio controlled devices (like garage
doors) there is increasing need for cryptography.
standardized, and has been unacceptable since the 1990s. (32-bit was
_never_ safe; during the 'crypto wars' period in the 1980s and 1990s,
when US and Europe tried to prevent spread of decent crypto,
the 'export' options in e.g. SSL used 40-bit _because_ "we can break
that".) Since 2010 at latest 128-bit is minimum,and now that people
are worried that quantum breaking will become practical, 256-bit is
more and more required.
There is a vast amount of stuff related to cryptography or security for which 32-bit is entirely fine.ÿ There are other things for which 8096-
bit is a better choice.ÿ It all depends on what you are trying to
protect, how attacks can work, and how much real entropy there is in the
key (rather than the key length).
Remember, access to your bank account is secured by a number that is not even 14 bits - it's a 4-digit PIN.ÿ And that is secure for its purpose.
But crypto does NOT operate on the whole key as a unit. Most
algorithms operate on either 32-bit or 64-bit chunks of data and the
same or sometimes less of the key.
A lot of popular cryptographic algorithms are optimised to work with 64-
bit chunks, so they are convenient for efficient implementation.ÿ But
the algorithms can work happily (albeit slowly) on 8-bit computers.
People may be worried about quantum computers breaking currentNo. But Quantum computing plus rogue super-AI plus a moronic and crooked
encryption systems, but they should not be - there is no realistic
pathway towards quantum computers being physically or economically
viable for the task.
As the great philosopher Dara ? Briain said, "Zombies are at an all-time
low level, but the fear of zombies could be incredibly high.ÿ It doesn't mean we have to have government policies to deal with the fear of zombies."
Fear of quantum computers breaking encryption may be high, but it's not something we should actually be worrying about.
On 16/09/2026 08:24, David Brown wrote:
On 16/09/2026 03:22, dave_thompson_2@comcast.net wrote:No. But Quantum computing plus rogue super-AI plus a moronic and crooked
On Thu, 27 Aug 2026 13:39:24 -0000 (UTC), antispam@fricas.org (Waldek
Hebisch) wrote:
bart <bc@freeuk.com> wrote:...
..., So what sorts of things need a 64-bit [int] range?
3) Cryptography.ÿ 32-bit cryptographic keys are deemed inadequateNot keys. 64-bit key was _barely_ adequate back when DES was
for most purposes.ÿ So, minimal reasonably safe cryptography needs
64-bits.ÿ And with spead of radio controlled devices (like garage
doors) there is increasing need for cryptography.
standardized, and has been unacceptable since the 1990s. (32-bit was
_never_ safe; during the 'crypto wars' period in the 1980s and 1990s,
when US and Europe tried to prevent spread of decent crypto,
the 'export' options in e.g. SSL used 40-bit _because_ "we can break
that".) Since 2010 at latest 128-bit is minimum,and now that people
are worried that quantum breaking will become practical, 256-bit is
more and more required.
There is a vast amount of stuff related to cryptography or security
for which 32-bit is entirely fine.ÿ There are other things for which
8096- bit is a better choice.ÿ It all depends on what you are trying
to protect, how attacks can work, and how much real entropy there is
in the key (rather than the key length).
Remember, access to your bank account is secured by a number that is
not even 14 bits - it's a 4-digit PIN.ÿ And that is secure for its
purpose.
But crypto does NOT operate on the whole key as a unit. Most
algorithms operate on either 32-bit or 64-bit chunks of data and the
same or sometimes less of the key.
A lot of popular cryptographic algorithms are optimised to work with
64- bit chunks, so they are convenient for efficient implementation.
But the algorithms can work happily (albeit slowly) on 8-bit computers.
People may be worried about quantum computers breaking current
encryption systems, but they should not be - there is no realistic
pathway towards quantum computers being physically or economically
viable for the task.
As the great philosopher Dara ? Briain said, "Zombies are at an all-
time low level, but the fear of zombies could be incredibly high.ÿ It
doesn't mean we have to have government policies to deal with the fear
of zombies."
Fear of quantum computers breaking encryption may be high, but it's
not something we should actually be worrying about.
US president in charge might be.
On 16/09/2026 03:22, dave_thompson_2@comcast.net wrote:
On Thu, 27 Aug 2026 13:39:24 -0000 (UTC), antispam@fricas.org (Waldek
Hebisch) wrote:
bart <bc@freeuk.com> wrote:...
..., So what sorts of things need a 64-bit [int] range?
3) Cryptography.ÿ 32-bit cryptographic keys are deemed inadequateNot keys. 64-bit key was _barely_ adequate back when DES was
for most purposes.ÿ So, minimal reasonably safe cryptography needs
64-bits.ÿ And with spead of radio controlled devices (like garage
doors) there is increasing need for cryptography.
standardized, and has been unacceptable since the 1990s. (32-bit was
_never_ safe; during the 'crypto wars' period in the 1980s and 1990s,
when US and Europe tried to prevent spread of decent crypto,
the 'export' options in e.g. SSL used 40-bit _because_ "we can break
that".) Since 2010 at latest 128-bit is minimum,and now that people
are worried that quantum breaking will become practical, 256-bit is
more and more required.
There is a vast amount of stuff related to cryptography or security for which 32-bit is entirely fine.ÿ There are other things for which 8096-
bit is a better choice.ÿ It all depends on what you are trying to
protect, how attacks can work, and how much real entropy there is in the
key (rather than the key length).
Remember, access to your bank account is secured by a number that is not even 14 bits - it's a 4-digit PIN.ÿ And that is secure for its purpose.
But crypto does NOT operate on the whole key as a unit. Most
algorithms operate on either 32-bit or 64-bit chunks of data and the
same or sometimes less of the key.
A lot of popular cryptographic algorithms are optimised to work with 64-
bit chunks, so they are convenient for efficient implementation.ÿ But
the algorithms can work happily (albeit slowly) on 8-bit computers.
People may be worried about quantum computers breaking current
encryption systems, but they should not be - there is no realistic
pathway towards quantum computers being physically or economically
viable for the task.
As the great philosopher Dara ? Briain said, "Zombies are at an all-time
low level, but the fear of zombies could be incredibly high.ÿ It doesn't mean we have to have government policies to deal with the fear of zombies."
Fear of quantum computers breaking encryption may be high, but it's not something we should actually be worrying about.
On 16/09/2026 08:24, David Brown wrote:
.
Fear of quantum computers breaking encryption may be high, but it's
not something we should actually be worrying about.
No. But Quantum computing plus rogue super-AI plus a moronic and
crooked US president in charge might be.
| Sysop: | Tetrazocine |
|---|---|
| Location: | Melbourne, VIC, Australia |
| Users: | 8 |
| Nodes: | 8 (0 / 8) |
| Uptime: | 14:39:17 |
| Calls: | 220 |
| Files: | 21,513 |
| Messages: | 83,058 |