private static bool CheckPublicKeyFormat()

in net/JetBrains.DownloadPgpVerifier/src/PgpSignaturesVerifier.cs [206:223]


    private static bool CheckPublicKeyFormat(PgpPublicKey key, Action<string> onError)
    {
      if (key == null) throw new ArgumentNullException(nameof(key));
      if (onError == null) throw new ArgumentNullException(nameof(onError));
      if (key.Version != 4)
      {
        onError($"Only PGP public keys version 4 are supported. KeyID={key.KeyId:X16}");
        return false;
      }

      if (key.BitStrength < 2048)
      {
        onError($"Only PGP public keys bits>=2048 are supported. KeyID={key.KeyId:X16}");
        return false;
      }

      return true;
    }