public class Syntex1 extends Digest
The Syntex family digests have size encoding. This version, syntex1, has the digest size of 36 bytes. More hard variants syntex2 and 3 are respectively longer
syntex1 pseudo code:
size_string = decimal_string(size(source))
s1 = sha256(source & size_string)
s2 = crc32(source & size_string & s1)
syntex1 = s1 & s2
The idea is, if there will be a way to effectively create documents with the same sha256 digest,
the additional requirement of either fit or respect source file size will present additional
level of the difficulty, and the necessity of match also crc32 will make attack on sha256 not
less effective on syntex code, while keeping its length enough short. As crc32 is calculate over
the sha256 hash too it does not increase vulnerability comparing to the sha256.
Created by sergeych on 14/02/16.
| Constructor | Description |
|---|---|
Syntex1() |
| Modifier and Type | Method | Description |
|---|---|---|
protected byte[] |
_digest() |
Override it to calculate and return digest of all processed data.
|
protected void |
_update(byte[] data,
int offset,
int size) |
Override to process sequence of bytes.
|
int |
getLength() |
Override to provide digest length in bytes.
|
base64Digest, base64Digest, base64Digest, base64Digest, digest, digest, digest, digest, getChunkSize, hexDigest, hexDigest, hexDigest, hexDigest, update, update, update, updateprotected void _update(byte[] data,
int offset,
int size)
Digestprotected byte[] _digest()
Digest