mdadm should be ported to use NSS library for cryptography.
See the tracking bug for details and links on how it could be done.
This won't happen. The crypto needs of mdadm are very modest (we only use an
SHA1 hash and only on version 0.90 superblocks and even then only on the rarely
used homehost string) and must also remain bug-for-bug compatible with the md
software raid kernel stack and also must be available in the statically linked
version of mdadm used in initrd images. Porting this to a library makes
absolutely no sense.