anchor.diff:  -spec get_private_key(SigningKeyPem) -> PrivateKey when
         SigningKeyPem :: pem_encoded_key(), PrivateKey :: ec_private_key().
   get_private_key(SigningKeyPem) ->
  -    [PemEntry] = public_key:pem_decode(SigningKeyPem),
  -    %% -record('PrivateKeyInfo',{version, privateKeyAlgorithm,
  -    %%         privateKey, attributes}).
  -    PrivateKeyInfo = public_key:pem_entry_decode(PemEntry),
  -
  -    %% So this isn't the end of it - the privateKey component of
  -    %% 'PrivateKeyInfo' is just an OCTET-STRING that needs to be further
  -    %% decoded as an ECPrivateKey.
  -    PrivKeyOctets = PrivateKeyInfo#'PrivateKeyInfo'.privateKey,
  -    %% -record('ECPrivateKey', {version, privateKey, parameters, publicKey}).
  -    {ok, ECPrivateKey} = 'OTP-PUB-KEY':decode('ECPrivateKey', PrivKeyOctets),
  -    ECPrivateKey.
  +    ExpType = 'PrivateKeyInfo',
  +    case public_key:pem_decode(SigningKeyPem) of
  +        [{ExpType, DER, _}] ->
  +            #'PrivateKeyInfo'{}=PKI = public_key:der_decode(ExpType, DER),
  +            %% So this isn't the end of it - the privateKey component of
  +            %% 'PrivateKeyInfo' is just an OCTET-STRING that needs to be
  +            %% further decoded as an ECPrivateKey.
  +            PrivKeyOctets = PKI#'PrivateKeyInfo'.privateKey,
  +            %% -record('ECPrivateKey', {version, privateKey, parameters,
  +            %%                          publicKey}).
  +            {ok, ECPK} = 'OTP-PUB-KEY':decode('ECPrivateKey', PrivKeyOctets),
  +            ECPK;
  +        [{UnexpType, _, _}] ->
  +            throw({unexpected_signing_key_type, UnexpType})
  +    end.
   
   %%--------------------------------------------------------------------
   %% @doc Generate a private key. This is mostly useful for testing.
  
positive.code:             Sig
      end.
  
  
negative.code: %% @end
  %%--------------------------------------------------------------------
  -compile({inline, [bsignature/2]}).
  bsignature(SigningInput, #'ECPrivateKey'{}=PK) when is_binary(SigningInput) ->
      Key = [PK#'ECPrivateKey'.privateKey, ?CURVE],
      Sig = crypto:sign(?ALGORITHM, ?DIGEST_TYPE, SigningInput, Key),
      maybe_der_decode_sig(Sig).
  
  %%--------------------------------------------------------------------
  