diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-11 20:10:55 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-11 20:10:55 -0400 |
commit | f5a53103a95b93f5cdb3cfe0c7043c190e591f0c (patch) | |
tree | 834ff21f410a3502b268cb95a0a679a76311f4e3 /keysafe.hs | |
parent | 4ff25ca59ecb0ccba00b60dd542e8bc7e99b1206 (diff) | |
download | keysafe-f5a53103a95b93f5cdb3cfe0c7043c190e591f0c.tar.gz |
show brute force cost estimate
Diffstat (limited to 'keysafe.hs')
-rw-r--r-- | keysafe.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -10,6 +10,7 @@ module Main where import Types import Tunables import Encryption +import Cost import Shard import Storage import Storage.LocalFiles @@ -22,12 +23,15 @@ main = do storedemo :: IO () storedemo = do kek <- genKeyEncryptionKey tunables name password + putStrLn "Very rough estimate of cost to brute-force the password:" + print $ estimateAttack spotAWS $ estimateBruteforceOf kek + (passwordEntropy password) let esk = encrypt kek secretkey let sis = shardIdents tunables name keyid shards <- genShards esk tunables print =<< mapM (uncurry (storeShard localFiles)) (zip (getIdents sis) shards) where - password = Password "foo" + password = Password "correct horse battery staple" name = Name "bar" tunables = testModeTunables -- defaultTunables keyid = KeyId gpgKey "foobar" |