Hello,
In the context of a one time pad on the CSRF token, I don’t see a security advantage to either cipher here. If I read correctly, the argument for Vignere is that it can already produce output suitable for inclusion in form values, not requiring base64 encoding of the one time pad.
I’ve looked up the current implementations that have been contributed:
Here’s the XOR+base64 implementation:
And the Vignere implementation:
Though the Vignere implementation means that base64 is not required and is significantly shorter, it seems considerably more complex and error prone. I can’t instantly see whether this implementation is correct. The XOR+base64 implementation, on the other hand, is straight forward and obvious. Therefore, if the current implementations are a proper measure for the complexity of implementing either option, XOR+base64 is my strong preference. Slightly more work, but substantially simpler, reducing the risk of overlooked implementation errors.
Erik