]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: TFA: default to a 160 bit secret
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 28 Oct 2019 11:20:43 +0000 (12:20 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 29 Oct 2019 08:43:02 +0000 (09:43 +0100)
This is base32, so we use only 5 bit per byte to make things simple,
so 32 byte * 5 bit/byte = 160 bit of entropy

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
www/manager6/dc/TFAEdit.js

index 7d19127dcd520001aea4e1cd8491ef0fc387ffb9..8f3017f6ac2c9eb5bff908c2766b7c2d93985515 100644 (file)
@@ -289,7 +289,7 @@ Ext.define('PVE.window.TFAEdit', {
 
        randomizeSecret: function() {
            var me = this;
-           var rnd = new Uint8Array(16);
+           var rnd = new Uint8Array(32);
            window.crypto.getRandomValues(rnd);
            var data = '';
            rnd.forEach(function(b) {