vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How does vBulletin encrypt passwords? (https://vborg.vbsupport.ru/showthread.php?t=161290)

HabboHut 10-28-2007 04:00 AM

How does vBulletin encrypt passwords?
 
I'm mucking around with AJAX at the moment, and want to make a quick register tool. Only thing is, I don't know how vB encrypts passwords. I'm assuming it would be using MD5, but I don't know if salts are involved >_> Any light shed on this mystery would be helpful!

Thanks! :)

Adrian Schneider 10-28-2007 04:10 AM

The password would be represented like this in MySQL:
PHP Code:

md5(concat(md5('password'), user.salt); 


HabboHut 10-28-2007 04:12 AM

Ah, thought there might be a salt involved... Trouble is, where is it defined?

Adrian Schneider 10-28-2007 04:13 AM

user table, salt column

Chris M 10-28-2007 04:14 AM

Each user has their own individual salt - This is created when they register and is stored in the user table in the database :)

Chris

HabboHut 10-28-2007 04:15 AM

Oh ok! So, if I first generate a random string (an equal length to the normal salt), apply it to the MD5 function, and then insert both the password and the generated salt into the database, will everything work ok?

Michael Morris 10-28-2007 04:52 AM

Client side you simply md5 it. Salting is applied server side. If you are replacing the vb registration routine the formula is

md5(md5(originalPasswordString) + salt)

That's what is stored in the database, along with the salt.

Marco van Herwaarden 10-28-2007 11:59 AM

Just use the DataManager to create the user. Salt will be created automatically.


All times are GMT. The time now is 03:30 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01046 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete