YouTube2Text

YouTube transcript (544rhbcDtc8) — Transcript

9,616 words · 1,322 segments · language en · Watch on YouTube

Full transcript

  1. 0:11great thank you Michelle and uh let's
  2. 0:12get started welcome everyone to this
  3. 0:14webinar um I I guess I'm going to tell
  4. 0:16you about a few things that we've been
  5. 0:17working on recently and uh I hope you
  6. 0:20enjoy it so let's see so let's get
  7. 0:22started um as I said what I wanted to
  8. 0:25tell you about today is some some areas
  9. 0:28that we've been working in our security
  10. 0:30lab lately in particular I wanted to
  11. 0:32tell you a little bit about new
  12. 0:33developments in password hashing and
  13. 0:35then I'll talk a little bit about um
  14. 0:37sort of a new approach we developed for
  15. 0:39uh securing program control flow This
  16. 0:41falls into the area of what's called
  17. 0:43control flow integrity and I'll tell you
  18. 0:45about a new technique for control flow
  19. 0:47Integrity hopefully we'll still have
  20. 0:49some more time and then I'll be able to
  21. 0:50tell you about uh other recent work that
  22. 0:53we've been doing and specifically on iot
  23. 0:55security in particular how do we know
  24. 0:57that iot devices are not revealing too
  25. 1:00much information about their owner so
  26. 1:02again kind of an exciting uh area having
  27. 1:04to being an intersection of privacy and
  28. 1:07security so I hope we I hope we'll get
  29. 1:08through all three topics but if not I
  30. 1:11guess we will schedule future webinars
  31. 1:13and we will cover whatever we didn't
  32. 1:15cover today in in a future webinar okay
  33. 1:17so with that let's get started with
  34. 1:19password hashing and let me remind you a
  35. 1:21little bit about how password hashing
  36. 1:23works and kind of the areas that we're
  37. 1:25uh interested in uh we've been working
  38. 1:26on recently so of course everybody knows
  39. 1:29you know there are constant attacks on
  40. 1:31serers side password databases that
  41. 1:34result in large scale password breaches
  42. 1:36so I just collected a random sample you
  43. 1:38know this is a very small uh sample of
  44. 1:41the actual breaches that have happened
  45. 1:43in the last couple of years um so just
  46. 1:45to remind you you probably you remember
  47. 1:47a few years ago LinkedIn lost um a
  48. 1:50collection of of uh hashed passwords
  49. 1:52that they stored Unfortunately they
  50. 1:54simply stored hashes sha one hashes of
  51. 1:57their password these were unsalted and
  52. 2:00we'll talk about the consequence of that
  53. 2:01in just a minute um so that that was one
  54. 2:03event that Lo that resulted in a loss of
  55. 2:056 million passwords all these people had
  56. 2:07to uh go in and uh reset their password
  57. 2:10of course when a password breach occurs
  58. 2:12um whoever does the breach is able in
  59. 2:15many cases to obtain many of the
  60. 2:17original unhashed password and those can
  61. 2:19then be used to attack those users on
  62. 2:21other sites as well because
  63. 2:23unfortunately still many users use the
  64. 2:25same password at many different sites
  65. 2:27and again we'll talk about mitigations
  66. 2:29for that in just a minute uh then later
  67. 2:31on uh a year later there was there were
  68. 2:34a couple other breaches again this is
  69. 2:35just a selected list uh so there was a
  70. 2:38250,000 passwords were uh stolen from
  71. 2:40Twitter Evernote had an issue where hash
  72. 2:42passwords were were revealed and Adobe
  73. 2:45had an entertaining uh breach where um
  74. 2:47in fact encrypted passwords not hash
  75. 2:49passwords were revealed um in addition
  76. 2:51to the password hints so as a result uh
  77. 2:54the password hints actually helped
  78. 2:55attackers recover the original password
  79. 2:58and then furthermore um just a more
  80. 3:00recent example in 20 2015 a famous um a
  81. 3:05fairly common password manager was
  82. 3:06actually had an issue where in fact
  83. 3:09hashed Master passwords and assaults uh
  84. 3:12were compromised and again that um canon
  85. 3:15in some cases that can enable the what's
  86. 3:17called an offline dictionary attack
  87. 3:19where an attacker can try lots of words
  88. 3:21in the dictionary until he finds one
  89. 3:23that hashes to the user's password and
  90. 3:25that essentially reveals the user's
  91. 3:27password so the question is uh what to
  92. 3:29do about about that and so um this was
  93. 3:32just a quick uh survey of what's
  94. 3:33happening the question is can we how do
  95. 3:35we store passwords in a way that make
  96. 3:37these offline dictionary attacks harder
  97. 3:39than uh simply just trying all words in
  98. 3:41a dictionary so let's talk about you
  99. 3:44know uh how to store password 101 and so
  100. 3:47of course I hope everybody knows that
  101. 3:50you ever never ever ever ever store
  102. 3:52passwords in the clear on the server
  103. 3:55what you actually do on the server is
  104. 3:56you store a hash of the password here
  105. 3:59you can see the of the password along
  106. 4:01with a salt the salt is denoted by sa
  107. 4:03and the salt is also stored uh in the
  108. 4:05database and then when a when a user um
  109. 4:08submits a password uh for login what the
  110. 4:10server actually does is it simply hashes
  111. 4:13the password along with assault and
  112. 4:15checks whether that's equal to the
  113. 4:16stored hash in the database and if it is
  114. 4:18equal then the login is allowed to go
  115. 4:20through so again this is why we use
  116. 4:23assault and so on this is uh fairly
  117. 4:25common reasoning in computer security we
  118. 4:27discussed this actually at quite a bit
  119. 4:29of length in the computer security class
  120. 4:31uh that we teach uh which again you are
  121. 4:33very uh welcome to to to sign up for and
  122. 4:36attend uh so I'm not going to talk about
  123. 4:37the reason for the salt here what I want
  124. 4:39to talk about today is is this question
  125. 4:41of what what hash function should be
  126. 4:44using um for hashing passwords so how do
  127. 4:47we actually hash passwords when we store
  128. 4:49them in the password database so what
  129. 4:52happened with LinkedIn is Unfortunately
  130. 4:54they used a sha one hash of their
  131. 4:57password and in fact a sha one hash was
  132. 4:59even on soled so literally all they did
  133. 5:01is the computer to sha one hash of
  134. 5:03everybody's password and that's the
  135. 5:05value that was stored in the in the
  136. 5:07password database when that password
  137. 5:09database was compromised within 6 days
  138. 5:11almost all the CL PL text passwords were
  139. 5:14exposed so 90% of the passwords were
  140. 5:16actually revealed and the reason that
  141. 5:18was possible is because sha one is an
  142. 5:20extremely hash fast hash function to
  143. 5:22evaluate so uh What uh folks were able
  144. 5:25to do is run through a large dictionary
  145. 5:28um you know very very large set of
  146. 5:30dictionary of of possible passwords in a
  147. 5:32dictionary and simply try to Hash each
  148. 5:34one of them until they got ones that hit
  149. 5:37values in the password database and that
  150. 5:39enable them to recover the original
  151. 5:40passwords so in some sense this is kind
  152. 5:42of
  153. 5:43counterintuitive into what's happening
  154. 5:45in computer science typically we want
  155. 5:47things to run fast as fast as possible
  156. 5:50when we hash passwords actually speed is
  157. 5:52detrimental to security because the
  158. 5:54faster the hash function is the faster
  159. 5:56an attacker can try uh all words in the
  160. 5:59dictionary until he he recovers the
  161. 6:01user's password so what we really want
  162. 6:03for password hashing is much much much
  163. 6:06slower passwords and by the way I should
  164. 6:08say that LinkedIn has since updated
  165. 6:10their uh password scheme and now this is
  166. 6:12this type of attack is not going to
  167. 6:14happen again on LinkedIn so that's um at
  168. 6:16least we hope and so that's actually
  169. 6:18good news and so the question I want to
  170. 6:20ask basically is what is the right way
  171. 6:22to Hash passwords and so basically there
  172. 6:24are kind of two ideas that come to that
  173. 6:26come to play uh the first one is is when
  174. 6:30we Hash a password on the server side
  175. 6:33one thing we might want to do is instead
  176. 6:34of just using um a simple hash function
  177. 6:37where we directly just give it as input
  178. 6:39the user's password we actually use
  179. 6:41what's called a key hash function so a
  180. 6:43function that in addition to the
  181. 6:45password also takes a secret key the
  182. 6:47secret key itself is going to be stored
  183. 6:49in some Hardware security module what's
  184. 6:52called an HSM so the secret key itself
  185. 6:54is going to be stored in some secure
  186. 6:56environment that attackers will not be
  187. 6:58able to extract and as a result um if
  188. 7:01they're able to steal the password file
  189. 7:03the the password database if they want
  190. 7:05to try a lot of words in the in the
  191. 7:07dictionary now for every word in the
  192. 7:09dictionary they have to interrogate the
  193. 7:11HSM in order to recover to check whether
  194. 7:14their guess is correct now the HSM might
  195. 7:16be rate limited for example the HSM
  196. 7:18might only respond to a th requests a
  197. 7:20second in which case the attacker is
  198. 7:22just going to take too long uh to mount
  199. 7:24his attack so definitely using key
  200. 7:27hashes on the server where the key
  201. 7:29stored an HSM is a is a very strong and
  202. 7:32powerful step forward but in many cases
  203. 7:34there is no HSM for example when you're
  204. 7:37hashing passwords on a laptop or when
  205. 7:38you're hashing passwords on on a cell
  206. 7:40phone there are actually no hsms
  207. 7:42available uh roughly speaking and as a
  208. 7:44result we'd like to have something a
  209. 7:46mechanism that that is secure even if we
  210. 7:48don't have an HSM in addition also hsms
  211. 7:51do not provide foolproof security maybe
  212. 7:54there is some still way to recover the
  213. 7:56secret key from the HSM so in addition
  214. 7:59in addition to the HSM we'd like to also
  215. 8:02hash the password using what what's
  216. 8:04called a slow space hard function okay
  217. 8:07so again these are complimentary
  218. 8:09mechanisms that work in tandem if you
  219. 8:11don't have an HSM you would just use a
  220. 8:13slow space hard function uh and that
  221. 8:16would um uh you know be kind of an
  222. 8:18alternative to using a key hash function
  223. 8:20so what I want to talk about is what is
  224. 8:22a slow space hard function and which one
  225. 8:25should we use and there's been actually
  226. 8:26a lot of progress on this recently and
  227. 8:28that's what I want to tell you
  228. 8:30okay so the first idea um uh dates back
  229. 8:34actually to the '90s and the first idea
  230. 8:36essentially again very very clever idea
  231. 8:38which is to say let's use a slow hash
  232. 8:41function so one that actually takes
  233. 8:42quite a bit of CPU power to evaluate and
  234. 8:45examples of that are functions like
  235. 8:47pbkdf2 and bcrypt so pbkdf2 is actually
  236. 8:50a standard that folks can use in very
  237. 8:53very very very commonly deployed for
  238. 8:55example Apple uses p pbkdf2 in many of
  239. 8:57their products the way pbk DF two works
  240. 9:00is essentially it slows down the hash
  241. 9:02function basically by iterating a hash
  242. 9:05function over and over and over and over
  243. 9:07again right so to evaluate the function
  244. 9:09you sort of have to take your your hash
  245. 9:11function evaluated on the password
  246. 9:13evaluate again on the result evaluate
  247. 9:14again on the result of that and iterate
  248. 9:16that like say 100,00 times or so um
  249. 9:19until the final result is the actual
  250. 9:22hash value okay now it turns out pbkdf2
  251. 9:24does actually more than just simple
  252. 9:26iteration of the hash function that by
  253. 9:29itself simply iterating a hash function
  254. 9:30is actually not secure you have to do
  255. 9:32something more and that's that's what p
  256. 9:34pbkdf2 and bcrypt do and so uh all the
  257. 9:39basically what that ensures is that when
  258. 9:41the CPU is evaluating the hash function
  259. 9:43it takes actually quite a while to
  260. 9:45evaluate the hash function so now uh in
  261. 9:48fact uh when the attacker wants to try
  262. 9:50you know billions of words in a
  263. 9:52dictionary it's actually going to take
  264. 9:53the attacker quite a bit of time to try
  265. 9:56all billion words in a dictionary or you
  266. 9:58know even however many words there are
  267. 10:00he's trying to uh to evaluate until he's
  268. 10:03able to get the user's password so the
  269. 10:05question is how many iterations uh
  270. 10:07should we do that is how slow should the
  271. 10:10hash function be and typically um you
  272. 10:12know this would be set so that you can
  273. 10:13evaluate the hash function on a modern
  274. 10:16uh server about a thousand times a
  275. 10:17second so that means that the actual
  276. 10:20server uh that's doing uh password
  277. 10:22authentication at the website would be
  278. 10:24able to evaluate the hash function about
  279. 10:26a thousand times a second so a single
  280. 10:28server can handle about a th000 logins
  281. 10:30per second of course if you have higher
  282. 10:33uh load on your server you would just
  283. 10:34you know you would have to buy more
  284. 10:36Hardware deploy more servers to handle
  285. 10:38that load but that's typical typical
  286. 10:40parameter that uh one would use uh for
  287. 10:43determining how many iterations to
  288. 10:44actually run unfortunately there's a
  289. 10:46problem with that this is not uh quite
  290. 10:48secure and the reason the the the the
  291. 10:51problematic issue here is that when an
  292. 10:53attacker attacks you they're not when
  293. 10:55they're running their offline dictionary
  294. 10:57attack they're not going to be using
  295. 10:59your Hardware they're not going to be
  296. 11:00using the hardware that the website is
  297. 11:02running instead they're going to be
  298. 11:04using custom Hardware to do their attack
  299. 11:06so for example they might use gpus to
  300. 11:08compute the hash function gpus as you
  301. 11:10know are very parallel and you know if a
  302. 11:13GPU for example has 100 cores on it it
  303. 11:15could actually do 100 evaluations at one
  304. 11:18in one step basically evaluate 100 words
  305. 11:20in the dictionary in one step and in
  306. 11:22fact you can even build commodity
  307. 11:24Hardware that's uh using you know as6
  308. 11:27and so on where the hash of valuation is
  309. 11:30even faster and in fact the attacking
  310. 11:32can do his dictionary attack much much
  311. 11:34much faster than a th000 evaluations per
  312. 11:37second so let me ask you here's a puzzle
  313. 11:39for you just so that this is a little
  314. 11:40bit interactive let me ask you so if you
  315. 11:42had to guess um when we were
  316. 11:45specifically building Shu 56 if we um uh
  317. 11:48eval if we uh use Shu 56 as our hash
  318. 11:50function um how much faster could sh 56
  319. 11:54be made to run on a custom piece of
  320. 11:57Hardware over running it on just the
  321. 11:59standard Intel processor say Intel
  322. 12:01Skylake a zon processor so so how much
  323. 12:04faster can Asic um be compared to to
  324. 12:07standard AIC uh to standard Intel uh
  325. 12:11processors yeah so I'll let you answer
  326. 12:13this uh this question while you
  327. 12:15answering the question uh let me kind of
  328. 12:17explain why commodity Hardware is so
  329. 12:19much faster than just you know
  330. 12:21off-the-shelf Intel processors so here I
  331. 12:24have uh an example uh yeah so here I
  332. 12:26have a picture of an Intel processor uh
  333. 12:29that just took a picture of Skylake
  334. 12:31which is the latest uh Intel processor
  335. 12:32on the market today you can see here
  336. 12:35this is a four core processor so you can
  337. 12:36see here the four cores this is one core
  338. 12:39uh this is another core and so on and
  339. 12:41you can see that there's a lot of other
  340. 12:43stuff on this processor for example
  341. 12:45there's a lot of cache that's going
  342. 12:46that's being used here in fact as you
  343. 12:48know there are three layers of caching
  344. 12:50there's a memory controller uh and so on
  345. 12:52and so forth there are many many many
  346. 12:53components on this processor that really
  347. 12:56are completely irrelevant and unuseful
  348. 12:58when you're trying to evaluate a hash
  349. 13:00function like Shot 2 56 so if you think
  350. 13:02about it the actual uh piece of the
  351. 13:05hardware that evaluates sh 2 56 are
  352. 13:09these four little squares here you
  353. 13:10notice the squares there's one little
  354. 13:12square um in every core and it's just
  355. 13:15this tiny amount of hardware on the
  356. 13:17processor that's actually being used to
  357. 13:19evaluate sh to 56 so it should be very
  358. 13:21clear that if all I want to do is just
  359. 13:23do a dictionary attack I would never use
  360. 13:26an Intel processor off the shelf because
  361. 13:29because you know very little hardware
  362. 13:31and very little silicon in the processor
  363. 13:33is actually used to evaluate shot 56 so
  364. 13:37my question to you was how much faster
  365. 13:39would uh commodity Hardware be compared
  366. 13:42to uh to an Intel processor and let's
  367. 13:44see what you guys answered ah so
  368. 13:46everybody says about 500,000 times
  369. 13:48faster so you guys are very pessimistic
  370. 13:49you think commodity Hardware can be made
  371. 13:51like super duper faster than uh Intel
  372. 13:54processors well so here's what we did um
  373. 13:56uh well here's what I did I just looked
  374. 13:58up essentially
  375. 13:59how long does it take to uh uh to do sh
  376. 14:0256 and come out it on custom hardware
  377. 14:05and the folks that are interested in
  378. 14:06speeding up uh sh 56 is are the folks
  379. 14:09that are doing Bitcoin mining and so
  380. 14:11Bitcoin miners when you look at the
  381. 14:13processors they build there's no there's
  382. 14:15no memory controllers there are no
  383. 14:16caches on those processors all those
  384. 14:18process do processors do is they just
  385. 14:21kind of uh flood the the the processor
  386. 14:24with just copies of uh the memory
  387. 14:26control of the shter 56 engine uh so a
  388. 14:29the engine is optimized and and and
  389. 14:31second of all it's replicated all over
  390. 14:33the processor so you don't have just
  391. 14:34have four engines per core you have
  392. 14:36thousands of engines per core and you
  393. 14:38can see that uh if you just go to Amazon
  394. 14:40and buy just a Bitcoin mining uh rig uh
  395. 14:42they cost about $1,700 and their price
  396. 14:45is constantly falling and you can see
  397. 14:47this is on a LW scale uh that um it's
  398. 14:50about 50,000 times faster than uh come
  399. 14:53out than than just an install processor
  400. 14:55so not quite as pessimistic as you guys
  401. 14:57were expecting but still still far far
  402. 15:00far faster so again if the Intel
  403. 15:01processor can do a th000 hashes per
  404. 15:04second the attacker using dedicated
  405. 15:07Hardware can do 50 million hashes per
  406. 15:10second so essentially the uh dictionary
  407. 15:13attack is re-enabled because the
  408. 15:15attacker can run through large portions
  409. 15:17of the dictionary very fast okay so um
  410. 15:21simply using a slow hash function
  411. 15:23doesn't really prevent the attacker from
  412. 15:24doing a dictionary attack because
  413. 15:26commodity Hardware is so much faster
  414. 15:29than the Intel processor so what do we
  415. 15:31do so what do we do so A beautiful idea
  416. 15:33actually appeared uh a couple of years
  417. 15:35ago this is this idea that's used in
  418. 15:37scripts um and this idea is really
  419. 15:39elegant so the idea basically says well
  420. 15:41let's use a hash function that isn't
  421. 15:43just slow that isn't just hard to
  422. 15:45evaluate but also takes a lot of memory
  423. 15:48to evaluate as you're Computing the hash
  424. 15:50function so now if you think about what
  425. 15:52the custom Hardware has to do it can't
  426. 15:54just use a little piece of silicon to
  427. 15:56compute the hash function it has to use
  428. 15:59the little piece of silicon but right
  429. 16:00next to it it has to allocate a large
  430. 16:03buffer of memory that's that's needed to
  431. 16:05evaluate the hash function so that's the
  432. 16:08idea behind script so if I'm building
  433. 16:10dedicated Hardware to do dictionary
  434. 16:12attacks now I have to kind of you know
  435. 16:14the number of uh engines I can lay on
  436. 16:17one chip is sort of limited by the
  437. 16:19number of memory components that I can
  438. 16:21put in every chip and since memory is
  439. 16:23relatively large now each one of my
  440. 16:25chips is not going to have that many
  441. 16:27hashing engines and so we kind have uh
  442. 16:30we kind of have um more equality between
  443. 16:33the actual website's hardware and the
  444. 16:35attacker's hardware again because the
  445. 16:37attacker cannot replicate uh using
  446. 16:39dedicated Hardware the attacker cannot
  447. 16:42put too many hashing engine engines on
  448. 16:44each chip because each engine needs a
  449. 16:46lot of memory and memory takes space
  450. 16:49space on the chip okay so so that's
  451. 16:51script and that's actually a fine thing
  452. 16:52to use there's one problem with escript
  453. 16:54however which is that in escript if you
  454. 16:58look at the how memory how this memory
  455. 17:01is being accessed as you're evaluating
  456. 17:03the hash function it turns out the
  457. 17:05memory access pattern actually depends
  458. 17:07on the password that the user supplied
  459. 17:09okay so for my password there would be
  460. 17:11one particular memory access pattern for
  461. 17:14your password there would be a different
  462. 17:15memory access pattern now you might have
  463. 17:18heard of uh what call what are called
  464. 17:20cache timing attacks where essentially
  465. 17:22an attacker who is able to um actually
  466. 17:26gain uh a low privilege control of the
  467. 17:29web server so the attacker sits on the
  468. 17:31web server but just has low privilege
  469. 17:34access to it um just by having a full
  470. 17:36hold on the web server you can actually
  471. 17:38get a lot of information as to how a
  472. 17:41high privilege process is accessing
  473. 17:43memory okay so basically what you're
  474. 17:45doing is you're kind of looking at how
  475. 17:46as a low privilege me uh process process
  476. 17:49you're looking at how the cash is being
  477. 17:51used and by looking at how the cash is
  478. 17:53being used you can figure out how the
  479. 17:55high privilege process is accessing
  480. 17:57memory you can't read the the password
  481. 17:59that the high privilege process is is uh
  482. 18:01processing but you can see how the high
  483. 18:03privilege process is accessing memory
  484. 18:06well if you can do that as I'm entering
  485. 18:09my password you can just measure uh what
  486. 18:11the memory access pattern is and now
  487. 18:14when an attacker uh recovers say the
  488. 18:17hash password plus the memory access
  489. 18:20pattern uh as the as the as the hash
  490. 18:22function was being evaluated that
  491. 18:24essentially eliminates the memory
  492. 18:26requirements for uh Computing the hash
  493. 18:28function because what the attacker would
  494. 18:30do is he would just try one password
  495. 18:32after another but he wouldn't actually
  496. 18:34evaluate the hash function he would just
  497. 18:35kind of compute the memory access
  498. 18:37pattern associated with the hash fun
  499. 18:39with the hash function and as soon as he
  500. 18:41sees that the word say you know 1 2 3 4
  501. 18:435 does not match the memory access
  502. 18:46pattern that the user uh generated with
  503. 18:49his password he knows that the user's
  504. 18:51password is not 1 2 3 4 5 so again he
  505. 18:53can reinstantiate the offine dictionary
  506. 18:57attack without memory
  507. 18:59just using the memory access pattern so
  508. 19:02I hope that was clear but essentially
  509. 19:04what it says is that script again it's a
  510. 19:05wonderful wonderful idea um in that it
  511. 19:09requires the attacker to to spend a lot
  512. 19:11of memory in order to evaluate the hash
  513. 19:13function uh but the minute the attacker
  514. 19:15has a little bit of side information in
  515. 19:17particular the memory access patterns as
  516. 19:19the hash function is being evaluated
  517. 19:22that essentially allows the attacker to
  518. 19:24now test words in the dictionary without
  519. 19:27memory and now we're back to a
  520. 19:29problematic custom Asic attack okay so
  521. 19:32that's the issue with script and so the
  522. 19:33question is what do we do about that is
  523. 19:35there a better solution and so again
  524. 19:36there's been progress on this recently
  525. 19:39the question that we're kind of asking
  526. 19:40is there a space hard function where in
  527. 19:43fact uh the time to evaluate the hash
  528. 19:46function is independent of the password
  529. 19:48and the answer is yes there actually is
  530. 19:50such a thing and uh here let me show you
  531. 19:52the hash function is called um this hash
  532. 19:55function is called argon 2 and it was
  533. 19:57actually the the winner of this password
  534. 20:00hashing competition that concluded
  535. 20:02recently and the the nice thing about
  536. 20:04argon 2 is it supposedly space hard and
  537. 20:07at the same time it's in the memory
  538. 20:09access pattern is independent of the
  539. 20:10password so the attack that I just
  540. 20:12described presumably would be would be
  541. 20:14difficult to mount so the one issue with
  542. 20:16argon 2 is it's not there's no kind of
  543. 20:19um a rigorous security proof to argue
  544. 20:22that it really is uh space hard as is
  545. 20:25claimed and so one of the things that we
  546. 20:28were interested is basically can we come
  547. 20:29up with the same prop with a hash
  548. 20:31function that has the same properties as
  549. 20:33argon 2i but actually has a proof that
  550. 20:36it cannot be evaluated with less memory
  551. 20:38than what's claimed and so the the hash
  552. 20:41function we came up is came up with is
  553. 20:43called balloon hashing this is Joint
  554. 20:44work with one of my students Henry
  555. 20:46Corgan Gibbs and Stuart Shor who uh is
  556. 20:49at Microsoft research and the properties
  557. 20:51of the hash function essentially as we
  558. 20:53said it's a it has a password
  559. 20:54independent access pattern memory
  560. 20:56independent access pattern so you can't
  561. 20:58do the attack that I just described uh
  562. 21:01it uses basically standard crypto
  563. 21:02primitive namely it's just based on sh
  564. 21:04256 so everything here is kind of uh
  565. 21:07standardized based on Primitives we all
  566. 21:09know and love it's actually uh quite
  567. 21:11fast and definitely can achieve you know
  568. 21:13rates of a th000 hashes per second uh so
  569. 21:16it is so it can be used on real world
  570. 21:18servers and the interesting property is
  571. 21:20that in fact it has um a proof of
  572. 21:22security in the following sense if you
  573. 21:24try to evaluate it um with less space
  574. 21:28than clck in particular suppose you try
  575. 21:30to evaluate evaluate it with a quarter
  576. 21:32of the space that we claimed is required
  577. 21:36then the amount of work to to do the
  578. 21:38evaluation actually kind of blows up
  579. 21:40exponentially so if you evaluated with
  580. 21:42however much space we said is needed
  581. 21:44then you can do it at a thousand times a
  582. 21:46second if you try to evaluate with a
  583. 21:48quarter of the space that we said is
  584. 21:50needed all of a sudden the total amount
  585. 21:52of work blows up exponentially so that's
  586. 21:55kind of a proof that uh you know at
  587. 21:57least when it comes to the total amount
  588. 21:59of work you have to do uh that uh can't
  589. 22:02be that that evaluation can't be done
  590. 22:05without space so again if the attacker
  591. 22:07is trying to build custom as6 to do a
  592. 22:09dictionary attack he has to spend a lot
  593. 22:11of space um to uh to mount the attack
  594. 22:14now one thing that's interesting is we
  595. 22:16were primarily interested in the total
  596. 22:18amount of work that's needed to evaluate
  597. 22:19the hash function uh with with less
  598. 22:22space but it turns out um if you're
  599. 22:24going to build something that's me
  600. 22:25that's that has uh that's um me memory
  601. 22:28access pattern independent of the
  602. 22:30password uh then it turns out there's um
  603. 22:33essentially uh kind of a an possibility
  604. 22:36result that says that any such scheme
  605. 22:39including argon 2i and balloon is is
  606. 22:41going to be subject to what's called a
  607. 22:43parallel speed up so in other words even
  608. 22:45though the total amount of work that the
  609. 22:47attacker has to do has to be quite large
  610. 22:50the attacker can still speed up some of
  611. 22:51what he's doing by kind of laying out
  612. 22:53multiple Cordes on his on his um on his
  613. 22:56processor so we're kind of um we have to
  614. 22:59have a we need to choose between two
  615. 23:02options either we have a hash function
  616. 23:05where the memory access pattern depends
  617. 23:06on the password and then You're
  618. 23:08vulnerable to the attack that I
  619. 23:09described before or you have one where
  620. 23:12the memory access pattern is independent
  621. 23:14of the password but then you have to
  622. 23:15worry about these parallel speed up
  623. 23:17attacks and so what we're actually
  624. 23:19recommending now is that since you know
  625. 23:21we can't kind of have the best of both
  626. 23:22worlds Let's do let's do both so kind of
  627. 23:25the natural thing to do is maybe you use
  628. 23:27balloon or argun to I to Hash the
  629. 23:29password first that prevents uh these um
  630. 23:34memory access pattern attacks and then
  631. 23:36you apply script so that uh the memory
  632. 23:39access pattern attack would only apply
  633. 23:41to the hash password not the original
  634. 23:43password so basically if you compose
  635. 23:45balloon on AR or argon toi with script
  636. 23:48in some sense you kind of get uh The
  637. 23:50Best of Both Worlds okay so that's
  638. 23:52that's one option to use so kind of
  639. 23:54that's what's been happening in the
  640. 23:55space of password hashing it's kind of
  641. 23:57interesting there's been recent develop
  642. 23:58vment as you can see uh so there's lots
  643. 24:00to say on how to do proper password
  644. 24:02hashing um this this is all very new
  645. 24:06material uh it has not been standardized
  646. 24:08yet um and so if you're considering um
  647. 24:12moving away from pbkdf2 you should
  648. 24:15because pbkdf2 is relatively old at this
  649. 24:17point um but uh what to move to yet is
  650. 24:20actually still as you can see a very
  651. 24:22active area of research so don't change
  652. 24:24what you're doing just wait just just
  653. 24:26yet just wait a little bit more but just
  654. 24:28realized that there's actually very
  655. 24:29active and uh interesting research going
  656. 24:32on in the space I wanted to show also
  657. 24:34show you what the balloon hashing
  658. 24:35function actually actually looks like so
  659. 24:39you know I can't give a presentation
  660. 24:40without actually giving you a little bit
  661. 24:41of code so let me show you what these
  662. 24:43space hard functions look like and how
  663. 24:46they operate so uh let's see so the way
  664. 24:48they work is basically as as I said they
  665. 24:50take as input the password the salt for
  666. 24:54the password the space requirement and
  667. 24:57the time requirement okay so what we do
  668. 24:59is first we allocate a buffer where the
  669. 25:01password will be where um where where
  670. 25:04that that is going to contain the large
  671. 25:06amount of memory that's needed to
  672. 25:07evaluate the hash function the next
  673. 25:09thing we do is uh we basically fill up
  674. 25:12the this buffer using values derived
  675. 25:15from the password the password and the
  676. 25:17salt so what we do is basically as you
  677. 25:19can see here we're kind of uh hashing
  678. 25:21the password and the salt and all we're
  679. 25:23doing in this Loop here is just filling
  680. 25:24up the buffer using uh values derived
  681. 25:27from the password and we're using as I
  682. 25:29said a hash function here as you can see
  683. 25:31this hash function this would just be
  684. 25:32like shot to 56 or so all right so then
  685. 25:36um the next thing we do is we're going
  686. 25:37to do a number of iterations so this is
  687. 25:39going to depend on the time cost so you
  688. 25:41can see the time cost variable here um
  689. 25:44the more iterate the more you iterate uh
  690. 25:46the more secure the hash function
  691. 25:47becomes uh in a certain sense which I
  692. 25:49won't make explicit here and then what
  693. 25:51we do is basically every every iteration
  694. 25:54we Loop through the buffer and do the
  695. 25:56following steps basically um we change
  696. 25:59uh so we take the previous value in the
  697. 26:02buffer in other words we take the uh you
  698. 26:05know when we're looking at element
  699. 26:06number M actually prev is just the value
  700. 26:09of the buffer element at position M
  701. 26:10minus one and then we hash that so we
  702. 26:13hash the elemented position n minus one
  703. 26:15with the elemented position M okay so we
  704. 26:17just hash two consecutive values and
  705. 26:20then in addition we Hash a few more
  706. 26:22values we can choose 20 more values uh
  707. 26:25to hash and uh all those values
  708. 26:28basically form the new value at position
  709. 26:31M and as you can see we're kind of doing
  710. 26:33a linear scan through the buffer and at
  711. 26:35every step in the buffer we're basically
  712. 26:37hashing well essentially 21 values uh
  713. 26:40into this uh position m in the buffer
  714. 26:43and M just kind of increments
  715. 26:44sequentially uh one after another so
  716. 26:47that's it that's the whole hash function
  717. 26:48we iterate this over and over and over
  718. 26:50again and finally the final output is
  719. 26:52the last entry in the buffer so it's
  720. 26:54kind of cool that this hash function
  721. 26:56just fits on a single page it's very
  722. 26:58easy to see how it works and as I said
  723. 27:00most of the work is in proving that in
  724. 27:02fact um the total amount of work that
  725. 27:04has to be done to evaluate this function
  726. 27:06must take a lot of memory okay so
  727. 27:08there's an accompanying proof of
  728. 27:09security that shows that if you try to
  729. 27:11evaluate this function with little
  730. 27:13memory their running time would actually
  731. 27:15blow up all right so that's what I
  732. 27:18wanted to tell you about uh password
  733. 27:20hashing now we're going to change gears
  734. 27:22a little bit I see that I have 10 more
  735. 27:23minutes so we're going to change gears a
  736. 27:25little bit I hope in the remaining 10
  737. 27:26minutes I can tell you about completely
  738. 27:28different topic that we've been working
  739. 27:30on having to do with uh control flow
  740. 27:32Integrity so this is Joint work uh with
  741. 27:35our students Ali Masa Andrew b a
  742. 27:38professor here David maerz and and
  743. 27:40myself okay so let me tell you what this
  744. 27:43is about so complete change of gear from
  745. 27:45password hashing on to control flow
  746. 27:48Integrity all right so control flow
  747. 27:51Integrity is a wonderful wonderful idea
  748. 27:53uh due to a body adal back in 2005 and
  749. 27:56the idea is essentially it's a way to
  750. 27:59prevent what are called control
  751. 28:00hijacking attacks where the attacker
  752. 28:02tries to take control of how the program
  753. 28:06executes so you know about buffer
  754. 28:08overflow attacks return or re
  755. 28:10programming attacks I hope you know
  756. 28:11about these things if you don't know
  757. 28:12about these types of attacks please
  758. 28:14please take our um secure programming
  759. 28:16course where we go into extreme depth
  760. 28:18about all these uh all these attacks and
  761. 28:21how they operate okay so uh the goal of
  762. 28:24control SL Integrity is basically to
  763. 28:26protect a program from these control
  764. 28:29hijacking attacks where the attacker
  765. 28:31basically um is able to to essentially
  766. 28:35uh take control of how control flow
  767. 28:37operates of how control flow flows and
  768. 28:39in that basically that allows the
  769. 28:41attacker to do uh to cause lots of
  770. 28:43damage uh to the program okay so there's
  771. 28:45actually a lot of academic research on
  772. 28:48control flow Integrity there's actually
  773. 28:50you know there's a lot of systems that I
  774. 28:52just gave some examples here uh and
  775. 28:54there's also a bunch of attacks on these
  776. 28:56systems and so on so this is a very
  777. 28:57active area of research um let me tell
  778. 29:00you instead of going through all the
  779. 29:01previous work let me kind of tell you
  780. 29:03what this is about and I'll tell you
  781. 29:05kind of um what what we've done all
  782. 29:08right so how does control flow Integrity
  783. 29:10work uh well again as I said there are
  784. 29:12many many many many proposals the cool
  785. 29:14thing is that actually in Windows 10
  786. 29:16this has actually been deployed by
  787. 29:17Microsoft in um and different systems
  788. 29:20called MX and control flow guard uh let
  789. 29:22me just tell you how control flow Guard
  790. 29:23works so what it does is essentially um
  791. 29:28well what it does I would say we
  792. 29:30consider this as very coarse control
  793. 29:32flow Integrity but what it does is
  794. 29:34essentially it builds at at uh compile
  795. 29:37and linking time the compiler
  796. 29:39essentially builds a table of all
  797. 29:42possible entry points into different
  798. 29:44functions in the program okay so you
  799. 29:46know maybe you have hundreds of of of
  800. 29:48functions in your program essentially
  801. 29:51what the compiler does is it lists
  802. 29:53literally lists all these uh possible
  803. 29:56entry points uh all these possible
  804. 29:58function entry points in a table it's
  805. 30:00represented as a bit Vector yeah so
  806. 30:02there's a bit big bit Vector at the
  807. 30:05beginning of your code that's that's
  808. 30:07zero if that particular address is not
  809. 30:09an entry point for for a function and
  810. 30:12the the bid Vector is one if that
  811. 30:14address is an entry point for a function
  812. 30:17and then every time you make an indirect
  813. 30:18call so here you know you can see that
  814. 30:20you're you're kind of making um an
  815. 30:22indirect call say you know a method
  816. 30:24invocation or so on what the program
  817. 30:27actually does is it takes the address of
  818. 30:29the indirect call and then calls this
  819. 30:32extra check here you can see the check
  820. 30:34that's uh shown here essentially this
  821. 30:37guard check I call what it does is it
  822. 30:40looks at the address that the processor
  823. 30:42is about to jump to and it verifies that
  824. 30:45in the bit Vector the corresponding bits
  825. 30:48is set to one in other words where it's
  826. 30:50about to jump to really is an entry
  827. 30:52point to a valid function in the code so
  828. 30:55you can't just cause the code to jump
  829. 30:57wherever you like you have to jump into
  830. 30:59a valid entry point in the in the
  831. 31:01program so this makes the uh control
  832. 31:03flow uh this makes the control hijacking
  833. 31:06attacks much much much harder to do and
  834. 31:08you see that if this uh function uh
  835. 31:11basically returns in other words you are
  836. 31:13jumping into a valid function then the
  837. 31:15actual call takes place you can see that
  838. 31:17we're now calling ESI which actually
  839. 31:19calls the function so the call only
  840. 31:21happens if you jump to an address that's
  841. 31:23a valid entry point for a function now
  842. 31:26so this looks great yeah this is already
  843. 31:28making these control hijacking attacks
  844. 31:31much harder uh however it's not perfect
  845. 31:33when the reason it's not perfect is
  846. 31:35first of all you realize it's checking
  847. 31:37that the attacker is calling some
  848. 31:39function but it's not checking that the
  849. 31:41attacker is calling the correct function
  850. 31:43right so the attacker can still jump to
  851. 31:45the wrong function and that will still
  852. 31:48uh cause you know in some cases that
  853. 31:50still let the attacker take control of
  854. 31:52the code and that's not prevented by
  855. 31:54control flow guard so again control flow
  856. 31:56guard flow guard is a wonderful
  857. 31:58wonderful idea but you can pretty much
  858. 32:00see how to get around it by essentially
  859. 32:02causing the code to jump into the wrong
  860. 32:04function that's an actual valid function
  861. 32:07in the program and the other thing is
  862. 32:09why can't we make it more precise it
  863. 32:10turns out it's actually non-trivial to
  864. 32:12build the actual control flow for the
  865. 32:14for the for the program at compile time
  866. 32:17it's much easier to do this dynamically
  867. 32:19at runtime and that's kind of what we're
  868. 32:21uh trying to do so let me explain to you
  869. 32:23what uh what we're doing so we have a
  870. 32:25different approach to control flow
  871. 32:26Integrity we call it cryptographic
  872. 32:28control flow Integrity so rather than um
  873. 32:31building it based on code analysis we're
  874. 32:34going to build control flow Integrity
  875. 32:35based on crypto and so let me explain to
  876. 32:38you first of all what are we assuming so
  877. 32:39we're assuming the attacker has a lot of
  878. 32:41power the threat model that we give the
  879. 32:43attacker is we say you know the attacker
  880. 32:45can read and write memory anywhere that
  881. 32:47it wants so we're given the attacker
  882. 32:50this is a remote attacker say that's
  883. 32:52trying to attack the web server and
  884. 32:53we're just assuming the attacker can
  885. 32:55already read and write any point in
  886. 32:57memory
  887. 32:58for in this web server um in the web
  888. 33:01server that's running that's coming
  889. 33:02under attack and in fact we showed we
  890. 33:04had a paper actually in 2014 14 we call
  891. 33:07this the hacking blind paper where we
  892. 33:09actually showed that on a real web
  893. 33:11server very very often attackers can
  894. 33:13actually induce reads and writs wherever
  895. 33:16they want so this is it sounds like it
  896. 33:18it's giving the attacker too much power
  897. 33:20but we actually came up with attacks
  898. 33:21where that's exactly the amount of power
  899. 33:23the attacker has literally you can read
  900. 33:24and write any point in memory and even
  901. 33:27though
  902. 33:28the attacker has so much power the
  903. 33:30attacker should not be able to cause the
  904. 33:31program to deviate from its designated
  905. 33:33control flow so again uh control flow
  906. 33:37must proceed at uh the allow only at the
  907. 33:40intended uh flow and not and the
  908. 33:42attacker should not be able to modify
  909. 33:43that okay so how do we do it well the
  910. 33:46way we do it is as I said using this uh
  911. 33:48using this cryptographic control for
  912. 33:50integrity idea what we do is essentially
  913. 33:52every time control flow depends on a
  914. 33:54jump address uh we're going to provide
  915. 33:57we're going to very ver ify Integrity of
  916. 33:58that jump address in particular what the
  917. 34:00code will actually do is every time it
  918. 34:03writes an address under the Heap or onto
  919. 34:06the stack it's going to concatenate to
  920. 34:08this address a 64-bit Integrity tag okay
  921. 34:12so here is how we comput it basically
  922. 34:14we're we're we're going to depend on on
  923. 34:15the AES block side for for this and
  924. 34:17again if you want to learn how AES Works
  925. 34:19uh we discussed this at Great length in
  926. 34:21our crypto course um but AES is
  927. 34:23basically is one thing that we can use
  928. 34:25AES for is to compute integral tags and
  929. 34:28what we do is basically we compute
  930. 34:30essentially this Integrity tag on the
  931. 34:32jump address uh plus the source address
  932. 34:35and you know we prend a zero if it's on
  933. 34:37the Heap we prepend the one if it's on
  934. 34:39the stack just so that there's no
  935. 34:40confusion between addresses on the Heap
  936. 34:42and addresses on the stack and now you
  937. 34:44can see that now every single uh Dynamic
  938. 34:47address on the Heap or on the stack is
  939. 34:49going to have this Integrity tag
  940. 34:51associated with it and every time we
  941. 34:53jump to that address before we jump we
  942. 34:56actually verify that the tag is is valid
  943. 34:58so essentially what the program is doing
  944. 35:00is making sure that um that jump address
  945. 35:04was actually generated by the program
  946. 35:06and not by the
  947. 35:07attacker so we only jump to addresses
  948. 35:10that the program generates and not
  949. 35:12addresses that the attacker controls now
  950. 35:16you should be asking when you look at
  951. 35:17this you should already be wondering
  952. 35:19where is this keyk going to be stored
  953. 35:21right I told you that the attacker can
  954. 35:24read and write any point in memory so if
  955. 35:26we store the key k memory the attacker
  956. 35:29can just read it and once he has the
  957. 35:30keyk he can forge these Tags by himself
  958. 35:33and he can defeat the mechanism so the
  959. 35:35question is where do we store this key
  960. 35:37Cas so the attacker can't get at it at
  961. 35:39it and the answer is we're going to
  962. 35:40store it actually in an xmm register so
  963. 35:43this key always lives in registers on
  964. 35:45the processor and it's never never ever
  965. 35:48written to main memory so the attacker
  966. 35:50can't can't actually read it and it
  967. 35:52turns out many programs actually don't
  968. 35:54use the xmm registers xmm registers are
  969. 35:56um sort of extensions extended registers
  970. 35:59in the processor uh many programs don't
  971. 36:01actually use it uh and as long as they
  972. 36:03don't use it you know we can put our key
  973. 36:05there interestingly open SSL actually
  974. 36:08ends up using the xmm registers and so
  975. 36:10to make op SSL work with this uh this is
  976. 36:12op SSL is a crypto Library we actually
  977. 36:14had to do uh extra work but again that's
  978. 36:17all described in our paper and I won't
  979. 36:18describe that here for the in the
  980. 36:20interest of time so just to complete
  981. 36:22this uh this topic you must be thinking
  982. 36:25that we're completely nuts in that again
  983. 36:26if you think about what we're proposing
  984. 36:28is every time uh an address is written
  985. 36:31to Heap or stack we compute an AES
  986. 36:34Integrity tack on it a tag on it and
  987. 36:36every time we jump to that address we
  988. 36:38verify the tag so if you think about how
  989. 36:40many times we have to compute AES as the
  990. 36:42program is running it sounds like this
  991. 36:44is just going to have horrible
  992. 36:45performance implications but it turns
  993. 36:48out actually it doesn't it doesn't yeah
  994. 36:50so we implemented this in llvm we tried
  995. 36:53this on a lot of kind of common
  996. 36:54applications and the Slowdown you know
  997. 36:57it is there is definitely a penalty to
  998. 36:59doing this but the Slowdown is not like
  999. 37:01out of the you know out of the out of
  1000. 37:03completely completely unreasonable there
  1001. 37:05is a Slowdown but it it does provide
  1002. 37:07quite a strong level of Defense so how
  1003. 37:09are we able to get this to be uh so fast
  1004. 37:12and the answer is again something you
  1005. 37:14guys should be aware of which is thank
  1006. 37:17you Intel Intel has actually made
  1007. 37:19amazing progress in making AES run fast
  1008. 37:23on the x86 processor so Intel added
  1009. 37:26these instructions called the AES s ni
  1010. 37:28instructions ni stands for new
  1011. 37:30instructions and what they did
  1012. 37:32essentially is they implemented AES in
  1013. 37:34Hardware so um there's an AES ink
  1014. 37:37instruction now that implements one
  1015. 37:39round of the AES Cipher so if you want
  1016. 37:41to if you want to do an AES encryption
  1017. 37:44all you have to do is just call AES in
  1018. 37:4610 times for the 10 rounds of AES and
  1019. 37:49that's essentially one um evaluation of
  1020. 37:51AES and in fact as you can see over the
  1021. 37:54years Intel has actually made AES even
  1022. 37:56faster um as this has been such a
  1023. 37:59successful project for them that AES
  1024. 38:02speed is is constantly improving and the
  1025. 38:04faster it gets the lower the overheads
  1026. 38:07for our for our system moreover they
  1027. 38:09even they even made these ases
  1028. 38:11evaluations fully pipelined so the
  1029. 38:13throughput for evaluating AES
  1030. 38:15essentially is is uh you know almost one
  1031. 38:18cycle per uh per one AES round uh yeah
  1032. 38:21so this is quite remarkable and because
  1033. 38:23of these a instructions we're able to to
  1034. 38:26get the performance for our uh method to
  1035. 38:28run at a reasonable rate okay so uh yeah
  1036. 38:31so I wanted to just point tell you that
  1037. 38:33these AES the fact that there's AES
  1038. 38:35available in Hardware is great for
  1039. 38:37crypto on the wire but it's also great
  1040. 38:40for uh securing applications for example
  1041. 38:43by using by by providing this strong
  1042. 38:45control flow Integrity all right so
  1043. 38:47these are two projects I wanted to tell
  1044. 38:48you about I guess we're going to I
  1045. 38:50wanted to tell you more about internet
  1046. 38:51of things things we're doing but I guess
  1047. 38:53we will do that at a future webinar so
  1048. 38:55thanks everyone for the questions
  1049. 38:56terrific questions
  1050. 38:58um so let's see so let's get to as many
  1051. 38:59of these as we can uh so how do gpus
  1052. 39:02impact the Practical implications
  1053. 39:04ability for evaluating or Brute Force
  1054. 39:06brute forcing hash functions so that's a
  1055. 39:08great question actually so for hash
  1056. 39:10functions that are not space hard um
  1057. 39:13gpus actually are quite detrimental
  1058. 39:16right so again a GPU has many many cores
  1059. 39:19and as a result you can actually
  1060. 39:20evaluate um many iterations of the hash
  1061. 39:23function at once and that allows you to
  1062. 39:26speed up the uh the uh dictionary attack
  1063. 39:28significantly so memory hard functions
  1064. 39:30so functions that require a lot of
  1065. 39:32memory to evaluate are much harder to
  1066. 39:34run on a GPU especially because every
  1067. 39:37core for every valuation of the hash
  1068. 39:39function the core has to allocate a lot
  1069. 39:42of memory for Val evaluating that hash
  1070. 39:44function and as a as a result uh it's
  1071. 39:46actually quite quite difficult to do on
  1072. 39:48a GPU so if you're worried about GPU
  1073. 39:50based attack definitely you need to use
  1074. 39:53a space hard hash function like balloon
  1075. 39:55or argon or script and uh you should not
  1076. 39:58be using pbkdf2 generally I hope I
  1077. 40:00convinced you in this presentation that
  1078. 40:02pbkdf2 is at this point essentially on
  1079. 40:05its way out yeah in in in a few years uh
  1080. 40:08once the once the discussion of uh the
  1081. 40:10Next Generation hash functions is
  1082. 40:11settled we will not be using TB kds2
  1083. 40:14anymore we really should be using space
  1084. 40:16hard functions okay the second question
  1085. 40:18is basically about having to remember
  1086. 40:20lots of passwords and uh the the the the
  1087. 40:24uh the question is about why not use
  1088. 40:26password managers of course course
  1089. 40:27password managers themselves also get
  1090. 40:29hacked so why shouldn't we just get rid
  1091. 40:30of passwords altogether I couldn't agree
  1092. 40:33more couldn't agree more so um in fact
  1093. 40:35I'm a very big supporter of uh second
  1094. 40:38Factor authentication um uh Google
  1095. 40:40Authenticator is a fantastic tool if um
  1096. 40:43you're running a website you should all
  1097. 40:45you should integrate Google
  1098. 40:46Authenticator into your website um to
  1099. 40:49let people use it you should advertise
  1100. 40:50it for your users uh and um there are
  1101. 40:54even better mechanisms now for uh second
  1102. 40:57Factor authentication CH challeng
  1103. 40:59response based if you're familiar with
  1104. 41:01companies like Duo they've made that
  1105. 41:03even easier to use um and so definitely
  1106. 41:06uh I couldn't agree more and that's a a
  1107. 41:08question that's right on target uh the
  1108. 41:10next question is uh how much memory are
  1109. 41:12we talking about so generally for these
  1110. 41:14space hard functions whether it's script
  1111. 41:17argon or balloon essentially what we try
  1112. 41:20to do is fill up the L3 cache so we
  1113. 41:22don't quite we don't go to main memory
  1114. 41:24CU that actually would not let us uh
  1115. 41:26achieve the th000 hashes per second
  1116. 41:28we're aiming for but the goal here is to
  1117. 41:30fill up the L3 cache so when I talked
  1118. 41:32about I showed you the pseudo code the
  1119. 41:34buffer and the pseudo code essentially
  1120. 41:35would be as big as your L3 cache uh okay
  1121. 41:39let's see so my next question uh is
  1122. 41:41about
  1123. 41:42ccfi um uh yeah how would this impact
  1124. 41:47mobile devices you know the answer is
  1125. 41:49you could so uh I guess on mobile
  1126. 41:51devices you would be using uh they're
  1127. 41:53not using uh Intel processors so much
  1128. 41:55those are more Arm based architectures
  1129. 41:57so first of all arm has also given a
  1130. 41:59success of asni arm has also introduced
  1131. 42:03asni into the into manyu of their of the
  1132. 42:06of the arm designs and so um it's
  1133. 42:09exactly the same API as on the x86 and
  1134. 42:11so in principle pca5 could be used on
  1135. 42:13mobile devices as well anyone any mobile
  1136. 42:16device that supports asni and my point
  1137. 42:19was that the faster the hardware
  1138. 42:22implementation of AES is the less
  1139. 42:24overhead that ccfi will take and really
  1140. 42:27does provide quite a strong measure of
  1141. 42:29uh security against control control
  1142. 42:31hijacking attacks and so in principle
  1143. 42:33this could be used on mobile devices
  1144. 42:35again there's a performance penalty but
  1145. 42:37there's also a a strong security benefit
  1146. 42:40okay um the next question is about uh
  1147. 42:43ccfi on Sparks and it's basically the
  1148. 42:45same answer I just gave essentially
  1149. 42:47whenever a and I is available whenever
  1150. 42:50you have AES in Hardware you can
  1151. 42:52actually use it without too much um uh
  1152. 42:54too much penalty the performance penalty
  1153. 42:57okay the next question is about Ring two
  1154. 42:59if I if the attacker gets control of
  1155. 43:00ring two on the computer yes absolutely
  1156. 43:03then all bets are off so with ring two
  1157. 43:06you can do you can extract a secret key
  1158. 43:08and then you would defeat this this
  1159. 43:09attack um uh well so the threat model
  1160. 43:13that this is trying to defend against is
  1161. 43:15a model where the attacker uh has
  1162. 43:18control has access read write access to
  1163. 43:20memory if the attacker has even more
  1164. 43:23power then absolutely there's uh that's
  1165. 43:25a much much much harder adversary to
  1166. 43:27defend against then you would have to go
  1167. 43:29to um to virtualization and and other
  1168. 43:32based approaches uh okay so that's
  1169. 43:34basically ccfi is defend designed to
  1170. 43:36defend against memory corruption attacks
  1171. 43:38not so much against uh ring two based
  1172. 43:40attacks uh can a hacker readed write xmm
  1173. 43:43xmm registers yeah so if a hacker is
  1174. 43:46basically using memory corruption to uh
  1175. 43:48to mount his attacks then he can't um he
  1176. 43:51can't have access to xmn registers if
  1177. 43:53it's a more powerful attacker like the
  1178. 43:54previous question then absolutely all
  1179. 43:57bets are off there's no Perfect Defense
  1180. 43:59uh we were trying we were basically
  1181. 44:01control SL Integrity generally is trying
  1182. 44:03to uh prevent memory corruption attacks
  1183. 44:06and we basically we're trying to we our
  1184. 44:08our mechanism is uh uh essentially using
  1185. 44:12this uh cryptographic mechanism to
  1186. 44:14prevent memory corruption okay uh let's
  1187. 44:17see
  1188. 44:18um oh are there programming languages
  1189. 44:21construct compilers that support
  1190. 44:22generation of a instruction sets well uh
  1191. 44:25compilers actually don't quite use them
  1192. 44:27today typically when you want to use
  1193. 44:28asni you would just inject some assembly
  1194. 44:30code into your into your higher level
  1195. 44:33programming language and you would
  1196. 44:34compile that in uh so for example when
  1197. 44:37you uh when you use op SSL for crypto op
  1198. 44:40SSL actually uh is when it's on running
  1199. 44:43on the appropriate Hardware it will
  1200. 44:45actually use asni and so automatically
  1201. 44:47by using op SSL you're getting the
  1202. 44:49benefits of of asni but yeah typically
  1203. 44:52you do have to access it using assembly
  1204. 44:55is the cc5 project going to be open s
  1205. 44:57absolutely so it's implemented as um uh
  1206. 45:00into lovm right now uh yeah we'll make
  1207. 45:03obviously this is academic code so you
  1208. 45:06know use it to your own risk um but
  1209. 45:08absolutely if you're interested in uh in
  1210. 45:10studying this or using it or developing
  1211. 45:12more um on ccfi we we definitely U make
  1212. 45:17will make this open source um let's see
  1213. 45:20on the balloon scheme where did the
  1214. 45:21number 20 come came from that is an
  1215. 45:23excellent excellent question I'm really
  1216. 45:25happy to hear someone asked this so why
  1217. 45:28do we if you look back to how um we we
  1218. 45:31did the hashing we said that essentially
  1219. 45:33as you do your linear sweep through the
  1220. 45:35buffer you basically hash 20 elements in
  1221. 45:37the buffer into the current element that
  1222. 45:39you're looking at so why 20 it turns out
  1223. 45:43uh the number 20 comes from the security
  1224. 45:44proof yeah so this is the nice thing
  1225. 45:46about doing security proofs and that
  1226. 45:48they guide you into how to design the
  1227. 45:49hash function so if we if we do include
  1228. 45:53uh if we do do the hashing on 20
  1229. 45:55elements that allows us to prove that if
  1230. 45:58you evaluate the hash function with less
  1231. 46:00than quarter of the space that we
  1232. 46:02require the running time would actually
  1233. 46:04blow up exponentially okay so and by the
  1234. 46:06way since you asked uh about the
  1235. 46:08technicalities I'll tell you that when I
  1236. 46:10say exponentially I mean exponentially
  1237. 46:12in the number of rounds that the hash
  1238. 46:15function is is uh using so remember I
  1239. 46:17told you that there's a timing parameter
  1240. 46:19how many rounds the hash function runs
  1241. 46:21for so for example if you run it for 10
  1242. 46:23or 20 rounds let's say you run it for 20
  1243. 46:25rounds then if you try to at the hash
  1244. 46:27function with a quarter of the space
  1245. 46:28that's required then necessarily the
  1246. 46:30running time would grow the total
  1247. 46:32running time uh not the parallel running
  1248. 46:34time the total running time would grow
  1249. 46:36by a factor of a million okay so that's
  1250. 46:37where the number 20 comes from basically
  1251. 46:39it's needed for the
  1252. 46:41proof
  1253. 46:43um uh right so you asked about sh 66 in
  1254. 46:47fact so in balloon hashing should be
  1255. 46:48used sh 66 or a different hash function
  1256. 46:51so our point was that balloon that one
  1257. 46:53of the nice features of balloon is it's
  1258. 46:55built from sort of stand IED components
  1259. 46:58and shot 56 was a reason was a very
  1260. 47:00common component to use in fact uh the
  1261. 47:03most of most of our running times we for
  1262. 47:05most of our running times we actually
  1263. 47:06use shot 3 which is kind of the uh a
  1264. 47:09recent uh variation you know a recent
  1265. 47:12proposal for n for a hash function the
  1266. 47:14reason sha 3 was better suited for us is
  1267. 47:16because it has a larger block size than
  1268. 47:18sha 356 and that actually improves
  1269. 47:20performance so um yeah but essentially
  1270. 47:23you can use any standardized hash
  1271. 47:24function you want if you want uh the
  1272. 47:27fastest possible performance then uh you
  1273. 47:29would use a hash function with a large
  1274. 47:31block Cipher so just use any of the
  1275. 47:33standardized ones we just happen to use
  1276. 47:35uh shot 3 for for for running times uh
  1277. 47:38let's see any research on crypto
  1278. 47:40Biometrics or related crypto
  1279. 47:43authentication absolutely there's a lot
  1280. 47:44of research on using Biometrics for
  1281. 47:47authentication in the crypto sense um
  1282. 47:50the question is how do you do hashing
  1283. 47:52when the credential is a biometric right
  1284. 47:55so if I have my if the metric is a
  1285. 47:57fingerprint the credential is a
  1286. 47:59fingerprint uh well when I read it
  1287. 48:01initially I get one version of the
  1288. 48:03fingerprint when I read it uh later on I
  1289. 48:05get a different version of the
  1290. 48:06fingerprint that might be a little bit
  1291. 48:08different uh and the question is how do
  1292. 48:10we compare the two traditionally when
  1293. 48:12you do biometric you kind of extract
  1294. 48:14extract what's called a sketch from the
  1295. 48:16fingerprint and then you compare the
  1296. 48:18scetch the sketch that was registered
  1297. 48:20from the sketch that was that was read
  1298. 48:22at a later time the sketches don't have
  1299. 48:24to fit perfectly they just have to be
  1300. 48:25close to one another so the question is
  1301. 48:28um if we do hashing how do we do the
  1302. 48:31comparison if the sketches only need to
  1303. 48:33be close but don't have to be perfectly
  1304. 48:35equal and the answer is there's actually
  1305. 48:36something called fuzzy hashing which
  1306. 48:39actually is relevant for Biometrics um
  1307. 48:41again so if you're interested in that
  1308. 48:42just Google fuzzy hashing and you'll see
  1309. 48:44a whole bunch of papers on how to do
  1310. 48:46hashing for the purpose of uh
  1311. 48:49Biometrics okay so that's going to wrap
  1312. 48:51up our live session uh on behalf of the
  1313. 48:54Stanford center for professional
  1314. 48:55development I'd like to thank thank you
  1315. 48:57for joining us for our webinar on uh
  1316. 48:59hashack code emerging Trends and cyber
  1317. 49:02security there are still a number of
  1318. 49:04questions in the queue which we will go
  1319. 49:05ahead and respond to offline so thank
  1320. 49:08you again for joining us and have a
  1321. 49:10great
  1322. 49:20day

About this transcript

This page contains the full transcript of YouTube transcript (544rhbcDtc8) , generated from the public captions YouTube serves with the video. The transcript has 9,616 words across 1,322 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.