aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/key_store_passphrase.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-09-06 00:07:57 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-11-14 23:56:58 +0800
commit178da7c6a94718389e7192d87df5ee42e7223bc3 (patch)
tree010f49656b5d1656cf24a4ff9bac35788dd9959f /accounts/key_store_passphrase.go
parentd89ea3e6f90c32a97bad58b82a15af0d81f4250e (diff)
downloadgo-tangerine-178da7c6a94718389e7192d87df5ee42e7223bc3.tar.gz
go-tangerine-178da7c6a94718389e7192d87df5ee42e7223bc3.tar.zst
go-tangerine-178da7c6a94718389e7192d87df5ee42e7223bc3.zip
mobile: initial wrappers for mobile support
Diffstat (limited to 'accounts/key_store_passphrase.go')
-rw-r--r--accounts/key_store_passphrase.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/accounts/key_store_passphrase.go b/accounts/key_store_passphrase.go
index 3a5155e13..4a777956d 100644
--- a/accounts/key_store_passphrase.go
+++ b/accounts/key_store_passphrase.go
@@ -46,12 +46,20 @@ import (
const (
keyHeaderKDF = "scrypt"
- // n,r,p = 2^18, 8, 1 uses 256MB memory and approx 1s CPU time on a modern CPU.
+ // StandardScryptN is the N parameter of Scrypt encryption algorithm, using 256MB
+ // memory and taking approximately 1s CPU time on a modern processor.
StandardScryptN = 1 << 18
+
+ // StandardScryptP is the P parameter of Scrypt encryption algorithm, using 256MB
+ // memory and taking approximately 1s CPU time on a modern processor.
StandardScryptP = 1
- // n,r,p = 2^12, 8, 6 uses 4MB memory and approx 100ms CPU time on a modern CPU.
+ // LightScryptN is the N parameter of Scrypt encryption algorithm, using 4MB
+ // memory and taking approximately 100ms CPU time on a modern processor.
LightScryptN = 1 << 12
+
+ // LightScryptP is the P parameter of Scrypt encryption algorithm, using 4MB
+ // memory and taking approximately 100ms CPU time on a modern processor.
LightScryptP = 6
scryptR = 8