mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
Several interfaces that return a high resolution time require that time to be coarsened, in order to prevent timing attacks. This implementation simply reduces the resolution of the returned timestamp to the minimum values given in the specification. Further work may be needed to make our implementation more robust to the kind of attacks that this mechanism is designed to prevent.
23 lines
676 B
HTML
23 lines
676 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>window.performance.now should not enable timing attacks</title>
|
|
<link rel="author" title="W3C" href="http://www.w3.org/" />
|
|
<link rel="help" href="http://w3c.github.io/hr-time/#privacy-security"/>
|
|
<script src="../resources/testharness.js"></script>
|
|
<script src="../resources/testharnessreport.js"></script>
|
|
<script src="resources/timing-attack.js"></script>
|
|
<script>
|
|
run_test(/*isolated=*/false);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>Description</h1>
|
|
<p>The recommended minimum resolution of the Performance interface should be set to 100 microseconds for non-isolated contexts.</p>
|
|
|
|
<div id="log"></div>
|
|
|
|
</body>
|
|
</html>
|