anchor.diff:      {Y,  #'Dss-Parms'{p=P, q=Q, g=G}};
   extract_public_key(#'ECPrivateKey'{parameters = {namedCurve,OID},
   				   publicKey = Q}) ->
  -    {#'ECPoint'{point=Q}, {namedCurve,OID}}.
  +    {#'ECPoint'{point=Q}, {namedCurve,OID}};
  +extract_public_key(#{engine:=_, key_id:=_, algorithm:=Alg} = M) ->
  +    case {Alg, crypto:privkey_to_pubkey(Alg, M)} of
  +        {rsa, [E,N]} ->
  +            #'RSAPublicKey'{modulus = N, publicExponent = E};
  +        {dss, [P,Q,G,Y]} ->
  +            {Y, #'Dss-Parms'{p=P, q=Q, g=G}}
  +    end.
  +
   
   
   verify_host_key(#ssh{algorithms=Alg}=SSH, PublicKey, Digest, {AlgStr,Signature}) ->
  
positive.code:     <<Payload:PayloadLen/binary, _/binary>> = PayloadAndPadding,
      Payload.
  
  sign(SigData, HashAlg,  #'DSAPrivateKey'{} = Key) ->
      DerSignature = public_key:sign(SigData, HashAlg, Key),
      #'Dss-Sig-Value'{r = R, s = S} = public_key:der_decode('Dss-Sig-Value', DerSignature),
      <<R:160/big-unsigned-integer, S:160/big-unsigned-integer>>;
  sign(SigData, HashAlg, Key = #'ECPrivateKey'{}) ->
      DerEncodedSign =  public_key:sign(SigData, HashAlg, Key),
      #'ECDSA-Sig-Value'{r=R, s=S} = public_key:der_decode('ECDSA-Sig-Value', DerEncodedSign),
      <<?Empint(R),?Empint(S)>>;
  sign(SigData, HashAlg, Key) ->
      public_key:sign(SigData, HashAlg, Key).
  
  verify(PlainText, HashAlg, Sig, {_,  #'Dss-Parms'{}} = Key) ->
      case Sig of
  
negative.code: 
  %%%----------------------------------------------------------------
  
  valid_key_sha_alg(#{engine:=_, key_id:=_}, _Alg) -> true; % Engine key
  
  valid_key_sha_alg(#'RSAPublicKey'{}, 'rsa-sha2-512') -> true;
  valid_key_sha_alg(#'RSAPublicKey'{}, 'rsa-sha2-384') -> true;
  valid_key_sha_alg(#'RSAPublicKey'{}, 'rsa-sha2-256') -> true;
  