Added secret base key generation