crypto: Initial implementation of preprocess.