class RbNaCl::LengthError

Something, probably a key, is the wrong length

This indicates some argument with an expected length was not that length. Since this is probably a cryptographic key, you should check that!