What is PBEWithMD5AndDes?


I am learning encryption algorithm in Java and stumble upon this algorithm:

SecretKey key = SecretKeyFactory.getInstance( "PBEWithMD5AndDES").generateSecret(keySpec);

I know it stands for Password Based Encryption with MD5 and DES algorithms. I know MD5 and DES are two separate algorithm encryption key but what exactly does PBEWithMD5AndDes means as an algorithm?

There isn't much resources online that does a good explanation regarding this "algorithm".

I was hoping someone could give simple and brief explanation about how this is different from a normal MD5 or normal DES algorithm.


Extending the previous answer


what exactly does PBEWithMD5AndDes means as an algorithm?


PBE is using an encryption key generated from a password, random salt and number of iterations, see the KeySpec parameters.

KeySpec pbeSpec = new PBEKeySpec(password.toCharArray(), psswdSalt, PBKDF_INTERATIONS, SYMMETRIC_KEY_LENGTH)

The idea is - passwords tend to be short and not random enough, so they are easy to guess. Using number of iterations should make the guessing somewhat harder.

PBEWithMD5AndDesis using MD5 and DES to generate the key, see the <a href="https://gist.github.com/rohitshampur/da5f79c34260150aafc1" rel="nofollow">example code</a>. Real life implementation should use much higher number of iterations


How does that differ with just using MD5 or just DES? That's what i would like to know.


In theory - you may use pure MD5 or DES, but today's computer could guess the passwords very fast.

Please note DES and MD5 are obsolete today. MD5 collision can be found under a minute on a commodity hardware and DES is using 64 bit key which is pretty short to be considered secure today.


PBE stands for "Password Based Encryption", a method where the encryption key (which is binary data) is derived from a password (text).


  • Mock timing in a context to create models with a field DateTimeField with auto_now_add=True
  • Iframe sandboxing with 'allow-same-origin' flag error
  • MATLAB Cell Array - Average two values if another column matches
  • Google Apps Script Async function execution on Server side
  • How to do multi-class image classification in keras?
  • How to install PHP pthreads in cpanel?
  • mat tab inside tab selected index not working
  • Respond to Website Message Box by Automating InternetExplorer with VBA
  • Exception in thread “main” java.awt.AWTError: Assistive Technology not found: com.sun.java.accessibi
  • angular 2 websql typings
  • HTTP Status 500 - Error instantiating servlet class org.springframework.web.servlet.DispatcherServle
  • Play Store In-App Billing custom price programmatically?
  • Encoding/decoding PDP-11 assembly language to binary and hex?
  • Sending Objects over Java Socket really slow
  • PostgreSQL in Docker - pg_hba.conf to allow access from host to container
  • Is there a way to convert all existing table data to UTF8 collation?
  • Parsing a complicated array with GetJSON Jquery
  • Trying to get lotusscript json reader
  • Google Geocoding API limit exceeded on cell network, but not on wifi
  • in Gwt, there are 2 different packages (or 2 options) for doing drag n Drop? Which one is better?
  • Bulk loading into PostgreSQL from a remote client
  • how to add Image in JPanel
  • Sorting Custom Listview Items Using Spinner Android
  • Opening tel: links from UIWebView
  • Why am I getting an Argument exception when creating event handler dynamically?
  • Yii Bootstrap not loading JS files
  • Write to elasticsearch from spark is very slow
  • How can I filter an array of dictionaries in 'updateSearchResultsForSearchController' to s
  • Showing image on a acro text field position
  • Multiple canvases (pages) in Fabric.js
  • content must have a ListView whose id attribute is 'android.R.id.list'
  • playing mp3 from nsbundle
  • Set SelectedIndex of ListView in FlipView_SelectionChanged event
  • Thumbnails for mxml components in Flex
  • Find angle of point on circle
  • Error handeling in antlr 3.0
  • Cloud Code: Creating a Parse.File from URL
  • VSTS work items list through REST API
  • Google App Engine backend servlet not responding
  • Angular FormGroup won't update it's value immediately after patchValue or setValue