-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
While testing https://github.com/gustavnikolaj/keepass-dmenu, I have found that there is an error in the keepass.io library when attempting to open a Keepass2 Database which has been set up to not use a key file.
The full error can be found below.
$ git clone https://github.com/gustavnikolaj/keepass-dmenu
$ cd keepass-dmenu
$ npm install
[output truncated]
$ ./bin/keepass-dmenu-cli.js --database ../testdb-test1234.kdbx
{ _: [],
database: '../testdb-test1234.kdbx',
'$0': '/usr/bin/node ./bin/keepass-dmenu-cli.js' }
Load Database File: Started timer at 1463839386388
crypto.js:184
this._handle.initiv(cipher, toBuf(key), toBuf(iv));
^
Error: Invalid key length
at Error (native)
at new Cipheriv (crypto.js:184:16)
at Object.Cipheriv (crypto.js:182:12)
at Function.dejavu.Class.declare.$statics.transformKey (/home/jamie/workspaces/keepass-dmenu/keepass-dmenu/node_modules/keepass.io/lib/Utility/Cryptography.js:48:25)
at Function.wrapper (/home/jamie/workspaces/keepass-dmenu/keepass-dmenu/node_modules/dejavu/dist/node/strict/Class.js:169:30)
at Function.dejavu.Class.declare.$statics.buildMasterKey (/home/jamie/workspaces/keepass-dmenu/keepass-dmenu/node_modules/keepass.io/lib/Utility/Cryptography.js:29:32)
at Function.wrapper (/home/jamie/workspaces/keepass-dmenu/keepass-dmenu/node_modules/dejavu/dist/node/strict/Class.js:169:30)
at Instance.buildMasterKey (/home/jamie/workspaces/keepass-dmenu/keepass-dmenu/node_modules/keepass.io/lib/KeePass/KeePassDatabase.js:113:37)
at Instance.wrapper (/home/jamie/workspaces/keepass-dmenu/keepass-dmenu/node_modules/dejavu/dist/node/strict/Class.js:169:30)
at /home/jamie/workspaces/keepass-dmenu/keepass-dmenu/node_modules/mout/function/bind.js:13:23
Attached is the database testdb-test1234, which can be accessed with the password test1234.