• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How come login be so fast?

 
Ranch Hand
Posts: 112
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Why is it that login to say Facebook/code ranch/gmail /.. everything is so fast?. I mean it practically needs to check if the user existis in the first place and if it exists, then it needs to identify if the password is accurate. How come all this happens in just moments?

Please shed some light .

Thanks,
Pavan.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course it is fast - Google&co already knows everything about you

Seriously, though, your login name is stored somewhere in a database and indexed. Due to the index, getting a row corresponding to your name is very fast, it involves just a few IO operations. Speed of an index access it is practically independent of the size of the table. Then your password hash is read (one or two IOs again), your password is salted, hashed and compared to a hash from a database. I'd say that the cryptographic hashing is the most expensive operation there, but given today's CPU speeds, it appears instantaneous.
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic