Commit 1cb3abe4 authored by Adam Langley's avatar Adam Langley Committed by Commit Bot

webauthn: rotate caBLEv2 QR code.

Previously the contents of the QR code changed because the keys were
continually rotated. The latency of BLE adverts turned out to be
significant however, so the acceptance window grew to the point where it
wasn't providing very much security.

The contents of the QR code no longer changes so this change animates
the QR code by rotating the masking function applied.

BUG=1002262

Change-Id: I5d1a179d0400b35e3840bf9fce356a038e5c2ead
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2441300Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Commit-Queue: Adam Langley <agl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812715}
parent 3c67e3a4
...@@ -52,7 +52,8 @@ class QRView : public views::View { ...@@ -52,7 +52,8 @@ class QRView : public views::View {
void RefreshQRCode(base::span<const uint8_t> new_qr_data) { void RefreshQRCode(base::span<const uint8_t> new_qr_data) {
state_ = (state_ + 1) % 6; state_ = (state_ + 1) % 6;
base::Optional<QRCode::GeneratedCode> code = qr_.Generate(new_qr_data); base::Optional<QRCode::GeneratedCode> code =
qr_.Generate(new_qr_data, /*mask=*/state_);
DCHECK(code); DCHECK(code);
qr_tiles_ = code->data; qr_tiles_ = code->data;
SchedulePaint(); SchedulePaint();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment