9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <9fans@hamnavoe.com>
To: 9fans@9fans.net
Subject: [9fans] one weird trick to break p9sk1 ?
Date: Sun, 12 May 2024 14:16:47 +0100	[thread overview]
Message-ID: <ccff0d92263529494d1fa46194c52c8c@hamnavoe.com> (raw)
In-Reply-To: <2dda1745-c644-4d9b-b436-26aaf3380192@posixcafe.org>

I'm using a new subject [was: Interoperating between 9legacy and 9front]
in the hope of continuing discussion of the vulnerability of p9sk1 without
too many other distractions.

moody@posixcafe.org said:
> If we agree that:
> 
> 1) p9sk1 allows the shared secret to be brute-forced offline.
> 2) The average consumer machine is fast enough to make a large amount of attempts in a short time,
>    in other words triple DES is not computationally hard to brute force these days.
> 
> I don't know how you don't see how this is trivial to do.

I agree that 1) is true, but I don't think it's serious. The shared secret is
only valid for the current session, so by the time it's brute forced, it may
be too late to use. I think the bad vulnerability is that the ticket request
and response can be used offline to brute force the (more permanent) DES keys
of the client and server. Provided, of course, that the random teenager somehow
is able to listen in on the conversation between my p9sk1 clients and servers.

On the other hand, it's hard to know whether to agree or disagree with 2),
without knowing exactly what is meant by "large amount", "short time",
"computationally hard", and "trivial".

When Jacob told me at IWP9 in Waterloo that p9sk1 had been broken, not
just theoretically but in practice, I was looking forward to seeing publication
of the details. Ori's recent claim in 9fans seemed more specific:

> From: ori@eigenstate.org
> ...
> keep in mind that it can literally be brute forced in an
> afternoon by a teenager; even a gpu isn't needed to do
> this in a reasonable amount of time.

I was hoping for a citation to the experimental result Ori's claim was
based on. If the "it" which can be brute forced refers to p9sk1, it
would be very interesting to learn if there are flaws in the algorithm
which will allow it to be broken without breaking DES. My assumption
was that "it" was referring simply to brute forcing DES keys with a
known-plaintext attack. In that case, a back of the envelope calculation
can help us to judge whether the "in an afternoon" claim is plausible.

In an afternoon from noon to 6pm, there are 6*60*60 seconds. To crack
a single DES key by brute force, we'd expect to have to search on average
half the 56-bit key space, performing about 2^55 DES encryptions. So how
fast would the teenager's computer have to be?

        cpu% hoc
        2^55/(6*60*60)
        1667999861989
        1/_
        5.995204332976e-13

1667 billion DES encryptions per second, or less than a picosecond
per encryption. I think just enumerating the keys at that speed would
be quite a challenge for "the average consumer machine" (even with a GPU).

A bit of googling for actual results on DES brute force brings up
https://www.sciencedirect.com/science/article/abs/pii/S1383762122000066
from March 2022, which says:
 "Our best optimizations provided 3.87 billion key searches per second for Des/3des
 ... on an RTX 3070 GPU."

So even with a GPU, the expected time to crack a random 56-bit key would be
something like:

        cpu% hoc
        2^55/3.87e9
        9309766.671567
        _/(60*60*24)
        107.7519290691

More than three months. The same paper mentions someone else's purpose-built
machine called RIVYERA which "uses 128 Xilinx Spartan-6 LX150 FPGAs ... 
can try 691 billion Des keys in a second ... costs around 100,000 Euros".
Still not quite fast enough to break a key in an afternoon.

When Jacob says "triple DES is not computationally hard to brute force these days",
I assume this is just a slip of the keyboard, since p9sk1 uses only single DES.
But if we are worried about the shaky foundations of p9sk1 being based on
single DES, Occam's Razor indicates that we should look for the minimal and simplest
possible extension to p9sk1 to mitigate the brute force threat. The manual entry for
des(2) suggests that the Plan 9 authors were already thinking along these lines:

     BUGS
          Single DES can be realistically broken by brute-force; its
          56-bit key is just too short.  It should not be used in new
          code, which should probably use aes(2) instead, or at least
          triple DES.

Let's postulate a p9sk3 which is identical to p9sk1 except that it encrypts the
ticket responses using 3DES instead of DES. The effective keyspace of 3DES is
considered to be 112 bits because of the theoretical meet-in-the-middle attack.
So brute forcing a 3DES key with commodity hardware (including GPU) would be
expected to take something like:

        cpu% hoc
        2^111/3.87e9
        6.708393874076e+23
        _/(60*60*24*365.25)
        2.125761741728e+16

That's quadrillions of years. Not what most people would call "trivial".
And that's generously assuming the implementation of meet-in-the-middle
is zero cost. Without meet-in-the-middle, we're looking at a 168-bit
keyspace and an even more preposterous number of years.

I was looking forward to the "proof of concept". Even if we can't see
the details, it would be intriguing to know if it was specifically about
breaking p9sk1 or just cracking DES keys, and what assumptions were made
about practical speed of operation.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T56397eff6269af27-Mc7caa71e6900a435bbe4a9b6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

  parent reply	other threads:[~2024-05-12 13:17 UTC|newest]

Thread overview: 296+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 16:06 [9fans] Interoperating between 9legacy and 9front Lucio De Re
2024-05-08 16:29 ` Jacob Moody
2024-05-08 19:16   ` vester.thacker
2024-05-08 20:10     ` hiro
2024-05-08 21:52       ` vic.thacker
2024-05-09  9:05         ` wb.kloke
2024-05-09 11:05           ` Lucio De Re
2024-05-09 14:04             ` wb.kloke
2024-05-09 16:30               ` kvik
2024-05-09 14:07             ` Lucas Francesco
2024-05-09 14:13               ` ori
2024-05-10 10:58                 ` Richard Miller
2024-05-10 13:01                   ` ibrahim via 9fans
2024-05-10 14:24                   ` Jacob Moody
2024-05-11 18:25                   ` hiro
2024-05-11 19:15                     ` Dan Cross
2024-05-11 19:34                       ` hiro
2024-05-11 19:59                         ` Dan Cross
2024-05-11 20:16                           ` Jacob Moody
2024-05-11 20:21                             ` Dan Cross
2024-05-12 13:16                             ` Richard Miller [this message]
2024-05-12 13:59                               ` [9fans] one weird trick to break p9sk1 ? tlaronde
2024-05-12 14:25                               ` hiro
2024-05-12 16:43                                 ` Richard Miller
2024-05-12 17:09                                   ` hiro
2024-05-13 10:32                                     ` Richard Miller
2024-05-13 11:00                                       ` hiro
2024-05-12 22:43                                   ` Dan Cross
2024-05-13 11:41                                     ` Richard Miller
2024-05-13 12:47                                     ` Richard Miller
2024-05-13 12:51                                       ` Charles Forsyth
2024-05-13 13:02                                         ` David du Colombier
2024-05-13 13:05                                         ` [9fans] golang dependency on python3 Richard Miller
2024-05-13 14:13                                       ` [9fans] one weird trick to break p9sk1 ? hiro
2024-05-12 15:19                               ` Jacob Moody
2024-05-12 18:19                               ` ori
2024-05-12 20:10                                 ` ori
2024-05-13 10:18                                   ` Richard Miller
2024-05-13 10:48                                     ` hiro
2024-05-13 13:48                                     ` Jacob Moody
2024-05-13 15:06                                       ` Richard Miller
2024-05-12 21:15                               ` Kurt H Maier via 9fans
2024-05-12 18:23                         ` [9fans] Interoperating between 9legacy and 9front hiro
2024-05-09 10:55         ` Lucio De Re
2024-05-17 16:16           ` Noam Preil
2024-05-18 19:08             ` [9fans] fossil Richard Miller
2024-05-09 19:50         ` [9fans] Interoperating between 9legacy and 9front hiro
2024-05-10  4:44           ` [9fans] Balancing Progress and Accessibility in the Plan 9 Community. (Was: [9fans] Interoperating between 9legacy and 9front) vic.thacker
2024-05-10  7:33             ` Lallero
2024-05-10  8:47               ` vic.thacker
2024-05-10  9:07                 ` Lucio De Re
2024-05-10 10:21                   ` qwx via 9fans
2024-05-10 11:53                     ` Lucio De Re
2024-05-10 12:20                       ` Lallero
2024-05-10 12:38                       ` thedaemon via 9fans
2024-05-10 13:19                         ` Lucio De Re
2024-05-10 13:18                       ` qwx via 9fans
2024-05-10 13:38                       ` kvik
2024-05-10 14:54                         ` Lucio De Re
2024-05-11 16:26                           ` hiro
2024-05-11 22:12                             ` vic.thacker
2024-05-11 22:27                               ` hiro
2024-05-11 22:50                                 ` vic.thacker
2024-05-12  0:43                                   ` ori
2024-05-12  2:55                                     ` Jacob Moody
2024-05-12  7:19                                       ` plan6
2024-05-12 11:45                                         ` vic.thacker
2024-05-12 11:53                                           ` hiro
2024-05-12 11:56                                             ` vester.thacker
2024-05-12 12:18                                               ` plan6
2024-05-12 12:41                                                 ` vester.thacker
2024-05-12 13:11                                                   ` hiro
2024-05-12 13:21                                                     ` plan6
2024-05-12 13:47                                                     ` vic.thacker
2024-05-12 13:23                                                   ` qwx via 9fans
2024-05-12 15:11                                                     ` vic.thacker
2024-05-12 15:55                                                       ` hiro
2024-05-12 16:56                                                         ` vester.thacker
2024-05-12 13:11                                                 ` plan6
2024-05-12 13:09                                               ` hiro
2024-05-12 18:36                                           ` ori
2024-05-13  0:21                                             ` vester.thacker
2024-05-13  1:32                                               ` ori
2024-05-13  1:46                                                 ` Dan Cross
2024-05-13  1:56                                                   ` Kurt H Maier via 9fans
2024-05-13  3:09                                                   ` Jacob Moody
2024-05-13  3:52                                                     ` ibrahim via 9fans
2024-05-13  4:06                                                       ` vic.thacker
2024-05-13  4:42                                                       ` Jacob Moody
2024-05-13  5:16                                                         ` clinton
2024-05-13  5:33                                                       ` ron minnich
2024-05-13  5:54                                                         ` ibrahim via 9fans
2024-05-13  6:07                                                           ` ron minnich
2024-05-13  6:14                                                           ` Kurt H Maier via 9fans
2024-05-13  7:44                                                         ` ibrahim via 9fans
2024-05-13  8:10                                                           ` sirjofri
2024-05-13  8:42                                                             ` [9fans] List of companies that use Plan 9 vic.thacker
2024-05-13  9:38                                                               ` hiro
2024-05-13 11:55                                                                 ` vic.thacker
2024-05-13 12:56                                                                   ` hiro
2024-05-13 13:59                                                                     ` G B via 9fans
2024-05-13 21:01                                                                       ` vic.thacker
2024-05-13 21:17                                                                     ` vic.thacker
2024-05-14 14:12                                                                       ` B. Atticus Grobe
2024-05-14 16:02                                                                         ` vic.thacker
2024-05-14 16:30                                                                           ` B. Atticus Grobe
2024-05-14 16:39                                                                             ` arnold
2024-05-14 17:54                                                                               ` Steve Simon
2024-05-14 18:38                                                                                 ` vic.thacker
2024-05-14 19:05                                                                                 ` tlaronde
2024-05-14 19:44                                                                                   ` Wes Kussmaul
2024-05-16 11:51                                                                                     ` tlaronde
2024-05-14 23:19                                                                                   ` michaelian ennis
2024-05-15  4:46                                                                                     ` Lucio De Re
2024-05-15  5:55                                                                                       ` Clarifying Lucio's Additional Requests [Was: Re: [9fans] List of companies that use Plan 9. ] vic.thacker
2024-05-15  6:11                                                                                         ` Jacob Moody
2024-05-15  6:41                                                                                           ` vic.thacker
2024-05-15  7:39                                                                                             ` plan6
2024-05-15  9:17                                                                                               ` vic.thacker
2024-05-15 10:08                                                                                                 ` sirjofri
2024-05-15 10:35                                                                                                 ` hiro
2024-05-15 12:04                                                                                                   ` vic.thacker
2024-05-15  8:38                                                                                             ` sirjofri
2024-05-15  9:25                                                                                               ` Aleksandar Kuktin
2024-05-15 13:58                                                                                               ` vic.thacker
2024-05-15 14:18                                                                                                 ` Don Bailey
2024-05-15 14:56                                                                                                   ` sirjofri
2024-05-15 15:04                                                                                                     ` Don Bailey
2024-05-15 15:20                                                                                                       ` sirjofri
2024-05-15 15:34                                                                                                         ` Jens Staal
2024-05-15 15:26                                                                                                       ` hiro
2024-05-15 15:20                                                                                                   ` Jacob Moody
2024-05-15 14:52                                                                                                 ` ori
2024-05-15 13:29                                                                                             ` ori
2024-05-15  6:04                                                                                       ` [9fans] List of companies that use Plan 9 Jacob Moody
2024-05-15  9:02                                                                                         ` Lucio De Re
2024-05-15  9:04                                                                                           ` hiro
2024-05-15 13:38                                                                                           ` ori
2024-05-15 14:35                                                                                           ` Jacob Moody
2024-05-15 15:18                                                                                             ` Lucio De Re
2024-05-15 15:20                                                                                               ` Don Bailey
2024-05-15 15:39                                                                                                 ` Kurt H Maier via 9fans
2024-05-15 15:53                                                                                                   ` Don Bailey
2024-05-15 16:10                                                                                                     ` Kurt H Maier via 9fans
2024-05-15 16:20                                                                                                       ` Don Bailey
2024-05-15 16:51                                                                                                         ` Kurt H Maier via 9fans
2024-05-15 16:54                                                                                                           ` Don Bailey
2024-05-15 17:00                                                                                                             ` Kurt H Maier via 9fans
2024-05-15 17:03                                                                                                         ` Jacob Moody
2024-05-15 17:36                                                                                                           ` Lucio De Re
2024-05-15 18:32                                                                                                             ` hiro
2024-05-15 22:06                                                                                                               ` Steve Simon
2024-05-15 22:17                                                                                                                 ` hiro
2024-05-15 22:38                                                                                                                   ` Steve Simon
2024-05-16  9:17                                                                                                                     ` hiro
2024-05-17 16:51                                                                                                     ` Noam Preil
2024-05-17 17:37                                                                                                       ` Lucio De Re
2024-05-17 18:45                                                                                                         ` Noam Preil
2024-05-18 12:58                                                                                                           ` Lucio De Re
2024-05-17 18:11                                                                                                       ` [9fans] fossil [was: List of companies that use Plan 9.] Richard Miller
2024-05-17 18:14                                                                                                         ` Noam Preil
2024-05-17 19:14                                                                                                           ` David du Colombier
2024-05-17 19:45                                                                                                             ` wb.kloke
2024-05-18 13:53                                                                                                             ` Lucio De Re
2024-05-18 14:06                                                                                                               ` Charles Forsyth
2024-05-18 14:24                                                                                                                 ` Lucio De Re
2024-05-15 15:52                                                                                                 ` [9fans] List of companies that use Plan 9 Jacob Moody
2024-05-15 15:56                                                                                                   ` Don Bailey
2024-05-15 16:06                                                                                                     ` hiro
2024-05-15 16:13                                                                                                       ` Don Bailey
2024-05-15 16:22                                                                                                         ` hiro
2024-05-15 16:28                                                                                                           ` Don Bailey
2024-05-15 16:17                                                                                                     ` Jacob Moody
2024-05-15 16:21                                                                                                       ` Don Bailey
2024-05-15 16:27                                                                                                         ` Jacob Moody
2024-05-15 15:56                                                                                                 ` hiro
2024-05-15 15:28                                                                                               ` Jacob Moody
2024-05-15 15:57                                                                                                 ` hiro
2024-05-15 16:19                                                                                                   ` Jacob Moody
2024-05-15 15:36                                                                                               ` hiro
2024-05-14 17:30                                                                             ` vic.thacker
2024-05-15  5:48                                                               ` John the Scott
2024-05-15  9:34                                                                 ` vic.thacker
2024-05-15 13:18                                                                 ` Wes Kussmaul
2024-05-15 13:46                                                                   ` vester.thacker
2024-05-17 16:26                                                               ` Noam Preil
2024-05-17 17:30                                                                 ` vester.thacker
2024-05-13  9:22                                                             ` [9fans] Balancing Progress and Accessibility in the Plan 9 Community. (Was: [9fans] Interoperating between 9legacy and 9front) ibrahim via 9fans
2024-05-13  9:56                                                               ` vic.thacker
2024-05-13  9:57                                                               ` sirjofri
2024-05-13 10:12                                                                 ` ibrahim via 9fans
2024-05-13 10:40                                                                   ` sirjofri
2024-05-13 11:01                                                                     ` ibrahim via 9fans
2024-05-13 11:26                                                                       ` hiro
2024-05-13 12:08                                                                         ` ibrahim via 9fans
2024-05-13 13:35                                                                           ` G B via 9fans
2024-05-13 13:50                                                                             ` ibrahim via 9fans
2024-05-13 14:26                                                                           ` ibrahim via 9fans
2024-05-13 14:32                                                                             ` ori
2024-05-13 14:47                                                                               ` ibrahim via 9fans
2024-05-13 11:15                                                                   ` hiro
2024-05-13 11:12                                                                 ` hiro
2024-05-13 15:03                                                               ` Jacob Moody
2024-05-13 15:20                                                                 ` hiro
2024-05-13  6:01                                                       ` Kurt H Maier via 9fans
2024-05-13  6:18                                                         ` ibrahim via 9fans
2024-05-13  6:23                                                           ` Kurt H Maier via 9fans
2024-05-13  6:55                                                         ` tlaronde
2024-05-13  7:27                                                           ` ibrahim via 9fans
2024-05-13  7:47                                                             ` tlaronde
2024-05-13  8:00                                                             ` ibrahim via 9fans
2024-05-13 10:04                                                       ` hiro
2024-05-13 10:52                                                         ` ibrahim via 9fans
2024-05-13 11:13                                                           ` Ori Bernstein
2024-05-13  2:16                                                 ` clinton
2024-05-13  2:33                                                   ` ori
2024-05-13  2:36                                                   ` Kurt H Maier via 9fans
2024-05-13  3:02                                                     ` ibrahim via 9fans
2024-05-13  7:55                                                   ` adventures in9
2024-05-13 10:43                                                     ` hiro
2024-05-13  3:45                                                 ` vic.thacker
2024-05-13  5:45                                                   ` ibrahim via 9fans
2024-05-13  6:04                                                     ` ibrahim via 9fans
2024-05-13  6:22                                                       ` Kurt H Maier via 9fans
2024-05-13  6:21                                                     ` Jacob Moody
2024-05-13  6:58                                                       ` ibrahim via 9fans
2024-05-13 10:27                                                       ` hiro
2024-05-13  1:37                                               ` Kurt H Maier via 9fans
2024-05-13  2:53                                               ` ibrahim via 9fans
2024-05-13  9:38                                               ` hiro
2024-05-13  9:45                                                 ` ibrahim via 9fans
2024-05-13 11:11                                                   ` hiro
2024-05-13 11:56                                                     ` ibrahim via 9fans
2024-05-13 14:01                                                       ` hiro
2024-05-13 14:39                                                       ` Jacob Moody
2024-05-13 14:46                                                         ` ori
2024-05-13 15:04                                                         ` ibrahim via 9fans
2024-05-13 15:56                                                           ` ibrahim via 9fans
2024-05-13 16:41                                                             ` Jacob Moody
2024-05-13 17:01                                                             ` Ori Bernstein
2024-05-13 17:59                                                               ` adventures in9
2024-05-13 18:07                                                                 ` hiro
2024-05-17 11:45                                                                 ` Matt Wilbur
2024-05-13 18:04                                                             ` hiro
2024-05-17 10:06                                                               ` samuel.reader via 9fans
2024-05-17 11:09                                                                 ` ori
2024-05-17 11:11                                                                 ` hiro
2024-05-17 11:32                                                                   ` plan6
2024-05-17 12:14                                                                     ` hiro
2024-05-17 13:50                                                                       ` Clout Tolstoy
2024-05-17 14:22                                                                         ` Samuel Reader via 9fans
2024-05-17 14:35                                                                           ` hiro
2024-05-17 14:58                                                                           ` Dave Eckhardt
2024-05-17 15:36                                                                           ` Kurt H Maier via 9fans
2024-05-17 12:31                                                                     ` qwx via 9fans
2024-05-17 12:43                                                                       ` Samuel Reader via 9fans
2024-05-17 14:14                                                                         ` Jacob Moody
2024-05-17 14:20                                                                           ` hiro
2024-05-17 14:46                                                                             ` Michael Kerpan
2024-05-17 14:59                                                                               ` Jacob Moody
2024-05-17 15:58                                                                               ` hiro
2024-05-17 16:59                                                                               ` Noam Preil
2024-05-17 17:22                                                                                 ` hiro
2024-05-17 17:50                                                                                   ` fig
2024-05-17 18:03                                                                                     ` Lucio De Re
2024-05-17 20:09                                                                                       ` hiro
2024-05-17 20:06                                                                                     ` hiro
2024-05-17 23:08                                                                                       ` fig
2024-05-17 23:32                                                                                         ` hiro
2024-05-17 14:49                                                                           ` Jacob Moody
2024-05-17 15:48                                                                             ` vester.thacker
2024-05-17 16:12                                                                         ` Noam Preil
2024-05-17 12:47                                                                     ` ori
2024-05-17 15:51                                                                     ` Kurt H Maier via 9fans
2024-05-18  3:32                                                                       ` vester.thacker
2024-05-18  7:10                                                                         ` sirjofri
2024-05-17 12:26                                                               ` samuel.reader via 9fans
2024-05-17 12:49                                                                 ` Steve Simon
2024-05-17 15:02                                                                   ` plan6
2024-05-17 13:11                                                                 ` hiro
     [not found]                                       ` <2eaaa7c4-ea43-4c97-bf33-9a78964debb3@app.fastmail.com>
     [not found]                                         ` <4a1cb1b6-869d-4697-8d63-fd949f6be596@posixcafe.org>
2024-05-12 11:40                                           ` vic.thacker
2024-05-17 16:23               ` Noam Preil
2024-05-10  8:17           ` [9fans] Interoperating between 9legacy and 9front Lucio De Re
2024-05-10  8:26             ` Charles Forsyth
2024-05-10  8:48               ` Lucio De Re
2024-05-11 16:37               ` hiro
2024-05-10 17:09             ` Jacob Moody
2024-05-11  9:45               ` David du Colombier
2024-05-11 19:51                 ` hiro
2024-05-11 19:59                   ` Dan Cross
2024-05-11 20:04                     ` hiro
2024-05-11 20:08                       ` Dan Cross
2024-05-11 20:29                         ` hiro
2024-05-11 20:58                           ` Skip Tavakkolian
2024-05-11 21:03                             ` hiro
2024-05-11 21:14                               ` Skip Tavakkolian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ccff0d92263529494d1fa46194c52c8c@hamnavoe.com \
    --to=9fans@hamnavoe.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).