Is it okay for a non-cryptographer to submit crypto code to an open source probject? I am not a cryptographer, nor do I claim to be.

However, at times I have wanted to contribute to open source cryptography projects such as libsodium.  The maintainer of libsodium is a cryptographer, and I consider it a good assumption that they will review any code submitted to the repo.

Under these conditions, is it okay to write the code, doing my best to get things right, and rely on a qualified person to catch any mistakes?

Edit: I am talking about implementations of already well-known, software-friendly algorithms that are not especially complex.  That is: zero new ideas, just "grunt work" &mdash; the problem is already solved and there is only the relatively mechanical task of writing the code.

I am especially talking about "glue code" that ties existing primitives together.
At least make sure that your code is reviewed. Verify you don't have possible buffer overflow or any kinds of implementation attack because of the use of non secure primitives. Moreover if you do so, test all your functions and in particular :


bitwise rotations
permutations
S-boxes...


Check everything as it is really easy to screw with it. Then use the test vector provided by the algorithm and check your results. For example here are the test vector I used when I implemented DES (which I don't use in production).

You can find other tests vectors of most ciphers here, i.e. for the AES-128-128.