mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-31 14:00:43 +00:00
* fix: replace AES-CBC with an AEAD mode: AES-CCM Closes #5705 AES-CBC is malleable and its use is dangereous without using a encrypt-then-mac approach. AES-CCM is an AEAD that is widely available and free to use (as opposed to OCB which was patented until 2021). AES-CCM is also stronger against nonce misuse than GCM. Until #5706 is fixed, nonce misuses are possible, so CCM seems preferable, even if it is slower (2-passes). * refactor: uses base64url encoding Custom encoding functions can be removed in favor the native base64url encoding scheme. * fix: derive unique encryption keys Closes #5706 Using the same encryption key to encrypt an unlimited amount of data/documents results in key wear-out, in particular when using AES-CBC or other cipher modes that are not very resistant to nonce misuse. This commit derives from the application secret a fresh encryption key and a fresh initialization vector for every document to encrypt. HKDF is used to derive these values and the context info parameter is set to a fresh random value called nonce. This nonce replaces the IV in the token. Using a random value as the context info instead of using it as the salt parameter is a recommendation from https://soatok.blog/2021/11/17/understanding-hkdf/ * make decrypt backwards compat and simplify code a bit --------- Co-authored-by: Mikael Finstad <finstaden@gmail.com> |
||
|---|---|---|
| .. | ||
| angular | ||
| audio | ||
| aws-s3 | ||
| aws-s3-multipart | ||
| box | ||
| companion | ||
| companion-client | ||
| compressor | ||
| core | ||
| dashboard | ||
| drag-drop | ||
| drop-target | ||
| dropbox | ||
| file-input | ||
| form | ||
| golden-retriever | ||
| google-drive | ||
| google-drive-picker | ||
| google-photos-picker | ||
| image-editor | ||
| informer | ||
| locales | ||
| onedrive | ||
| progress-bar | ||
| provider-views | ||
| react | ||
| react-native | ||
| redux-dev-tools | ||
| remote-sources | ||
| screen-capture | ||
| status-bar | ||
| store-default | ||
| store-redux | ||
| svelte | ||
| thumbnail-generator | ||
| transloadit | ||
| tus | ||
| unsplash | ||
| url | ||
| utils | ||
| vue | ||
| webcam | ||
| webdav | ||
| xhr-upload | ||
| zoom | ||