Added public key support