Encrypt private key.

Change-Id: I858cad8e65a4d45d5307d59a382221e150fd6047
Bug fix

Change-Id: Ib5bd7da1a915788e13b885598b6f399b44d071f3