Scrapeless Wiki

What Is Crypto Fingerprinting? – Definition and How It Works

Informational P3 what is crypto fingerprinting

Learn how Web Crypto algorithm support and timing reveal the browser build and platform behind a session.

Crypto fingerprinting probes the Web Crypto API β€” which algorithms it supports, how it errors, and how fast it performs β€” to characterise the browser and platform.

1. Algorithm Support Varies by Build

The Web Crypto API is standardised, but coverage differs between engines and versions:

async function supported() {
  const algs = ['RSASSA-PKCS1-v1_5','RSA-PSS','RSA-OAEP','ECDSA','ECDH',
                'AES-CTR','AES-CBC','AES-GCM','AES-KW','HMAC',
                'Ed25519','X25519','PBKDF2','HKDF'];
  const out = {};
  for (const name of algs) {
    try { await crypto.subtle.generateKey({name, ...params(name)}, true, uses(name)); out[name] = true; }
    catch { out[name] = false; }
  }
  return out;
}

The support matrix is a compact signature. Ed25519 and X25519 are useful discriminators, since they arrived at different times in different engines β€” so their presence or absence brackets the browser version.

2. Curve and Parameter Support

Beyond algorithm names, the accepted parameters differ: which named elliptic curves are available, which key sizes are permitted, which hash functions pair with which signature schemes.

A browser accepting P-521 but rejecting a particular curve, with a specific set of permitted RSA key sizes, produces a finer signature than the algorithm list alone.

3. Error Messages Are Distinctive

When an unsupported algorithm is requested, engines throw different error types with different messages. Those strings are engine-specific and version-specific:

  • Different DOMException names for the same invalid input.
  • Different message wording.
  • Different behaviour for malformed parameters β€” throw versus reject.

Because the messages are not standardised, they identify the engine more precisely than the success cases do. This is the same principle that makes error-message fingerprinting effective across other APIs.

4. Timing Reveals Hardware Acceleration

Cryptographic operations may be hardware-accelerated. AES with AES-NI is dramatically faster than a software implementation, so timing a fixed workload indicates whether acceleration is present:

const key = await crypto.subtle.generateKey({name:'AES-GCM', length:256}, true, ['encrypt']);
const data = new Uint8Array(1 << 20);
const t0 = performance.now();
await crypto.subtle.encrypt({name:'AES-GCM', iv: new Uint8Array(12)}, key, data);
const elapsed = performance.now() - t0;

That places the session on a hardware class β€” and, combined with a claimed device, is a consistency check that property spoofing cannot satisfy.

5. Secure Context Requirement

crypto.subtle is only available in secure contexts β€” HTTPS or localhost. Its absence therefore indicates an insecure context rather than an old browser, which is itself information about how the page was loaded.

A session where crypto.subtle is missing on an HTTPS page is anomalous and points at a restricted or unusual environment.

6. crypto.randomUUID and Feature Bracketing

Smaller additions to the crypto namespace are useful version markers:

typeof crypto.randomUUID          // added at a known point in each engine
typeof crypto.getRandomValues     // long-standing
typeof crypto.subtle              // secure contexts only

Checking a handful of these brackets the browser version tightly β€” and a user agent claiming a version whose features are absent is a contradiction.

7. Practical Guidance

  1. Do not patch the crypto API. Its error behaviour and timing are cross-checkable, and patching a native method is separately detectable.
  2. Keep the claimed browser version consistent with the algorithm and feature support actually present.
  3. Use a real browser build rather than a modified one, so the support matrix is genuinely correct.
  4. Provide real hardware so acceleration timing matches the claimed device class.
  5. Treat this as a low-weight signal individually, and a strong one as a version cross-check.

8. Summary

Crypto fingerprinting probes Web Crypto algorithm and curve support, engine-specific error messages, feature presence such as randomUUID and Ed25519, and operation timing that reveals hardware acceleration.

Its main value to a defender is bracketing the real browser version and platform, which makes it an effective cross-check against a spoofed user agent β€” so the durable approach is a genuine, unmodified browser build on real hardware rather than any attempt to patch the surface.