MatrixAI / js-encryptedfs

Encrypted Filesystem for TypeScript/JavaScript Applications
https://polykey.com
Apache License 2.0
10 stars 3 forks source link

Crypto - initiVector Variable Length #21

Closed robert-cronin closed 4 years ago

robert-cronin commented 4 years ago

If an initVector is not provided to the Crypto class upon initialisation, a random vector is generated of length 16 bytes. Should this be variable length? Plausibly one could assume this functionality is already available to users who specify their own initiVector but there are methods that cannot be changed. My suggestion is to use the length of the existing initVector to drive any further creation of initVectors, this lets the user control the initVector length.