1 Encryption Enformation for notes
max edited this page 2020-03-20 05:35:41 -06:00

There are multiple levels to a secure encryption scheme. Hash - one way function. Put something in, get scrambled but consistent output. Hard to take the output and get original input.

Steps: Password is hashed, then hash again with a salt (unique, random series of bits). The salt is unique to each note so you can use the same password on each note without decreasing entropy.

A unique chunk of data is created. This is called padding. It is pushed to the front of the note. This increases entropy. Knowing that notes can contain natural language can be an attack vector. The padding helps to mitigate that. Then a unique tag is added to the end of the note. This is the verification tag. Then all of this is encrypted using AES (Advanced Encryption Standard) using a 256 bit key. (which is basically uncrackable with current technology and foreseeable technology like quantum computing.)

When the data is decrypted, the process is reversed. The padding is removed and the unique tag is verified against the data. If someone modified the data in any way, the tag will not pass and you will know someone touched yo shit.