Commit 91b89fbd authored by Éloïs's avatar Éloïs
Browse files

[RFC17] decrease scrypt parameter r

parent b5b0b66e
......@@ -41,7 +41,7 @@ With following parameters for scrypt:
password = R
Salt = s
N = 1024
r = 12
r = 8
p = 1
dkLen = message length
```
......@@ -107,7 +107,7 @@ Let `t` the message type.
1. compute `L = l + x`
1. compute `Si'` and `Pr'`.
1. Compute `R = crypto_box_beforenm(Si', Pr')`
1. Generate symmetric encryption key `k = scrypt(R, salt, N: 1024, r: 12, p: 1, dkLen: L)`
1. Generate symmetric encryption key `k = scrypt(R, salt, N: 1024, r: 8, p: 1, dkLen: L)`
1. compute `encryptedMessage = m ^ k`
1. Create a bytes array `b` of length `L + 20`
1. Fill the three first bytes of `b` with content `0x27b601`
......@@ -132,7 +132,7 @@ Let `source` a base64 string read from comment field of a transaction document.
1. Compute `R = crypto_box_beforenm(Sr', Pi')`
1. compute `L = b.length - 20`
1. Let `salt` a bytes array from `b[4]` to `b[19]`
1. Generate symmetric encryption key `k = scrypt(R, salt, N: 1024, r: 12, p: 1, dkLen: L)`
1. Generate symmetric encryption key `k = scrypt(R, salt, N: 1024, r: 8, p: 1, dkLen: L)`
1. Let `encryptedMessage` a bytes array from `b[20]` to `b[b.length -1]`
1. compute `m = encryptedMessage ^ k`
1. Read `l = m[0]`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment