Common use of Parallel Hashing Clause in Contracts

Parallel Hashing. ‌ 4.1 illustrates that this is only part of the solution. More critically, the execution time depends on being able to exploit the extreme levels of parallelism that are inherent to hash-based signatures. Here parallelism does not necessarily imply parallel execution, but rather independent parallel data streams. The current interface to hash functions is provided in the form of the MessageDigest class. After instantiating an object for a specific digest function, say SHA-256, a user can add additional data by calling the update(byte[] inBuff, short inOffset, short inLength) method, and obtain the final digest by calling doFinal(byte[] inBuff, short inOffset, short inLength, byte[] outBuff, short outOffset). We propose duals of these methods, following an almost identical API: updateParallel(byte[] inBuff, short inOffset, short inBlockLength, short numberOfBlocks), and doFinalParallel(byte[] inBuff, short inOffset, short inBlockLength, short numberOfBlocks, byte[] outBuff, short outOffset). Here, inBuff provides numberOfBlocks sequential inputs of inBlockLength bytes, and output is written to outBuff analogously. Providing an inconsistent number of inputs (i.e. different numberOfBlocks) for update and doFinal calls could be treated as an error but it may be ben- eficial to instead fix the numberOfBlocks at the time of construction of the MessageDigest object. For hash-based signatures this decision is equivalent, as the relevant hash function calls all require arguments of the same form. Both options have serious effects on the underlying implementations, as these mod- ifications suggest maintaining a (runtime-determined) number of intermediate hash function states. If this proves to be infeasible, a natural restriction would be to drop the parallel updateParallel method12. While this reduces flexibility 12 It is also possible to reach a similar invariance by fixing numberOfBlocks, but this still requires multiple hash-function intermediate states in transient memory.

Appears in 2 contracts

Sources: End User Agreement, End User Agreement