Scrypt was created by Colin Percival and is specified in RFC 7914 - The scrypt Password-Based Key Derivation Function
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static void | |
| private static void | |
| private static void | |
| public static byte[] | Returns: the generated key.the bytes of the pass phrase. P, byte[] the salt to use for this invocation. S, int CPU/Memory cost parameter. Must be larger than 1, a power of 2 and less than
N, int 2^(128 * r / 8).the block size, must be >= 1. r, int Parallelization parameter. Must be a positive integer less than or equal to
p, int Integer.MAX_VALUE / (128 * r * 8).the length of the key to generate. dkLen)Generate a key using the scrypt key derivation function. |
| private static boolean | |
| private static byte[] | |
| private static byte[] | |
| private static void | |
| private static void |
| SCryptImpl | back to summary |
|---|---|
| private SCryptImpl() | |
| BlockMix | back to summary |
|---|---|
| private static void BlockMix(int[] B, int[] X1, int[] X2, int[] Y, int r) | |
| Clear | back to summary |
|---|---|
| private static void Clear(byte[] array) | |
| Clear | back to summary |
|---|---|
| private static void Clear(int[] array) | |
| ClearAll | back to summary |
|---|---|
| private static void ClearAll(int[][] arrays) | |
| generate | back to summary |
|---|---|
| public static byte[] generate(byte[] P, byte[] S, int N, int r, int p, int dkLen) Generate a key using the scrypt key derivation function.
| |
| isPowerOf2 | back to summary |
|---|---|
| private static boolean isPowerOf2(int x) | |
| MFcrypt | back to summary |
|---|---|
| private static byte[] MFcrypt(byte[] P, byte[] S, int N, int r, int p, int dkLen) | |
| SingleIterationPBKDF2 | back to summary |
|---|---|
| private static byte[] SingleIterationPBKDF2(byte[] P, byte[] S, int dkLen) | |
| SMix | back to summary |
|---|---|
| private static void SMix(int[] B, int BOff, int N, int r) | |
| Xor | back to summary |
|---|---|
| private static void Xor(int[] a, int[] b, int bOff, int[] output) | |