Identity-based one-time key generator with data encryption