fix key creation algorithm+difficulty

easy