Improved the key derivation examples
Merge pull request #1151
Merge pull request #1151 in master