<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK][EFL] CryptoDigest implementation depends on GnuTLS with LGPLv3+/GPLv2+ deps"
   href="https://bugs.webkit.org/show_bug.cgi?id=162913#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK][EFL] CryptoDigest implementation depends on GnuTLS with LGPLv3+/GPLv2+ deps"
   href="https://bugs.webkit.org/show_bug.cgi?id=162913">bug 162913</a>
              from <span class="vcard"><a class="email" href="mailto:olivier.blin&#64;softathome.com" title="Olivier Blin &lt;olivier.blin&#64;softathome.com&gt;"> <span class="fn">Olivier Blin</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=162913#c4">comment #4</a>)

<span class="quote">&gt; Perhaps the SubtleCrypto code can be replace with a libgcrypt
&gt; implementation. </span >
&gt;
<span class="quote">&gt; And then the code for CSP code can use the hash functions from SubtleCrypto
&gt; if this was selected at build time. Otherwise it can fall back to our
&gt; simple/non-optimized internal implementations of sha-1/sha-2.</span >

CSP is using CryptoDigest directly.
Maybe the CryptoAlgorithmHMAC platform-specific implementations in Source/WebCore/crypto should be replaced by a common implementation that uses CryptoDigest.
This is what is done in Source/WebCore/crypto/algorithms/ implementations already.

By the way, it looks a bit weird to have platform specific implementations of crypto in both and Source/WebCore/crypto/&lt;platform&gt; (SubtleCrypto) and Source/WebCore/platform/crypto/&lt;platform&gt;/ (CryptoDigest)

I am going to propose both a libgcrypt implementation and an OpenSSL implmentation of CryptoDigest.

Another alternative would be to resurrect the gcrypt backend in gnutls, since performance improved since its removal (nettle was preferred at the time).
See <a href="https://www.gnupg.org/blog/20131215-gcrypt-bench.html">https://www.gnupg.org/blog/20131215-gcrypt-bench.html</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>