Revert "Revert "crypto: Use correct enum""

This reverts commit 866b1babd907e13a29e00920b68982d26d8bdbbc.