I am not sure I clear understand "why" do you need to compare keys but probably your best bet would be to use crypto library specific functions (e.g. xmlSecOpenSSLXXX) to get a handler to the crypto library key structure (e.g. RSA* or DSA* for OpenSSL) and then compare crypto library key values directly. Aleksey