Content deleted Content added
m Dating maintenance tags: {{Not in citation given}} |
m Copy edits |
||
(31 intermediate revisions by 22 users not shown) | |||
Line 1:
{{Short description|Key derivative function}}
{{Multiple issues|
{{advert|date=October 2017}}<!-- self-promotion by one of the authors of the algo: most of the article is written by a single-purpose account "Erandrade" -->
{{primary sources|date=October 2017}}
{{
}}
'''Lyra2''' is a [[Password hashing|password hashing scheme]] (PHS) that can also work as a [[key derivation function]] (KDF). It received
Lyra2 was designed by Marcos A. Simplicio Jr., Leonardo C. Almeida, Ewerton R. Andrade, Paulo C. F. dos Santos, and [[Paulo S. L. M. Barreto]] from [[Polytechnic School of the University of São Paulo|Escola Politécnica da Universidade de São Paulo]].<ref name=":0">{{Cite web|url=https://eprint.iacr.org/2015/136|title=Cryptology ePrint Archive: Report 2015/136|website=eprint.iacr.org|access-date=2016-03-22}}</ref>
*
*
*
*
* Lyra2 is released under [[public domain]], and provides two main extensions:<ref name="lyra2RefGuide">{{Cite web|url=https://password-hashing.net/submissions/specs/Lyra2-v3.pdf|title=The Lyra2 reference guide|
* Lyra2-δ, gives the user better control over the algorithm's bandwidth usage
* Lyra2''p'', takes advantage of [[Parallel computing|parallelism]] capabilities on the legitimate user's platform
This algorithm enables parameterization in terms of:<ref name="lyra2RefGuide"/>▼
▲This algorithm enables parameterization in terms of:<ref name="lyra2RefGuide" />
* execution time (time cost <math>T</math>)
* memory required (number of rows <math>R</math>, and number of columns <math>C</math>)
Line 21 ⟶ 24:
* number of rounds performed for the underlying permutation function (<math>\rho</math>)
* number of bits to be used in rotations (<math>\omega</math>)
* output length
==Strengths ==
The core strengths of the algorithm are as follows:<ref name="lyra2ToC"/><ref name="lyra2RefGuide"/>
*High resistance against processing-memory
*Fast due to use of reduced-round sponge function in the algorithm's core.▼
▲*High resistance against processing-memory tradeoffs: estimated processing costs of [[Time/memory/data tradeoff attack|attacks with low memory usage]] involve a factor that grows exponentially with time cost due to recomputations
*Can provide outputs of any desired length, behaving as a [[
▲*Memory and time costs can be decoupled, allowing the resources' usage to be fine-tuned
*Design combines resistance to [[side-channel attack]]s (during the whole Setup phase) and to attacks involving cheap (hence, low-speed) [[Computer data storage|memory devices]], aiming to balance such conflicting requirements.▼
▲*Fast due to use of reduced-round sponge function in the algorithm's core
*
▲*Can provide outputs of any desired length, behaving as a [[Key derivation function|Key Derivation Function]] (KDF)
**Support for parallelism
▲*Design combines resistance to [[side-channel attack]]s (during the whole Setup phase) and to attacks involving cheap (hence, low-speed) [[Computer data storage|memory devices]], aiming to balance such conflicting requirements
**Capability of using different underlying sponge functions depending on the target platform (e.g., [[BLAKE2
▲*Considers a wide range of configurations for protecting against attacking platforms while optimizing execution on legitimate platform, such as:
**Ability to raise the algorithm's memory bandwidth usage. (note: the original specification is expected to max out the bandwidth in current machines, but this feature may be useful for future hardware)▼
▲**Support for parallelism, for [[Multi-core processor|multicore platforms]], without giving much advantage to [[Graphics processing unit|GPU]]-based attacks
▲**Capability of using different underlying sponge functions depending on the target platform (e.g., [[BLAKE2|Blake2b]] for software implementations; [[Keccak]] for hardware implementations; BlaMka for additional resistance against hardware platforms; etc.)
▲**Ability to raise the algorithm's memory bandwidth usage (note: the original specification is expected to max out the bandwidth in current machines, but feature may be useful for future hardware)
==Design==
As any PHS, Lyra2 takes as input a [[salt (cryptography)|salt]] and a
Internally, the scheme's memory is organized as a matrix that is expected to remain in memory during the whole password hashing process
The construction and visitation of the matrix is done using a stateful combination of the absorbing, squeezing and duplexing operations of the underlying [[Sponge function|sponge]] (i.e., its internal state is never reset to zero), ensuring the sequential nature of the whole process.
Also, the number of times the matrix's cells are revisited after initialization is defined by the user, allowing Lyra2's execution time to be fine-tuned according to the target platform's resources.
# *** Algorithm without parallelism ***▼
# ** Bootstrapping phase: Initializes the sponge's state and local variables▼
{{pre|1=<nowiki>
# Byte representation of input parameters (others can be added)
params = outlen || len(password) || len(salt) || t_cost || m_cost || C
Line 95:
row1 = 1
prev1 = 0
</nowiki>
# Initializes M[0], M[1] and M[2]
Line 130:
sqrt = 2 * sqrt
# Visitation Loop: (2 * m_cost * t_cost) rows revisited in pseudorandom fashion
Line 152:
prev1 = row1
# Absorbs a final column with a full-round sponge
Line 162:
# Provides outlen-long bitstring as output
return output
}}
<pre>
for each i in [0
# Byte representation of input parameters (others can be added)
Line 186 ⟶ 187:
prevP = 0
# Initializes M_i[0], M_i[1] and M_i[2]
Line 228 ⟶ 229:
syncThreads()
wnd = m_cost / (2 * P)
Line 261 ⟶ 262:
syncThreads()
# Absorbs a final column with a full-round sponge
Line 271 ⟶ 272:
# Provides outlen-long bitstring as output
return output_0 ^ ... ^ output_{P-1}
</pre>
==Security analysis==
Against Lyra2, the processing cost of attacks using <math>1/2^{n+2} </math> of the amount of memory employed by a legitimate user is expected to be between <math>O(2^{2nT}R^{3})</math> and <math>O(2^{2nT}R^{n+2})</math>, the latter being a better estimate for <math>n \gg 1</math>, instead of the <math>O(R)</math> achieved when the amount of memory is <math>O(R)</math>, where <math>T</math> is a user-defined parameter to define a processing time.
This compares well to [[
Nonetheless, in practice these solutions usually involve a value of <math>R</math> (memory usage) lower than those attained with the Lyra2 for the same processing time.<ref name=":3">{{Cite web|url=http://article.gmane.org/gmane.comp.security.phc/2237|title=Gmane -- Another PHC candidates
==Performance==
[[File:Lyra2-Bench.pdf|thumb|1050x1050px|center|Performance of SSE-enabled Lyra2, for C = 256, ρ = 1, p = 1, and different T and R settings, compared with SSE-enabled
The processing time obtained with a SSE single-core implementation of Lyra2 are illustrated in the hereby shown figure. This figure was extracted from,<ref name="
The results depicted correspond to the average execution time of Lyra2 configured with <math>C=256</math>, <math>\rho=1</math>, <math>b=768</math> bits (i.e., the inner state has 256 bits), and different <math>T</math> and <math>R</math> settings, giving an overall idea of possible combinations of parameters and the corresponding usage of resources.
Line 289 ⟶ 290:
As shown in this figure, Lyra2 is able to execute in: less than 1 s while using up to 400 MB (with <math>R = 2^{14}</math> and <math>T=5</math>) or up to 1 GB of memory (with <math>R \approx 4.2\cdot10^{4}</math> and <math>T=1</math>); or in less than 5 s with 1.6 GB (with <math>R = 2^{16}</math> and <math>T=6</math>).
All tests were performed on an [[List of Intel Xeon microprocessors|Intel Xeon E5-2430]] (2.20 GHz with 12 Cores, 64 bits) equipped with 48 GB of [[Dynamic random-access memory|DRAM]], running [[Ubuntu (operating system)|Ubuntu]] 14.04 LTS 64 bits, and the source code was compiled using [[GNU Compiler Collection|gcc]] 4.9.2.<ref name="
==References==
|