Adding sample project

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-05-24 09:46:35 +02:00
1 parent 7ce350825e
commit aecad37e64
18 files changed
+494 -150

No files matched your search

@@ -25,6 +25,9 @@ import com.ionspin.kotlin.crypto.util.xor
* or a UByteArray block
*/
interface ArgonBlockPointer {
companion object {
private val _emitLongArray : LongArray = longArrayOf(1L,2L)
}
val blockStartPosition: Int
fun pointerArithmetic(block : (Int, Int) -> Int) : ArgonBlockPointer
@@ -47,6 +50,8 @@ interface ArgonBlockPointer {
fun getAsUByteArray() : UByteArray
}
fun ArgonBlockPointer._emitLongArray() : LongArray = longArrayOf(0,1)
fun ArgonBlockPointer.getRowOfULongsForMixing(rowIndex: Int) : ULongArray {
// Each row has 16 unsigned longs (16 ulongs * 8 bytes = 128 bytes) -- Argon2 considers this as 2 word unsigned
// numbers, so strictly speaking argon representation is 8 * 8 matrix of 2 word unsigned numbers (registers
@@ -138,7 +138,7 @@ class ReadmeTest {
salt = "RandomSalt",
parallelism = 1,
tagLength = 64U,
requestedMemorySize = 4096U, //Travis build on mac fails with higher values
requestedMemorySize = 4096U,
numberOfIterations = 100,
key = "",
associatedData = "",