Work on encryption logic