anchor.diff:  	     | dsa_public_key()) -> boolean().
   %% Description: Verifies a digital signature.
   %%--------------------------------------------------------------------
  -verify({digest,_}=Digest, DigestType, Signature,
  +verify({digest,_} = Digest, DigestType, Signature,
          #'RSAPublicKey'{modulus = Mod, publicExponent = Exp}) ->
  -    crypto:rsa_verify(DigestType, Digest,
  -		      sized_binary(Signature),
  -		      [crypto:mpint(Exp), crypto:mpint(Mod)]);
  +    crypto:verify(rsa, DigestType, Digest, Signature, [Exp, Mod]);
   
   verify(PlainText, DigestType, Signature,
          #'RSAPublicKey'{modulus = Mod, publicExponent = Exp}) ->
  -    crypto:rsa_verify(DigestType,
  -		      sized_binary(PlainText), 
  -		      sized_binary(Signature), 
  -		      [crypto:mpint(Exp), crypto:mpint(Mod)]);
  -
  -verify({digest,_}=Digest, sha, Signature, {Key,  #'Dss-Parms'{p = P, q = Q, g = G}})
  +    crypto:verify(rsa, DigestType, PlainText, Signature,
  +		  [Exp, Mod]);
  +
  +verify({digest,_} = Digest, sha = DigestType, Signature, {Key,  #'Dss-Parms'{p = P, q = Q, g = G}})
     when is_integer(Key), is_binary(Signature) ->
  -    crypto:dss_verify(Digest, sized_binary(Signature),
  -		      [crypto:mpint(P), crypto:mpint(Q), 
  -		       crypto:mpint(G), crypto:mpint(Key)]);
  -
  -verify({digest,_}=Digest, DigestType, Signature, {'ECKey', Key}) ->
  -    crypto:ecdsa_verify(DigestType, Digest,
  -			sized_binary(Signature),
  -			Key);
  +    crypto:verify(dss, DigestType, Digest, Signature, [P, Q, G, Key]);
  +
  +verify({digest,_} = Digest, DigestType, Signature, {'ECKey', Key}) ->
  +    crypto:verify(ecdsa, DigestType, Digest, Signature, Key);
   
   verify(PlainText, DigestType, Signature, Key = #'ECPrivateKey'{}) ->
       verify(PlainText, DigestType, Signature, ec_private_key_to_eckey(Key));
  
positive.code:        is_integer(N), is_integer(E), is_integer(D),  
         is_list(Options) ->
      Padding = proplists:get_value(rsa_pad, Options, rsa_pkcs1_padding),
      crypto:rsa_private_decrypt(CipherText, format_rsa_private_key(Key), Padding).
  
  %%--------------------------------------------------------------------
  -spec decrypt_public(CipherText :: binary(), rsa_public_key() | rsa_private_key()) ->
  
negative.code: %% Description: Create digital signature.
  %%--------------------------------------------------------------------
  sign({digest,_}=Digest, DigestType, Key = #'RSAPrivateKey'{}) ->
      crypto:sign(rsa, DigestType, Digest, format_rsa_private_key(Key));
  
  sign(PlainText, DigestType, Key = #'RSAPrivateKey'{}) ->
      crypto:sign(rsa, DigestType, PlainText, format_rsa_private_key(Key));
  
  sign({digest,_}=Digest, sha, #'DSAPrivateKey'{p = P, q = Q, g = G, x = X}) ->
      crypto:sign(dss, sha, Digest, [P, Q, G, X]);
  
  sign(PlainText, sha, #'DSAPrivateKey'{p = P, q = Q, g = G, x = X}) ->
      crypto:sign(dss, sha, PlainText, [P, Q, G, X]);
  
  sign(Digest, DigestType, Key = {?'id-ecPublicKey', _, _}) ->
      sign(Digest, DigestType, ec_public_key_to_eckey(Key));
  