WEBVTT

00:00.000 --> 00:01.300
All right.

00:01.300 --> 00:03.120
Welcome back, everybody.

00:03.140 --> 00:06.900
Next up, please welcome Steve, who will be speaking about EasyPake Oven.

00:10.020 --> 00:11.020
I'm Steve.

00:11.020 --> 00:12.460
You may know me as Scoobs.

00:12.460 --> 00:14.460
Thank you for coming to my talk.

00:15.840 --> 00:23.440
So, a quick overview of my talk.

00:23.440 --> 00:34.640
It's going to be, you know, what, why, which, password, KDFs, APIs, and HSMs, secret salt, and recovery.

00:35.740 --> 00:37.960
So, what is a Pake?

00:38.080 --> 00:40.140
A Pake is a password key...

00:43.940 --> 00:46.220
This always happens in, like, the first five minutes.

00:46.220 --> 00:48.220
I always get super nervous.

00:48.220 --> 00:49.200
I know.

00:49.520 --> 00:50.800
Anyways.

00:50.800 --> 00:51.560
Woo!

00:55.540 --> 00:56.980
Anyway.

00:57.000 --> 01:01.640
So, a password authenticated key exchange is just that.

01:01.640 --> 01:15.280
It's a key exchange that has a password involved such that anyone trying to do any, like, malicious attacks or anything like that gains nothing from it.

01:15.280 --> 01:25.220
It's a zero knowledge proof, and the only thing that leaks is yes or no for whether your password was correct or wrong.

01:25.480 --> 01:31.360
It also has... there's two different types of Pakes.

01:31.600 --> 01:33.300
Balanced and unbalanced.

01:33.300 --> 01:37.440
Sometimes it's called symmetric and asymmetric or augmented.

01:37.720 --> 01:44.220
So, a balanced Pake is where it's peer-to-peer.

01:45.820 --> 01:51.380
So, sorry.

01:54.180 --> 01:58.620
So, a balanced Pake is where you're peer-to-peer.

01:58.640 --> 02:12.080
So, this is, like, two people that have a shared low entropy key, such as, like, a short password or something that you prearranged or whatever.

02:12.080 --> 02:18.080
You can do a key exchange, and it can be secure.

02:18.520 --> 02:25.820
The other way, the augmented asymmetric unbalanced way, is server client.

02:25.820 --> 02:42.340
So, the server has a password, and the client has a password, and the server has a verifier that... so, the verifier, it can't be used as a way to authenticate to the server.

02:42.340 --> 02:48.780
So, if the database ever leaks, that verifier data can't be used to authenticate to the server.

02:48.780 --> 02:54.170
But basically, it's a password hash equivalent, but not a password equivalent.

02:55.550 --> 02:58.490
So, why should you use Pake?

02:58.490 --> 03:11.010
Well, it may seem overly complex or scary or something, but there are some use cases where it helps with security.

03:14.510 --> 03:27.470
So, one of these cases is recently, over the last... over a span of about a year, these tech companies accidentally were logging passwords.

03:27.470 --> 03:36.950
And if the password is never sent to the server, then you can't log the password.

03:37.050 --> 03:50.130
You might think, oh, I could hash the password first and send it over, but... so, you secure the database really well, but you still log, like, a simple hash of the password, and that's in the log.

03:50.130 --> 03:51.790
Those can be cracked easily.

03:51.950 --> 04:01.970
But even if you logged all the Pake data that's being going... that's going back and forth, you would gain nothing from that as an attacker.

04:03.510 --> 04:12.170
There... since this isn't, like, implemented in the browser, you'd have to be... you'd have to implement it in JavaScript.

04:13.050 --> 04:17.630
And sometimes people have JavaScript disabled, so you'd have to still have a fallback.

04:17.630 --> 04:21.030
But that's, you know, like, 1%.

04:21.030 --> 04:27.790
So, some other uses, as I was saying, peer-to-peer.

04:27.830 --> 04:34.110
What you can do is secure peer-to-peer file transfer with magic wormhole.

04:35.590 --> 04:40.210
You can also... so, that's the GitHub page for it.

04:40.330 --> 04:44.010
You can also... it's in package managers for Linux.

04:44.870 --> 05:13.990
I actually don't know which ones, but... so, anyway, so, basically what it does is you have this small shared secret that you send... that you tell someone, they type it in, and then you can get a secure connection between the two of you, assuming that someone didn't man the middle and guess what it was with one try.

05:14.670 --> 05:25.610
Another good thing Pakes are for are for encrypted cloud services, like password managers and encrypted backups.

05:25.610 --> 05:30.190
Because they have to do authentication and encryption with your password.

05:30.210 --> 05:35.490
And there's a lot of things that you can do incorrectly with passwords.

05:35.490 --> 05:43.110
Such as... so, there's downgrade attacks that Pakes prevent.

05:43.110 --> 05:55.990
So, a bug that last pass had was you would log in, it would say error... well, if the server was compromised, the server could reply with error iterations one.

05:56.270 --> 05:59.150
You would be like, oh, oops, I had the iterations wrong.

05:59.150 --> 06:04.670
So, then you would do one iteration, which would be a really fast hash, and then send that.

06:04.670 --> 06:10.530
And then it would say error iterations, the correct amount of iterations for your account.

06:10.530 --> 06:15.090
And all the user would see is that it took twice as long to log in.

06:15.670 --> 06:16.880
And they'd just be like...

06:19.330 --> 06:22.290
Then there was keeper.

06:22.730 --> 06:25.760
This was on full disclosure.

06:31.140 --> 06:35.360
And so, the bug here was...

06:40.570 --> 06:51.570
so, the way authentication and encryption worked on this is there was a salt and iteration count for the authentication key.

06:51.590 --> 06:54.410
And then there was a salt and iteration count for the encryption key.

06:54.410 --> 06:57.150
And both of those were run through PBKDF2.

06:57.150 --> 07:00.930
And then you would get the authentication key or encryption key.

07:00.930 --> 07:14.870
But if you sent the... if an evil server sent the encryption salt and iteration count for the authentication stage, the client would just send the encryption key.

07:15.810 --> 07:18.210
So, that would be really bad.

07:18.930 --> 07:22.830
I forgot which way I decided on doing this.

07:24.150 --> 07:34.910
So, the fix... well... so, they don't like people not praising them.

07:34.910 --> 07:38.070
So, I'm not gonna say this one.

07:39.470 --> 07:45.250
But it was very obvious from the previous slide what they're doing wrong.

07:45.250 --> 07:52.210
Because they're doing exactly the same thing except for the authentication key is now hashed.

07:52.210 --> 07:55.890
So, you can probably figure out what's wrong.

07:56.110 --> 08:07.770
But if any... well, I guess I'm still... if they were using pigs for authentication, then none of these attacks would work.

08:08.890 --> 08:11.470
So, there's a bunch of pigs.

08:11.470 --> 08:13.310
And which one do you use?

08:13.730 --> 08:22.050
So, you may have heard recently about dragon fly and the pony award for dragon blood.

08:24.350 --> 08:31.310
So, basically, it was a timing attack on their hash to point algorithm.

08:31.310 --> 08:35.310
Because it was like an iterated loop which would then leak information.

08:35.570 --> 08:39.830
This is actually known to be bad a while ago.

08:39.830 --> 08:42.450
I don't know why anyone uses dragon fly.

08:42.450 --> 08:44.910
I guess their marketing team is good or something.

08:45.330 --> 08:45.430
But

08:50.390 --> 08:59.430
no one's actually done a real life test on such as with dragon blood, which is the cool part.

09:00.630 --> 09:05.550
Anyway, so, there's SRP 6A.

09:06.810 --> 09:09.070
So, the client's on the left.

09:09.210 --> 09:10.610
Server's on the right.

09:10.630 --> 09:14.050
And those are just... the arrows are just packets going back and forth.

09:14.050 --> 09:29.210
When you see a key, that means at that stage, the... that side can encrypt or send... well, and send the authentication key.

09:29.210 --> 09:30.530
Or, yeah.

09:30.530 --> 09:32.030
Verifier thing.

09:32.030 --> 09:38.310
So, only need to authenticate the user.

09:38.310 --> 09:42.810
Such as, like, logging into an account.

09:42.810 --> 09:46.430
Then you wouldn't need to do the last step.

09:49.450 --> 09:57.870
There's... so, on the server side, the key is actually available after the first packet.

09:57.970 --> 10:12.410
But if you send encrypted data or you... or send the authentication token from the server to the client, the client actually has all the information necessary to do offline brute force.

10:12.510 --> 10:17.570
So, if you were to do that, your implementation would be really, really bad.

10:18.090 --> 10:25.890
So, when I was doing my slides, I remembered seeing something weird on Wikipedia like a year ago.

10:25.890 --> 10:29.490
And being like, wait a minute.

10:30.390 --> 10:32.290
This is wrong.

10:32.410 --> 10:36.050
So, I haven't actually had time to fix this.

10:36.050 --> 10:44.490
But according to this, you can skip M1, which is the authentication method...

10:45.570 --> 10:48.450
verification from the client to the server.

10:48.450 --> 10:51.570
And M2 is verification from the server to the client.

10:51.570 --> 11:12.550
If you skip M1 or... well, if you skip M1 and M2 and then you encrypt data to the client before verifying the encrypted data from the client, then the client has everything it needs to do a offline password cracking.

11:13.590 --> 11:19.990
So, opaque, that's the new hotness.

11:22.650 --> 11:35.840
So, this pig was presented at real world crypto a few years ago.

11:36.440 --> 11:43.500
So, what they introduced was blind salt.

11:43.500 --> 11:45.620
It has this interesting property.

11:45.620 --> 11:52.740
So, with other pigs, the salt is given to the client or, you know, assumed or whatever.

11:54.240 --> 12:01.660
And, you know, like, when I say assumed, I mean, like, the user name combined with the domain name.

12:01.660 --> 12:03.320
That's the salt.

12:04.240 --> 12:15.160
So, what happens with these other pigs is you can run the password KDF, which is expensive, on a bunch of password guesses.

12:16.040 --> 12:19.280
So, you store all those keys.

12:19.280 --> 12:33.620
And then when you want to, what you do is, well, once you're done with enough, you go and break into the server, grab the verification data, and run through all those passwords extremely fast.

12:33.620 --> 12:45.900
So, if you are in a limited time scale from when you get in to when they're going to change passwords or something, you would want to do this.

12:46.040 --> 12:48.160
It's like a theoretical attack.

12:48.180 --> 13:02.180
But with opaque, with the blind salt, there's basically it prevents that by, well, actually, so, you don't really have to read this.

13:02.180 --> 13:03.680
It's just sort of there.

13:05.320 --> 13:08.340
So, this is how blind salt works.

13:10.260 --> 13:20.000
Basically, after it runs through, if you had the wrong password at the beginning, so, H, that's a fast hash.

13:20.000 --> 13:22.340
That's not like a password KDF or anything.

13:22.560 --> 13:25.180
There's no information linkage on this.

13:25.180 --> 13:33.080
There's no way to, you know, from the client's message to know, oh, hey, the password could have been like that or something.

13:33.640 --> 13:43.900
But, so, if the password is wrong at the beginning, then when you get back your blind salt, it will be the wrong salt.

13:43.900 --> 13:48.400
And then when you're doing the password KDF, it will be also wrong.

13:49.440 --> 13:51.940
So, basically, you have to do this all.

13:52.820 --> 13:59.300
There's one small thing with, so, the S column.

14:01.160 --> 14:02.040
Okay.

14:02.040 --> 14:03.300
You can't really see that.

14:03.440 --> 14:18.140
So, server, the part where that's doing its work, if you're doing that with elliptic curves, basically, what's happening is the server is receiving a point and then applying a private value to that.

14:18.140 --> 14:21.200
The same private value every single time.

14:21.200 --> 14:36.560
And what you can do with that is if there's a implementation error, such as this one implementation had a rare carry bug.

14:37.140 --> 14:39.860
And Sean and Filippo,

14:43.700 --> 14:48.400
they did a black hat talk about breaking that.

14:48.400 --> 14:54.960
They were able to, so, every now and then, given a point, it would cause an error.

14:54.960 --> 15:00.240
And when the value was incorrect, they could then determine some information about the private key.

15:00.240 --> 15:03.720
They were able to recover the entire private key.

15:03.720 --> 15:24.170
So, if the secret, the server is ever leaked in a case like that, then it would completely break opaque because that would give you all the data as an attacker to do line password cracking.

15:25.130 --> 15:26.650
So,

15:31.860 --> 15:40.500
SPake 2 plus EE with blind salt.

15:40.560 --> 15:42.360
That's a mouthful.

15:42.360 --> 15:51.660
So, basically, what I did was I added blind salt to SPake 2 plus EE.

15:51.940 --> 15:59.360
And I ended up making the name smaller to BSpake or BSpake.

15:59.380 --> 16:06.660
So , basically, it's similar to the round trips.

16:06.660 --> 16:12.140
Well, it is the same as the round trips for SRP.

16:14.360 --> 16:20.360
Except for this has an extra property that not many Pakes have.

16:20.360 --> 16:28.000
Well, it also has the property that opaque has where it prevents precomputations.

16:29.800 --> 16:35.580
So, this also has a property that is fairly interesting.

16:35.660 --> 16:39.080
So, it's sort of quantum resistant.

16:39.080 --> 16:40.900
I call it quantum annoying.

16:40.900 --> 16:42.660
It's not really a quantum easy problem.

16:42.660 --> 16:44.980
It's not a quantum hard problem.

16:44.980 --> 17:00.300
Basically, most Pakes, you have to solve one DLP and then you can do offline classical computer password guessing.

17:00.300 --> 17:08.720
But with BSpake, you have to solve one DLP for every password guess.

17:08.720 --> 17:19.620
So, it's fairly expensive because even if we did have quantum computers, I forgot to look this up.

17:19.620 --> 17:36.780
There's this paper that tells you, like, how many quantum operations you have to do to solve a DLP for a 256-bit elliptic curve, which is on the order of a few billion.

17:37.080 --> 17:51.580
So, even if you could do, if your theoretical quantum computer could do a billion quantum operations per second, you're looking at, you know, .1 passwords per second with a very expensive computer.

17:51.580 --> 17:55.720
There is a PQPake.

17:55.720 --> 17:58.660
I haven't actually looked into it that much.

17:58.740 --> 18:07.840
But, basically, with post-quantum algorithms, we don't really trust them that well yet.

18:07.840 --> 18:17.040
So, we usually run them in parallel with classical cryptography, like elliptic curves and whatnot.

18:17.040 --> 18:28.040
And so, with a Pake, you can't really run a PQPake next to a BSPake .

18:29.440 --> 18:33.480
Because you wouldn't get the combination.

18:33.480 --> 18:36.740
It would be whichever is the weakest one.

18:37.220 --> 18:44.100
So, basically , I think the best Pake to use is BSPake.

18:44.100 --> 18:49.400
So, this brings us to password KDFs.

18:49.400 --> 18:52.120
So, there's many different ones.

18:52.180 --> 19:00.320
One that you probably have heard of, or most common, probably, is just computationally hard.

19:00.320 --> 19:02.540
It's called PBKDF2.

19:02.540 --> 19:05.440
There's just one small problem with it.

19:05.440 --> 19:07.420
It has a foot gun.

19:07.760 --> 19:13.060
So, it runs in iterations times output length.

19:13.060 --> 19:25.880
So, if you ask for so, if you're doing PBKDF2 HMAC SHA-256, each block of output of SHA-256 is 256 bits.

19:25.880 --> 19:33.380
So, if you ask for 256 bits of key, then you only do iterations amount of work.

19:33.380 --> 19:44.860
But if you ask for 257 bits, then it has to do two blocks, and thus, it needs to do twice as much work.

19:45.540 --> 20:05.540
So, one password, they generated an IV and a key from PBKDF2, and an attacker only needed to generate one of those blocks and decrypt some stuff.

20:05.680 --> 20:09.400
And it was Adam from Hashcat that found that.

20:09.400 --> 20:19.440
And then, technically, Google Sync isn't on this list, but I like bringing them up because they did fairly bad.

20:19.440 --> 20:32.400
Basically, for Google Sync, they use Nigori, which the first thing that they do is they use PBKDF2 on constant data to generate assault.

20:32.400 --> 20:39.500
Then they do three more runs of PBKDF2 to generate three different keys.

20:39.520 --> 20:48.120
Technically, they could have done PBKDF2 with just like a long output, which is kind of like what the foot gun would have done.

20:48.800 --> 21:04.880
And then Microsoft, they were using was SHA1 base, so 160 bits, and they were asking for, or they were storing 256 bits.

21:04.880 --> 21:12.300
So, their servers had to do twice as much calculations as an attacker would have to.

21:12.900 --> 21:18.480
But, good thing, each block of output is independently generated.

21:18.560 --> 21:23.960
So, is the foot gun to actually make PBKDF2 better?

21:23.960 --> 21:28.280
Because what they're doing, each block is independently generated.

21:28.280 --> 21:34.540
So, you can use SIMD, which is single instruction multiple data.

21:34.540 --> 21:43.000
So, with x86, you have SC2, AVX, AVX2, AVX512.

21:43.380 --> 21:53.380
AVX512, that can run 16 iterations of PBKDF2 SHA256 at the same time.

21:53.540 --> 22:00.480
So, it would be 16 times more work being done in the same amount of time, and then you have multiple cores.

22:00.480 --> 22:07.960
So, you can make PBKDF a little bit better, but still, other algorithms are better.

22:08.420 --> 22:15.680
You really shouldn't be using a script at this point, because of the time memory tradeoff.

22:15.980 --> 22:26.710
Basically, an attacker is the only one that actually uses this, to their advantage, because they use less memory, and they do a little bit more work.

22:27.850 --> 22:31.790
And it ends up being faster overall.

22:31.950 --> 22:45.070
So, instead, you should be using Argon2, but the problem with Argon2 is for short runs, for like authentication, you can't use enough memory.

22:45.070 --> 22:47.070
It's just too slow.

22:47.430 --> 22:58.210
So, technically, a better algorithm would be a cache hard algorithm.

22:59.130 --> 23:08.770
Bcrypt isn't actually a KDF, but there are some weird ones like PBKDF, Bcrypt, or whatever.

23:08.850 --> 23:10.810
And then there's also Pufferfish.

23:10.810 --> 23:13.570
There are issues, but whatever.

23:14.590 --> 23:25.570
Really, I would say, currently, Argon2 would probably be the ideal way to go.

23:26.550 --> 23:45.030
So, with, so, the problem with pick APIs is, so, this is what you usually see when you see an implementation of SRP.

23:45.330 --> 23:49.570
So, calculate B, calculate M2, what's V?

23:49.870 --> 23:56.210
And, you know, so, basically, the developer has to figure out what all these are.

23:56.270 --> 24:11.950
And then they're like, okay, and some implementations leave it up to the developer to figure out whether, how they're supposed to check M1, M2, which one they send first, and whatnot.

24:11.950 --> 24:20.410
And as I said before, with SRP, this can lead to very bad bugs.

24:21.210 --> 24:29.770
So, a good API would be one that is easy to use and hard to misuse.

24:30.390 --> 24:37.210
So, basically, you start, you say who you are, who the other person is, and your secret.

24:37.210 --> 24:43.110
If you're a client, or, you know, it's a symmetric pick, this would be a password.

24:43.230 --> 24:46.870
If you're the server, then this would be your server secret data.

24:47.350 --> 24:56.250
Then you say, you let the API know what type of user you are and what type of mode you're using.

24:56.290 --> 25:00.050
And it will return a message status.

25:00.490 --> 25:03.630
You check the status for whatever.

25:03.670 --> 25:07.470
And the message, you may or may not get a message back.

25:07.470 --> 25:12.770
If you do, you send it to the other side.

25:17.450 --> 25:23.710
So, when you receive a message, you pass it into receive message.

25:23.710 --> 25:26.530
And then you get another message and a status.

25:26.730 --> 25:29.650
And every time you get a message, you send it to the other side.

25:29.650 --> 25:33.530
And you check to see if you're finished by the status.

25:34.090 --> 25:38.510
And then there's certain other things that you can do.

25:38.550 --> 25:41.190
Like, get server secret.

25:41.330 --> 25:43.890
Get user key.

25:44.310 --> 25:49.910
So, user key is a little bit different.

25:49.910 --> 25:52.650
It's kind of unrelated to pigs.

25:52.650 --> 25:58.410
But so, you're supposed to only run the password KDF once.

25:59.390 --> 26:01.790
And derive two keys from it.

26:01.790 --> 26:04.390
An authentication key and an encryption key.

26:04.390 --> 26:17.770
And since we're using blind salt and we can't generate two keys beforehand and give it to the API, we have the API run the password KDF.

26:19.250 --> 26:28.410
If you need a user key, which is user specific based on the password to encrypt data that only the user can read.

26:28.950 --> 26:34.930
So, you know, like a password vault or a, you know, encrypted backup or something.

26:35.510 --> 26:40.770
So, you know, what's client server.

26:40.990 --> 26:43.350
So, those are for augmented.

26:43.350 --> 26:46.750
And then Alice, Bob.

26:46.750 --> 26:51.130
So, there are some pigs where you have to say, I'm Alice, they're Bob.

26:51.190 --> 26:53.150
And vice versa.

26:53.150 --> 26:57.570
Or you can say, I'm either Alice or Bob.

26:57.570 --> 26:59.570
And the pig figures it out.

27:00.490 --> 27:05.110
And then mode uses, you know, you're using the pig.

27:05.110 --> 27:08.830
And then register.

27:08.830 --> 27:13.950
That just generates the server and gets sent to the server.

27:13.970 --> 27:19.170
Then the other two are special for a special case that we'll talk about later.

27:21.350 --> 27:23.770
You know, so, these are just the flags.

27:23.850 --> 27:24.990
Session key available.

27:24.990 --> 27:26.470
That means you can encrypt.

27:26.470 --> 27:28.490
So, that's there.

27:28.490 --> 27:34.530
Then you can get the session key and then start encrypting data to the other side.

27:34.710 --> 27:36.310
Server secret available.

27:36.410 --> 27:38.430
Fairly self explanatory.

27:39.070 --> 27:40.610
Verified other.

27:40.990 --> 27:44.850
You have already authenticated the other party.

27:44.850 --> 27:54.490
So, in the event that, like, you only want to verify the user, you could stop right then.

27:54.490 --> 28:03.530
Because if you're the server, because that's the whole entire goal is just verify that the user's password is correct.

28:04.770 --> 28:07.130
So, fairly straightforward.

28:11.690 --> 28:16.650
So, this is just, so, Carol, client, Steve, server.

28:16.650 --> 28:17.810
Hey, that's me.

28:18.710 --> 28:27.370
Those are actually the common names that are used for describing client and user.

28:28.910 --> 28:31.290
Just like, you know, Alice, Bob.

28:31.850 --> 28:35.670
So, fairly easy.

28:36.570 --> 28:42.850
So, the server doesn't have a server secret yet because it's on register.

28:42.850 --> 28:44.030
So, no.

28:44.490 --> 28:49.470
And, you know, for using, fairly straightforward.

28:49.910 --> 28:55.870
The common, this is for using or it's all pseudocode.

28:55.870 --> 28:59.890
But for using or registering.

28:59.890 --> 29:03.670
Because all you're doing is waiting until it's finished or errored out.

29:03.670 --> 29:07.130
And then you're just passing messages back and forth.

29:10.150 --> 29:12.990
There we go.

29:13.150 --> 29:17.250
So, HSM.

29:19.470 --> 29:35.410
So, basically, what you can do as a server is you can have an HSM that store, that has, that you give it encrypted data.

29:35.910 --> 29:42.370
And what it does is it does the whole PAKE algorithm on its own.

29:42.370 --> 29:56.270
So, that if your database ever gets leaked, then the an attacker wouldn't have the decryption key necessary to decrypt the verifying data.

29:56.270 --> 30:03.410
And they wouldn't be able to crack any passwords.

30:03.970 --> 30:09.690
So, the way it would work is, so, the is on the far left.

30:09.830 --> 30:11.250
Out of the picture.

30:11.250 --> 30:12.390
One goes that way.

30:12.390 --> 30:13.730
That's basically.

30:14.190 --> 30:16.830
So, finds the user.

30:16.830 --> 30:17.730
Gets the encrypted data.

30:17.730 --> 30:22.170
Sends it to the HSM.

30:22.250 --> 30:23.150
Decrypts it.

30:23.150 --> 30:25.710
And then it has the server secret data.

30:25.710 --> 30:29.490
Then it runs the PAKE and gets the session key.

30:29.970 --> 30:39.370
Then this is actually a slide from another talk that I gave a few years ago at B sides.

30:39.630 --> 30:45.990
So, this was for when you have, like, an encrypted service.

30:45.990 --> 30:48.370
So, you would have an encrypted master key.

30:48.370 --> 30:52.850
So, that when you change your password, you didn't have to reencrypt everything.

30:52.850 --> 31:00.130
So, what some does is, it encrypts the master key with the session key.

31:00.130 --> 31:02.950
Sends that over to the client.

31:02.950 --> 31:10.790
No one in between the HSM and the client can read these packets because of the PAKE session.

31:11.390 --> 31:37.730
And then a little bonus feature is, you can drive a second key from the session key or another session key from the session key and give that to the server so that they can talk to the client in a way such that no one in between the server and the client can man in the middle of that without knowing the password.

31:40.050 --> 31:41.850
So, secret salt.

31:45.350 --> 31:51.670
So, this is used by, well, they call it something else.

31:51.670 --> 31:53.590
They changed the name a few times.

31:53.590 --> 31:55.730
This is used by one password.

31:58.750 --> 32:04.350
So, what this allows you to do is, it's basically a key that's on your device.

32:04.390 --> 32:08.910
And you never send it to the server or anything like that.

32:09.210 --> 32:14.550
And you basically transfer it to all your devices some way.

32:14.770 --> 32:33.510
And then what it does is, it makes it so that an attacker would have to get your device, get the secret salt, and then they can then do online password guessing to the server.

32:34.870 --> 32:45.230
Which means that if it was in, like, a password manager, it would be actually more secure than an offline password manager.

32:50.170 --> 32:55.230
So, there is one small thing about one password.

32:57.610 --> 33:27.030
So, they require you to use a, their web client, which means if their servers are ever attacked or, you know, infiltrated, then when you do use the web client, then they can extract, send malicious JavaScript, which then can extract your key, which would be bad.

33:27.030 --> 33:40.610
But that's only during administration because that's not actually implemented in any of the other apps that they have.

33:43.210 --> 33:50.390
So, recovering a lost secret salt.

33:50.490 --> 33:52.450
I wrote a blog post about it.

33:52.450 --> 33:55.730
You can actually just go to tab2.com slash blog.

33:56.410 --> 34:05.990
I was lazy and it's just, like, you can, it's just directories.

34:06.690 --> 34:15.250
So, so, to the basic idea behind recovering a secret salt.

34:16.030 --> 34:21.890
So, if you ever lose the secret salt, then you're screwed.

34:22.490 --> 34:28.430
Even though you know your password, you just can't log in.

34:28.430 --> 34:37.190
And this would be really bad for users, which is why you need to make paper copies, which they won't make and what.

34:37.190 --> 34:54.930
But so, taking a recovery option for secret salt would invalidate the entire idea of having a secret salt, except there's this little trick.

34:54.990 --> 35:10.810
So, when you're doing, so, the recovery method is you do the password KDF with the, with another blind salt and your password and this guessing salt.

35:10.810 --> 35:13.290
It's, like, 16 bits.

35:13.290 --> 35:19.430
And what you do is after you run the password KDF, you throw away those 16 bits.

35:19.450 --> 35:30.950
And what you have to do from then is you have to, when you're recovering, you have to brute force those 16 bits that you don't know.

35:31.050 --> 35:45.770
So, if you ran a password KDF that was Argon 2 with 256 meg, one thread, three iterations, it would run for about one second on your computer.

35:45.830 --> 35:48.230
So, it would be, like, 18 hours.

35:48.230 --> 35:57.610
You probably have a few less bits than that so that it would run in a more reasonable amount of time, like, a couple hours.

35:58.250 --> 36:04.250
The thing is, you never actually, you're rarely ever doing this.

36:04.250 --> 36:17.210
So, from the user standpoint, it's, I never get my account back or I have to do two hours of hard computations on my computer.

36:18.010 --> 36:32.970
And since it takes, you know, two hours for one password guess, if a password cracker got this, that is a ridiculously slow speed.

36:33.170 --> 36:43.110
So, the recovery method also uses a pake and whatnot.

36:43.270 --> 36:49.450
But that's what those two extra ones were, the blind salt.

36:49.450 --> 36:58.350
So , you would actually need to do... there we go.

36:58.350 --> 37:06.870
So, these two, blind salt, only blind salt, you would do that with your password and then you would get back your blind salt.

37:06.870 --> 37:14.730
Then you would go and do your, basically, brute force the guessing salt.

37:14.730 --> 37:23.010
And then after that, you would have a bunch of candidates, which you would then use after blind salt.

37:23.050 --> 37:28.030
You're also given a very short, a smaller hash than the guessing salt.

37:28.030 --> 37:36.370
So, you'll have a few, like, 10 or whatever that you would have to do.

37:38.810 --> 37:41.550
Pake operations with the server.

37:42.450 --> 37:51.910
Then you would have a session key and then you would decrypt the secret salt that you lost.

37:51.910 --> 37:53.270
And then you would have it back.

37:55.630 --> 37:56.670
Questions?

37:57.170 --> 37:57.890
Yeah.

37:57.890 --> 38:00.250
All right.

38:00.290 --> 38:02.110
Thank you very much.

38:02.470 --> 38:03.530
Any questions?

38:03.530 --> 38:06.270
I'm slowly making my way up to the front.

38:09.850 --> 38:12.050
Can we have this with the mic, please?

38:12.050 --> 38:13.170
I'll be right there.

38:15.250 --> 38:15.930
Thanks.

38:15.930 --> 38:17.150
Sorry, I walked in late.

38:17.150 --> 38:19.410
I missed what a blind salt is.

38:19.470 --> 38:22.530
I missed what a blind salt is.

38:22.530 --> 38:23.430
Oh!

38:23.510 --> 38:24.210
I walked in.

38:24.210 --> 38:24.770
Sorry.

38:24.770 --> 38:25.910
There we go.

38:27.490 --> 38:33.590
So, basically, blind salt prevents pre-computational attacks.

38:34.650 --> 38:40.410
It was first added into a pake with opaque.

38:42.710 --> 39:04.080
So, basically, with this, so, basically, after you run through this, if you had the wrong password, you have the wrong salt for when you run your password KDF.

39:04.080 --> 39:09.340
And there's no information leakage in the algorithm.

39:09.340 --> 39:18.040
So, you can't, like, guess or whatnot what the password was from the server side.

39:18.760 --> 39:23.620
And this makes it so that you have to do online password guessing.

39:28.660 --> 39:30.660
Well, thanks for doing this talk, Steve.

39:30.660 --> 39:35.460
I think pakes are definitely underutilized and the landscape is definitely kind of confusing.

39:35.780 --> 39:42.980
So, have you thought about contributing an implementation of your API to something like Libsodium just to make it easier for developers?

39:44.180 --> 39:49.860
So, the nice thing is, you can actually, you don't really have to write much.

39:49.860 --> 39:56.370
You just have to write the, basically, like a wrapper for current implementation.

39:57.560 --> 40:00.280
What project did you say?

40:01.080 --> 40:05.020
Libsodium or any other general crypto library?

40:06.620 --> 40:07.580
Yeah.

40:08.400 --> 40:14.980
I did talk to, I forgot his name.

40:15.260 --> 40:17.460
Libsodium guy.

40:18.520 --> 40:19.700
Yeah.

40:21.160 --> 40:24.240
He didn't like it.

40:24.580 --> 40:26.500
What?

40:27.320 --> 40:29.860
No, he didn't like it.

40:30.280 --> 40:32.320
But, yeah.

40:32.320 --> 40:33.740
Thanks for your talk.

40:33.740 --> 40:38.120
Could you repeat, again, how Opaque and BSpake compare?

40:38.120 --> 40:40.180
Are they different?

40:40.880 --> 40:54.540
So, Opaque, basically, so, with Opaque, it's fragile for implementations because of the blind salt.

40:55.280 --> 41:17.180
Basically, if you solve that DLP or figure out, you know, like, what the salt is through some coding error, like the carry propagation, then the, an attacker would be able to get offline pass or guessing.

41:17.580 --> 41:28.760
And with BSpake, it does add some, another pass back and forth.

41:28.760 --> 41:31.120
Or, well, one more trip.

41:31.220 --> 41:39.320
But it has an extra property that is quantum annoying.

41:40.540 --> 41:42.920
It's just a name I came up with.

41:42.920 --> 41:44.320
I'm not really attached to it.

41:44.320 --> 42:13.660
But, um, basically, uh, due to the hash to point blinding on, uh, the, well, the, uh, the base function, uh, uh, uh, SPake 2 plus EE that it's based off of, uh, that blinding, uh, prevents, you, well, it requires you to, uh, solve one DLP for every password guess.

42:14.100 --> 42:31.220
So, um, so with hash to point, um, what that does is it creates a point on the curve that you don't know what the, um, the, uh, the, uh, discrete log is.

42:31.580 --> 42:46.920
So, uh, when you are trying to attack this, you would have to guess a password, then hash it, it would go hash to point, then you subtract it from the message that you saw that went by.

42:46.920 --> 42:52.400
And then you would have to solve the, uh, the DLP for what's left.

42:52.460 --> 42:54.620
And you would have to do that every single time.

42:54.620 --> 43:00.380
First, other picks where you just have to solve one and then you have everything that you need.

43:01.020 --> 43:04.280
Oh, there was one other thing with Opaque.

43:04.280 --> 43:23.300
Uh, you don't need to observe a successful key exchange, but with, uh, uh, Bspake, um, you have to observe a successful key exchange to be able to then, uh, use a quantum computer if it were to exist.

43:23.700 --> 43:27.120
Uh, and you'd have to do one for every guess.

43:29.180 --> 43:31.420
Any further questions?

43:34.430 --> 43:35.270
All right.

43:35.270 --> 43:37.370
One last round of applause for our speaker.

43:37.370 --> 43:38.190
Thank you.

