Add validation of known-good identity to selftest to check endian and similar issues across platforms.