halfdone on key encrption