Password-based key generation

Adding PBE keys as an option.
Fixed.