I'm working on a system that needs to use cryptographic functions that must be FIPS 140-2, Level 1 validated. The challenging part is that some of this system needs to run in the browser. For maintainability reasons and ease of use, I would really like to avoid having to resort to applets or browser plugins or Active-X controls or something of that sort, and would much rather build this part of the system in JavaScript.
So, I've been searching for validated JavaScript modules, but this website:
https://csrc.nist.gov/Projects/Cryptographic-Module-Validation-Program/Validated-Modules/Search
which lists all (?) currently validated modules if you click on "Show All", does not give me much hope to find one.
So, here's what I'm thinking:
Can I take one of the Java modules (like Bouncy Castle) and cross-compile them to JavaScript using something like GWT?
Or can I take one of the C or C++ modules and compile it into asm.js?
Or, to ask the question even more generally: How does (cross-)compilation or translation of validated code affect the validation?
realloc
has the same problem. If you have key material in a GC'ed object, you need to ensure that the GC doesn't do copying (which isn't necessarily the case in JavaScript since it's implementation-dependent), and you need to trigger a collection at every point where zeroizing is necessary. – Gilles 'SO- stop being evil' Apr 21 '18 at 16:04