nippy/taoensso.nippy.crypto.html

28 lines
2.8 KiB
HTML
Raw Normal View History

2013-06-12 08:24:36 +00:00
<!DOCTYPE html>
<html><head><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>taoensso.nippy.crypto documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Nippy 1.3.0-alpha2 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><span>Namespaces</span></h3><ul><li><a href="taoensso.nippy.html"><span>taoensso.nippy</span></a></li><li><a href="taoensso.nippy.benchmarks.html"><span>taoensso.nippy.benchmarks</span></a></li><li class="current"><a href="taoensso.nippy.crypto.html"><span>taoensso.nippy.crypto</span></a></li><li><a href="taoensso.nippy.utils.html"><span>taoensso.nippy.utils</span></a></li></ul></div><div class="sidebar" id="vars"><h3>Public Vars</h3><ul><li><a href="taoensso.nippy.crypto.html#var-aes128-cached"><span>aes128-cached</span></a></li><li><a href="taoensso.nippy.crypto.html#var-aes128-salted"><span>aes128-salted</span></a></li></ul></div><div class="namespace-docs" id="content"><h2>taoensso.nippy.crypto documentation</h2><pre class="doc">Alpha - subject to change.
Simple no-nonsense crypto with reasonable defaults. Because your Clojure data
deserves some privacy.</pre><div class="public" id="var-aes128-cached"><h3>aes128-cached</h3><div class="usage"></div><pre class="doc">USE CASE: You want only a small, finite number of passwords (e.g. a limited
number of staff/admins, or you'll be using a single password to
encrypt many items).
IMPLEMENTATION: Uses a _very_ expensive (but cached) key hash, and no salt.
PROS: Great amortized encryption/decryption speed. Expensive key hash makes
attacking any particular key very difficult.
CONS: Using a small number of keys for many encrypted items means that if any
key _is_ somehow compromised, _all_ items encrypted with that key are
compromised.
Faster than `aes128-salted`, and harder to attack any particular key - but
increased danger if a key is somehow compromised.</pre></div><div class="public" id="var-aes128-salted"><h3>aes128-salted</h3><div class="usage"></div><pre class="doc">USE CASE: You want more than a small, finite number of passwords (e.g. each
item encrypted will use a unique user-provided password).
IMPLEMENTATION: Uses a relatively cheap key hash, but automatically salts
every key.
PROS: Each key is independent so would need to be attacked independently.
CONS: Key caching impossible, so there's an inherent trade-off between
encryption/decryption speed and the difficulty of attacking any
particular key.
Slower than `aes128-cached`, and easier to attack any particular key.</pre></div></div></body></html>