mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
sync: Use 600,000 iterations for pbkdf2. (#3251)
Per [wikipedia](https://en.wikipedia.org/wiki/PBKDF2), "In 2023, OWASP recommended to use 600,000 iterations for PBKDF2-HMAC-SHA256..."
This commit is contained in:
parent
323bd23251
commit
4008069a70
9 changed files with 11 additions and 10 deletions
|
@ -7,7 +7,7 @@ Encryption is not used for local (on-disk) sync, but is used for all cases where
|
|||
|
||||
## Key Derivation
|
||||
|
||||
The client derives the 32-byte encryption key from the configured encryption secret using PBKDF2 with HMAC-SHA256 and 100,000 iterations.
|
||||
The client derives the 32-byte encryption key from the configured encryption secret using PBKDF2 with HMAC-SHA256 and 600,000 iterations.
|
||||
The salt value depends on the implementation of the protocol, as described in subsequent chapters.
|
||||
|
||||
## Encryption
|
||||
|
|
|
@ -4,7 +4,7 @@ use crate::errors::{Error, Result};
|
|||
use ring::{aead, pbkdf2, rand, rand::SecureRandom};
|
||||
use uuid::Uuid;
|
||||
|
||||
const PBKDF2_ITERATIONS: u32 = 100000;
|
||||
const PBKDF2_ITERATIONS: u32 = 600000;
|
||||
const ENVELOPE_VERSION: u8 = 1;
|
||||
const AAD_LEN: usize = 17;
|
||||
const TASK_APP_ID: u8 = 1;
|
||||
|
|
|
@ -25,7 +25,7 @@ def gen(
|
|||
encryption_secret,
|
||||
salt,
|
||||
digestmodule=hashlib.sha256,
|
||||
iterations=100000,
|
||||
iterations=600000,
|
||||
).read(32)
|
||||
|
||||
# create a nonce
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
®
|
||||
<EFBFBD>KŸo]æâʶ£‘†‘McØ\ï©QL)cHÂ;ÚÎ-:
|
||||
k_Я╔uз▄x9ФmЙшg╦└┬%j╜[с5щ+╧k≤В╓╪/│
|
|
@ -1 +1 @@
|
|||
%<25>ۇ <09><07><>ko¹<6F>{hكb<D983><62><EFBFBD>
<0A><><02>ˁLqU
|
||||
[<5B>+Æ¢BÞÞYök‹Ch58-éJóCî¢<Ø<>š¬ô)Å›
|
|
@ -1 +1 @@
|
|||
κsq<0F><>nΟΐk,Βν\‹ΕΘ;W¶<΄'
®Ξ;{Π<>
|
||||
ιΏYΖΐ#π_D<15><>υ>Ο½ά<C2BD>jή<6A>Ο3FσΖ#–<>BΔQ
|
|
@ -1 +1,2 @@
|
|||
ñ±Ÿâ–ajJ›šÕ·ïq\IF4¤ó<C2A4>YÓ£
€$‹ë9W
|
||||
テP*トレヲ\嵓搖`SナUワ<55>キ~<7E>Wcサ`ン戛ニン
|
||||
オ
|
|
@ -1 +1,2 @@
|
|||
cR<06>ùË|¯|iKoÌÀ˜³+t•U|Ñ™ï˜& —BIŸ·3
|
||||
cl<EFBFBD>;<3B>L+ѩ<><D1A9>'p<>f?
|
||||
jn<0E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v<EFBFBD><1D>O\<5C><>
|
|
@ -1 +1 @@
|
|||
PRÇojÇ—Þgs²&vMØYÔn<>œ?ƒÛcå¼~:œ
|
||||
Êx-÷ãàLh¿Aí4?A¸°T3çQ¦Ñe‰R«VW•±
|
Loading…
Add table
Add a link
Reference in a new issue